waf_custom_rules
Creates, updates, deletes, gets or lists a waf_custom_rules resource.
Overview
| Name | waf_custom_rules | 
| Type | Resource | 
| Id | datadog.remote_config.waf_custom_rules | 
Fields
The following fields are returned by SELECT queries:
- get_application_security_waf_custom_rule
- list_application_security_wafcustom_rules
| Name | Datatype | Description | 
|---|---|---|
| id | string | The ID of the custom rule. (example: 2857c47d-1e3a-4300-8b2f-dc24089c084b) | 
| attributes | object | A WAF custom rule. | 
| type | string | The type of the resource. The value should always be custom_rule. (default: custom_rule, example: custom_rule) | 
| Name | Datatype | Description | 
|---|---|---|
| id | string | The ID of the custom rule. (example: 2857c47d-1e3a-4300-8b2f-dc24089c084b) | 
| attributes | object | A WAF custom rule. | 
| type | string | The type of the resource. The value should always be custom_rule. (default: custom_rule, example: custom_rule) | 
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description | 
|---|---|---|---|---|
| get_application_security_waf_custom_rule | select | custom_rule_id,region | Retrieve a WAF custom rule by ID. | |
| list_application_security_wafcustom_rules | select | region | Retrieve a list of WAF custom rule. | |
| create_application_security_waf_custom_rule | insert | region,data__data | Create a new WAF custom rule with the given parameters. | |
| update_application_security_waf_custom_rule | replace | custom_rule_id,region,data__data | Update a specific WAF custom Rule. Returns the Custom Rule object when the request is successful. | |
| delete_application_security_waf_custom_rule | delete | custom_rule_id,region | Delete a specific WAF custom rule. | 
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 | 
|---|---|---|
| custom_rule_id | string | The ID of the custom rule. (example: 3b5-v82-ns6) | 
| region | string | (default: datadoghq.com) | 
SELECT examples
- get_application_security_waf_custom_rule
- list_application_security_wafcustom_rules
Retrieve a WAF custom rule by ID.
SELECT
id,
attributes,
type
FROM datadog.remote_config.waf_custom_rules
WHERE custom_rule_id = '{{ custom_rule_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieve a list of WAF custom rule.
SELECT
id,
attributes,
type
FROM datadog.remote_config.waf_custom_rules
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_application_security_waf_custom_rule
- Manifest
Create a new WAF custom rule with the given parameters.
INSERT INTO datadog.remote_config.waf_custom_rules (
data__data,
region
)
SELECT 
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: waf_custom_rules
  props:
    - name: region
      value: string
      description: Required parameter for the waf_custom_rules resource.
    - name: data
      value: object
      description: |
        Object for a single WAF custom rule.
REPLACE examples
- update_application_security_waf_custom_rule
Update a specific WAF custom Rule.
Returns the Custom Rule object when the request is successful.
REPLACE datadog.remote_config.waf_custom_rules
SET 
data__data = '{{ data }}'
WHERE 
custom_rule_id = '{{ custom_rule_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_application_security_waf_custom_rule
Delete a specific WAF custom rule.
DELETE FROM datadog.remote_config.waf_custom_rules
WHERE custom_rule_id = '{{ custom_rule_id }}' --required
AND region = '{{ region }}' --required
;