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 | The unique identifier of the attachment. (example: 00000000-abcd-0002-0000-000000000000) |
attributes | object | The attachment's attributes. |
relationships | object | The attachment's resource relationships. |
type | string | The incident attachment resource type. (incident_attachments) (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 | filter[attachment_type], include | List incident attachments. |
create_incident_attachment | insert | incident_id | include | Create an incident attachment. |
update_incident_attachment | update | incident_id, attachment_id | include | |
delete_incident_attachment | delete | incident_id, attachment_id |
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 |
|---|---|---|
attachment_id | string | The ID of the attachment. |
incident_id | string | The UUID of the incident. |
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. |
filter[attachment_type] | string | Filter attachments by type. Supported values are 1 (postmortem) and 2 (link). |
include | string | Resource to include in the response. Supported value: last_modified_by_user. |
SELECT examples
- list_incident_attachments
List incident attachments.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_attachments
WHERE incident_id = '{{ incident_id }}' -- required
AND filter[attachment_type] = '{{ filter[attachment_type] }}'
AND include = '{{ include }}'
;
INSERT examples
- create_incident_attachment
- Manifest
Create an incident attachment.
INSERT INTO datadog.service_management.incident_attachments (
data,
incident_id,
include
)
SELECT
'{{ data }}',
'{{ incident_id }}',
'{{ include }}'
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: incident_attachments
props:
- name: incident_id
value: "{{ incident_id }}"
description: Required parameter for the incident_attachments resource.
- name: data
description: |
Attachment data for a create request.
value:
attributes:
attachment:
documentUrl: "{{ documentUrl }}"
title: "{{ title }}"
attachment_type: "{{ attachment_type }}"
id: "{{ id }}"
type: "{{ type }}"
- name: include
value: "{{ include }}"
description: Resource to include in the response. Supported value: `last_modified_by_user`.
description: Resource to include in the response. Supported value: `last_modified_by_user`.
UPDATE examples
- update_incident_attachment
No description available.
UPDATE datadog.service_management.incident_attachments
SET
data = '{{ data }}'
WHERE
incident_id = '{{ incident_id }}' --required
AND attachment_id = '{{ attachment_id }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;
DELETE examples
- delete_incident_attachment
No description available.
DELETE FROM datadog.service_management.incident_attachments
WHERE incident_id = '{{ incident_id }}' --required
AND attachment_id = '{{ attachment_id }}' --required
;