PPA: Task
Summary
This module contains actions related to the running task instance.
Actions
ppa.task.
get_payload_values
Get specific keys & values from the task payload.
Only use this action if the task payload is a dictionary.
Minimum Plugin Version: 3.1.0
Missing Keys
This action will fail if any requested keys are missing.
Input
- keys: a list of keys to get from the payload
Output
A dictionary containing the requested keys & values from the payload.
Example
1 2 3 4 5 |
|
ppa.task.
manifest
Get the task manifest.
Minimum Plugin Version: 1.0.0
Input
This action takes no inputs.
Output
A dictionary containing the task manifest.
Example
1 2 |
|
ppa.task.
payload
Get the task payload.
Minimum Plugin Version: 1.0.0
Input
This action takes no inputs.
Output
A dictionary containing the task payload.
Example
1 2 |
|
ppa.task.
save_result
Set the task JSON result.
A task's JSON result can be used to store information relevant to the run of a task.
This result is not shown in the PPA interface, but it can be fetched via the PPA API.
The action can only be run once per task, as the task result cannot be overwritten once it is set.
Minimum Plugin Version: 4.1.0
PPA Version
This action requires PPA v2.7.1 or newer.
Input
-
json: any valid JSON to store as the task result
-
reason: text to display when the action runs (defaults to Saving the task result)
Output
Nothing is outputted by this action.
Example
The following action:
1 2 3 |
|
Will set the following task result:
{'message': 'The task completed successfully'}
ppa.task.
started_by_api
Determine if a task was started by an API call.
Minimum Plugin Version: 3.1.0
Input
This action takes no inputs.
Output
true
if the task was started by an API call, otherwise false
.
Example
1 2 |
|
ppa.task.
started_by_schedule
Determine if a task was started by a PPA schedule.
Minimum Plugin Version: 3.1.0
Input
This action takes no inputs.
Output
true
if the task was started by a schedule, otherwise false
.
Example
1 2 |
|
ppa.task.
started_by_user
Determine if a task was started by a PPA user.
Minimum Plugin Version: 3.1.0
Input
This action takes no inputs.
Output
true
if the task was started by a user, otherwise false
.
Example
1 2 |
|
ppa.task.
user_password
With the task operator's consent, get the password they used to authenticate to PPA.
This can be used to authenticate to other systems using the task operator's identity.
Minimum Plugin Version: 1.0.0
Remember
This operation is not possible if SAML is used to authenticate users to PPA.
Input
This action takes no inputs.
Output
The operator's password if the consent was given, or null
if it was not given.
Example
1 2 |
|