policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | azure.cdn.policies |
Fields
- vw_policies
- policies
Name | Datatype | Description |
---|---|---|
custom_rules | text | field from the properties object |
endpoint_links | text | field from the properties object |
etag | text | Gets a unique read-only string that changes whenever the resource is updated. |
extended_properties | text | field from the properties object |
location | text | Resource location. |
managed_rules | text | field from the properties object |
policyName | text | field from the properties object |
policy_settings | text | field from the properties object |
provisioning_state | text | field from the properties object |
rate_limit_rules | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_state | text | field from the properties object |
sku | text | 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. |
| subscriptionId
| text
| field from the properties
object |
| tags
| text
| Resource tags. |
Name | Datatype | Description |
---|---|---|
etag | string | Gets a unique read-only string that changes whenever the resource is updated. |
location | string | Resource location. |
properties | object | Defines CDN web application firewall policy properties. |
sku | object | 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. |
| tags
| object
| Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | policyName, resourceGroupName, subscriptionId | Retrieve protection policy with specified name within a resource group. |
list | SELECT | resourceGroupName, subscriptionId | Lists all of the protection policies within a resource group. |
create_or_update | INSERT | policyName, resourceGroupName, subscriptionId, data__sku | Create or update policy with specified rule set name within a resource group. |
delete | DELETE | policyName, resourceGroupName, subscriptionId | Deletes Policy |
update | UPDATE | policyName, resourceGroupName, subscriptionId | Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group |
SELECT
examples
Lists all of the protection policies within a resource group.
- vw_policies
- policies
SELECT
custom_rules,
endpoint_links,
etag,
extended_properties,
location,
managed_rules,
policyName,
policy_settings,
provisioning_state,
rate_limit_rules,
resourceGroupName,
resource_state,
sku,
subscriptionId,
tags
FROM azure.cdn.vw_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
etag,
location,
properties,
sku,
tags
FROM azure.cdn.policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.cdn.policies (
policyName,
resourceGroupName,
subscriptionId,
data__sku,
properties,
etag,
sku,
location,
tags
)
SELECT
'{{ policyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__sku }}',
'{{ properties }}',
'{{ etag }}',
'{{ sku }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: policySettings
value:
- name: enabledState
value: string
- name: mode
value: string
- name: defaultRedirectUrl
value: string
- name: defaultCustomBlockResponseStatusCode
value: integer
- name: defaultCustomBlockResponseBody
value: string
- name: rateLimitRules
value:
- name: rules
value:
- - name: rateLimitThreshold
value: integer
- name: rateLimitDurationInMinutes
value: integer
- name: name
value: string
- name: enabledState
value: string
- name: priority
value: integer
- name: matchConditions
value:
- - name: matchVariable
value: string
- name: selector
value: string
- name: operator
value: string
- name: negateCondition
value: boolean
- name: matchValue
value:
- string
- name: transforms
value:
- []
- name: action
value: []
- name: customRules
value:
- name: rules
value:
- - name: name
value: string
- name: enabledState
value: string
- name: priority
value: integer
- name: matchConditions
value:
- - name: matchVariable
value: string
- name: selector
value: string
- name: operator
value: string
- name: negateCondition
value: boolean
- name: matchValue
value:
- string
- name: transforms
value:
- []
- name: managedRules
value:
- name: managedRuleSets
value:
- - name: ruleSetType
value: string
- name: ruleSetVersion
value: string
- name: anomalyScore
value: integer
- name: ruleGroupOverrides
value:
- - name: ruleGroupName
value: string
- name: rules
value:
- - name: ruleId
value: string
- name: enabledState
value: string
- name: endpointLinks
value:
- - name: id
value: string
- name: extendedProperties
value: object
- name: provisioningState
value: string
- name: resourceState
value: string
- name: etag
value: string
- name: sku
value:
- name: name
value: string
- name: location
value: string
- name: tags
value: object
UPDATE
example
Updates a policies
resource.
/*+ update */
UPDATE azure.cdn.policies
SET
tags = '{{ tags }}'
WHERE
policyName = '{{ policyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified policies
resource.
/*+ delete */
DELETE FROM azure.cdn.policies
WHERE policyName = '{{ policyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';