openapi: 3.2.0 info: title: CdnManagementClient Cdn Web Application Firewall Policies… version: '2026-07-01' description: Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. x-typespec-generated: - emitter: '@azure-tools/typespec-autorest' servers: - url: https://management.azure.com security: - azure_auth: - user_impersonation tags: - name: CdnWebApplicationFirewallPolicies paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies : get: operationId: Policies_List tags: - CdnWebApplicationFirewallPolicies description: Lists all of the protection policies within a resource group. parameters: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicyList' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: List Policies in a Resource Group: $ref: ./examples/WafListPolicies.json x-ms-pageable: nextLinkName: nextLink summary: Policies list x-summary-source: derived ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName} : get: operationId: Policies_Get tags: - CdnWebApplicationFirewallPolicies description: Retrieve protection policy with specified name within a resource group. parameters: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter - name: policyName in: path description: The name of the CdnWebApplicationFirewallPolicy. required: true schema: type: string maxLength: 128 responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: Get Policy: $ref: ./examples/WafPolicyGet.json summary: Policies get x-summary-source: derived put: operationId: Policies_CreateOrUpdate tags: - CdnWebApplicationFirewallPolicies description: Create or update policy with specified rule set name within a resource group. parameters: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter - name: policyName in: path description: The name of the CdnWebApplicationFirewallPolicy. required: true schema: type: string maxLength: 128 responses: '200': description: Resource 'CdnWebApplicationFirewallPolicy' update operation succeeded content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' '201': description: Resource 'CdnWebApplicationFirewallPolicy' create operation succeeded headers: Retry-After: description: The Retry-After header can indicate how long the client should wait before polling the operation status. schema: type: integer format: int32 content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' '202': description: The request has been accepted for processing, but processing has not yet completed. headers: Location: description: The Location header contains the URL where the status of the long running operation can be checked. schema: type: string content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: Creates specific policy: $ref: ./examples/WafPolicyCreateOrUpdate.json x-ms-long-running-operation-options: final-state-via: location final-state-schema: '#/definitions/CdnWebApplicationFirewallPolicy' x-ms-long-running-operation: true requestBody: content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' description: Policy to be created. required: true summary: Policies create or update x-summary-source: derived patch: operationId: Policies_Update tags: - CdnWebApplicationFirewallPolicies description: Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group parameters: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter - name: policyName in: path description: The name of the CdnWebApplicationFirewallPolicy. required: true schema: type: string maxLength: 128 responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' '202': description: The request has been accepted for processing, but processing has not yet completed. headers: Location: description: The Location header contains the URL where the status of the long running operation can be checked. schema: type: string content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: Creates specific policy: $ref: ./examples/WafPatchPolicy.json x-ms-long-running-operation-options: final-state-via: location final-state-schema: '#/definitions/CdnWebApplicationFirewallPolicy' x-ms-long-running-operation: true requestBody: content: application/json: schema: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicyPatchParameters' description: CdnWebApplicationFirewallPolicy parameters to be patched. required: true summary: Policies update x-summary-source: derived delete: operationId: Policies_Delete tags: - CdnWebApplicationFirewallPolicies description: Deletes Policy parameters: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter - $ref: ../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter - name: policyName in: path description: The name of the CdnWebApplicationFirewallPolicy. required: true schema: type: string maxLength: 128 responses: '200': description: Resource deleted successfully. '204': description: Resource does not exist. default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: Delete protection policy: $ref: ./examples/WafPolicyDelete.json summary: Policies delete x-summary-source: derived components: schemas: Operator: type: string description: Describes operator to be matched enum: - Any - IPMatch - GeoMatch - Equal - Contains - LessThan - GreaterThan - LessThanOrEqual - GreaterThanOrEqual - BeginsWith - EndsWith - RegEx x-ms-enum: name: Operator modelAsString: true values: - name: Any value: Any - name: IPMatch value: IPMatch - name: GeoMatch value: GeoMatch - name: Equal value: Equal - name: Contains value: Contains - name: LessThan value: LessThan - name: GreaterThan value: GreaterThan - name: LessThanOrEqual value: LessThanOrEqual - name: GreaterThanOrEqual value: GreaterThanOrEqual - name: BeginsWith value: BeginsWith - name: EndsWith value: EndsWith - name: RegEx value: RegEx CdnWebApplicationFirewallPolicyPatchParameters: type: object description: Properties required to update a CdnWebApplicationFirewallPolicy. properties: tags: type: object description: CdnWebApplicationFirewallPolicy tags additionalProperties: type: string ManagedRuleGroupOverride: type: object description: Defines a managed rule group override setting. properties: ruleGroupName: type: string description: Describes the managed rule group within the rule set to override rules: type: array description: List of rules that will be enabled. If none specified, all rules in the group will be disabled. items: $ref: '#/components/schemas/ManagedRuleOverride' x-ms-identifiers: - ruleId required: - ruleGroupName SkuName: type: string description: Name of the pricing tier. enum: - Standard_Verizon - Premium_Verizon - Custom_Verizon - Standard_Akamai - Standard_ChinaCdn - Standard_Microsoft - Standard_AzureFrontDoor - Premium_AzureFrontDoor - Standard_955BandWidth_ChinaCdn - Standard_AvgBandWidth_ChinaCdn - StandardPlus_ChinaCdn - StandardPlus_955BandWidth_ChinaCdn - StandardPlus_AvgBandWidth_ChinaCdn x-ms-enum: name: SkuName modelAsString: true values: - name: Standard_Verizon value: Standard_Verizon - name: Premium_Verizon value: Premium_Verizon - name: Custom_Verizon value: Custom_Verizon - name: Standard_Akamai value: Standard_Akamai - name: Standard_ChinaCdn value: Standard_ChinaCdn - name: Standard_Microsoft value: Standard_Microsoft - name: Standard_AzureFrontDoor value: Standard_AzureFrontDoor - name: Premium_AzureFrontDoor value: Premium_AzureFrontDoor - name: Standard_955BandWidth_ChinaCdn value: Standard_955BandWidth_ChinaCdn - name: Standard_AvgBandWidth_ChinaCdn value: Standard_AvgBandWidth_ChinaCdn - name: StandardPlus_ChinaCdn value: StandardPlus_ChinaCdn - name: StandardPlus_955BandWidth_ChinaCdn value: StandardPlus_955BandWidth_ChinaCdn - name: StandardPlus_AvgBandWidth_ChinaCdn value: StandardPlus_AvgBandWidth_ChinaCdn ManagedRuleEnabledState: type: string description: Describes if the managed rule is in enabled or disabled state. enum: - Disabled - Enabled x-ms-enum: name: ManagedRuleEnabledState modelAsString: true values: - name: Disabled value: Disabled - name: Enabled value: Enabled CdnWebApplicationFirewallPolicy: type: object description: Defines web application firewall policy for Azure CDN. properties: properties: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicyProperties' description: Properties of the web application firewall policy. x-ms-client-flatten: true etag: type: string description: Gets a unique read-only string that changes whenever the resource is updated. sku: $ref: '#/components/schemas/Sku' description: The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. required: - sku allOf: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource WafMatchVariable: type: string description: Match variable to compare against. enum: - RemoteAddr - SocketAddr - RequestMethod - RequestHeader - RequestUri - QueryString - RequestBody - Cookies - PostArgs x-ms-enum: name: WafMatchVariable modelAsString: true values: - name: RemoteAddr value: RemoteAddr - name: SocketAddr value: SocketAddr - name: RequestMethod value: RequestMethod - name: RequestHeader value: RequestHeader - name: RequestUri value: RequestUri - name: QueryString value: QueryString - name: RequestBody value: RequestBody - name: Cookies value: Cookies - name: PostArgs value: PostArgs ProvisioningState: type: string description: Provisioning state of the WebApplicationFirewallPolicy. enum: - Creating - Succeeded - Failed x-ms-enum: name: ProvisioningState modelAsString: true values: - name: Creating value: Creating - name: Succeeded value: Succeeded - name: Failed value: Failed TransformType: type: string description: Describes what transforms were applied before matching. enum: - Lowercase - Uppercase - Trim - UrlDecode - UrlEncode - RemoveNulls x-ms-enum: name: TransformType modelAsString: true values: - name: Lowercase value: Lowercase - name: Uppercase value: Uppercase - name: Trim value: Trim - name: UrlDecode value: UrlDecode - name: UrlEncode value: UrlEncode - name: RemoveNulls value: RemoveNulls PolicyResourceState: type: string description: Resource status of the policy. enum: - Creating - Enabling - Enabled - Disabling - Disabled - Deleting x-ms-enum: name: PolicyResourceState modelAsString: true values: - name: Creating value: Creating - name: Enabling value: Enabling - name: Enabled value: Enabled - name: Disabling value: Disabling - name: Disabled value: Disabled - name: Deleting value: Deleting ActionType: type: string description: Defines the action to take on rule match. enum: - Allow - Block - Log - Redirect x-ms-enum: name: ActionType modelAsString: true values: - name: Allow value: Allow - name: Block value: Block - name: Log value: Log - name: Redirect value: Redirect ManagedRuleSetList: type: object description: Defines the list of managed rule sets for the policy. properties: managedRuleSets: type: array description: List of rule sets. items: $ref: '#/components/schemas/ManagedRuleSet' x-ms-identifiers: - ruleSetType - ruleSetVersion PolicyMode: type: string description: Describes if it is in detection mode or prevention mode at policy level. enum: - Prevention - Detection x-ms-enum: name: PolicyMode modelAsString: true values: - name: Prevention value: Prevention - name: Detection value: Detection Sku: type: object description: 'Standard_Verizon = The SKU name for a Standard Verizon CDN profile. Premium_Verizon = The SKU name for a Premium Verizon CDN profile. Custom_Verizon = The SKU name for a Custom Verizon CDN profile. Standard_Akamai = The SKU name for an Akamai CDN profile. Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak bandwidth billing model. Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly average peak bandwidth billing model. StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing model. StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth billing model.' properties: name: $ref: '#/components/schemas/SkuName' description: Name of the pricing tier. CdnWebApplicationFirewallPolicyList: type: object description: Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. properties: value: type: array description: The CdnWebApplicationFirewallPolicy items on this page items: $ref: '#/components/schemas/CdnWebApplicationFirewallPolicy' nextLink: type: string format: uri description: The link to the next page of items required: - value CustomRule: type: object description: Defines the common attributes for a custom rule that can be included in a waf policy properties: name: type: string description: Defines the name of the custom rule enabledState: $ref: '#/components/schemas/CustomRuleEnabledState' description: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. priority: type: integer format: int32 description: Defines in what order this rule be evaluated in the overall list of custom rules minimum: 0 maximum: 1000 matchConditions: type: array description: List of match conditions. items: $ref: '#/components/schemas/MatchCondition' x-ms-identifiers: [] action: $ref: '#/components/schemas/ActionType' description: Describes what action to be applied when rule matches required: - name - priority - matchConditions - action PolicySettingsDefaultCustomBlockResponseStatusCode: type: number description: If the action type is block, this field defines the default customer overridable http response status code. enum: - 200 - 403 - 405 - 406 - 429 x-ms-enum: name: PolicySettingsDefaultCustomBlockResponseStatusCode modelAsString: true values: - name: '200' value: 200 - name: '403' value: 403 - name: '405' value: 405 - name: '406' value: 406 - name: '429' value: 429 RateLimitRuleList: type: object description: Defines contents of rate limit rules properties: rules: type: array description: List of rules items: $ref: '#/components/schemas/RateLimitRule' x-ms-identifiers: - name PolicyEnabledState: type: string description: Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified. enum: - Disabled - Enabled x-ms-enum: name: PolicyEnabledState modelAsString: true values: - name: Disabled value: Disabled - name: Enabled value: Enabled policySettings: type: object description: Defines contents of a web application firewall global configuration properties: enabledState: $ref: '#/components/schemas/PolicyEnabledState' description: describes if the policy is in enabled state or disabled state mode: $ref: '#/components/schemas/PolicyMode' description: Describes if it is in detection mode or prevention mode at policy level. defaultRedirectUrl: type: string description: If action type is redirect, this field represents the default redirect URL for the client. defaultCustomBlockResponseStatusCode: $ref: '#/components/schemas/PolicySettingsDefaultCustomBlockResponseStatusCode' description: If the action type is block, this field defines the default customer overridable http response status code. defaultCustomBlockResponseBody: type: string description: If the action type is block, customer can override the response body. The body must be specified in base64 encoding. pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$ CustomRuleEnabledState: type: string description: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. enum: - Disabled - Enabled x-ms-enum: name: CustomRuleEnabledState modelAsString: true values: - name: Disabled value: Disabled - name: Enabled value: Enabled ManagedRuleSet: type: object description: Defines a managed rule set. properties: ruleSetType: type: string description: Defines the rule set type to use. ruleSetVersion: type: string description: Defines the version of the rule set to use. anomalyScore: type: integer format: int32 description: 'Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.' minimum: 0 maximum: 20 ruleGroupOverrides: type: array description: Defines the rule overrides to apply to the rule set. items: $ref: '#/components/schemas/ManagedRuleGroupOverride' x-ms-identifiers: - ruleGroupName required: - ruleSetType - ruleSetVersion ManagedRuleOverride: type: object description: Defines a managed rule group override setting. properties: ruleId: type: string description: Identifier for the managed rule. enabledState: $ref: '#/components/schemas/ManagedRuleEnabledState' description: Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. action: $ref: '#/components/schemas/ActionType' description: Describes the override action to be applied when rule matches. required: - ruleId RateLimitRule: type: object description: Defines a rate limiting rule that can be included in a waf policy properties: rateLimitThreshold: type: integer format: int32 description: Defines rate limit threshold. minimum: 0 rateLimitDurationInMinutes: type: integer format: int32 description: Defines rate limit duration. Default is 1 minute. minimum: 0 maximum: 60 required: - rateLimitThreshold - rateLimitDurationInMinutes allOf: - $ref: '#/components/schemas/CustomRule' CdnWebApplicationFirewallPolicyProperties: type: object description: Defines CDN web application firewall policy properties. properties: policySettings: $ref: '#/components/schemas/policySettings' description: Describes policySettings for policy rateLimitRules: $ref: '#/components/schemas/RateLimitRuleList' description: Describes rate limit rules inside the policy. customRules: $ref: '#/components/schemas/CustomRuleList' description: Describes custom rules inside the policy. managedRules: $ref: '#/components/schemas/ManagedRuleSetList' description: Describes managed rules inside the policy. endpointLinks: type: array description: Describes Azure CDN endpoints associated with this Web Application Firewall policy. items: $ref: '#/components/schemas/CdnEndpoint' readOnly: true extendedProperties: type: object description: Key-Value pair representing additional properties for Web Application Firewall policy. additionalProperties: type: string provisioningState: $ref: '#/components/schemas/ProvisioningState' description: Provisioning state of the WebApplicationFirewallPolicy. readOnly: true resourceState: $ref: '#/components/schemas/PolicyResourceState' description: Resource status of the policy. readOnly: true MatchCondition: type: object description: Define match conditions properties: matchVariable: $ref: '#/components/schemas/WafMatchVariable' description: Match variable to compare against. selector: type: string description: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. operator: $ref: '#/components/schemas/Operator' description: Describes operator to be matched negateCondition: type: boolean description: Describes if the result of this condition should be negated. matchValue: type: array description: List of possible match values. items: type: string transforms: type: array description: List of transforms. items: $ref: '#/components/schemas/TransformType' required: - matchVariable - operator - matchValue CdnEndpoint: type: object description: Defines the ARM Resource ID for the linked endpoints properties: id: type: string description: ARM Resource ID string. CustomRuleList: type: object description: Defines contents of custom rules properties: rules: type: array description: List of rules items: $ref: '#/components/schemas/CustomRule' x-ms-identifiers: - name securitySchemes: azure_auth: type: oauth2 flows: implicit: scopes: user_impersonation: impersonate your user account authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize description: Azure Active Directory OAuth2 Flow.