Skip to main content

waf_policies

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

Overview

Namewaf_policies
TypeResource
Iddatadog.remote_config.waf_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the policy. (example: 2857c47d-1e3a-4300-8b2f-dc24089c084b)
attributesobjectA WAF policy.
metaobjectMetadata associated with the WAF policy.
typestringThe type of the resource. The value should always be policy. (policy) (default: policy, example: policy)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_application_security_waf_policyselectpolicy_idRetrieve a WAF policy by ID.
list_application_security_wafpoliciesselectRetrieve a list of WAF policies.
create_application_security_waf_policyinsertdataCreate a new WAF policy.
update_application_security_waf_policyreplacepolicy_id, dataUpdate a specific WAF policy.<br />Returns the policy object when the request is successful.
delete_application_security_waf_policydeletepolicy_idDelete a specific WAF 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_idstringThe ID of the policy. (example: recommended)
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

SELECT examples

Retrieve a WAF policy by ID.

SELECT
id,
attributes,
meta,
type
FROM datadog.remote_config.waf_policies
WHERE policy_id = '{{ policy_id }}' -- required
;

INSERT examples

Create a new WAF policy.

INSERT INTO datadog.remote_config.waf_policies (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;

REPLACE examples

Update a specific WAF policy.<br />Returns the policy object when the request is successful.

REPLACE datadog.remote_config.waf_policies
SET
data = '{{ data }}'
WHERE
policy_id = '{{ policy_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a specific WAF policy.

DELETE FROM datadog.remote_config.waf_policies
WHERE policy_id = '{{ policy_id }}' --required
;