airflow.providers.amazon.aws.sensors.eks

Tracking the state of Amazon EKS Clusters, Amazon EKS managed node groups, and AWS Fargate profiles.

Attributes

DEFAULT_CONN_ID

CLUSTER_TERMINAL_STATES

FARGATE_TERMINAL_STATES

NODEGROUP_TERMINAL_STATES

Classes

EksBaseSensor

Base class to check various EKS states.

EksClusterStateSensor

Check the state of an Amazon EKS Cluster until it reaches the target state or another terminal state.

EksFargateProfileStateSensor

Check the state of an AWS Fargate profile until it reaches the target state or another terminal state.

EksNodegroupStateSensor

Check the state of an EKS managed node group until it reaches the target state or another terminal state.

Module Contents

airflow.providers.amazon.aws.sensors.eks.DEFAULT_CONN_ID = 'aws_default'[source]
airflow.providers.amazon.aws.sensors.eks.CLUSTER_TERMINAL_STATES[source]
airflow.providers.amazon.aws.sensors.eks.FARGATE_TERMINAL_STATES[source]
airflow.providers.amazon.aws.sensors.eks.NODEGROUP_TERMINAL_STATES[source]
class airflow.providers.amazon.aws.sensors.eks.EksBaseSensor(*, cluster_name, target_state, target_state_type, **kwargs)[source]

Bases: airflow.providers.amazon.aws.sensors.base_aws.AwsBaseSensor

Base class to check various EKS states.

Subclasses need to implement get_state and get_terminal_states methods.

Parameters:
aws_hook_class[source]
cluster_name[source]
target_state[source]
poke(context)[source]

Override when deriving this class.

abstract get_state()[source]
abstract get_terminal_states()[source]
class airflow.providers.amazon.aws.sensors.eks.EksClusterStateSensor(*, target_state=ClusterStates.ACTIVE, region=None, **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)

  • aws_conn_id – 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 default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

template_fields: collections.abc.Sequence[str][source]
ui_color = '#ff9900'[source]
ui_fgcolor = '#232F3E'[source]
get_state()[source]
get_terminal_states()[source]
class airflow.providers.amazon.aws.sensors.eks.EksFargateProfileStateSensor(*, fargate_profile_name, region=None, 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)

  • aws_conn_id – 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 default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

template_fields: collections.abc.Sequence[str][source]
ui_color = '#ff9900'[source]
ui_fgcolor = '#232F3E'[source]
fargate_profile_name[source]
get_state()[source]
get_terminal_states()[source]
class airflow.providers.amazon.aws.sensors.eks.EksNodegroupStateSensor(*, nodegroup_name, target_state=NodegroupStates.ACTIVE, region=None, **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)

  • aws_conn_id – 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 default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

template_fields: collections.abc.Sequence[str][source]
ui_color = '#ff9900'[source]
ui_fgcolor = '#232F3E'[source]
nodegroup_name[source]
get_state()[source]
get_terminal_states()[source]

Was this entry helpful?