filters
Creates, updates, deletes, gets or lists a filters resource.
Overview
| Name | filters |
| Type | Resource |
| Id | datadog.security.filters |
Fields
The following fields are returned by SELECT queries:
- get_security_filter
- list_security_filters
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the security filter. (example: 3dd-0uc-h1s) |
attributes | object | The object describing a security filter. |
type | string | The type of the resource. The value should always be security_filters. (default: security_filters, example: security_filters) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the security filter. (example: 3dd-0uc-h1s) |
attributes | object | The object describing a security filter. |
type | string | The type of the resource. The value should always be security_filters. (default: security_filters, example: security_filters) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_security_filter | select | security_filter_id, region | Get the details of a specific security filter. See the security filter guide for more examples. | |
list_security_filters | select | region | Get the list of configured security filters with their definitions. | |
create_security_filter | insert | region, data__data | Create a security filter. See the security filter guide for more examples. | |
update_security_filter | update | security_filter_id, region, data__data | Update a specific security filter. Returns the security filter object when the request is successful. | |
delete_security_filter | delete | security_filter_id, region | Delete a specific security filter. |
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 |
|---|---|---|
region | string | (default: datadoghq.com) |
security_filter_id | string | The ID of the security filter. |
SELECT examples
- get_security_filter
- list_security_filters
Get the details of a specific security filter.
See the security filter guide
for more examples.
SELECT
id,
attributes,
type
FROM datadog.security.filters
WHERE security_filter_id = '{{ security_filter_id }}' -- required
AND region = '{{ region }}' -- required
;
Get the list of configured security filters with their definitions.
SELECT
id,
attributes,
type
FROM datadog.security.filters
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_security_filter
- Manifest
Create a security filter.
See the security filter guide
for more examples.
INSERT INTO datadog.security.filters (
data__data,
region
)
SELECT
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data,
meta
;
# Description fields are for documentation purposes
- name: filters
props:
- name: region
value: string
description: Required parameter for the filters resource.
- name: data
value: object
description: |
Object for a single security filter.
UPDATE examples
- update_security_filter
Update a specific security filter.
Returns the security filter object when the request is successful.
UPDATE datadog.security.filters
SET
data__data = '{{ data }}'
WHERE
security_filter_id = '{{ security_filter_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
RETURNING
data,
meta;
DELETE examples
- delete_security_filter
Delete a specific security filter.
DELETE FROM datadog.security.filters
WHERE security_filter_id = '{{ security_filter_id }}' --required
AND region = '{{ region }}' --required
;