openapi: 3.2.0 info: title: CdnManagementClient Rule Sets API 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: Rulesets paths: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets: get: operationId: RuleSets_ListByProfile tags: - Rulesets description: Lists existing AzureFrontDoor rule sets within a profile. 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: profileName in: path description: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. required: true schema: type: string maxLength: 260 minLength: 1 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/RuleSetListResult' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: RuleSets_ListByProfile: $ref: ./examples/RuleSets_ListByProfile.json x-ms-pageable: nextLinkName: nextLink summary: Rule sets list by profile x-summary-source: derived ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName} : get: operationId: RuleSets_Get tags: - Rulesets description: Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. 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: profileName in: path description: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. required: true schema: type: string maxLength: 260 minLength: 1 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ - name: ruleSetName in: path description: Name of the rule set under the profile which is unique globally. required: true schema: type: string responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/RuleSet' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: RuleSets_Get: $ref: ./examples/RuleSets_Get.json summary: Rule sets get x-summary-source: derived put: operationId: RuleSets_Create tags: - Rulesets description: Creates or update a batch rule set within the specified profile along with the rules associate to it. 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: profileName in: path description: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. required: true schema: type: string maxLength: 260 minLength: 1 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ - name: ruleSetName in: path description: Name of the rule set under the profile which is unique globally. required: true schema: type: string responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/RuleSet' '201': description: The request has succeeded and a new resource has been created as a result. headers: Azure-AsyncOperation: description: A link to the status monitor schema: type: string Location: description: The Location header contains the URL where the status of the long running operation can be checked. schema: type: string 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/RuleSet' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: RuleSets_Create: $ref: ./examples/RuleSets_Create.json x-ms-long-running-operation-options: final-state-via: azure-async-operation final-state-schema: '#/definitions/RuleSet' x-ms-long-running-operation: true requestBody: content: application/json: schema: $ref: '#/components/schemas/RuleSet' description: Resource create parameters. summary: Rule sets create x-summary-source: derived delete: operationId: RuleSets_Delete tags: - Rulesets description: Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. 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: profileName in: path description: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. required: true schema: type: string maxLength: 260 minLength: 1 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ - name: ruleSetName in: path description: Name of the rule set under the profile which is unique globally. required: true schema: type: string responses: '200': description: Resource deleted successfully. '202': description: Resource deletion accepted. headers: Azure-AsyncOperation: description: A link to the status monitor schema: type: string Location: description: The Location header contains the URL where the status of the long running operation can be checked. schema: type: string 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 '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: RuleSets_Delete: $ref: ./examples/RuleSets_Delete.json x-ms-long-running-operation-options: final-state-via: azure-async-operation x-ms-long-running-operation: true summary: Rule sets delete x-summary-source: derived ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages : post: operationId: RuleSets_ListResourceUsage tags: - Rulesets description: Checks the quota and actual usage of endpoints under the given Azure Front Door profile. 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: profileName in: path description: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. required: true schema: type: string maxLength: 260 minLength: 1 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ - name: ruleSetName in: path description: Name of the rule set under the profile which is unique globally. required: true schema: type: string responses: '200': description: Azure operation completed successfully. content: application/json: schema: $ref: '#/components/schemas/UsagesListResult' default: description: An unexpected error response. content: application/json: schema: $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse x-ms-examples: RuleSets_ListResourceUsage: $ref: ./examples/RuleSets_ListResourceUsage.json x-ms-pageable: nextLinkName: nextLink summary: Rule sets list resource usage x-summary-source: derived components: schemas: RuleSetProperties: type: object description: The JSON object that contains the properties of the Rule Set to create. properties: profileName: type: string description: The name of the profile which holds the rule set. readOnly: true batchMode: type: boolean description: 'Indicates whether rule set is in batch mode. When batch mode is enabled, rules will be processed in a batch along with the rule set. When batch mode is disabled, rules would need to be processed independently. This property can only be set during rule set creation and cannot be updated later. For switching modes, a new rule set needs to be created with the desired mode and rules need to be migrated to the new rule set.' x-ms-mutability: - read - create rules: type: array description: 'A list of rules that are part of this rule set provided the rule set is in batch mode. This property will be ignored if the rule set is not in batch mode.' items: $ref: '#/components/schemas/BatchRuleProperties' x-ms-identifiers: - ruleName allOf: - $ref: '#/components/schemas/AFDStateProperties' BatchRuleProperties: type: object description: The JSON object that contains a rule with its name for batch mode operations. properties: ruleName: type: string description: Name of the rule. minLength: 1 maxLength: 60 pattern: ^[a-zA-Z][a-zA-Z0-9]{0,59}$ x-ms-mutability: - read - create ruleSetName: type: string description: The name of the rule set containing the rule. readOnly: true order: type: integer format: int32 description: The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. conditions: type: array description: A list of conditions that must be matched for the actions to be executed items: $ref: '#/components/schemas/DeliveryRuleCondition' x-ms-identifiers: - name actions: type: array description: A list of actions that are executed when all the conditions of a rule are satisfied. items: $ref: '#/components/schemas/DeliveryRuleAction' x-ms-identifiers: - name matchProcessingBehavior: type: string description: If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. default: Continue enum: - Continue - Stop x-ms-enum: name: MatchProcessingBehavior modelAsString: true values: - name: Continue value: Continue - name: Stop value: Stop required: - ruleName RuleSetListResult: type: object description: The response of a RuleSet list operation. properties: value: type: array description: The RuleSet items on this page items: $ref: '#/components/schemas/RuleSet' nextLink: type: string format: uri description: The link to the next page of items required: - value DeliveryRuleAction: type: object description: An action for the delivery rule. properties: name: $ref: '#/components/schemas/DeliveryRuleActionName' description: The name of the action for the delivery rule. discriminator: propertyName: name required: - name DeliveryRuleActionName: type: string description: The name of the action for the delivery rule. enum: - CacheExpiration - CacheKeyQueryString - ModifyRequestHeader - ModifyResponseHeader - UrlRedirect - UrlRewrite - UrlSigning - OriginGroupOverride - RouteConfigurationOverride - EdgeAction - AfdUrlSigning x-ms-enum: name: DeliveryRuleActionName modelAsString: true values: - name: CacheExpiration value: CacheExpiration - name: CacheKeyQueryString value: CacheKeyQueryString - name: ModifyRequestHeader value: ModifyRequestHeader - name: ModifyResponseHeader value: ModifyResponseHeader - name: UrlRedirect value: UrlRedirect - name: UrlRewrite value: UrlRewrite - name: UrlSigning value: UrlSigning - name: OriginGroupOverride value: OriginGroupOverride - name: RouteConfigurationOverride value: RouteConfigurationOverride - name: EdgeAction value: EdgeAction - name: AfdUrlSigning value: AfdUrlSigning UsageUnit: type: string description: An enum describing the unit of measurement. enum: - Count x-ms-enum: name: UsageUnit modelAsString: true values: - name: Count value: Count AfdProvisioningState: type: string description: Provisioning status enum: - Succeeded - Failed - Updating - Deleting - Creating x-ms-enum: name: AfdProvisioningState modelAsString: true values: - name: Succeeded value: Succeeded - name: Failed value: Failed - name: Updating value: Updating - name: Deleting value: Deleting - name: Creating value: Creating UsagesListResult: type: object description: The list usages operation response. properties: value: type: array description: The Usage items on this page items: $ref: '#/components/schemas/Usage' nextLink: type: string format: uri description: The link to the next page of items required: - value Usage: type: object description: Describes resource usage. properties: id: type: string description: Resource identifier. readOnly: true unit: $ref: '#/components/schemas/UsageUnit' description: An enum describing the unit of measurement. currentValue: type: integer format: int64 description: The current value of the usage. limit: type: integer format: int64 description: The limit of usage. name: $ref: '#/components/schemas/UsageName' description: The name of the type of usage. required: - unit - currentValue - limit - name AFDStateProperties: type: object description: The tracking states for afd resources. properties: provisioningState: $ref: '#/components/schemas/AfdProvisioningState' description: Provisioning status readOnly: true deploymentStatus: $ref: '#/components/schemas/DeploymentStatus' readOnly: true RuleSet: type: object description: Friendly RuleSet name mapping to the any RuleSet or secret related information. properties: properties: $ref: '#/components/schemas/RuleSetProperties' description: The JSON object that contains the properties of the Rule Set to create. x-ms-client-flatten: true allOf: - $ref: ../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource DeploymentStatus: type: string enum: - NotStarted - InProgress - Succeeded - Failed x-ms-enum: name: DeploymentStatus modelAsString: true values: - name: NotStarted value: NotStarted - name: InProgress value: InProgress - name: Succeeded value: Succeeded - name: Failed value: Failed DeliveryRuleCondition: type: object description: A condition for the delivery rule. properties: name: $ref: '#/components/schemas/MatchVariable' description: The name of the condition for the delivery rule. discriminator: propertyName: name required: - name MatchVariable: type: string description: Request variable to compare with. enum: - RemoteAddress - RequestMethod - QueryString - PostArgs - RequestUri - RequestHeader - RequestBody - RequestScheme - UrlPath - UrlFileExtension - UrlFileName - HttpVersion - Cookies - IsDevice - SocketAddr - ClientPort - ServerPort - HostName - SslProtocol x-ms-enum: name: MatchVariable modelAsString: true values: - name: RemoteAddress value: RemoteAddress - name: RequestMethod value: RequestMethod - name: QueryString value: QueryString - name: PostArgs value: PostArgs - name: RequestUri value: RequestUri - name: RequestHeader value: RequestHeader - name: RequestBody value: RequestBody - name: RequestScheme value: RequestScheme - name: UrlPath value: UrlPath - name: UrlFileExtension value: UrlFileExtension - name: UrlFileName value: UrlFileName - name: HttpVersion value: HttpVersion - name: Cookies value: Cookies - name: IsDevice value: IsDevice - name: SocketAddr value: SocketAddr - name: ClientPort value: ClientPort - name: ServerPort value: ServerPort - name: HostName value: HostName - name: SslProtocol value: SslProtocol UsageName: type: object description: The usage names. properties: value: type: string description: A string describing the resource name. localizedValue: type: string description: A localized string describing the resource 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.