Skip to content

Commit

Permalink
Merge pull request #2 from ChenglongLiu/chenglong/fix
Browse files Browse the repository at this point in the history
Update SecurityPolicy patch operation
  • Loading branch information
ChenglongLiu authored Jan 5, 2022
2 parents d8ac4f9 + d390ac7 commit 898caaf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2856,12 +2856,12 @@
"type": "string"
},
{
"name": "securityPolicyProperties",
"name": "securityPolicUpdateProperties",
"in": "body",
"description": "Security policy update properties",
"required": true,
"schema": {
"$ref": "#/definitions/SecurityPolicyProperties"
"$ref": "#/definitions/SecurityPolicyUpdateParameters"
}
},
{
Expand Down Expand Up @@ -4228,6 +4228,7 @@
},
"SecurityPolicyProperties": {
"description": "The json object that contains properties required to create a security policy",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/AFDStateProperties"
Expand All @@ -4241,11 +4242,31 @@
},
"parameters": {
"description": "object which contains security policy parameters",
"$ref": "#/definitions/SecurityPolicyParameters"
"$ref": "#/definitions/SecurityPolicyPropertiesParameters"
}
}
},
"SecurityPolicyUpdateParameters": {
"description": "The JSON object containing security policy update parameters.",
"type": "object",
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/SecurityPolicyUpdateProperties"
}
}
},
"SecurityPolicyUpdateProperties": {
"description": "The json object that contains properties required to update a security policy",
"type": "object",
"properties": {
"parameters": {
"description": "object which contains security policy parameters",
"$ref": "#/definitions/SecurityPolicyPropertiesParameters"
}
}
},
"SecurityPolicyParameters": {
"SecurityPolicyPropertiesParameters": {
"description": "The json object containing security policy parameters",
"discriminator": "type",
"required": [
Expand All @@ -4272,7 +4293,7 @@
"type": "object",
"allOf": [
{
"$ref": "#/definitions/SecurityPolicyParameters"
"$ref": "#/definitions/SecurityPolicyPropertiesParameters"
}
],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,28 @@
"profileName": "profile1",
"securityPolicyName": "securityPolicy1",
"securityPolicyProperties": {
"parameters": {
"type": "WebApplicationFirewall",
"wafPolicy": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"
},
"associations": [
{
"domains": [
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1"
},
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2"
}
],
"patternsToMatch": [
"/*"
]
}
]
"properties": {
"parameters": {
"type": "WebApplicationFirewall",
"wafPolicy": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"
},
"associations": [
{
"domains": [
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1"
},
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2"
}
],
"patternsToMatch": [
"/*"
]
}
]
}
}
}
},
Expand Down

0 comments on commit 898caaf

Please sign in to comment.