Skip to main content

web_application_firewall_policies

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

Overview

Nameweb_application_firewall_policies
TypeResource
Idazure.network.web_application_firewall_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
applicationGatewayForContainersarrayA collection of references to application gateway for containers.
applicationGatewaysarrayA collection of references to application gateways.
customRulesarrayThe custom rules inside the policy.
etagstringA unique read-only string that changes whenever the resource is updated.
httpListenersarrayA collection of references to application gateway http listeners.
locationstringResource location.
managedRulesobjectDescribes the managedRules structure. Required.
pathBasedRulesarrayA collection of references to application gateway path rules.
policySettingsobjectThe PolicySettings for policy.
provisioningStatestringThe provisioning state of the web application firewall policy resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
resourceStatestringResource status of the policy. Known values are: "Creating", "Enabling", "Enabled", "Disabling", "Disabled", and "Deleting". (Creating, Enabling, Enabled, Disabling, Disabled, Deleting)
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_allselectsubscription_idGets all the WAF policies in a subscription.
create_or_updateinsertresource_group_name, policy_name, subscription_idCreates or update policy with specified rule set name within a resource group.
create_or_updatereplaceresource_group_name, policy_name, subscription_idCreates 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 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,
applicationGatewayForContainers,
applicationGateways,
customRules,
etag,
httpListeners,
location,
managedRules,
pathBasedRules,
policySettings,
provisioningState,
resourceState,
tags,
type
FROM azure.network.web_application_firewall_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND policy_name = '{{ policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or update policy with specified rule set name within a resource group.

INSERT INTO azure.network.web_application_firewall_policies (
id,
location,
tags,
properties,
resource_group_name,
policy_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

REPLACE examples

Creates or update policy with specified rule set name within a resource group.

REPLACE azure.network.web_application_firewall_policies
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
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,
tags,
type;

DELETE examples

Deletes Policy.

DELETE FROM azure.network.web_application_firewall_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND policy_name = '{{ policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;