airflow.providers.amazon.aws.triggers.eks
¶
Module Contents¶
Classes¶
Trigger for EksCreateFargateProfileOperator. |
|
Trigger for EksDeleteFargateProfileOperator. |
- class airflow.providers.amazon.aws.triggers.eks.EksCreateFargateProfileTrigger(cluster_name, fargate_profile_name, poll_interval, max_attempts, aws_conn_id)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
Trigger for EksCreateFargateProfileOperator. The trigger will asynchronously wait for the fargate profile to be created.
- Parameters
cluster_name (str) – The name of the EKS cluster
fargate_profile_name (str) – The name of the fargate profile
poll_interval (int) – The amount of time in seconds to wait between attempts.
max_attempts (int) – The maximum number of attempts to be made.
aws_conn_id (str) – The Airflow connection used for AWS credentials.
- async run()[source]¶
Runs 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.
- class airflow.providers.amazon.aws.triggers.eks.EksDeleteFargateProfileTrigger(cluster_name, fargate_profile_name, poll_interval, max_attempts, aws_conn_id)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
Trigger for EksDeleteFargateProfileOperator. The trigger will asynchronously wait for the fargate profile to be deleted.
- Parameters
cluster_name (str) – The name of the EKS cluster
fargate_profile_name (str) – The name of the fargate profile
poll_interval (int) – The amount of time in seconds to wait between attempts.
max_attempts (int) – The maximum number of attempts to be made.
aws_conn_id (str) – The Airflow connection used for AWS credentials.
- async run()[source]¶
Runs 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.