Skip to main content

policies

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

Overview

Namepolicies
TypeResource
Idazure.front_door.policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
customRulesobjectDescribes custom rules inside the policy.
etagstringGets a unique read-only string that changes whenever the resource is updated.
frontendEndpointLinksarrayDescribes Frontend Endpoints associated with this Web Application Firewall policy.
locationstringResource location.
managedRulesobjectDescribes managed rules inside the policy.
policySettingsobjectDescribes settings for the policy.
provisioningStatestringProvisioning state of the policy.
resourceStatestringResource status of the policy. Known values are: "Creating", "Enabling", "Enabled", "Disabling", "Disabled", and "Deleting". (Creating, Enabling, Enabled, Disabling, Disabled, Deleting)
routingRuleLinksarrayDescribes Routing Rules associated with this Web Application Firewall policy.
securityPolicyLinksarrayDescribes Security Policy associated with this Web Application Firewall policy.
skuobjectThe pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified.
tagsobjectResource tags.
typestringResource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, policy_name, subscription_idRetrieve protection policy with specified name within a resource group.
listselectresource_group_name, subscription_idLists all of the protection policies within a resource group.
list_by_subscriptionselectsubscription_idLists all of the protection policies within a subscription.
create_or_updateinsertresource_group_name, policy_name, subscription_idCreate or update policy with specified rule set name within a resource group.
updateupdateresource_group_name, policy_name, subscription_idPatch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and resource group.
create_or_updatereplaceresource_group_name, policy_name, subscription_idCreate or update policy with specified rule set name within a resource group.
deletedeleteresource_group_name, policy_name, subscription_idDeletes 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.

NameDatatypeDescription
policy_namestringThe name of the Web Application Firewall Policy. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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

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
;