{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "APIs to manage web application firewall rules",
    "title": "WebApplicationFirewallManagement",
    "version": "2018-08-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/frontdoor/resource-manager/Microsoft.Network/preview/2018-08-01-preview/webapplicationfirewall.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "frontdoor-webapplicationfirewall",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client API version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies": {
      "get": {
        "description": "Lists all of the protection policies within a resource group.",
        "operationId": "Policies_List",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/WebApplicationFirewallPolicyListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "ListWebApplicationFirewallPolicies"
        ],
        "x-ms-examples": {
          "List Policies in a Resource Group": {
            "parameters": {
              "api-version": "2018-08-01",
              "resourceGroupName": "rg1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1",
                      "location": "WestUs",
                      "name": "Policy1",
                      "properties": {
                        "customRules": {
                          "rules": [
                            {
                              "action": "Block",
                              "matchConditions": [
                                {
                                  "matchValue": [
                                    "192.168.1.0/24",
                                    "10.0.0.0/24"
                                  ],
                                  "matchVariable": "RemoteAddr",
                                  "negateCondition": false,
                                  "operator": "IPMatch",
                                  "selector": null
                                }
                              ],
                              "name": "Rule1",
                              "priority": 1,
                              "rateLimitDurationInMinutes": 0,
                              "rateLimitThreshold": 1000,
                              "ruleType": "RateLimitRule",
                              "transforms": []
                            },
                            {
                              "action": "Block",
                              "matchConditions": [
                                {
                                  "matchValue": [
                                    "CH"
                                  ],
                                  "matchVariable": "RemoteAddr",
                                  "negateCondition": false,
                                  "operator": "GeoMatch",
                                  "selector": null
                                },
                                {
                                  "matchValue": [
                                    "Windows"
                                  ],
                                  "matchVariable": "RequestHeader",
                                  "negateCondition": false,
                                  "operator": "Contains",
                                  "selector": "UserAgent"
                                }
                              ],
                              "name": "Rule2",
                              "priority": 2,
                              "rateLimitDurationInMinutes": 0,
                              "rateLimitThreshold": 0,
                              "ruleType": "MatchRule",
                              "transforms": []
                            }
                          ]
                        },
                        "managedRules": {
                          "ruleSets": [
                            {
                              "priority": 1,
                              "ruleGroupOverrides": [
                                {
                                  "action": "Block",
                                  "ruleGroupOverride": "SqlInjection"
                                },
                                {
                                  "action": "Log",
                                  "ruleGroupOverride": "XSS"
                                }
                              ],
                              "ruleSetType": "AzureManagedRuleSet",
                              "version": 0
                            }
                          ]
                        },
                        "policySettings": {
                          "enabledState": "Enabled",
                          "mode": "Prevention"
                        },
                        "provisioningState": "Succeeded",
                        "resourceState": "Enabled"
                      },
                      "tags": {
                        "key1": "value1",
                        "key2": "value2"
                      },
                      "type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}": {
      "delete": {
        "description": "Deletes Policy",
        "operationId": "Policies_Delete",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group.",
            "in": "path",
            "maxLength": 128,
            "name": "policyName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete successful."
          },
          "202": {
            "description": "Accepted. The request has been accepted for processing and the operation will complete asynchronously."
          },
          "204": {
            "description": "No Content. The request has been accepted but the policy was not found."
          }
        },
        "tags": [
          "DeleteWebApplicationFirewallPolicy"
        ],
        "x-ms-examples": {
          "Delete protection policy": {
            "parameters": {
              "api-version": "2018-08-01",
              "policyName": "Policy1",
              "resourceGroupName": "rg1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Retrieve protection policy with specified name within a resource group.",
        "operationId": "Policies_Get",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group.",
            "in": "path",
            "maxLength": 128,
            "name": "policyName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/WebApplicationFirewallPolicy"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "GetWebapplicationfirewallPolicy"
        ],
        "x-ms-examples": {
          "policy get": {
            "parameters": {
              "api-version": "2018-08-01",
              "policyName": "Policy1",
              "resourceGroupName": "rg1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1",
                  "location": "WestUs",
                  "name": "Policy1",
                  "properties": {
                    "customRules": {
                      "rules": [
                        {
                          "action": "Block",
                          "matchConditions": [
                            {
                              "matchValue": [
                                "192.168.1.0/24",
                                "10.0.0.0/24"
                              ],
                              "matchVariable": "RemoteAddr",
                              "negateCondition": false,
                              "operator": "IPMatch",
                              "selector": null
                            }
                          ],
                          "name": "Rule1",
                          "priority": 1,
                          "rateLimitDurationInMinutes": 0,
                          "rateLimitThreshold": 1000,
                          "ruleType": "RateLimitRule",
                          "transforms": []
                        },
                        {
                          "action": "Block",
                          "matchConditions": [
                            {
                              "matchValue": [
                                "CH"
                              ],
                              "matchVariable": "RemoteAddr",
                              "negateCondition": false,
                              "operator": "GeoMatch",
                              "selector": null
                            },
                            {
                              "matchValue": [
                                "Windows"
                              ],
                              "matchVariable": "RequestHeader",
                              "negateCondition": false,
                              "operator": "Contains",
                              "selector": "UserAgent"
                            }
                          ],
                          "name": "Rule2",
                          "priority": 2,
                          "rateLimitDurationInMinutes": 0,
                          "rateLimitThreshold": 0,
                          "ruleType": "MatchRule",
                          "transforms": []
                        }
                      ]
                    },
                    "managedRules": {
                      "ruleSets": [
                        {
                          "priority": 1,
                          "ruleGroupOverrides": [
                            {
                              "action": "Block",
                              "ruleGroupOverride": "SqlInjection"
                            },
                            {
                              "action": "Log",
                              "ruleGroupOverride": "XSS"
                            }
                          ],
                          "ruleSetType": "AzureManagedRuleSet",
                          "version": 0
                        }
                      ]
                    },
                    "policySettings": {
                      "enabledState": "Enabled",
                      "mode": "Prevention"
                    },
                    "provisioningState": "Succeeded",
                    "resourceState": "Enabled"
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates or update policy with specified rule set name within a resource group.",
        "operationId": "Policies_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group.",
            "in": "path",
            "maxLength": 128,
            "name": "policyName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "description": "Policy to be created.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/WebApplicationFirewallPolicy"
            }
          },
          {
            "description": "Client API version.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/WebApplicationFirewallPolicy"
            }
          },
          "201": {
            "description": "Created. The request has been fulfilled and a new protection policy has been created.",
            "schema": {
              "$ref": "#/definitions/WebApplicationFirewallPolicy"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        },
        "tags": [
          "CreateOrUpdateWebApplicationFirewallPolicy"
        ],
        "x-ms-examples": {
          "Creates specific policy": {
            "parameters": {
              "api-version": "2018-08-01",
              "parameters": {
                "properties": {
                  "customRules": {
                    "rules": [
                      {
                        "action": "Block",
                        "matchConditions": [
                          {
                            "matchValue": [
                              "192.168.1.0/24",
                              "10.0.0.0/24"
                            ],
                            "matchVariable": "RemoteAddr",
                            "operator": "IPMatch"
                          }
                        ],
                        "name": "Rule1",
                        "priority": 1,
                        "rateLimitThreshold": 1000,
                        "ruleType": "RateLimitRule"
                      },
                      {
                        "action": "Block",
                        "matchConditions": [
                          {
                            "matchValue": [
                              "CH"
                            ],
                            "matchVariable": "RemoteAddr",
                            "operator": "GeoMatch"
                          },
                          {
                            "matchValue": [
                              "Windows"
                            ],
                            "matchVariable": "RequestHeader",
                            "operator": "Contains",
                            "selector": "UserAgent"
                          }
                        ],
                        "name": "Rule2",
                        "priority": 2,
                        "ruleType": "MatchRule"
                      }
                    ]
                  },
                  "managedRules": {
                    "ruleSets": [
                      {
                        "priority": 1,
                        "ruleGroupOverrides": [
                          {
                            "action": "Block",
                            "ruleGroupOverride": "SqlInjection"
                          },
                          {
                            "action": "Log",
                            "ruleGroupOverride": "XSS"
                          }
                        ],
                        "ruleSetType": "AzureManagedRuleSet"
                      }
                    ]
                  }
                }
              },
              "policyName": "Policy1",
              "resourceGroupName": "rg1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1",
                  "location": "WestUs",
                  "name": "Policy1",
                  "properties": {
                    "customRules": {
                      "rules": [
                        {
                          "action": "Block",
                          "matchConditions": [
                            {
                              "matchValue": [
                                "192.168.1.0/24",
                                "10.0.0.0/24"
                              ],
                              "matchVariable": "RemoteAddr",
                              "negateCondition": false,
                              "operator": "IPMatch",
                              "selector": null
                            }
                          ],
                          "name": "Rule1",
                          "priority": 1,
                          "rateLimitDurationInMinutes": 0,
                          "rateLimitThreshold": 1000,
                          "ruleType": "RateLimitRule",
                          "transforms": []
                        },
                        {
                          "action": "Block",
                          "matchConditions": [
                            {
                              "matchValue": [
                                "CH"
                              ],
                              "matchVariable": "RemoteAddr",
                              "negateCondition": false,
                              "operator": "GeoMatch",
                              "selector": null
                            },
                            {
                              "matchValue": [
                                "Windows"
                              ],
                              "matchVariable": "RequestHeader",
                              "negateCondition": false,
                              "operator": "Contains",
                              "selector": "UserAgent"
                            }
                          ],
                          "name": "Rule2",
                          "priority": 2,
                          "rateLimitDurationInMinutes": 0,
                          "rateLimitThreshold": 0,
                          "ruleType": "MatchRule",
                          "transforms": []
                        }
                      ]
                    },
                    "managedRules": {
                      "ruleSets": [
                        {
                          "priority": 1,
                          "ruleGroupOverrides": [
                            {
                              "action": "Block",
                              "ruleGroupOverride": "SqlInjection"
                            },
                            {
                              "action": "Log",
                              "ruleGroupOverride": "XSS"
                            }
                          ],
                          "ruleSetType": "AzureManagedRuleSet",
                          "version": 0
                        }
                      ]
                    },
                    "policySettings": {
                      "enabledState": "Enabled",
                      "mode": "Prevention"
                    },
                    "provisioningState": "Succeeded",
                    "resourceState": "Enabled"
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1",
                  "location": "WestUs",
                  "name": "Policy1",
                  "properties": {
                    "customRules": {
                      "rules": [
                        {
                          "action": "Block",
                          "matchConditions": [
                            {
                              "matchValue": [
                                "192.168.1.0/24",
                                "10.0.0.0/24"
                              ],
                              "matchVariable": "RemoteAddr",
                              "negateCondition": false,
                              "operator": "IPMatch",
                              "selector": null
                            }
                          ],
                          "name": "Rule1",
                          "priority": 1,
                          "rateLimitDurationInMinutes": 0,
                          "rateLimitThreshold": 1000,
                          "ruleType": "RateLimitRule",
                          "transforms": []
                        },
                        {
                          "action": "Block",
                          "matchConditions": [
                            {
                              "matchValue": [
                                "CH"
                              ],
                              "matchVariable": "RemoteAddr",
                              "negateCondition": false,
                              "operator": "GeoMatch",
                              "selector": null
                            },
                            {
                              "matchValue": [
                                "Windows"
                              ],
                              "matchVariable": "RequestHeader",
                              "negateCondition": false,
                              "operator": "Contains",
                              "selector": "UserAgent"
                            }
                          ],
                          "name": "Rule2",
                          "priority": 2,
                          "rateLimitDurationInMinutes": 0,
                          "rateLimitThreshold": 0,
                          "ruleType": "MatchRule",
                          "transforms": []
                        }
                      ]
                    },
                    "managedRules": {
                      "ruleSets": [
                        {
                          "priority": 1,
                          "ruleGroupOverrides": [
                            {
                              "action": "Block",
                              "ruleGroupOverride": "SqlInjection"
                            },
                            {
                              "action": "Log",
                              "ruleGroupOverride": "XSS"
                            }
                          ],
                          "ruleSetType": "AzureManagedRuleSet",
                          "version": 0
                        }
                      ]
                    },
                    "policySettings": {
                      "enabledState": "Enabled",
                      "mode": "Prevention"
                    },
                    "provisioningState": "Succeeded",
                    "resourceState": "Enabled"
                  },
                  "tags": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AzureManagedOverrideRuleGroup": {
      "description": "Defines contents of a web application rule",
      "properties": {
        "action": {
          "description": "Type of Actions",
          "enum": [
            "Allow",
            "Block",
            "Log"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "action"
          }
        },
        "ruleGroupOverride": {
          "description": "Describes override rule group",
          "enum": [
            "SqlInjection",
            "XSS"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "ruleGroupOverride"
          }
        }
      },
      "required": [
        "ruleGroupOverride",
        "action"
      ]
    },
    "AzureManagedRuleSet": {
      "allOf": [
        {
          "$ref": "#/definitions/ManagedRuleSet"
        }
      ],
      "description": "Describes azure managed provider.",
      "properties": {
        "ruleGroupOverrides": {
          "description": "List of azure managed provider override configuration (optional)",
          "items": {
            "$ref": "#/definitions/AzureManagedOverrideRuleGroup"
          },
          "type": "array"
        }
      },
      "type": "object",
      "x-ms-discriminator-value": "AzureManagedRuleSet"
    },
    "CustomRule": {
      "description": "Defines contents of a web application rule",
      "properties": {
        "action": {
          "description": "Type of Actions",
          "enum": [
            "Allow",
            "Block",
            "Log"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "action"
          }
        },
        "etag": {
          "description": "Gets a unique read-only string that changes whenever the resource is updated.",
          "readOnly": true,
          "type": "string"
        },
        "matchConditions": {
          "description": "List of match conditions",
          "items": {
            "$ref": "#/definitions/MatchCondition"
          },
          "type": "array"
        },
        "name": {
          "description": "Gets name of the resource that is unique within a policy. This name can be used to access the resource.",
          "maxLength": 128,
          "type": "string"
        },
        "priority": {
          "description": "Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value",
          "type": "integer"
        },
        "rateLimitDurationInMinutes": {
          "description": "Defines rate limit duration. Default - 1 minute",
          "type": "integer"
        },
        "rateLimitThreshold": {
          "description": "Defines rate limit threshold",
          "type": "integer"
        },
        "ruleType": {
          "description": "Describes type of rule",
          "enum": [
            "MatchRule",
            "RateLimitRule"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "ruleType"
          }
        },
        "transforms": {
          "description": "List of transforms",
          "items": {
            "$ref": "#/definitions/transform"
          },
          "type": "array"
        }
      },
      "required": [
        "priority",
        "ruleType",
        "matchConditions",
        "action"
      ]
    },
    "CustomRules": {
      "description": "Defines contents of custom rules",
      "properties": {
        "rules": {
          "description": "List of rules",
          "items": {
            "$ref": "#/definitions/CustomRule"
          },
          "type": "array"
        }
      }
    },
    "ErrorResponse": {
      "description": "Error response indicates Front Door service is not able to process the incoming request. The reason is provided in the error message.",
      "properties": {
        "code": {
          "description": "Error code.",
          "readOnly": true,
          "type": "string"
        },
        "message": {
          "description": "Error message indicating why the operation failed.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "ManagedRuleSet": {
      "description": "Base class for all types of ManagedRuleSet.",
      "discriminator": "ruleSetType",
      "properties": {
        "priority": {
          "description": "Describes priority of the rule",
          "type": "integer"
        },
        "ruleSetType": {
          "description": "RuleSetType - AzureManagedRuleSet or OWASP RuleSets.",
          "type": "string"
        },
        "version": {
          "description": "defines version of the rule set",
          "type": "integer"
        }
      },
      "required": [
        "ruleSetType"
      ],
      "type": "object",
      "x-ms-discriminator-value": "Unknown"
    },
    "ManagedRuleSets": {
      "description": "Defines ManagedRuleSets - array of managedRuleSet",
      "properties": {
        "ruleSets": {
          "description": "List of rules",
          "items": {
            "$ref": "#/definitions/ManagedRuleSet"
          },
          "type": "array"
        }
      }
    },
    "MatchCondition": {
      "description": "Define match conditions",
      "properties": {
        "matchValue": {
          "description": "Match value",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "matchVariable": {
          "description": "Match Variable",
          "enum": [
            "RemoteAddr",
            "RequestMethod",
            "QueryString",
            "PostArgs",
            "RequestUri",
            "RequestHeader",
            "RequestBody"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "MatchCondition"
          }
        },
        "negateCondition": {
          "description": "Describes if this is negate condition or not",
          "type": "boolean"
        },
        "operator": {
          "description": "Describes operator to be matched",
          "enum": [
            "Any",
            "IPMatch",
            "GeoMatch",
            "Equal",
            "Contains",
            "LessThan",
            "GreaterThan",
            "LessThanOrEqual",
            "GreaterThanOrEqual",
            "BeginsWith",
            "EndsWith"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "operator"
          }
        },
        "selector": {
          "description": "Name of selector in RequestHeader or RequestBody to be matched",
          "type": "string"
        }
      },
      "required": [
        "matchVariable",
        "operator",
        "matchValue"
      ]
    },
    "WebApplicationFirewallPolicy": {
      "allOf": [
        {
          "description": "Common resource representation.",
          "properties": {
            "id": {
              "description": "Resource ID.",
              "readOnly": true,
              "type": "string"
            },
            "location": {
              "description": "Resource location.",
              "type": "string"
            },
            "name": {
              "description": "Resource name.",
              "readOnly": true,
              "type": "string"
            },
            "tags": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Resource tags.",
              "type": "object"
            },
            "type": {
              "description": "Resource type.",
              "readOnly": true,
              "type": "string"
            }
          },
          "x-ms-azure-resource": true
        }
      ],
      "description": "Defines web application firewall policy.",
      "properties": {
        "etag": {
          "description": "Gets a unique read-only string that changes whenever the resource is updated.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/WebApplicationFirewallPolicyPropertiesFormat",
          "description": "Properties of the web application firewall policy.",
          "x-ms-client-flatten": true
        }
      }
    },
    "WebApplicationFirewallPolicyListResult": {
      "description": "Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.",
      "properties": {
        "nextLink": {
          "description": "URL to get the next set of WebApplicationFirewallPolicy objects if there are any.",
          "type": "string"
        },
        "value": {
          "description": "List of WebApplicationFirewallPolicies within a resource group.",
          "items": {
            "$ref": "#/definitions/WebApplicationFirewallPolicy"
          },
          "readOnly": true,
          "type": "array"
        }
      }
    },
    "WebApplicationFirewallPolicyPropertiesFormat": {
      "description": "Defines web application firewall policy properties",
      "properties": {
        "customRules": {
          "$ref": "#/definitions/CustomRules",
          "description": "Describes custom rules inside the policy"
        },
        "managedRules": {
          "$ref": "#/definitions/ManagedRuleSets",
          "description": "Describes managed rules inside the policy"
        },
        "policySettings": {
          "$ref": "#/definitions/policySettings",
          "description": "Describes  policySettings for policy"
        },
        "provisioningState": {
          "description": "Provisioning state of the WebApplicationFirewallPolicy.",
          "readOnly": true,
          "type": "string"
        },
        "resourceState": {
          "enum": [
            "Creating",
            "Enabling",
            "Enabled",
            "Disabling",
            "Disabled",
            "Deleting"
          ],
          "readOnly": true,
          "title": "Resource status of the policy.",
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "WebApplicationFirewallPolicy"
          }
        }
      }
    },
    "policySettings": {
      "description": "Defines contents of a web application firewall global configuration",
      "properties": {
        "enabledState": {
          "description": "describes if the policy is in enabled state or disabled state",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "enabledState"
          }
        },
        "mode": {
          "description": "Describes if it is in detection mode  or prevention mode at policy level",
          "enum": [
            "Prevention",
            "Detection"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "mode"
          }
        }
      }
    },
    "transform": {
      "description": "Describes what transforms applied before matching",
      "enum": [
        "Lowercase",
        "Uppercase",
        "Trim",
        "UrlDecode",
        "UrlEncode",
        "RemoveNulls",
        "HtmlEntityDecode"
      ],
      "type": "string",
      "x-ms-enum": {
        "modelAsString": true,
        "name": "transform"
      }
    }
  }
}