policies
Creates, updates, deletes, gets or lists a policies resource.
Overview
| Name | policies |
| Type | Resource |
| Id | azure.front_door.policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
customRules | object | Describes custom rules inside the policy. |
etag | string | Gets a unique read-only string that changes whenever the resource is updated. |
frontendEndpointLinks | array | Describes Frontend Endpoints associated with this Web Application Firewall policy. |
location | string | Resource location. |
managedRules | object | Describes managed rules inside the policy. |
policySettings | object | Describes settings for the policy. |
provisioningState | string | Provisioning state of the policy. |
resourceState | string | Resource status of the policy. Known values are: "Creating", "Enabling", "Enabled", "Disabling", "Disabled", and "Deleting". (Creating, Enabling, Enabled, Disabling, Disabled, Deleting) |
routingRuleLinks | array | Describes Routing Rules associated with this Web Application Firewall policy. |
securityPolicyLinks | array | Describes Security Policy associated with this Web Application Firewall policy. |
sku | object | The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified. |
tags | object | Resource tags. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
customRules | object | Describes custom rules inside the policy. |
etag | string | Gets a unique read-only string that changes whenever the resource is updated. |
frontendEndpointLinks | array | Describes Frontend Endpoints associated with this Web Application Firewall policy. |
location | string | Resource location. |
managedRules | object | Describes managed rules inside the policy. |
policySettings | object | Describes settings for the policy. |
provisioningState | string | Provisioning state of the policy. |
resourceState | string | Resource status of the policy. Known values are: "Creating", "Enabling", "Enabled", "Disabling", "Disabled", and "Deleting". (Creating, Enabling, Enabled, Disabling, Disabled, Deleting) |
routingRuleLinks | array | Describes Routing Rules associated with this Web Application Firewall policy. |
securityPolicyLinks | array | Describes Security Policy associated with this Web Application Firewall policy. |
sku | object | The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified. |
tags | object | Resource tags. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
customRules | object | Describes custom rules inside the policy. |
etag | string | Gets a unique read-only string that changes whenever the resource is updated. |
frontendEndpointLinks | array | Describes Frontend Endpoints associated with this Web Application Firewall policy. |
location | string | Resource location. |
managedRules | object | Describes managed rules inside the policy. |
policySettings | object | Describes settings for the policy. |
provisioningState | string | Provisioning state of the policy. |
resourceState | string | Resource status of the policy. Known values are: "Creating", "Enabling", "Enabled", "Disabling", "Disabled", and "Deleting". (Creating, Enabling, Enabled, Disabling, Disabled, Deleting) |
routingRuleLinks | array | Describes Routing Rules associated with this Web Application Firewall policy. |
securityPolicyLinks | array | Describes Security Policy associated with this Web Application Firewall policy. |
sku | object | The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified. |
tags | object | Resource tags. |
type | string | Resource type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, policy_name, subscription_id | Retrieve protection policy with specified name within a resource group. | |
list | select | resource_group_name, subscription_id | Lists all of the protection policies within a resource group. | |
list_by_subscription | select | subscription_id | Lists all of the protection policies within a subscription. | |
create_or_update | insert | resource_group_name, policy_name, subscription_id | Create or update policy with specified rule set name within a resource group. | |
update | update | resource_group_name, policy_name, subscription_id | Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and resource group. | |
create_or_update | replace | resource_group_name, policy_name, subscription_id | Create or update policy with specified rule set name within a resource group. | |
delete | delete | resource_group_name, policy_name, subscription_id | 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 |
|---|---|---|
policy_name | string | The name of the Web Application Firewall Policy. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
- list_by_subscription
Retrieve protection policy with specified name within a resource group.
SELECT
id,
name,
customRules,
etag,
frontendEndpointLinks,
location,
managedRules,
policySettings,
provisioningState,
resourceState,
routingRuleLinks,
securityPolicyLinks,
sku,
tags,
type
FROM azure.front_door.policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND policy_name = '{{ policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all of the protection policies within a resource group.
SELECT
id,
name,
customRules,
etag,
frontendEndpointLinks,
location,
managedRules,
policySettings,
provisioningState,
resourceState,
routingRuleLinks,
securityPolicyLinks,
sku,
tags,
type
FROM azure.front_door.policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all of the protection policies within a subscription.
SELECT
id,
name,
customRules,
etag,
frontendEndpointLinks,
location,
managedRules,
policySettings,
provisioningState,
resourceState,
routingRuleLinks,
securityPolicyLinks,
sku,
tags,
type
FROM azure.front_door.policies
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update policy with specified rule set name within a resource group.
INSERT INTO azure.front_door.policies (
location,
tags,
properties,
etag,
sku,
resource_group_name,
policy_name,
subscription_id
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ etag }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type
;
# Description fields are for documentation purposes
- name: policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the policies resource.
- name: policy_name
value: "{{ policy_name }}"
description: Required parameter for the policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the policies resource.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of the web application firewall policy.
value:
policySettings:
enabledState: "{{ enabledState }}"
mode: "{{ mode }}"
redirectUrl: "{{ redirectUrl }}"
customBlockResponseStatusCode: {{ customBlockResponseStatusCode }}
customBlockResponseBody: "{{ customBlockResponseBody }}"
requestBodyCheck: "{{ requestBodyCheck }}"
javascriptChallengeExpirationInMinutes: {{ javascriptChallengeExpirationInMinutes }}
captchaExpirationInMinutes: {{ captchaExpirationInMinutes }}
logScrubbing:
state: "{{ state }}"
scrubbingRules:
- matchVariable: "{{ matchVariable }}"
selectorMatchOperator: "{{ selectorMatchOperator }}"
selector: "{{ selector }}"
state: "{{ state }}"
customRules:
rules:
- name: "{{ name }}"
priority: {{ priority }}
enabledState: "{{ enabledState }}"
ruleType: "{{ ruleType }}"
rateLimitDurationInMinutes: {{ rateLimitDurationInMinutes }}
rateLimitThreshold: {{ rateLimitThreshold }}
groupBy: "{{ groupBy }}"
matchConditions: "{{ matchConditions }}"
action: "{{ action }}"
managedRules:
managedRuleSets:
- ruleSetType: "{{ ruleSetType }}"
ruleSetVersion: "{{ ruleSetVersion }}"
ruleSetAction: "{{ ruleSetAction }}"
exclusions: "{{ exclusions }}"
ruleGroupOverrides: "{{ ruleGroupOverrides }}"
frontendEndpointLinks:
- id: "{{ id }}"
routingRuleLinks:
- id: "{{ id }}"
securityPolicyLinks:
- id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
resourceState: "{{ resourceState }}"
- name: etag
value: "{{ etag }}"
description: |
Gets a unique read-only string that changes whenever the resource is updated.
- name: sku
description: |
The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified.
value:
name: "{{ name }}"
UPDATE examples
- update
Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and resource group.
UPDATE azure.front_door.policies
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND policy_name = '{{ policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type;
REPLACE examples
- create_or_update
Create or update policy with specified rule set name within a resource group.
REPLACE azure.front_door.policies
SET
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}',
etag = '{{ etag }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND policy_name = '{{ policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type;
DELETE examples
- delete
Deletes Policy.
DELETE FROM azure.front_door.policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND policy_name = '{{ policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;