actions
Creates, updates, deletes, gets or lists an actions
resource.
Overview
Name | actions |
Type | Resource |
Id | pagerduty.automation_actions.actions |
Fields
The following fields are returned by SELECT
queries:
- get_automation_action
- get_all_automation_actions
Action information
Name | Datatype | Description |
---|
An array of actions
Name | Datatype | Description |
---|
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_automation_action | select | id | Accept , Content-Type | Get an Automation Action |
get_all_automation_actions | select | Accept , Content-Type , limit , cursor , name , runner_id , classification , team_id , service_id , action_type | Lists Automation Actions matching provided query params. The returned records are sorted by action name in alphabetical order. See Cursor-based pagination for instructions on how to paginate through the result set. | |
create_automation_action_invocation | insert | id , data__invocation | Accept , Content-Type | Invokes an Action |
create_automation_action | insert | data__action | Accept , Content-Type | Create a Script, Process Automation, or Runbook Automation action |
delete_automation_action | delete | id | Accept , Content-Type | Delete an Automation Action |
_get_all_automation_actions | exec | Accept , Content-Type , limit , cursor , name , runner_id , classification , team_id , service_id , action_type | Lists Automation Actions matching provided query params. The returned records are sorted by action name in alphabetical order. See Cursor-based pagination for instructions on how to paginate through the result set. | |
_get_automation_action | exec | id | Accept , Content-Type | Get an Automation Action |
update_automation_action | exec | id , action | Accept , Content-Type | Updates an Automation Action |
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 |
---|---|---|
id | string | The ID of the resource. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
action_type | string | Filters results to include the ones matching the specified action type |
classification | string | Filters results to include the ones matching the specified classification (aka category) |
cursor | string | Optional parameter used to request the "next" set of results from an API. The value provided here is most commonly obtained from the next_cursor field of the previous request. When no value is provided, the request starts at the beginning of the result set. |
limit | integer | The minimum of the limit parameter used in the request or the maximum request size of the API. |
name | string | Filters results to include the ones matching the name (case insensitive substring matching) |
runner_id | string | Filters results to include the ones linked to the specified runner. Specifying the value any filters results to include the ones linked to runners only, thus omitting the results not linked to runners. |
service_id | string | Filters results to include the ones associated with the specified service |
team_id | string | Filters results to include the ones associated with the specified team. |
SELECT
examples
- get_automation_action
- get_all_automation_actions
Get an Automation Action
SELECT
*
FROM pagerduty.automation_actions.actions
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
Lists Automation Actions matching provided query params.
The returned records are sorted by action name in alphabetical order.
See Cursor-based pagination
for instructions on how to paginate through the result set.
SELECT
*
FROM pagerduty.automation_actions.actions
WHERE Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
AND name = '{{ name }}'
AND runner_id = '{{ runner_id }}'
AND classification = '{{ classification }}'
AND team_id = '{{ team_id }}'
AND service_id = '{{ service_id }}'
AND action_type = '{{ action_type }}'
;
INSERT
examples
- create_automation_action_invocation
- create_automation_action
- Manifest
Invokes an Action
INSERT INTO pagerduty.automation_actions.actions (
data__invocation,
id,
Accept,
Content-Type
)
SELECT
'{{ invocation }}' /* required */,
'{{ id }}',
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
invocation
;
Create a Script, Process Automation, or Runbook Automation action
INSERT INTO pagerduty.automation_actions.actions (
data__action,
Accept,
Content-Type
)
SELECT
'{{ action }}' /* required */,
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
action
;
# Description fields are for documentation purposes
- name: actions
props:
- name: id
value: string
description: Required parameter for the actions resource.
- name: invocation
value: object
- name: action
value: string
- name: Accept
value: string
description: The `Accept` header is used as a versioning header.
- name: Content-Type
value: string
DELETE
examples
- delete_automation_action
Delete an Automation Action
DELETE FROM pagerduty.automation_actions.actions
WHERE id = '{{ id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
Lifecycle Methods
- _get_all_automation_actions
- _get_automation_action
- update_automation_action
Lists Automation Actions matching provided query params.
The returned records are sorted by action name in alphabetical order.
See Cursor-based pagination
for instructions on how to paginate through the result set.
EXEC pagerduty.automation_actions.actions._get_all_automation_actions
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@limit='{{ limit }}',
@cursor='{{ cursor }}',
@name='{{ name }}',
@runner_id='{{ runner_id }}',
@classification='{{ classification }}',
@team_id='{{ team_id }}',
@service_id='{{ service_id }}',
@action_type='{{ action_type }}'
;
Get an Automation Action
EXEC pagerduty.automation_actions.actions._get_automation_action
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;
Updates an Automation Action
EXEC pagerduty.automation_actions.actions.update_automation_action
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
@@json=
'{
"action": "{{ action }}"
}'
;