airflow.providers.amazon.aws.hooks.eks
¶
Interact with Amazon EKS, using the boto3 library.
Module Contents¶
-
class
airflow.providers.amazon.aws.hooks.eks.
ClusterStates
[source]¶ Bases:
enum.Enum
Contains the possible State values of an EKS Cluster.
-
class
airflow.providers.amazon.aws.hooks.eks.
NodegroupStates
[source]¶ Bases:
enum.Enum
Contains the possible State values of an EKS Managed Nodegroup.
-
class
airflow.providers.amazon.aws.hooks.eks.
EKSHook
(*args, **kwargs)[source]¶ Bases:
airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook
Interact with Amazon EKS, using the boto3 library.
Additional arguments (such as
aws_conn_id
) may be specified and are passed down to the underlying AwsBaseHook.See also
-
create_cluster
(self, name: str, roleArn: str, resourcesVpcConfig: Dict, **kwargs)[source]¶ Creates an Amazon EKS control plane.
- Parameters
name (str) -- The unique name to give to your Amazon EKS Cluster.
roleArn (str) -- The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
resourcesVpcConfig (Dict) -- The VPC configuration used by the cluster control plane.
- Returns
Returns descriptive information about the created EKS Cluster.
- Return type
Dict
-
create_nodegroup
(self, clusterName: str, nodegroupName: str, subnets: List[str], nodeRole: str, **kwargs)[source]¶ Creates an Amazon EKS Managed Nodegroup for an EKS Cluster.
- Parameters
clusterName (str) -- The name of the cluster to create the EKS Managed Nodegroup in.
nodegroupName (str) -- The unique name to give your managed nodegroup.
subnets (List[str]) -- The subnets to use for the Auto Scaling group that is created for your nodegroup.
nodeRole (str) -- The Amazon Resource Name (ARN) of the IAM role to associate with your nodegroup.
- Returns
Returns descriptive information about the created EKS Managed Nodegroup.
- Return type
Dict
-
delete_cluster
(self, name: str)[source]¶ Deletes the Amazon EKS Cluster control plane.
- Parameters
name (str) -- The name of the cluster to delete.
- Returns
Returns descriptive information about the deleted EKS Cluster.
- Return type
Dict
-
delete_nodegroup
(self, clusterName: str, nodegroupName: str)[source]¶ Deletes an Amazon EKS Nodegroup from a specified cluster.
-
describe_cluster
(self, name: str, verbose: bool = False)[source]¶ Returns descriptive information about an Amazon EKS Cluster.
-
describe_nodegroup
(self, clusterName: str, nodegroupName: str, verbose: bool = False)[source]¶ Returns descriptive information about an Amazon EKS Nodegroup.
- Parameters
- Returns
Returns descriptive information about a specific EKS Nodegroup.
- Return type
Dict
-
get_cluster_state
(self, clusterName: str)[source]¶ Returns the current status of a given Amazon EKS Cluster.
- Parameters
clusterName (str) -- The name of the cluster to check.
- Returns
Returns the current status of a given Amazon EKS Cluster.
- Return type
-
get_nodegroup_state
(self, clusterName: str, nodegroupName: str)[source]¶ Returns the current status of a given Amazon EKS Nodegroup.
- Parameters
- Returns
Returns the current status of a given Amazon EKS Nodegroup.
- Return type
-
list_clusters
(self, verbose: bool = False)[source]¶ Lists all Amazon EKS Clusters in your AWS account.
- Parameters
verbose (bool) -- Provides additional logging if set to True. Defaults to False.
- Returns
A List containing the cluster names.
- Return type
List
-
list_nodegroups
(self, clusterName: str, verbose: bool = False)[source]¶ Lists all Amazon EKS Nodegroups associated with the specified cluster.
-