synthetics_downtimes
Creates, updates, deletes, gets or lists a synthetics_downtimes resource.
Overview
| Name | synthetics_downtimes |
| Type | Resource |
| Id | datadog.monitoring.synthetics_downtimes |
Fields
The following fields are returned by SELECT queries:
- get_synthetics_downtime
- list_synthetics_downtimes
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the downtime. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | Attributes of a Synthetics downtime response object. |
type | string | The resource type for a Synthetics downtime. (downtime) (example: downtime) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the downtime. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | Attributes of a Synthetics downtime response object. |
type | string | The resource type for a Synthetics downtime. (downtime) (example: downtime) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_synthetics_downtime | select | downtime_id | Get a Synthetics downtime by its ID. | |
list_synthetics_downtimes | select | filter[test_ids], filter[active] | Get a list of all Synthetics downtimes for your organization. | |
create_synthetics_downtime | insert | data | Create a new Synthetics downtime. | |
update_synthetics_downtime | replace | downtime_id, data | Update a Synthetics downtime by its ID. | |
delete_synthetics_downtime | delete | downtime_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
downtime_id | string | The ID of the downtime to delete. |
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[active] | string | If set to true, return only downtimes that are currently active. |
filter[test_ids] | string | Comma-separated list of Synthetics test public IDs to filter downtimes by. |
SELECT examples
- get_synthetics_downtime
- list_synthetics_downtimes
Get a Synthetics downtime by its ID.
SELECT
id,
attributes,
type
FROM datadog.monitoring.synthetics_downtimes
WHERE downtime_id = '{{ downtime_id }}' -- required
;
Get a list of all Synthetics downtimes for your organization.
SELECT
id,
attributes,
type
FROM datadog.monitoring.synthetics_downtimes
WHERE filter[test_ids] = '{{ filter[test_ids] }}'
AND filter[active] = '{{ filter[active] }}'
;
INSERT examples
- create_synthetics_downtime
- Manifest
Create a new Synthetics downtime.
INSERT INTO datadog.monitoring.synthetics_downtimes (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: synthetics_downtimes
props:
- name: data
description: |
The data object for a Synthetics downtime create or update request.
value:
attributes:
description: "{{ description }}"
isEnabled: {{ isEnabled }}
name: "{{ name }}"
tags:
- "{{ tags }}"
testIds:
- "{{ testIds }}"
timeSlots:
- duration: {{ duration }}
name: "{{ name }}"
recurrence:
end:
day: {{ day }}
hour: {{ hour }}
minute: {{ minute }}
month: {{ month }}
year: {{ year }}
frequency: "{{ frequency }}"
interval: {{ interval }}
weekdayPositions:
- {{ weekdayPositions }}
weekdays:
- "{{ weekdays }}"
start:
day: {{ day }}
hour: {{ hour }}
minute: {{ minute }}
month: {{ month }}
year: {{ year }}
timezone: "{{ timezone }}"
type: "{{ type }}"
REPLACE examples
- update_synthetics_downtime
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_synthetics_downtime
Delete a Synthetics downtime by its ID.
DELETE FROM datadog.monitoring.synthetics_downtimes
WHERE downtime_id = '{{ downtime_id }}' --required
;