csm_ownerships
Creates, updates, deletes, gets or lists a csm_ownerships resource.
Overview
| Name | csm_ownerships |
| Type | Resource |
| Id | datadog.security.csm_ownerships |
Fields
The following fields are returned by SELECT queries:
- get_ownership_inference
- list_ownership_inferences
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the inference, formatted as resource_id:owner_type. (example: test-resource:team) |
attributes | object | The attributes of a single ownership inference. |
type | string | The type of the ownership inference resource. The value should always be ownership_inference. (ownership_inference) (default: ownership_inference, example: ownership_inference) |
| Name | Datatype | Description |
|---|---|---|
id | string | The resource identifier associated with the returned inferences. (example: test-resource) |
attributes | object | The attributes of the ownership inferences collection response. |
type | string | The type of the ownership inferences collection resource. The value should always be ownership_inferences. (ownership_inferences) (default: ownership_inferences, example: ownership_inferences) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_ownership_inference | select | resource_id, owner_type | if-_none-_match | 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. |
list_ownership_inferences | select | resource_id | Get 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.
| Name | Datatype | Description |
|---|---|---|
owner_type | string | The owner type of the inference to retrieve. |
resource_id | string | The identifier of the resource to retrieve ownership inferences 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. |
if-_none-_match | string | A 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_ownership_inference
- list_ownership_inferences
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 }}'
;
Get all current ownership inferences for a resource, one per owner type (user, team, service, unknown).
SELECT
id,
attributes,
type
FROM datadog.security.csm_ownerships
WHERE resource_id = '{{ resource_id }}' -- required
;