Skip to main content

csm_ownership_histories

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

Overview

Namecsm_ownership_histories
TypeResource
Iddatadog.security.csm_ownership_histories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe resource identifier for which history is returned. (example: res-1)
attributesobjectThe attributes of an ownership history response.
typestringThe type of the ownership history resource. The value should always be ownership_history. (ownership_history) (default: ownership_history, example: ownership_history)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_ownership_history_by_owner_typeselectresource_id, owner_typecursor, limitList inference history entries for a resource filtered by owner type, ordered from most recent to oldest. Uses cursor-based pagination.
list_ownership_historyselectresource_idcursor, limitList inference history entries for a resource across all owner types, ordered from most recent to oldest. Uses cursor-based pagination.

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
owner_typestringThe owner type to filter history by.
resource_idstringThe identifier of the resource to retrieve inference history for.
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.
cursorstringAn opaque, base64-encoded cursor token returned by a previous call in pagination.next_cursor. Omit to fetch the first page.
limitinteger (int32)The maximum number of history entries to return per page.

SELECT examples

List inference history entries for a resource filtered by owner type, ordered from most recent to oldest. Uses cursor-based pagination.

SELECT
id,
attributes,
type
FROM datadog.security.csm_ownership_histories
WHERE resource_id = '{{ resource_id }}' -- required
AND owner_type = '{{ owner_type }}' -- required
AND cursor = '{{ cursor }}'
AND limit = '{{ limit }}'
;