Skip to main content

csm_threats_agent_policies

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

Overview

Namecsm_threats_agent_policies
TypeResource
Iddatadog.remote_config.csm_threats_agent_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the Agent policy (example: 6517fcc1-cec7-4394-a655-8d6e9d085255)
attributesobjectA Cloud Workload Security Agent policy returned by the API
typestringThe type of the resource, must always be policy (policy) (default: policy, example: policy)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_csmthreats_agent_policyselectpolicy_idGet 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_policiesselectGet 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_policyinsertdataCreate 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_policyupdatepolicy_id, dataUpdate 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_policydeletepolicy_idDelete 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.

NameDatatypeDescription
policy_idstringThe ID of the Agent policy (example: 6517fcc1-cec7-4394-a655-8d6e9d085255)
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

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
;

INSERT examples

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
;

UPDATE examples

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 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
;