Skip to main content

rule_sets

Creates, updates, deletes, gets or lists a rule_sets resource.

Overview

Namerule_sets
TypeResource
Idazure.cdn.rule_sets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
batchModebooleanIndicates 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.
deploymentStatusstringKnown values are: "NotStarted", "InProgress", "Succeeded", and "Failed". (NotStarted, InProgress, Succeeded, Failed)
profileNamestringThe name of the profile which holds the rule set.
provisioningStatestringProvisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating)
rulesarrayA 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.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, profile_name, rule_set_name, subscription_idGets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.
list_by_profileselectresource_group_name, profile_name, subscription_idLists existing AzureFrontDoor rule sets within a profile.
createinsertresource_group_name, profile_name, rule_set_name, subscription_idCreates or update a batch rule set within the specified profile along with the rules associate to it.
deletedeleteresource_group_name, profile_name, rule_set_name, subscription_idDeletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.
list_resource_usageexecresource_group_name, profile_name, rule_set_name, subscription_idChecks the quota and actual usage of endpoints under the given Azure Front Door profile.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
profile_namestringName of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
rule_set_namestringName of the rule set under the profile which is unique globally. Required.
subscription_idstring

SELECT examples

Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.

SELECT
id,
name,
batchMode,
deploymentStatus,
profileName,
provisioningState,
rules,
systemData,
type
FROM azure.cdn.rule_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND rule_set_name = '{{ rule_set_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or update a batch rule set within the specified profile along with the rules associate to it.

INSERT INTO azure.cdn.rule_sets (
properties,
resource_group_name,
profile_name,
rule_set_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ profile_name }}',
'{{ rule_set_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.

DELETE FROM azure.cdn.rule_sets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND rule_set_name = '{{ rule_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Checks the quota and actual usage of endpoints under the given Azure Front Door profile.

EXEC azure.cdn.rule_sets.list_resource_usage 
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@rule_set_name='{{ rule_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;