Skip to main content

incident_attachments

Creates, updates, deletes, gets or lists an incident_attachments resource.

Overview

Nameincident_attachments
TypeResource
Iddatadog.service_management.incident_attachments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringA unique identifier that represents the incident attachment. (example: 00000000-abcd-0001-0000-000000000000)
attributesThe attributes object for an attachment.
relationshipsobjectThe incident attachment's relationships.
typestringThe incident attachment resource type. (default: incident_attachments, example: incident_attachments)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_incident_attachmentsselectincident_id, regioninclude, filter[attachment_type]Get all attachments for a given incident.
update_incident_attachmentsupdateincident_id, region, data__dataincludeThe bulk update endpoint for creating, updating, and deleting attachments for a given incident.

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
incident_idstringThe UUID of the incident.
regionstring(default: datadoghq.com)
filter[attachment_type]arraySpecifies which types of attachments are included in the response.
includearraySpecifies which types of related objects are included in the response.

SELECT examples

Get all attachments for a given incident.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_attachments
WHERE incident_id = '{{ incident_id }}' -- required
AND region = '{{ region }}' -- required
AND include = '{{ include }}'
AND filter[attachment_type] = '{{ filter[attachment_type] }}'
;

UPDATE examples

The bulk update endpoint for creating, updating, and deleting attachments for a given incident.

UPDATE datadog.service_management.incident_attachments
SET
data__data = '{{ data }}'
WHERE
incident_id = '{{ incident_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;