Skip to main content

on_call_escalation_policies

Creates, updates, deletes, gets or lists an on_call_escalation_policies resource.

Overview

Nameon_call_escalation_policies
TypeResource
Iddatadog.service_management.on_call_escalation_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringSpecifies the unique identifier of the escalation policy. (example: ab000000-0000-0000-0000-000000000000)
attributesobjectDefines the main attributes of an escalation policy, such as its name and behavior on policy end.
relationshipsobjectRepresents the relationships for an escalation policy, including references to steps and teams.
typestringIndicates that the resource is of type policies. (policies) (default: policies, example: policies)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_on_call_escalation_policyselectpolicy_idincludeGet an On-Call escalation policy
create_on_call_escalation_policyinsertdataincludeCreate a new On-Call escalation policy
update_on_call_escalation_policyreplacepolicy_id, dataincludeUpdate an On-Call escalation policy
delete_on_call_escalation_policydeletepolicy_idDelete an On-Call escalation policy

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
policy_idstringThe ID of the escalation policy
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.
includestringComma-separated list of included relationships to be returned. Allowed values: teams, steps, steps.targets.

SELECT examples

Get an On-Call escalation policy

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

INSERT examples

Create a new On-Call escalation policy

INSERT INTO datadog.service_management.on_call_escalation_policies (
data,
include
)
SELECT
'{{ data }}' /* required */,
'{{ include }}'
RETURNING
data,
included
;

REPLACE examples

Update an On-Call escalation policy

REPLACE datadog.service_management.on_call_escalation_policies
SET
data = '{{ data }}'
WHERE
policy_id = '{{ policy_id }}' --required
AND data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;

DELETE examples

Delete an On-Call escalation policy

DELETE FROM datadog.service_management.on_call_escalation_policies
WHERE policy_id = '{{ policy_id }}' --required
;