class_docstr: Poll the cluster state until it reaches a terminal state; raises AirflowException with the failure reason.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/sensor:EcsClusterStateSensor`
  
  :param cluster_name: The name of your cluster.
  :param target_state: Success state to watch for. (Default: "ACTIVE")
  :param failure_states: Fail if any of these states are reached before the
       Success State. (Default: "FAILED" or "INACTIVE")
code: def poke(self, context: Context):
      cluster_state = EcsClusterStates(
          self.hook.get_cluster_state(cluster_name=self.cluster_name)
      )
  
      self.log.info(
          "Cluster state: %s, waiting for: %s",
          cluster_state,
          self.target_state,
      )
      _check_failed(
          cluster_state,
          self.target_state,
          self.failure_states,
          self.soft_fail,
      )
  
      return cluster_state == self.target_state
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING, Sequence
  from airflow.exceptions import AirflowException, AirflowSkipException
  from airflow.providers.amazon.aws.hooks.ecs import EcsClusterStates, EcsHook, EcsTaskDefinitionStates, EcsTaskStates
  from airflow.providers.amazon.aws.sensors.base_aws import AwsBaseSensor
  from airflow.providers.amazon.aws.utils.mixins import aws_template_fields
label_desc: Use image node_id 2 for calling the EcsClusterStateSensor obj's underlying member method code with example usage: obj.poke(context) and returns: unknown