csm_ownership_histories
Creates, updates, deletes, gets or lists a csm_ownership_histories resource.
Overview
| Name | csm_ownership_histories |
| Type | Resource |
| Id | datadog.security.csm_ownership_histories |
Fields
The following fields are returned by SELECT queries:
- list_ownership_history_by_owner_type
- list_ownership_history
| Name | Datatype | Description |
|---|---|---|
id | string | The resource identifier for which history is returned. (example: res-1) |
attributes | object | The attributes of an ownership history response. |
type | string | The type of the ownership history resource. The value should always be ownership_history. (ownership_history) (default: ownership_history, example: ownership_history) |
| Name | Datatype | Description |
|---|---|---|
id | string | The resource identifier for which history is returned. (example: res-1) |
attributes | object | The attributes of an ownership history response. |
type | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_ownership_history_by_owner_type | select | resource_id, owner_type | cursor, limit | List inference history entries for a resource filtered by owner type, ordered from most recent to oldest. Uses cursor-based pagination. |
list_ownership_history | select | resource_id | cursor, limit | List 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.
| Name | Datatype | Description |
|---|---|---|
owner_type | string | The owner type to filter history by. |
resource_id | string | The identifier of the resource to retrieve inference history for. |
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. |
cursor | string | An opaque, base64-encoded cursor token returned by a previous call in pagination.next_cursor. Omit to fetch the first page. |
limit | integer (int32) | The maximum number of history entries to return per page. |
SELECT examples
- list_ownership_history_by_owner_type
- list_ownership_history
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 }}'
;
List inference history entries for a resource across all owner types, 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 cursor = '{{ cursor }}'
AND limit = '{{ limit }}'
;