csm_threats_agent_policies
Creates, updates, deletes, gets or lists a csm_threats_agent_policies resource.
Overview
| Name | csm_threats_agent_policies |
| Type | Resource |
| Id | datadog.remote_config.csm_threats_agent_policies |
Fields
The following fields are returned by SELECT queries:
- get_csmthreats_agent_policy
- list_csmthreats_agent_policies
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Agent policy (example: 6517fcc1-cec7-4394-a655-8d6e9d085255) |
attributes | object | A Cloud Workload Security Agent policy returned by the API |
type | string | The type of the resource, must always be policy (policy) (default: policy, example: policy) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Agent policy (example: 6517fcc1-cec7-4394-a655-8d6e9d085255) |
attributes | object | A Cloud Workload Security Agent policy returned by the API |
type | string | The type of the resource, must always be policy (policy) (default: policy, example: policy) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_csmthreats_agent_policy | select | policy_id | Get the details of a specific Workload Protection policy.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below. | |
list_csmthreats_agent_policies | select | Get the list of Workload Protection policies.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below. | ||
create_csmthreats_agent_policy | insert | data | Create a new Workload Protection policy with the given parameters.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below. | |
update_csmthreats_agent_policy | update | policy_id, data | Update a specific Workload Protection policy.<br />Returns the policy object when the request is successful.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below. | |
delete_csmthreats_agent_policy | delete | policy_id | Delete a specific Workload Protection policy.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below. |
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 |
|---|---|---|
policy_id | string | The ID of the Agent policy (example: 6517fcc1-cec7-4394-a655-8d6e9d085255) |
site | string | The 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
- get_csmthreats_agent_policy
- list_csmthreats_agent_policies
Get the details of a specific Workload Protection policy.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
SELECT
id,
attributes,
type
FROM datadog.remote_config.csm_threats_agent_policies
WHERE policy_id = '{{ policy_id }}' -- required
;
Get the list of Workload Protection policies.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
SELECT
id,
attributes,
type
FROM datadog.remote_config.csm_threats_agent_policies
;
INSERT examples
- create_csmthreats_agent_policy
- Manifest
Create a new Workload Protection policy with the given parameters.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
INSERT INTO datadog.remote_config.csm_threats_agent_policies (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: csm_threats_agent_policies
props:
- name: data
description: |
Object for a single Agent rule
value:
attributes:
description: "{{ description }}"
enabled: {{ enabled }}
hostTags:
- "{{ hostTags }}"
hostTagsLists:
- "{{ hostTagsLists }}"
name: "{{ name }}"
type: "{{ type }}"
UPDATE examples
- update_csmthreats_agent_policy
Update a specific Workload Protection policy.<br />Returns the policy object when the request is successful.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
UPDATE datadog.remote_config.csm_threats_agent_policies
SET
data = '{{ data }}'
WHERE
policy_id = '{{ policy_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_csmthreats_agent_policy
Delete a specific Workload Protection policy.<br /><br />Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
DELETE FROM datadog.remote_config.csm_threats_agent_policies
WHERE policy_id = '{{ policy_id }}' --required
;