incident_postmortem_templates
Creates, updates, deletes, gets or lists an incident_postmortem_templates resource.
Overview
| Name | incident_postmortem_templates |
| Type | Resource |
| Id | datadog.service_management.incident_postmortem_templates |
Fields
The following fields are returned by SELECT queries:
- get_incident_postmortem_template
- list_incident_postmortem_templates
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the template. (example: 00000000-0000-0000-0000-000000000000) |
attributes | object | Attributes of a postmortem template returned in a response. |
relationships | object | Relationships of a postmortem template returned in a response. |
type | string | Postmortem template resource type. (postmortem_templates, postmortem_template) (example: postmortem_templates) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the template. (example: 00000000-0000-0000-0000-000000000000) |
attributes | object | Attributes of a postmortem template returned in a response. |
relationships | object | Relationships of a postmortem template returned in a response. |
type | string | Postmortem template resource type. (postmortem_templates, postmortem_template) (example: postmortem_templates) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_incident_postmortem_template | select | template_id | Retrieve details of a specific postmortem template. | |
list_incident_postmortem_templates | select | filter[incident-type], sort | Retrieve a list of all postmortem templates for incidents. | |
create_incident_postmortem_template | insert | data | Create a new postmortem template for incidents. | |
update_incident_postmortem_template | update | template_id, data | Update an existing postmortem template. | |
delete_incident_postmortem_template | delete | template_id | Delete a postmortem template. |
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 |
|---|---|---|
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. |
template_id | string | The ID of the postmortem template. (example: 00000000-0000-0000-0000-000000000000) |
filter[incident-type] | string (uuid) | Filter postmortem templates by the associated incident type ID. |
sort | string | The attribute to sort results by. Prefix with - for descending order. |
SELECT examples
- get_incident_postmortem_template
- list_incident_postmortem_templates
Retrieve details of a specific postmortem template.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_postmortem_templates
WHERE template_id = '{{ template_id }}' -- required
;
Retrieve a list of all postmortem templates for incidents.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_postmortem_templates
WHERE filter[incident-type] = '{{ filter[incident-type] }}'
AND sort = '{{ sort }}'
;
INSERT examples
- create_incident_postmortem_template
- Manifest
Create a new postmortem template for incidents.
INSERT INTO datadog.service_management.incident_postmortem_templates (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: incident_postmortem_templates
props:
- name: data
description: |
Data object for creating or updating a postmortem template.
value:
attributes:
confluence_postmortem_settings:
account_id: "{{ account_id }}"
parent_id: "{{ parent_id }}"
space_id: "{{ space_id }}"
content: "{{ content }}"
google_docs_postmortem_settings:
account_id: "{{ account_id }}"
parent_folder_id: "{{ parent_folder_id }}"
is_default: "{{ is_default }}"
location: "{{ location }}"
name: "{{ name }}"
id: "{{ id }}"
relationships:
incident_type:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
UPDATE examples
- update_incident_postmortem_template
Update an existing postmortem template.
UPDATE datadog.service_management.incident_postmortem_templates
SET
data = '{{ data }}'
WHERE
template_id = '{{ template_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_incident_postmortem_template
Delete a postmortem template.
DELETE FROM datadog.service_management.incident_postmortem_templates
WHERE template_id = '{{ template_id }}' --required
;