Skip to main content

statuspage_degradation_templates

Creates, updates, deletes, gets or lists a statuspage_degradation_templates resource.

Overview

Namestatuspage_degradation_templates
TypeResource
Iddatadog.service_management.statuspage_degradation_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the degradation template.
attributesobjectThe attributes of a degradation template.
relationshipsobjectThe relationships of a degradation template.
typestringDegradation templates resource type. (degradation_templates) (default: degradation_templates, example: degradation_templates)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_degradation_templateselectpage_id, template_idincludeRetrieves a specific degradation template by its ID.
list_degradation_templatesselectpage_idincludeLists all degradation templates for a status page.
create_degradation_templateinsertpage_idincludeCreates a new degradation template.
update_degradation_templateupdatetemplate_id, page_idincludeUpdates an existing degradation template's attributes.
delete_degradation_templatedeletepage_id, template_idDeletes a degradation template by its ID (soft delete).

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
page_idstring (uuid)The ID of the status page.
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_idstring (uuid)The ID of the degradation or maintenance template.
includestringComma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

SELECT examples

Retrieves a specific degradation template by its ID.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.statuspage_degradation_templates
WHERE page_id = '{{ page_id }}' -- required
AND template_id = '{{ template_id }}' -- required
AND include = '{{ include }}'
;

INSERT examples

Creates a new degradation template.

INSERT INTO datadog.service_management.statuspage_degradation_templates (
data,
page_id,
include
)
SELECT
'{{ data }}',
'{{ page_id }}',
'{{ include }}'
RETURNING
data,
included
;

UPDATE examples

Updates an existing degradation template's attributes.

UPDATE datadog.service_management.statuspage_degradation_templates
SET
data = '{{ data }}'
WHERE
template_id = '{{ template_id }}' --required
AND page_id = '{{ page_id }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;

DELETE examples

Deletes a degradation template by its ID (soft delete).

DELETE FROM datadog.service_management.statuspage_degradation_templates
WHERE page_id = '{{ page_id }}' --required
AND template_id = '{{ template_id }}' --required
;