governance_control_detections
Creates, updates, deletes, gets or lists a governance_control_detections resource.
Overview
| Name | governance_control_detections |
| Type | Resource |
| Id | datadog.organization.governance_control_detections |
Fields
The following fields are returned by SELECT queries:
- list_governance_control_detections
| 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 |
|---|---|---|---|---|
list_governance_control_detections | select | detection_type | filter[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.
| Name | Datatype | Description |
|---|---|---|
detection_type | string | The detection type that identifies the control; for example, unused_api_keys. (example: unused_api_keys) |
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. |
filter[query] | string | Restrict the results to detections matching the given free-text query. (example: production) |
filter[state] | string | Restrict 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) |
sort | string | A 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
- list_governance_control_detections
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] }}'
;