Skip to main content

csm_threats_agent_rules

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

Overview

Namecsm_threats_agent_rules
TypeResource
Iddatadog.remote_config.csm_threats_agent_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the Agent rule (example: 3dd-0uc-h1s)
attributesobjectA Cloud Workload Security Agent rule returned by the API
typestringThe type of the resource, must always be agent_rule (default: agent_rule, example: agent_rule)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_csmthreats_agent_ruleselectagent_rule_id, regionpolicy_idGet the details of a specific Workload Protection agent rule.

Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
list_csmthreats_agent_rulesselectregionpolicy_idGet the list of Workload Protection agent rules.

Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
create_csmthreats_agent_ruleinsertregion, data__dataCreate a new Workload Protection agent rule 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_ruleupdateagent_rule_id, region, data__datapolicy_idUpdate a specific Workload Protection Agent rule.
Returns the agent rule 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_ruledeleteagent_rule_id, regionpolicy_idDelete a specific Workload Protection agent rule.

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
agent_rule_idstringThe ID of the Agent rule (example: 3b5-v82-ns6)
regionstring(default: datadoghq.com)
policy_idstringThe ID of the Agent policy (example: 6517fcc1-cec7-4394-a655-8d6e9d085255)

SELECT examples

Get the details of a specific Workload Protection agent rule.

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_rules
WHERE agent_rule_id = '{{ agent_rule_id }}' -- required
AND region = '{{ region }}' -- required
AND policy_id = '{{ policy_id }}'
;

INSERT examples

Create a new Workload Protection agent rule 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_rules (
data__data,
region
)
SELECT
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data
;

UPDATE examples

Update a specific Workload Protection Agent rule.
Returns the agent rule 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_rules
SET
data__data = '{{ data }}'
WHERE
agent_rule_id = '{{ agent_rule_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
AND policy_id = '{{ policy_id}}'
RETURNING
data;

DELETE examples

Delete a specific Workload Protection agent rule.

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_rules
WHERE agent_rule_id = '{{ agent_rule_id }}' --required
AND region = '{{ region }}' --required
AND policy_id = '{{ policy_id }}'
;