actions
prefect.server.events.actions
The actions consumer watches for actions that have been triggered by Automations and carries them out. Also includes the various concrete subtypes of Actions
Classes
ActionFailed
Action
An Action that may be performed when an Automation is triggered
Methods:
logging_context
Common logging context for all actions
DoNothing
Do nothing when an Automation is triggered
EmitEventAction
ExternalDataAction
Base class for Actions that require data from an external source such as the Orchestration API
Methods:
reason_from_response
JinjaTemplateAction
Base class for Actions that use Jinja templates supplied by the user and are rendered with a context containing data from the triggered action, and the orchestration API.
Methods:
validate_template
templates_in_dictionary
instantiate_object
DeploymentAction
Base class for Actions that operate on Deployments and need to infer them from events
Methods:
selected_deployment_requires_id
DeploymentCommandAction
Executes a command against a matching deployment
RunDeployment
Runs the given deployment with the given parameters
Methods:
validate_parameters
PauseDeployment
Pauses the given Deployment
ResumeDeployment
Resumes the given Deployment
FlowRunAction
An action that operates on a flow run
FlowRunStateChangeAction
Changes the state of a flow run associated with the trigger
ChangeFlowRunState
Changes the state of a flow run associated with the trigger
CancelFlowRun
Cancels a flow run associated with the trigger
SuspendFlowRun
Suspends a flow run associated with the trigger
ResumeFlowRun
Resumes a paused or suspended flow run associated with the trigger
CallWebhook
Call a webhook when an Automation is triggered.
Methods:
ensure_payload_is_a_string
Temporary measure while we migrate payloads from being a dictionary to
a string template. This covers both reading from the database where values
may currently be a dictionary, as well as the API, where older versions of the
frontend may be sending a JSON object with the single "message"
key.
validate_payload_templates
Validate user-provided payload template.
SendNotification
Send a notification when an Automation is triggered
Methods:
is_valid_template
WorkPoolAction
Base class for Actions that operate on Work Pools and need to infer them from events
Methods:
selected_work_pool_requires_id
WorkPoolCommandAction
PauseWorkPool
Pauses a Work Pool
ResumeWorkPool
Resumes a Work Pool
WorkQueueAction
Base class for Actions that operate on Work Queues and need to infer them from events
Methods:
selected_work_queue_requires_id
WorkQueueCommandAction
PauseWorkQueue
Pauses a Work Queue
ResumeWorkQueue
Resumes a Work Queue
AutomationAction
Base class for Actions that operate on Automations and need to infer them from events
Methods:
selected_automation_requires_id
AutomationCommandAction
PauseAutomation
Pauses a Work Queue
ResumeAutomation
Resumes a Work Queue