Skip to content

Commit

Permalink
2020 01 01 updates to rules engine caching behavior (Azure#8455)
Browse files Browse the repository at this point in the history
* 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

* renamed privateLinkResourceId to privateLinkAlias

* fix x-nullable usage

* Change cacheDuration to "format":"duration"

Co-authored-by: Moustafa Eid <[email protected]>
  • Loading branch information
2 people authored and microsoft-rin committed Feb 27, 2020
1 parent ef43fa2 commit f06134e
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"
}
}
Expand Down Expand Up @@ -216,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",
Expand Down Expand Up @@ -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"
}
}
Expand Down Expand Up @@ -355,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",
Expand Down Expand Up @@ -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"
}
}
Expand Down Expand Up @@ -493,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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "P1DT12H20M30S"
},
"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"
}
]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "P1DT12H20M30S"
},
"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"
}
]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "P1DT12H20M30S"
},
"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"
}
]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -1570,14 +1570,20 @@
"description": "Treatment of URL query terms when forming the cache key.",
"enum": [
"StripNone",
"StripAll"
"StripAll",
"StripOnly",
"StripAllExcept"
],
"type": "string",
"x-ms-enum": {
"name": "FrontDoorQuery",
"modelAsString": true
}
},
"queryParameters": {
"description": "query parameters to include or exclude (comma separated).",
"type": "string"
},
"dynamicCompression": {
"description": "Whether to use dynamic compression for cached content",
"enum": [
Expand All @@ -1589,6 +1595,11 @@
"name": "DynamicCompressionEnabled",
"modelAsString": true
}
},
"cacheDuration": {
"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"
}
}
},
Expand Down

0 comments on commit f06134e

Please sign in to comment.