Skip to main content

incident_postmortem_templates

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

Overview

Nameincident_postmortem_templates
TypeResource
Iddatadog.service_management.incident_postmortem_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the template. (example: 00000000-0000-0000-0000-000000000000)
attributesobjectAttributes of a postmortem template returned in a response.
relationshipsobjectRelationships of a postmortem template returned in a response.
typestringPostmortem template resource type. (postmortem_templates, postmortem_template) (example: postmortem_templates)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_incident_postmortem_templateselecttemplate_idRetrieve details of a specific postmortem template.
list_incident_postmortem_templatesselectfilter[incident-type], sortRetrieve a list of all postmortem templates for incidents.
create_incident_postmortem_templateinsertdataCreate a new postmortem template for incidents.
update_incident_postmortem_templateupdatetemplate_id, dataUpdate an existing postmortem template.
delete_incident_postmortem_templatedeletetemplate_idDelete 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.

NameDatatypeDescription
sitestringThe 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_idstringThe 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.
sortstringThe attribute to sort results by. Prefix with - for descending order.

SELECT examples

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
;

INSERT examples

Create a new postmortem template for incidents.

INSERT INTO datadog.service_management.incident_postmortem_templates (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;

UPDATE examples

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 a postmortem template.

DELETE FROM datadog.service_management.incident_postmortem_templates
WHERE template_id = '{{ template_id }}' --required
;