statuspage_degradations
Creates, updates, deletes, gets or lists a statuspage_degradations resource.
Overview
| Name | statuspage_degradations |
| Type | Resource |
| Id | datadog.service_management.statuspage_degradations |
Fields
The following fields are returned by SELECT queries:
- get_degradation
- list_degradations
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the degradation. |
attributes | object | The attributes of a degradation. |
relationships | object | The relationships of a degradation. |
type | string | Degradations resource type. (degradations) (default: degradations, example: degradations) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the degradation. |
attributes | object | The attributes of a degradation. |
relationships | object | The relationships of a degradation. |
type | string | Degradations resource type. (degradations) (default: degradations, example: degradations) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_degradation | select | page_id, degradation_id | include | Retrieves a specific degradation by its ID. |
list_degradations | select | filter[page_id], page[offset], page[limit], include, filter[status], sort, filter[source_id] | Lists all degradations for the organization. Optionally filter by status and page. | |
create_degradation | insert | page_id | notify_subscribers, include | Creates a new degradation. |
update_degradation | update | page_id, degradation_id | notify_subscribers, include | Updates an existing degradation's attributes. |
delete_degradation | delete | page_id, degradation_id | Deletes a degradation by its 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 |
|---|---|---|
degradation_id | string (uuid) | The ID of the degradation. |
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. |
filter[page_id] | string | Optional page id filter. |
filter[source_id] | string | Optional source ID filter. Returns only degradations whose source matches this ID (for example, an incident ID). |
filter[status] | string | Optional degradation status filter. Supported values: investigating, identified, monitoring, resolved. |
include | string | Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page. |
notify_subscribers | boolean | Whether to notify page subscribers of the degradation. |
page[limit] | integer (int64) | The number of degradations to return per page. |
page[offset] | integer (int64) | Offset to use as the start of the page. |
sort | string | Sort order. Prefix with '-' for descending. Supported values: created_at, -created_at, modified_at, -modified_at. |
SELECT examples
- get_degradation
- list_degradations
Retrieves a specific degradation by its ID.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.statuspage_degradations
WHERE page_id = '{{ page_id }}' -- required
AND degradation_id = '{{ degradation_id }}' -- required
AND include = '{{ include }}'
;
Lists all degradations for the organization. Optionally filter by status and page.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.statuspage_degradations
WHERE filter[page_id] = '{{ filter[page_id] }}'
AND page[offset] = '{{ page[offset] }}'
AND page[limit] = '{{ page[limit] }}'
AND include = '{{ include }}'
AND filter[status] = '{{ filter[status] }}'
AND sort = '{{ sort }}'
AND filter[source_id] = '{{ filter[source_id] }}'
;
INSERT examples
- create_degradation
- Manifest
Creates a new degradation.
INSERT INTO datadog.service_management.statuspage_degradations (
data,
meta,
page_id,
notify_subscribers,
include
)
SELECT
'{{ data }}',
'{{ meta }}',
'{{ page_id }}',
'{{ notify_subscribers }}',
'{{ include }}'
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: statuspage_degradations
props:
- name: page_id
value: "{{ page_id }}"
description: Required parameter for the statuspage_degradations resource.
- name: data
description: |
The data object for creating a degradation.
value:
attributes:
components_affected:
- id: "{{ id }}"
name: "{{ name }}"
status: "{{ status }}"
description: "{{ description }}"
status: "{{ status }}"
title: "{{ title }}"
relationships:
template:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
- name: meta
description: |
The supported metadata for creating a degradation.
value:
idempotency_key: "{{ idempotency_key }}"
- name: notify_subscribers
value: {{ notify_subscribers }}
description: Whether to notify page subscribers of the degradation.
description: Whether to notify page subscribers of the degradation.
- 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
Updates an existing degradation's attributes.
UPDATE datadog.service_management.statuspage_degradations
SET
data = '{{ data }}',
meta = '{{ meta }}'
WHERE
page_id = '{{ page_id }}' --required
AND degradation_id = '{{ degradation_id }}' --required
AND notify_subscribers = {{ notify_subscribers}}
AND include = '{{ include}}'
RETURNING
data,
included;
DELETE examples
- delete_degradation
Deletes a degradation by its ID.
DELETE FROM datadog.service_management.statuspage_degradations
WHERE page_id = '{{ page_id }}' --required
AND degradation_id = '{{ degradation_id }}' --required
;