policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | azure.cdn.policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
etag | string | Gets a unique read-only string that changes whenever the resource is updated. |
location | string | Resource location. |
properties | object | Properties of the web application firewall policy. |
sku | object | The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. |
tags | object | Resource tags. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
etag | string | Gets a unique read-only string that changes whenever the resource is updated. |
location | string | Resource location. |
properties | object | Properties of the web application firewall policy. |
sku | object | The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , policyName , 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 | resourceGroupName , policyName , subscriptionId , data__sku | Create or update policy with specified rule set name within a resource group. | |
update | update | resourceGroupName , policyName , subscriptionId | Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group | |
delete | delete | resourceGroupName , policyName , subscriptionId | Deletes Policy |
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.
Name | Datatype | Description |
---|---|---|
policyName | string | The name of the CdnWebApplicationFirewallPolicy. |
resourceGroupName | string | Name of the Resource group within the Azure subscription. |
subscriptionId | string | Azure Subscription ID. |
SELECT
examples
- get
- list
Retrieve protection policy with specified name within a resource group.
SELECT
etag,
location,
properties,
sku,
tags
FROM azure.cdn.policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND policyName = '{{ policyName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists all of the protection policies within a resource group.
SELECT
etag,
location,
properties,
sku,
tags
FROM azure.cdn.policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update policy with specified rule set name within a resource group.
INSERT INTO azure.cdn.policies (
data__properties,
data__etag,
data__sku,
data__location,
data__tags,
resourceGroupName,
policyName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ etag }}',
'{{ sku }}' /* required */,
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ policyName }}',
'{{ subscriptionId }}'
RETURNING
etag,
location,
properties,
sku,
tags
;
# Description fields are for documentation purposes
- name: policies
props:
- name: resourceGroupName
value: string
description: Required parameter for the policies resource.
- name: policyName
value: string
description: Required parameter for the policies resource.
- name: subscriptionId
value: string
description: Required parameter for the policies resource.
- name: properties
value: object
description: |
Properties of the web application firewall policy.
- name: etag
value: string
description: |
Gets a unique read-only string that changes whenever the resource is updated.
- name: sku
value: object
description: |
The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy.
- name: location
value: string
description: |
Resource location.
- name: tags
value: object
description: |
Resource tags.
UPDATE
examples
- update
Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group
UPDATE azure.cdn.policies
SET
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND policyName = '{{ policyName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
etag,
location,
properties,
sku,
tags;
DELETE
examples
- delete
Deletes Policy
DELETE FROM azure.cdn.policies
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND policyName = '{{ policyName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;