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, region_name=None, verify=None, botocore_config=None)[source]¶
Bases:
airflow.providers.amazon.aws.triggers.base.AwsBaseWaiterTriggerTrigger 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.
region_name (str | None) – AWS region_name. If not specified then the default boto3 behaviour is used.
verify (bool | str | None) – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html
botocore_config (dict | None) – Configuration dictionary (key-values) for botocore client. See: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html
- 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.