Skip to main content

governance_detections

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

Overview

Namegovernance_detections
TypeResource
Iddatadog.organization.governance_detections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the detection. (example: 3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d)
attributesobjectThe attributes of a governance control detection.
typestringGovernance control detection resource type. (governance_control_detection) (example: governance_control_detection)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_governance_detectionselectdetection_idRetrieve a single governance detection by its unique identifier.
update_governance_detectionupdatedetection_id, dataUpdate a governance detection by its unique identifier. Only the attributes present in the<br />request are modified, allowing a detection to be acknowledged as an exception, reopened,<br />reassigned, or deferred for mitigation.
mitigate_governance_detectionsexecdataApply a mitigation to a set of governance detections of a given detection type. When the<br />mitigation type is omitted, the control's configured mitigation is used. The request is<br />accepted for asynchronous processing.

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
detection_idstringThe unique identifier of the detection. (example: 3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d)
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

Retrieve a single governance detection by its unique identifier.

SELECT
id,
attributes,
type
FROM datadog.organization.governance_detections
WHERE detection_id = '{{ detection_id }}' -- required
;

UPDATE examples

Update a governance detection by its unique identifier. Only the attributes present in the<br />request are modified, allowing a detection to be acknowledged as an exception, reopened,<br />reassigned, or deferred for mitigation.

UPDATE datadog.organization.governance_detections
SET
data = '{{ data }}'
WHERE
detection_id = '{{ detection_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

Lifecycle Methods

EXEC variables use wire (API) names.

Apply a mitigation to a set of governance detections of a given detection type. When the<br />mitigation type is omitted, the control's configured mitigation is used. The request is<br />accepted for asynchronous processing.

EXEC datadog.organization.governance_detections.mitigate_governance_detections
@@json=
'{
"data": "{{ data }}"
}'
;