Skip to main content

actions_services

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

Overview

Nameactions_services
TypeResource
Idpagerduty.automation_actions.actions_services

Fields

The following fields are returned by SELECT queries:

Service reference

NameDatatypeDescription
idstring
html_urlstring (url)a URL at which the entity is uniquely displayed in the Web app
selfstring (url)the API show URL at which the object is accessible
summarystringA short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
typestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_automation_actions_action_service_associationselectid, service_idAccept, Content-TypeGets the details of a Automation Action / service relation
get_automation_actions_action_service_associationsselectidAccept, Content-TypeGets all service references associated with an Automation Action
create_automation_action_service_assocationinsertid, data__serviceAccept, Content-TypeAssociate an Automation Action with a service
delete_automation_action_service_associationdeleteid, service_idAccept, Content-TypeDisassociate an Automation Action from a service
_get_automation_actions_action_service_associationsexecidAccept, Content-TypeGets all service references associated with an Automation Action
_get_automation_actions_action_service_associationexecid, service_idAccept, Content-TypeGets the details of a Automation Action / service relation

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
idstringThe ID of the resource.
service_idstringThe service ID
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring

SELECT examples

Gets the details of a Automation Action / service relation

SELECT
id,
html_url,
self,
summary,
type
FROM pagerduty.automation_actions.actions_services
WHERE id = '{{ id }}' -- required
AND service_id = '{{ service_id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

INSERT examples

Associate an Automation Action with a service

INSERT INTO pagerduty.automation_actions.actions_services (
data__service,
id,
Accept,
Content-Type
)
SELECT
'{{ service }}' /* required */,
'{{ id }}',
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
service
;

DELETE examples

Disassociate an Automation Action from a service

DELETE FROM pagerduty.automation_actions.actions_services
WHERE id = '{{ id }}' --required
AND service_id = '{{ service_id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

Lifecycle Methods

Gets all service references associated with an Automation Action

EXEC pagerduty.automation_actions.actions_services._get_automation_actions_action_service_associations 
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;