statuspage_degradation_templates
Creates, updates, deletes, gets or lists a statuspage_degradation_templates resource.
Overview
| Name | statuspage_degradation_templates |
| Type | Resource |
| Id | datadog.service_management.statuspage_degradation_templates |
Fields
The following fields are returned by SELECT queries:
- get_degradation_template
- list_degradation_templates
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the degradation template. |
attributes | object | The attributes of a degradation template. |
relationships | object | The relationships of a degradation template. |
type | string | Degradation templates resource type. (degradation_templates) (default: degradation_templates, example: degradation_templates) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the degradation template. |
attributes | object | The attributes of a degradation template. |
relationships | object | The relationships of a degradation template. |
type | string | Degradation templates resource type. (degradation_templates) (default: degradation_templates, example: degradation_templates) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_degradation_template | select | page_id, template_id | include | Retrieves a specific degradation template by its ID. |
list_degradation_templates | select | page_id | include | Lists all degradation templates for a status page. |
create_degradation_template | insert | page_id | include | Creates a new degradation template. |
update_degradation_template | update | template_id, page_id | include | Updates an existing degradation template's attributes. |
delete_degradation_template | delete | page_id, template_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
page_id | string (uuid) | The ID of the status page. |
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 (uuid) | The ID of the degradation or maintenance template. |
include | string | Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page. |
SELECT examples
- get_degradation_template
- list_degradation_templates
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 }}'
;
Lists all degradation templates for a status page.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.statuspage_degradation_templates
WHERE page_id = '{{ page_id }}' -- required
AND include = '{{ include }}'
;
INSERT examples
- create_degradation_template
- Manifest
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
;
# Description fields are for documentation purposes
- name: statuspage_degradation_templates
props:
- name: page_id
value: "{{ page_id }}"
description: Required parameter for the statuspage_degradation_templates resource.
- name: data
description: |
The data object for creating a degradation template.
value:
attributes:
components_affected:
- id: "{{ id }}"
name: "{{ name }}"
status: "{{ status }}"
degradation_title: "{{ degradation_title }}"
name: "{{ name }}"
updates:
- message: "{{ message }}"
status: "{{ status }}"
type: "{{ type }}"
- name: include
value: "{{ include }}"
description: Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.
description: Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.
UPDATE examples
- update_degradation_template
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
- delete_degradation_template
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
;