blob: fcd85dd407c4c5f69c062aa9dba6c9b9f23a04dd [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.sensors.eks`
==================================================
.. py:module:: airflow.providers.amazon.aws.sensors.eks
.. autoapi-nested-parse::
Tracking the state of Amazon EKS Clusters, Amazon EKS managed node groups, and AWS Fargate profiles.
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.sensors.eks.EksClusterStateSensor
airflow.providers.amazon.aws.sensors.eks.EksFargateProfileStateSensor
airflow.providers.amazon.aws.sensors.eks.EksNodegroupStateSensor
airflow.providers.amazon.aws.sensors.eks.EKSClusterStateSensor
airflow.providers.amazon.aws.sensors.eks.EKSFargateProfileStateSensor
airflow.providers.amazon.aws.sensors.eks.EKSNodegroupStateSensor
Attributes
~~~~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.sensors.eks.DEFAULT_CONN_ID
airflow.providers.amazon.aws.sensors.eks.CLUSTER_TERMINAL_STATES
airflow.providers.amazon.aws.sensors.eks.FARGATE_TERMINAL_STATES
airflow.providers.amazon.aws.sensors.eks.NODEGROUP_TERMINAL_STATES
airflow.providers.amazon.aws.sensors.eks.UNEXPECTED_TERMINAL_STATE_MSG
.. py:data:: DEFAULT_CONN_ID
:annotation: = aws_default
.. py:data:: CLUSTER_TERMINAL_STATES
.. py:data:: FARGATE_TERMINAL_STATES
.. py:data:: NODEGROUP_TERMINAL_STATES
.. py:data:: UNEXPECTED_TERMINAL_STATE_MSG
:annotation: = Terminal state reached. Current state: {current_state}, Expected state: {target_state}
.. py:class:: EksClusterStateSensor(*, cluster_name, target_state = ClusterStates.ACTIVE, aws_conn_id = DEFAULT_CONN_ID, region = None, **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Check the state of an Amazon EKS Cluster until it reaches the target state or another terminal state.
.. seealso::
For more information on how to use this sensor, take a look at the guide:
:ref:`howto/sensor:EksClusterStateSensor`
:param cluster_name: The name of the Cluster to watch. (templated)
:param target_state: Target state of the Cluster. (templated)
:param region: Which AWS region the connection should use. (templated)
If this is None or empty then the default boto3 behaviour is used.
:param 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).
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['cluster_name', 'target_state', 'aws_conn_id', 'region']
.. py:attribute:: ui_color
:annotation: = #ff9900
.. py:attribute:: ui_fgcolor
:annotation: = #232F3E
.. py:method:: poke(self, context)
Function that the sensors defined while deriving this class should
override.
.. py:class:: EksFargateProfileStateSensor(*, cluster_name, fargate_profile_name, target_state = FargateProfileStates.ACTIVE, aws_conn_id = DEFAULT_CONN_ID, region = None, **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Check the state of an AWS Fargate profile until it reaches the target state or another terminal state.
.. seealso::
For more information on how to use this sensor, take a look at the guide:
:ref:`howto/sensor:EksFargateProfileStateSensor`
:param cluster_name: The name of the Cluster which the AWS Fargate profile is attached to. (templated)
:param fargate_profile_name: The name of the Fargate profile to watch. (templated)
:param target_state: Target state of the Fargate profile. (templated)
:param region: Which AWS region the connection should use. (templated)
If this is None or empty then the default boto3 behaviour is used.
:param 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).
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['cluster_name', 'fargate_profile_name', 'target_state', 'aws_conn_id', 'region']
.. py:attribute:: ui_color
:annotation: = #ff9900
.. py:attribute:: ui_fgcolor
:annotation: = #232F3E
.. py:method:: poke(self, context)
Function that the sensors defined while deriving this class should
override.
.. py:class:: EksNodegroupStateSensor(*, cluster_name, nodegroup_name, target_state = NodegroupStates.ACTIVE, aws_conn_id = DEFAULT_CONN_ID, region = None, **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Check the state of an EKS managed node group until it reaches the target state or another terminal state.
.. seealso::
For more information on how to use this sensor, take a look at the guide:
:ref:`howto/sensor:EksNodegroupStateSensor`
:param cluster_name: The name of the Cluster which the Nodegroup is attached to. (templated)
:param nodegroup_name: The name of the Nodegroup to watch. (templated)
:param target_state: Target state of the Nodegroup. (templated)
:param region: Which AWS region the connection should use. (templated)
If this is None or empty then the default boto3 behaviour is used.
:param 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).
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['cluster_name', 'nodegroup_name', 'target_state', 'aws_conn_id', 'region']
.. py:attribute:: ui_color
:annotation: = #ff9900
.. py:attribute:: ui_fgcolor
:annotation: = #232F3E
.. py:method:: poke(self, context)
Function that the sensors defined while deriving this class should
override.
.. py:class:: EKSClusterStateSensor(*args, **kwargs)
Bases: :py:obj:`EksClusterStateSensor`
This sensor is deprecated.
Please use :class:`airflow.providers.amazon.aws.sensors.eks.EksClusterStateSensor`.
.. py:class:: EKSFargateProfileStateSensor(*args, **kwargs)
Bases: :py:obj:`EksFargateProfileStateSensor`
This sensor is deprecated.
Please use :class:`airflow.providers.amazon.aws.sensors.eks.EksFargateProfileStateSensor`.
.. py:class:: EKSNodegroupStateSensor(*args, **kwargs)
Bases: :py:obj:`EksNodegroupStateSensor`
This sensor is deprecated.
Please use :class:`airflow.providers.amazon.aws.sensors.eks.EksNodegroupStateSensor`.