governance_detections
Creates, updates, deletes, gets or lists a governance_detections resource.
Overview
| Name | governance_detections |
| Type | Resource |
| Id | datadog.organization.governance_detections |
Fields
The following fields are returned by SELECT queries:
- get_governance_detection
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the detection. (example: 3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d) |
attributes | object | The attributes of a governance control detection. |
type | string | Governance control detection resource type. (governance_control_detection) (example: governance_control_detection) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_governance_detection | select | detection_id | Retrieve a single governance detection by its unique identifier. | |
update_governance_detection | update | detection_id, data | 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. | |
mitigate_governance_detections | exec | data | 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. |
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 |
|---|---|---|
detection_id | string | The unique identifier of the detection. (example: 3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d) |
site | string | The 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_governance_detection
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_governance_detection
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.
- mitigate_governance_detections
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 }}"
}'
;