Skip to main content

synthetics_downtimes

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

Overview

Namesynthetics_downtimes
TypeResource
Iddatadog.monitoring.synthetics_downtimes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the downtime. (example: 00000000-0000-0000-0000-000000000001)
attributesobjectAttributes of a Synthetics downtime response object.
typestringThe resource type for a Synthetics downtime. (downtime) (example: downtime)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_synthetics_downtimeselectdowntime_idGet a Synthetics downtime by its ID.
list_synthetics_downtimesselectfilter[test_ids], filter[active]Get a list of all Synthetics downtimes for your organization.
create_synthetics_downtimeinsertdataCreate a new Synthetics downtime.
update_synthetics_downtimereplacedowntime_id, dataUpdate a Synthetics downtime by its ID.
delete_synthetics_downtimedeletedowntime_idDelete a Synthetics downtime 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.

NameDatatypeDescription
downtime_idstringThe ID of the downtime to delete.
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[active]stringIf set to true, return only downtimes that are currently active.
filter[test_ids]stringComma-separated list of Synthetics test public IDs to filter downtimes by.

SELECT examples

Get a Synthetics downtime by its ID.

SELECT
id,
attributes,
type
FROM datadog.monitoring.synthetics_downtimes
WHERE downtime_id = '{{ downtime_id }}' -- required
;

INSERT examples

Create a new Synthetics downtime.

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

REPLACE examples

Update a Synthetics downtime by its ID.

REPLACE datadog.monitoring.synthetics_downtimes
SET
data = '{{ data }}'
WHERE
downtime_id = '{{ downtime_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a Synthetics downtime by its ID.

DELETE FROM datadog.monitoring.synthetics_downtimes
WHERE downtime_id = '{{ downtime_id }}' --required
;