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(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(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,region | Get the details of a specific Workload Protection policy. 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 | region | Get the list of Workload Protection policies. 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 | region,data__data | Create a new Workload Protection policy with the given parameters. 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,region,data__data | Update a specific Workload Protection policy. Returns the policy object when the request is successful. 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,region | Delete a specific Workload Protection policy. Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below. | |
| download_csmthreats_policy | exec | region | The download endpoint generates a Workload Protection policy file from your currently active Workload Protection agent rules, and downloads them as a .policyfile. This file can then be deployed toyour agents to update the policy running in your environment. 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) | 
| region | string | (default: datadoghq.com) | 
SELECT examples
- get_csmthreats_agent_policy
- list_csmthreats_agent_policies
Get the details of a specific Workload Protection policy.
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
AND region = '{{ region }}' -- required
;
Get the list of Workload Protection policies.
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 region = '{{ region }}' -- required
;
INSERT examples
- create_csmthreats_agent_policy
- Manifest
Create a new Workload Protection policy with the given parameters.
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__data,
region
)
SELECT 
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: csm_threats_agent_policies
  props:
    - name: region
      value: string
      description: Required parameter for the csm_threats_agent_policies resource.
    - name: data
      value: object
      description: |
        Object for a single Agent rule
UPDATE examples
- update_csmthreats_agent_policy
Update a specific Workload Protection policy.
Returns the policy object when the request is successful.
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 = '{{ data }}'
WHERE 
policy_id = '{{ policy_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_csmthreats_agent_policy
Delete a specific Workload Protection policy.
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
AND region = '{{ region }}' --required
;
Lifecycle Methods
- download_csmthreats_policy
The download endpoint generates a Workload Protection policy file from your currently active
Workload Protection agent rules, and downloads them as a .policy file. This file can then be deployed to
your agents to update the policy running in your environment.
Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
EXEC datadog.remote_config.csm_threats_agent_policies.download_csmthreats_policy 
@region='{{ region }}' --required
;