airflow.providers.amazon.aws.sensors.eks
¶
Tracking the state of Amazon EKS Clusters, Amazon EKS managed node groups, and AWS Fargate profiles.
Module Contents¶
Classes¶
Base class to check various EKS states. |
|
Check the state of an Amazon EKS Cluster until it reaches the target state or another terminal state. |
|
Check the state of an AWS Fargate profile until it reaches the target state or another terminal state. |
|
Check the state of an EKS managed node group until it reaches the target state or another terminal state. |
Attributes¶
- class airflow.providers.amazon.aws.sensors.eks.EksBaseSensor(*, cluster_name, target_state, target_state_type, aws_conn_id=DEFAULT_CONN_ID, region=None, **kwargs)[source]¶
Bases:
airflow.sensors.base.BaseSensorOperator
Base class to check various EKS states.
Subclasses need to implement get_state and get_terminal_states methods.
- Parameters
cluster_name (str) – The name of the Cluster
target_state (airflow.providers.amazon.aws.hooks.eks.ClusterStates | airflow.providers.amazon.aws.hooks.eks.NodegroupStates | airflow.providers.amazon.aws.hooks.eks.FargateProfileStates) – Will return successfully when that state is reached.
target_state_type (type) – The enum containing the states, will be used to convert the target state if it has to be converted from a string
aws_conn_id (str | None) – The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then the default boto3 configuration would be used (and must be maintained on each worker node).
region (str | None) – Which AWS region the connection should use. If this is None or empty then the default boto3 behaviour is used.
- class airflow.providers.amazon.aws.sensors.eks.EksClusterStateSensor(*, target_state=ClusterStates.ACTIVE, **kwargs)[source]¶
Bases:
EksBaseSensor
Check the state of an Amazon EKS Cluster until it reaches the target state or another terminal state.
See also
For more information on how to use this sensor, take a look at the guide: Wait on an Amazon EKS cluster state
- Parameters
cluster_name – The name of the Cluster to watch. (templated)
target_state (airflow.providers.amazon.aws.hooks.eks.ClusterStates) – Target state of the Cluster. (templated)
region – Which AWS region the connection should use. (templated) If this is None or empty then the default boto3 behaviour is used.
aws_conn_id – The Airflow connection used for AWS credentials. (templated) If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then the default boto3 configuration would be used (and must be maintained on each worker node).
- template_fields: collections.abc.Sequence[str] = ('cluster_name', 'target_state', 'aws_conn_id', 'region')[source]¶
- class airflow.providers.amazon.aws.sensors.eks.EksFargateProfileStateSensor(*, fargate_profile_name, target_state=FargateProfileStates.ACTIVE, **kwargs)[source]¶
Bases:
EksBaseSensor
Check the state of an AWS Fargate profile until it reaches the target state or another terminal state.
See also
For more information on how to use this sensor, take a look at the guide: Wait on an AWS Fargate profile state
- Parameters
cluster_name – The name of the Cluster which the AWS Fargate profile is attached to. (templated)
fargate_profile_name (str) – The name of the Fargate profile to watch. (templated)
target_state (airflow.providers.amazon.aws.hooks.eks.FargateProfileStates) – Target state of the Fargate profile. (templated)
region – Which AWS region the connection should use. (templated) If this is None or empty then the default boto3 behaviour is used.
aws_conn_id – The Airflow connection used for AWS credentials. (templated) If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then the default boto3 configuration would be used (and must be maintained on each worker node).
- template_fields: collections.abc.Sequence[str] = ('cluster_name', 'fargate_profile_name', 'target_state', 'aws_conn_id', 'region')[source]¶
- class airflow.providers.amazon.aws.sensors.eks.EksNodegroupStateSensor(*, nodegroup_name, target_state=NodegroupStates.ACTIVE, **kwargs)[source]¶
Bases:
EksBaseSensor
Check the state of an EKS managed node group until it reaches the target state or another terminal state.
See also
For more information on how to use this sensor, take a look at the guide: Wait on an Amazon EKS managed node group state
- Parameters
cluster_name – The name of the Cluster which the Nodegroup is attached to. (templated)
nodegroup_name (str) – The name of the Nodegroup to watch. (templated)
target_state (airflow.providers.amazon.aws.hooks.eks.NodegroupStates) – Target state of the Nodegroup. (templated)
region – Which AWS region the connection should use. (templated) If this is None or empty then the default boto3 behaviour is used.
aws_conn_id – The Airflow connection used for AWS credentials. (templated) If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then the default boto3 configuration would be used (and must be maintained on each worker node).
- template_fields: collections.abc.Sequence[str] = ('cluster_name', 'nodegroup_name', 'target_state', 'aws_conn_id', 'region')[source]¶