Skip to main content

cloud_workload_security_agent_rules

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

Overview

Namecloud_workload_security_agent_rules
TypeResource
Iddatadog.security.cloud_workload_security_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 (agent_rule) (default: agent_rule, example: agent_rule)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cloud_workload_security_agent_ruleselectagent_rule_idGet the details of a specific agent rule.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.
list_cloud_workload_security_agent_rulesselectGet the list of agent rules.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.
create_cloud_workload_security_agent_ruleinsertdataCreate a new agent rule with the given parameters.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.
update_cloud_workload_security_agent_ruleupdateagent_rule_id, dataUpdate a specific agent rule.<br />Returns the agent rule object when the request is successful.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.
delete_cloud_workload_security_agent_ruledeleteagent_rule_idDelete a specific agent rule.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.

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)
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 agent rule.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.

SELECT
id,
attributes,
type
FROM datadog.security.cloud_workload_security_agent_rules
WHERE agent_rule_id = '{{ agent_rule_id }}' -- required
;

INSERT examples

Create a new agent rule with the given parameters.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.

INSERT INTO datadog.security.cloud_workload_security_agent_rules (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;

UPDATE examples

Update a specific agent rule.<br />Returns the agent rule object when the request is successful.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.

UPDATE datadog.security.cloud_workload_security_agent_rules
SET
data = '{{ data }}'
WHERE
agent_rule_id = '{{ agent_rule_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a specific agent rule.<br /><br />Note: This endpoint should only be used for the Government (US1-FED) site.

DELETE FROM datadog.security.cloud_workload_security_agent_rules
WHERE agent_rule_id = '{{ agent_rule_id }}' --required
;