diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafListPoliciesUnderSubscription.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafListPoliciesUnderSubscription.json new file mode 100644 index 000000000000..db08f4bfc4b7 --- /dev/null +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafListPoliciesUnderSubscription.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Policy1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1", + "type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "location": "WestUs", + "sku": { + "name": "Classic_AzureFrontDoor" + }, + "properties": { + "resourceState": "Enabled", + "provisioningState": "Succeeded", + "policySettings": { + "enabledState": "Enabled", + "mode": "Prevention", + "redirectUrl": "http://www.bing.com", + "customBlockResponseStatusCode": 499, + "customBlockResponseBody": "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg==" + }, + "customRules": { + "rules": [ + { + "name": "Rule1", + "priority": 1, + "enabledState": "Enabled", + "ruleType": "RateLimitRule", + "rateLimitDurationInMinutes": 0, + "rateLimitThreshold": 1000, + "matchConditions": [ + { + "matchVariable": "RemoteAddr", + "selector": null, + "operator": "IPMatch", + "negateCondition": false, + "matchValue": [ + "192.168.1.0/24", + "10.0.0.0/24" + ], + "transforms": [] + } + ], + "action": "Block" + }, + { + "name": "Rule2", + "priority": 2, + "enabledState": "Enabled", + "ruleType": "MatchRule", + "rateLimitDurationInMinutes": 0, + "rateLimitThreshold": 0, + "matchConditions": [ + { + "matchVariable": "RemoteAddr", + "selector": null, + "operator": "GeoMatch", + "negateCondition": false, + "matchValue": [ + "CH" + ] + }, + { + "matchVariable": "RequestHeader", + "selector": "UserAgent", + "operator": "Contains", + "negateCondition": false, + "matchValue": [ + "windows" + ], + "transforms": [ + "Lowercase" + ] + } + ], + "action": "Block" + } + ] + }, + "managedRules": { + "managedRuleSets": [ + { + "ruleSetType": "DefaultRuleSet", + "ruleSetVersion": "1.0", + "exclusions": [ + { + "matchVariable": "RequestHeaderNames", + "selectorMatchOperator": "Equals", + "selector": "User-Agent" + } + ], + "ruleGroupOverrides": [ + { + "ruleGroupName": "SQLI", + "rules": [ + { + "ruleId": "942100", + "enabledState": "Enabled", + "action": "Redirect" + }, + { + "ruleId": "942110", + "enabledState": "Disabled" + } + ] + } + ] + } + ] + }, + "frontendEndpointLinks": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontdoors/fd1/frontendendpoints/fd1-azurefd-net" + } + ], + "securityPolicyLinks": [] + } + } + ] + } + } + } +} diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafPolicyDelete.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafPolicyDelete.json index 332076658c76..d7a9e97fb528 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafPolicyDelete.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/examples/WafPolicyDelete.json @@ -7,7 +7,11 @@ }, "responses": { "200": {}, - "202": {}, + "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Network/frontdoors/fd1/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2022-10-01" + } + }, "204": {} } } diff --git a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/webapplicationfirewall.json b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/webapplicationfirewall.json index 2ed095ec802f..2ab308d39bff 100644 --- a/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/webapplicationfirewall.json +++ b/specification/frontdoor/resource-manager/Microsoft.Network/stable/2022-05-01/webapplicationfirewall.json @@ -76,6 +76,45 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies": { + "get": { + "tags": [ + "WebApplicationFirewallPolicies" + ], + "description": "Lists all of the protection policies within a subscription.", + "operationId": "Policies_ListBySubscription", + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/WebApplicationFirewallPolicyList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all Policies in a Resource Group": { + "$ref": "./examples/WafListPoliciesUnderSubscription.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}": { "get": { "tags": [ @@ -967,6 +1006,28 @@ } } }, + "DefaultErrorResponse": { + "description": "Error response indicates Front Door service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "Error model.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "readOnly": true, + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "readOnly": true, + "type": "string" + } + } + } + } + }, "FrontendEndpointLink": { "description": "Defines the Resource ID for a Frontend Endpoint.", "type": "object",