From b2a85fff36a87a99eb412a3ba365b7af2e2fee95 Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 14:46:05 +0800 Subject: [PATCH 01/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index 9c4c4813f70f..26be68ba5105 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -2861,7 +2861,7 @@ "description": "Security policy update properties", "required": true, "schema": { - "$ref": "#/definitions/SecurityPolicyProperties" + "$ref": "#/definitions/SecurityPolicyUpdateParameters" } }, { @@ -4229,6 +4229,9 @@ "SecurityPolicyProperties": { "description": "The json object that contains properties required to create a security policy", "allOf": [ + { + "$ref": "#/definitions/AFDOriginGroupUpdatePropertiesParameters" + }, { "$ref": "#/definitions/AFDStateProperties" } @@ -4241,11 +4244,21 @@ }, "parameters": { "description": "object which contains security policy parameters", - "$ref": "#/definitions/SecurityPolicyParameters" + "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" + } + } + }, + "SecurityPolicyUpdateParameters": { + "description": "The JSON object containing security policy update parameters.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" } } }, - "SecurityPolicyParameters": { + "SecurityPolicyUpdatePropertiesParameters": { "description": "The json object containing security policy parameters", "discriminator": "type", "required": [ @@ -4272,7 +4285,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/SecurityPolicyParameters" + "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" } ], "properties": { From 36c88c16053f217df62c3b249c41912a487fb934 Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 15:19:09 +0800 Subject: [PATCH 02/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index 26be68ba5105..dddf0ecd2a27 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -2856,7 +2856,7 @@ "type": "string" }, { - "name": "securityPolicyProperties", + "name": "securityPolicUpdateProperties", "in": "body", "description": "Security policy update properties", "required": true, @@ -4230,7 +4230,7 @@ "description": "The json object that contains properties required to create a security policy", "allOf": [ { - "$ref": "#/definitions/AFDOriginGroupUpdatePropertiesParameters" + "$ref": "#/definitions/SecurityPolicyUpdateParameters" }, { "$ref": "#/definitions/AFDStateProperties" @@ -4279,13 +4279,13 @@ } } }, - "SecurityPolicyWebApplicationFirewallParameters": { + "SecurityPolicyWebApplicationFirewall": { "description": "The json object containing security policy waf parameters", "x-ms-discriminator-value": "WebApplicationFirewall", "type": "object", "allOf": [ { - "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" + "$ref": "#/definitions/SecurityPolicy" } ], "properties": { From ff473fa9c930560f1ddb5aa68df1095053ce2212 Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 15:24:46 +0800 Subject: [PATCH 03/10] Update SecurityPolicy patch operation --- .../resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index dddf0ecd2a27..d11116ff8cd8 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4230,7 +4230,7 @@ "description": "The json object that contains properties required to create a security policy", "allOf": [ { - "$ref": "#/definitions/SecurityPolicyUpdateParameters" + "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" }, { "$ref": "#/definitions/AFDStateProperties" From 85c0a161930a4954b86a2fc5b107dfc6521b999b Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 15:38:34 +0800 Subject: [PATCH 04/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index d11116ff8cd8..eca37d07b40f 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4241,10 +4241,6 @@ "description": "The name of the profile which holds the security policy.", "type": "string", "readOnly": true - }, - "parameters": { - "description": "object which contains security policy parameters", - "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" } } }, From 9f1b61432115d5168aed904b770b5d1ce69f9a76 Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 15:54:41 +0800 Subject: [PATCH 05/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index eca37d07b40f..18c44df7a09a 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4228,10 +4228,8 @@ }, "SecurityPolicyProperties": { "description": "The json object that contains properties required to create a security policy", + "type": "object", "allOf": [ - { - "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" - }, { "$ref": "#/definitions/AFDStateProperties" } @@ -4241,6 +4239,10 @@ "description": "The name of the profile which holds the security policy.", "type": "string", "readOnly": true + }, + "parameters": { + "description": "object which contains security policy parameters", + "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" } } }, @@ -4248,8 +4250,13 @@ "description": "The JSON object containing security policy update parameters.", "type": "object", "properties": { - "properties": { - "x-ms-client-flatten": true, + "profileName": { + "description": "The name of the profile which holds the security policy.", + "type": "string", + "readOnly": true + }, + "parameters": { + "description": "object which contains security policy parameters", "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" } } From 3b76a4913990342d6c810855ff7ee474d665759e Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 16:13:51 +0800 Subject: [PATCH 06/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index 18c44df7a09a..1ed826c95349 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4242,7 +4242,7 @@ }, "parameters": { "description": "object which contains security policy parameters", - "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" + "$ref": "#/definitions/SecurityPolicyPropertiesParameters" } } }, @@ -4250,18 +4250,13 @@ "description": "The JSON object containing security policy update parameters.", "type": "object", "properties": { - "profileName": { - "description": "The name of the profile which holds the security policy.", - "type": "string", - "readOnly": true - }, "parameters": { "description": "object which contains security policy parameters", - "$ref": "#/definitions/SecurityPolicyUpdatePropertiesParameters" + "$ref": "#/definitions/SecurityPolicyPropertiesParameters" } } }, - "SecurityPolicyUpdatePropertiesParameters": { + "SecurityPolicyPropertiesParameters": { "description": "The json object containing security policy parameters", "discriminator": "type", "required": [ @@ -4282,13 +4277,13 @@ } } }, - "SecurityPolicyWebApplicationFirewall": { + "SecurityPolicyWebApplicationFirewallParameters": { "description": "The json object containing security policy waf parameters", "x-ms-discriminator-value": "WebApplicationFirewall", "type": "object", "allOf": [ { - "$ref": "#/definitions/SecurityPolicy" + "$ref": "#/definitions/SecurityPolicyPropertiesParameters" } ], "properties": { From aea71be62d34c2e1a4ce46612f478988ca5dff39 Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 17:24:09 +0800 Subject: [PATCH 07/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index 1ed826c95349..def52b0b13d8 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4250,9 +4250,11 @@ "description": "The JSON object containing security policy update parameters.", "type": "object", "properties": { - "parameters": { - "description": "object which contains security policy parameters", - "$ref": "#/definitions/SecurityPolicyPropertiesParameters" + "properties": { + "parameters": { + "description": "object which contains security policy parameters", + "$ref": "#/definitions/SecurityPolicyPropertiesParameters" + } } } }, From ddb3135515a499da93aece870b834ee9a90d489b Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 17:27:49 +0800 Subject: [PATCH 08/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index def52b0b13d8..f40384cf8121 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4251,10 +4251,8 @@ "type": "object", "properties": { "properties": { - "parameters": { - "description": "object which contains security policy parameters", - "$ref": "#/definitions/SecurityPolicyPropertiesParameters" - } + "x-ms-client-flatten": true, + "$ref": "#/definitions/SecurityPolicyPropertiesParameters" } } }, From de5976b3bffd2ab689e8551abdcdf8048a2174db Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 17:36:31 +0800 Subject: [PATCH 09/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index f40384cf8121..aa85601b3932 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4252,6 +4252,21 @@ "properties": { "properties": { "x-ms-client-flatten": true, + "$ref": "#/definitions/SecurityPolicyUpdateProperties" + } + } + }, + "SecurityPolicyUpdateProperties": { + "description": "The json object that contains properties required to create a security policy", + "type": "object", + "properties": { + "profileName": { + "description": "The name of the profile which holds the security policy.", + "type": "string", + "readOnly": true + }, + "parameters": { + "description": "object which contains security policy parameters", "$ref": "#/definitions/SecurityPolicyPropertiesParameters" } } From d390ac79e56dbfd60093c1be390dd48197aae7cf Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Wed, 5 Jan 2022 18:07:54 +0800 Subject: [PATCH 10/10] Update SecurityPolicy patch operation --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 7 +--- .../examples/SecurityPolicies_Patch.json | 42 ++++++++++--------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index aa85601b3932..d6b245194899 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4257,14 +4257,9 @@ } }, "SecurityPolicyUpdateProperties": { - "description": "The json object that contains properties required to create a security policy", + "description": "The json object that contains properties required to update a security policy", "type": "object", "properties": { - "profileName": { - "description": "The name of the profile which holds the security policy.", - "type": "string", - "readOnly": true - }, "parameters": { "description": "object which contains security policy parameters", "$ref": "#/definitions/SecurityPolicyPropertiesParameters" diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Patch.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Patch.json index 49d4564ade9b..c5d6a525836e 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Patch.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Patch.json @@ -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": [ + "/*" + ] + } + ] + } } } },