Skip to main content

statuspage_maintenances

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

Overview

Namestatuspage_maintenances
TypeResource
Iddatadog.service_management.statuspage_maintenances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The ID of the maintenance.
attributesobjectThe attributes of a maintenance.
relationshipsobjectThe relationships of a maintenance.
typestringMaintenances resource type. (maintenances) (default: maintenances, example: maintenances)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_maintenanceselectpage_id, maintenance_idincludeRetrieves a specific maintenance by its ID.
list_maintenancesselectfilter[page_id], page[offset], page[limit], include, filter[status], sortLists all maintenances for the organization. Optionally filter by status and page.
create_maintenanceinsertpage_idnotify_subscribers, includeSchedules a new maintenance.
update_maintenanceupdatepage_id, maintenance_idnotify_subscribers, includeUpdates an existing maintenance's attributes.

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
maintenance_idstring (uuid)The ID of the maintenance.
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.
filter[page_id]stringOptional page id filter.
filter[status]stringOptional maintenance status filter. Supported values: scheduled, in_progress, completed.
includestringComma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.
notify_subscribersbooleanWhether to notify page subscribers of the maintenance.
page[limit]integer (int64)The number of maintenances to return per page.
page[offset]integer (int64)Offset to use as the start of the page.
sortstringSort order. Prefix with '-' for descending. Supported values: created_at, -created_at, start_date, -start_date.

SELECT examples

Retrieves a specific maintenance by its ID.

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

INSERT examples

Schedules a new maintenance.

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

UPDATE examples

Updates an existing maintenance's attributes.

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