Skip to main content

csm_ownerships

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

Overview

Namecsm_ownerships
TypeResource
Iddatadog.security.csm_ownerships

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the inference, formatted as resource_id:owner_type. (example: test-resource:team)
attributesobjectThe attributes of a single ownership inference.
typestringThe type of the ownership inference resource. The value should always be ownership_inference. (ownership_inference) (default: ownership_inference, example: ownership_inference)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ownership_inferenceselectresource_id, owner_typeif-_none-_matchGet the current ownership inference for a resource for a specific owner type.<br /><br />This endpoint supports ETag-based caching. Pass the previously returned ETag value in the If-None-Match request header to receive a 304 Not Modified response when the inference has not changed.
list_ownership_inferencesselectresource_idGet all current ownership inferences for a resource, one per owner type (user, team, service, unknown).

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 of the inference to retrieve.
resource_idstringThe identifier of the resource to retrieve ownership inferences 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.
if-_none-_matchstringA previously returned ETag value. When supplied and the resource has not changed, the endpoint returns 304 Not Modified. (wire: If-None-Match)

SELECT examples

Get the current ownership inference for a resource for a specific owner type.<br /><br />This endpoint supports ETag-based caching. Pass the previously returned ETag value in the If-None-Match request header to receive a 304 Not Modified response when the inference has not changed.

SELECT
id,
attributes,
type
FROM datadog.security.csm_ownerships
WHERE resource_id = '{{ resource_id }}' -- required
AND owner_type = '{{ owner_type }}' -- required
AND if-_none-_match = '{{ if-_none-_match }}'
;