From 80037e8e57b805d45944c3f8d040fa0789293040 Mon Sep 17 00:00:00 2001 From: Adithya Ramesh Date: Thu, 20 Feb 2020 13:20:26 -0800 Subject: [PATCH 1/4] 2020 01 01 updates to rules engine caching behavior * add new cache settings fields to CacheConfiguration * cache settings fields will enable Rules Engine to allow cache override actions * fix typos in examples --- .../2020-01-01/examples/FrontdoorCreate.json | 11 ++++-- .../2020-01-01/examples/FrontdoorGet.json | 2 +- .../examples/FrontdoorRulesEngineCreate.json | 34 +++++++++++++++++++ .../examples/FrontdoorRulesEngineGet.json | 34 +++++++++++++++++++ .../examples/FrontdoorRulesEngineList.json | 34 +++++++++++++++++++ .../stable/2020-01-01/frontdoor.json | 14 +++++++- 6 files changed, 125 insertions(+), 4 deletions(-) diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json index 53f6407f0237..b067e314fb6b 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json @@ -167,7 +167,9 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" } }, - "rulesEngine": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1", + "rulesEngine": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1" + }, "enabledState": "Enabled" } } @@ -306,7 +308,9 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" } }, - "rulesEngine": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1", + "rulesEngine": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1" + }, "enabledState": "Enabled" } } @@ -445,6 +449,9 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" } }, + "rulesEngine": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1" + }, "enabledState": "Enabled" } } diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json index fd4b657552f7..227e734fe098 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json @@ -138,7 +138,7 @@ ], "rulesEngines": [ { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/routingRules/rulesEngine1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1", "name": "rulesEngine1", "properties": { "rules": [ diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json index 1805db9019f9..7a582fbb6454 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json @@ -57,6 +57,40 @@ ] } ] + }, + { + "name": "Rule3", + "priority": 3, + "action": { + "routeConfigurationOverride": { + "@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "customForwardingPath": null, + "forwardingProtocol": "HttpsOnly", + "cacheConfiguration": { + "queryParameterStripDirective": "StripOnly", + "queryParameters": "a=b,p=q", + "dynamicCompression": "Disabled", + "cacheDuration": "1.10:10:09" + }, + "backendPool": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" + } + } + }, + "matchConditions": [ + { + "rulesEngineMatchVariable": "RequestHeader", + "rulesEngineOperator": "Equal", + "rulesEngineMatchValue": [ + "allowoverride" + ], + "transforms": [ + "Lowercase" + ], + "negateCondition": false, + "selector": "Rules-Engine-Route-Forward" + } + ] } ] } diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json index b6b138d610da..a9ba08f20fba 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json @@ -62,6 +62,40 @@ ] } ] + }, + { + "name": "Rule3", + "priority": 3, + "action": { + "routeConfigurationOverride": { + "@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "customForwardingPath": null, + "forwardingProtocol": "HttpsOnly", + "cacheConfiguration": { + "queryParameterStripDirective": "StripOnly", + "queryParameters": "a=b,p=q", + "dynamicCompression": "Disabled", + "cacheDuration": "1.10:10:09" + }, + "backendPool": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" + } + } + }, + "matchConditions": [ + { + "rulesEngineMatchVariable": "RequestHeader", + "rulesEngineOperator": "Equal", + "rulesEngineMatchValue": [ + "allowoverride" + ], + "transforms": [ + "Lowercase" + ], + "negateCondition": false, + "selector": "Rules-Engine-Route-Forward" + } + ] } ] } diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json index 9ca9c9249d18..473791c42851 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json @@ -63,6 +63,40 @@ ] } ] + }, + { + "name": "Rule3", + "priority": 3, + "action": { + "routeConfigurationOverride": { + "@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + "customForwardingPath": null, + "forwardingProtocol": "HttpsOnly", + "cacheConfiguration": { + "queryParameterStripDirective": "StripOnly", + "queryParameters": "a=b,p=q", + "dynamicCompression": "Disabled", + "cacheDuration": "1.10:10:09" + }, + "backendPool": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" + } + } + }, + "matchConditions": [ + { + "rulesEngineMatchVariable": "RequestHeader", + "rulesEngineOperator": "Equal", + "rulesEngineMatchValue": [ + "allowoverride" + ], + "transforms": [ + "Lowercase" + ], + "negateCondition": false, + "selector": "Rules-Engine-Route-Forward" + } + ] } ] } diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json index 8b25f8ffeddd..fabe78edf60a 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json @@ -1570,7 +1570,9 @@ "description": "Treatment of URL query terms when forming the cache key.", "enum": [ "StripNone", - "StripAll" + "StripAll", + "StripOnly", + "StripAllExcept" ], "type": "string", "x-ms-enum": { @@ -1578,6 +1580,11 @@ "modelAsString": true } }, + "queryParameters": { + "description": "query parameters to include or exclude (comma separated).", + "type": "string", + "x-nullable": true + }, "dynamicCompression": { "description": "Whether to use dynamic compression for cached content", "enum": [ @@ -1589,6 +1596,11 @@ "name": "DynamicCompressionEnabled", "modelAsString": true } + }, + "cacheDuration": { + "description": "The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", + "type": "string", + "x-nullable": true } } }, From 104d4f524c124db0214e0968ea893be974ac7930 Mon Sep 17 00:00:00 2001 From: Moustafa Eid Date: Thu, 20 Feb 2020 16:35:10 -0800 Subject: [PATCH 2/4] renamed privateLinkResourceId to privateLinkAlias --- .../stable/2020-01-01/examples/FrontdoorCreate.json | 8 ++++---- .../stable/2020-01-01/examples/FrontdoorGet.json | 2 +- .../stable/2020-01-01/examples/FrontdoorList.json | 2 +- .../stable/2020-01-01/examples/FrontdoorListAll.json | 2 +- .../Microsoft.Network/stable/2020-01-01/frontdoor.json | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json index b067e314fb6b..1e75091a2451 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorCreate.json @@ -83,7 +83,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateLinkApprovalMessage": "Please approve this request to connect to the Private Link", "address": "10.0.1.5", "httpPort": 80, @@ -218,7 +218,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateEndpointStatus": "Pending", "privateLinkApprovalMessage": "Please approve the connection request for this Private Link", "address": "10.0.1.5", @@ -359,7 +359,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateEndpointStatus": "Approved", "privateLinkApprovalMessage": "Please approve the connection request for this Private Link", "address": "10.0.1.5", @@ -500,7 +500,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateEndpointStatus": "Approved", "privateLinkApprovalMessage": "Please approve the connection request for this Private Link", "address": "10.0.1.5", diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json index 227e734fe098..ee642abc01b3 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorGet.json @@ -95,7 +95,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateEndpointStatus": "Approved", "privateLinkApprovalMessage": "Please approve the connection request for this Private Link", "address": "10.0.1.5", diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorList.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorList.json index f859c8a824e7..5affee4eeac4 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorList.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorList.json @@ -96,7 +96,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateEndpointStatus": "Approved", "privateLinkApprovalMessage": "Please approve the connection request for this Private Link", "address": "10.0.1.5", diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorListAll.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorListAll.json index 6c99f8d4e449..3975d2759a87 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorListAll.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorListAll.json @@ -95,7 +95,7 @@ "priority": 1 }, { - "privateLinkResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1", + "privateLinkAlias": "SQLSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice", "privateEndpointStatus": "Approved", "privateLinkApprovalMessage": "Please approve the connection request for this Private Link", "address": "10.0.1.5", diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json index fabe78edf60a..ce4709604bc7 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json @@ -1237,8 +1237,8 @@ "description": "Location of the backend (IP address or FQDN)", "type": "string" }, - "privateLinkResourceId": { - "description": "If this backend is private, provide the Private Link resource Id. Populating this optional field indicates that this backend is 'Private'", + "privateLinkAlias": { + "description": "The Alias of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", "type": "string" }, "privateEndpointStatus": { From bc86b2821624c6ed2dfa42ef196ba035b6d98a0d Mon Sep 17 00:00:00 2001 From: Adithya Ramesh Date: Thu, 20 Feb 2020 17:59:00 -0800 Subject: [PATCH 3/4] fix x-nullable usage --- .../Microsoft.Network/stable/2020-01-01/frontdoor.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json index ce4709604bc7..db754720b6d6 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json @@ -1582,8 +1582,7 @@ }, "queryParameters": { "description": "query parameters to include or exclude (comma separated).", - "type": "string", - "x-nullable": true + "type": "string" }, "dynamicCompression": { "description": "Whether to use dynamic compression for cached content", @@ -1599,8 +1598,7 @@ }, "cacheDuration": { "description": "The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", - "type": "string", - "x-nullable": true + "type": "string" } } }, From e9213c24b5ad64ed03f21083e5be27f03d138a0c Mon Sep 17 00:00:00 2001 From: Adithya Ramesh Date: Mon, 24 Feb 2020 09:49:42 -0800 Subject: [PATCH 4/4] Change cacheDuration to "format":"duration" --- .../2020-01-01/examples/FrontdoorRulesEngineCreate.json | 2 +- .../stable/2020-01-01/examples/FrontdoorRulesEngineGet.json | 2 +- .../stable/2020-01-01/examples/FrontdoorRulesEngineList.json | 2 +- .../Microsoft.Network/stable/2020-01-01/frontdoor.json | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json index 7a582fbb6454..e7d7da48aca3 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineCreate.json @@ -70,7 +70,7 @@ "queryParameterStripDirective": "StripOnly", "queryParameters": "a=b,p=q", "dynamicCompression": "Disabled", - "cacheDuration": "1.10:10:09" + "cacheDuration": "P1DT12H20M30S" }, "backendPool": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json index a9ba08f20fba..329e370ff82f 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineGet.json @@ -75,7 +75,7 @@ "queryParameterStripDirective": "StripOnly", "queryParameters": "a=b,p=q", "dynamicCompression": "Disabled", - "cacheDuration": "1.10:10:09" + "cacheDuration": "P1DT12H20M30S" }, "backendPool": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json index 473791c42851..bf1c2190f8e0 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/examples/FrontdoorRulesEngineList.json @@ -76,7 +76,7 @@ "queryParameterStripDirective": "StripOnly", "queryParameters": "a=b,p=q", "dynamicCompression": "Disabled", - "cacheDuration": "1.10:10:09" + "cacheDuration": "P1DT12H20M30S" }, "backendPool": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1" diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json index db754720b6d6..1fac62bfeda9 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json @@ -1597,8 +1597,9 @@ } }, "cacheDuration": { - "description": "The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", - "type": "string" + "description": "The duration for which the content needs to be cached. Allowed format is in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). HTTP requires the value to be no more than a year", + "type": "string", + "format": "duration" } } },