incident_attachments
Creates, updates, deletes, gets or lists an incident_attachments resource.
Overview
| Name | incident_attachments | 
| Type | Resource | 
| Id | datadog.service_management.incident_attachments | 
Fields
The following fields are returned by SELECT queries:
- list_incident_attachments
| Name | Datatype | Description | 
|---|---|---|
| id | string | A unique identifier that represents the incident attachment. (example: 00000000-abcd-0001-0000-000000000000) | 
| attributes |  | The attributes object for an attachment. | 
| relationships | object | The incident attachment's relationships. | 
| type | string | The incident attachment resource type. (default: incident_attachments, example: incident_attachments) | 
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description | 
|---|---|---|---|---|
| list_incident_attachments | select | incident_id,region | include,filter[attachment_type] | Get all attachments for a given incident. | 
| update_incident_attachments | update | incident_id,region,data__data | include | The 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.
| Name | Datatype | Description | 
|---|---|---|
| incident_id | string | The UUID of the incident. | 
| region | string | (default: datadoghq.com) | 
| filter[attachment_type] | array | Specifies which types of attachments are included in the response. | 
| include | array | Specifies which types of related objects are included in the response. | 
SELECT examples
- list_incident_attachments
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
- update_incident_attachments
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;