invocations
Creates, updates, deletes, gets or lists an invocations resource.
Overview
| Name | invocations |
| Type | Resource |
| Id | pagerduty.automation_actions.invocations |
Fields
The following fields are returned by SELECT queries:
- get
- list
Invocation information
| Name | Datatype | Description |
|---|---|---|
id | string | |
action_id | string | |
runner_id | string | |
action_snapshot | object | |
duration | integer | The duration of the invocation's execution time. |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
metadata | object | |
self | string (url) | the API show URL at which the object is accessible |
state | string | prepared -- the invocation exists and can be referenced, but is NOT available to a Runner <br /> created -- the invocation exists and is waiting for a Runner <br /> sent -- invocation sent to a Runner <br /> queued -- invocation queued by a Runner <br /> running -- invocation is being ran by a Runner <br /> aborted -- invocation was aborted on a Runner <br /> completed -- invocation completed on a Runner <br /> error -- invocation encountered an error on a Runner unknown -- transient error encountered when fetching invocation state (prepared, created, sent, queued, running, aborted, completed, error, unknown) (example: sent) |
summary | string | A 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. |
timing | array | A list of state transitions with timestamps, sorted in ascending order by timestamp. Only the 'created' transition is guaranteed to exist at any time. |
type | string | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference. |
Invocations matching the criteria
| Name | Datatype | Description |
|---|---|---|
id | string | |
action_id | string | |
runner_id | string | |
action_snapshot | object | |
duration | integer | The duration of the invocation's execution time. |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
metadata | object | |
self | string (url) | the API show URL at which the object is accessible |
state | string | prepared -- the invocation exists and can be referenced, but is NOT available to a Runner <br /> created -- the invocation exists and is waiting for a Runner <br /> sent -- invocation sent to a Runner <br /> queued -- invocation queued by a Runner <br /> running -- invocation is being ran by a Runner <br /> aborted -- invocation was aborted on a Runner <br /> completed -- invocation completed on a Runner <br /> error -- invocation encountered an error on a Runner unknown -- transient error encountered when fetching invocation state (prepared, created, sent, queued, running, aborted, completed, error, unknown) (example: sent) |
summary | string | A 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. |
timing | array | A list of state transitions with timestamps, sorted in ascending order by timestamp. Only the 'created' transition is guaranteed to exist at any time. |
type | string | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Get an Automation Action Invocation<br /> | |
list | select | invocation_state, not_invocation_state, incident_id, action_id | List Invocations<br /> | |
create | insert | id, invocation | Invokes an Action<br /> |
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. |
action_id | string | Action ID |
incident_id | string | Incident ID |
invocation_state | string | Invocation state |
not_invocation_state | string | Invocation state inverse filter (matches invocations NOT in the specified state) |
SELECT examples
- get
- list
Get an Automation Action Invocation<br />
SELECT
id,
action_id,
runner_id,
action_snapshot,
duration,
html_url,
metadata,
self,
state,
summary,
timing,
type
FROM pagerduty.automation_actions.invocations
WHERE id = '{{ id }}' -- required
;
List Invocations<br />
SELECT
id,
action_id,
runner_id,
action_snapshot,
duration,
html_url,
metadata,
self,
state,
summary,
timing,
type
FROM pagerduty.automation_actions.invocations
WHERE invocation_state = '{{ invocation_state }}'
AND not_invocation_state = '{{ not_invocation_state }}'
AND incident_id = '{{ incident_id }}'
AND action_id = '{{ action_id }}'
;
INSERT examples
- create
- Manifest
Invokes an Action<br />
INSERT INTO pagerduty.automation_actions.invocations (
invocation,
id
)
SELECT
'{{ invocation }}' /* required */,
'{{ id }}'
RETURNING
invocation
;
# Description fields are for documentation purposes
- name: invocations
props:
- name: id
value: "{{ id }}"
description: Required parameter for the invocations resource.
- name: invocation
value:
metadata:
incident_id: "{{ incident_id }}"
alert_id: "{{ alert_id }}"