class_docstr: Executes a task in a Kubernetes pod on the specified Amazon EKS Cluster.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:EksPodOperator`
  
  :param cluster_name: The name of the Amazon EKS Cluster to execute the task on. (templated)
  :param in_cluster: If True, look for config inside the cluster; if False look for a local file path.
  :param namespace: The namespace in which to execute the pod. (templated)
  :param pod_name: The unique name to give the pod. (templated)
  :param aws_profile: The named profile containing the credentials for the AWS CLI tool to use.
  :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).
  :param on_finish_action: What to do when the pod reaches its final state, or the execution is interrupted.
      If "delete_pod", the pod will be deleted regardless its state; if "delete_succeeded_pod",
      only succeeded pod will be deleted. You can set to "keep_pod" to keep the pod.
      Current default is `keep_pod`, but this will be changed in the next major release of this provider.
  :param is_delete_operator_pod: What to do when the pod reaches its final
      state, or the execution is interrupted. If True, delete the
      pod; if False, leave the pod. Current default is False, but this will be
      changed in the next major release of this provider.
      Deprecated - use `on_finish_action` instead.
class_docstr_tok: ["Executes","a","task","in","a","Kubernetes","pod","on","the","specified","Amazon","EKS","Cluster",".","..","seealso",":",":","For","more","information","on","how","to","use","this","operator",",","take","a","look","at","the","guide",":",":","ref",":","`","howto\/operator",":","EksPodOperator","`",":","param","cluster_name",":","The","name","of","the","Amazon","EKS","Cluster","to","execute","the","task","on",".","(","templated",")",":","param","in_cluster",":","If","True",",","look","for","config","inside","the","cluster",";","if","False","look","for","a","local","file","path",".",":","param","namespace",":","The","namespace","in","which","to","execute","the","pod",".","(","templated",")",":","param","pod_name",":","The","unique","name","to","give","the","pod",".","(","templated",")",":","param","aws_profile",":","The","named","profile","containing","the","credentials","for","the","AWS","CLI","tool","to","use",".",":","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",")",".",":","param","on_finish_action",":","What","to","do","when","the","pod","reaches","its","final","state",",","or","the","execution","is","interrupted",".","If","``","delete_pod","''",",","the","pod","will","be","deleted","regardless","its","state",";","if","``","delete_succeeded_pod","''",",","only","succeeded","pod","will","be","deleted",".","You","can","set","to","``","keep_pod","''","to","keep","the","pod",".","Current","default","is","`","keep_pod","`",",","but","this","will","be","changed","in","the","next","major","release","of","this","provider",".",":","param","is_delete_operator_pod",":","What","to","do","when","the","pod","reaches","its","final","state",",","or","the","execution","is","interrupted",".","If","True",",","delete","the","pod",";","if","False",",","leave","the","pod",".","Current","default","is","False",",","but","this","will","be","changed","in","the","next","major","release","of","this","provider",".","Deprecated","-","use","`","on_finish_action","`","instead","."]
code: def __init__(
      self,
      cluster_name: str,
      # Setting in_cluster to False tells the pod that the config
      # file is stored locally in the worker and not in the cluster.
      in_cluster: bool = False,
      namespace: str = DEFAULT_NAMESPACE_NAME,
      pod_context: str | None = None,
      pod_name: str | None = None,
      pod_username: str | None = None,
      aws_conn_id: str = DEFAULT_CONN_ID,
      region: str | None = None,
      on_finish_action: str | None = None,
      is_delete_operator_pod: bool | None = None,
      **kwargs,
  ) -> None:
      if is_delete_operator_pod is not None:
          warnings.warn(
              "`is_delete_operator_pod` parameter is deprecated, please use `on_finish_action`",
              AirflowProviderDeprecationWarning,
              stacklevel=2,
          )
          kwargs["on_finish_action"] = (
              OnFinishAction.DELETE_POD
              if is_delete_operator_pod
              else OnFinishAction.KEEP_POD
          )
      else:
          if on_finish_action is not None:
              kwargs["on_finish_action"] = OnFinishAction(
                  on_finish_action
              )
          else:
              warnings.warn(
                  f"You have not set parameter `on_finish_action` in class {self.__class__.__name__}. "
                  "Currently the default for this parameter is `keep_pod` but in a future release"
                  " the default will be changed to `delete_pod`. To ensure pods are not deleted in"
                  " the future you will need to set `on_finish_action=keep_pod` explicitly.",
                  AirflowProviderDeprecationWarning,
                  stacklevel=2,
              )
              kwargs["on_finish_action"] = OnFinishAction.KEEP_POD
  
      self.cluster_name = cluster_name
      self.in_cluster = in_cluster
      self.namespace = namespace
      self.pod_name = pod_name
      self.aws_conn_id = aws_conn_id
      self.region = region
      super().__init__(
          in_cluster=self.in_cluster,
          namespace=self.namespace,
          name=self.pod_name,
          **kwargs,
      )
      # There is no need to manage the kube_config file, as it will be generated automatically.
      # All Kubernetes parameters (except config_file) are also valid for the EksPodOperator.
      if self.config_file:
          raise AirflowException(
              "The config_file is not an allowed parameter for the EksPodOperator."
          )
  
imports: from __future__ import annotations
  import logging
  import warnings
  from ast import literal_eval
  from datetime import timedelta
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, List, Sequence, cast
  from botocore.exceptions import ClientError, WaiterError
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.models import BaseOperator
  from airflow.providers.amazon.aws.hooks.eks import EksHook
  from airflow.providers.amazon.aws.triggers.eks import EksCreateClusterTrigger, EksCreateFargateProfileTrigger, EksCreateNodegroupTrigger, EksDeleteClusterTrigger, EksDeleteFargateProfileTrigger, EksDeleteNodegroupTrigger
  from airflow.providers.amazon.aws.utils.waiter_with_logging import wait
  from airflow.providers.cncf.kubernetes.utils.pod_manager import OnFinishAction
label_desc: Use image node_id 1 to create a new EksPodOperator object from inherited base classes: KubernetesPodOperator with example: obj = EksPodOperator(cluster_name, in_cluster, namespace, pod_context, pod_name, pod_username, aws_conn_id, region, on_finish_action, is_delete_operator_pod)