Skip to main content

governance_control_detections

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

Overview

Namegovernance_control_detections
TypeResource
Iddatadog.organization.governance_control_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
list_governance_control_detectionsselectdetection_typefilter[state], filter[query], sort, page[number], page[size]Retrieve the detections produced by the governance control with the given detection type.<br />Results can be filtered by state and free-text query, sorted, and paginated.

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_typestringThe detection type that identifies the control; for example, unused_api_keys. (example: unused_api_keys)
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.
filter[query]stringRestrict the results to detections matching the given free-text query. (example: production)
filter[state]stringRestrict the results to detections in the given state. (example: active)
page[number]integer (int64)The zero-based index of the page to return; the first page is 0. (example: 0)
page[size]integer (int64)The number of detections to return per page. (example: 50)
sortstringA comma-separated list of attributes to sort detections by. Prefix an attribute with - for descending order. The attributes available for sorting are id, created_at, assigned_to, detection_type, display_name, exception_at, mitigate_after, mitigated_at, priority, resource_id, and state. Defaults to created_at,-id. (example: -created_at,-id)

SELECT examples

Retrieve the detections produced by the governance control with the given detection type.<br />Results can be filtered by state and free-text query, sorted, and paginated.

SELECT
id,
attributes,
type
FROM datadog.organization.governance_control_detections
WHERE detection_type = '{{ detection_type }}' -- required
AND filter[state] = '{{ filter[state] }}'
AND filter[query] = '{{ filter[query] }}'
AND sort = '{{ sort }}'
AND page[number] = '{{ page[number] }}'
AND page[size] = '{{ page[size] }}'
;