airflow.providers.amazon.aws.triggers.ssm¶
Classes¶
Trigger when a SSM run command is complete. |
Module Contents¶
- class airflow.providers.amazon.aws.triggers.ssm.SsmRunCommandTrigger(*, command_id, waiter_delay=120, waiter_max_attempts=75, aws_conn_id=None)[source]¶
Bases:
airflow.providers.amazon.aws.triggers.base.AwsBaseWaiterTrigger
Trigger when a SSM run command is complete.
- Parameters:
command_id (str) – The ID of the AWS SSM Run Command.
waiter_delay (int) – The amount of time in seconds to wait between attempts. (default: 120)
waiter_max_attempts (int) – The maximum number of attempts to be made. (default: 75)
aws_conn_id (str | None) – The Airflow connection used for AWS credentials.
- async run()[source]¶
Run the trigger in an asynchronous context.
The trigger should yield an Event whenever it wants to fire off an event, and return None if it is finished. Single-event triggers should thus yield and then immediately return.
If it yields, it is likely that it will be resumed very quickly, but it may not be (e.g. if the workload is being moved to another triggerer process, or a multi-event trigger was being used for a single-event task defer).
In either case, Trigger classes should assume they will be persisted, and then rely on cleanup() being called when they are no longer needed.