Skip to main content

pagerduty_services

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

Overview

Namepagerduty_services
TypeResource
Iddatadog.integrations.pagerduty_services

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
service_namestringYour service name associated service key in PagerDuty. (example: )

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_pager_duty_integration_serviceselectservice_nameGet service name in the Datadog-PagerDuty integration.
create_pager_duty_integration_serviceinsertservice_name, service_keyCreate a new service object in the PagerDuty integration.
update_pager_duty_integration_servicereplaceservice_name, service_keyUpdate a single service object in the Datadog-PagerDuty integration.
delete_pager_duty_integration_servicedeleteservice_nameDelete a single service object in the Datadog-PagerDuty integration.

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
service_namestringThe service name
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.

SELECT examples

Get service name in the Datadog-PagerDuty integration.

SELECT
service_name
FROM datadog.integrations.pagerduty_services
WHERE service_name = '{{ service_name }}' -- required
;

INSERT examples

Create a new service object in the PagerDuty integration.

INSERT INTO datadog.integrations.pagerduty_services (
service_key,
service_name
)
SELECT
'{{ service_key }}' /* required */,
'{{ service_name }}' /* required */
RETURNING
service_name
;

REPLACE examples

Update a single service object in the Datadog-PagerDuty integration.

REPLACE datadog.integrations.pagerduty_services
SET
service_key = '{{ service_key }}'
WHERE
service_name = '{{ service_name }}' --required
AND service_key = '{{ service_key }}' --required;

DELETE examples

Delete a single service object in the Datadog-PagerDuty integration.

DELETE FROM datadog.integrations.pagerduty_services
WHERE service_name = '{{ service_name }}' --required
;