create_capability
async
¶
create_capability(
capability_name: String,
cluster_name: String,
type: CapabilityType,
role_arn: String,
delete_propagation_policy: CapabilityDeletePropagationPolicy,
*,
config_overrides: Optional[AsyncEKSClientConfig] = None,
client_request_token: Optional[String] = None,
configuration: Optional[CapabilityConfigurationRequest] = None,
tags: Optional[TagMap] = None,
) -> CreateCapabilityResponse
Creates a managed capability resource for an Amazon EKS cluster.
Capabilities provide fully managed capabilities to build and scale with Kubernetes. When you create a capability, Amazon EKSprovisions and manages the infrastructure required to run the capability outside of your cluster. This approach reduces operational overhead and preserves cluster resources.
You can only create one Capability of each type on a given Amazon EKS cluster. Valid types are Argo CD for declarative GitOps deployment, Amazon Web Services Controllers for Kubernetes (ACK) for resource management, and Kube Resource Orchestrator (KRO) for Kubernetes custom resource orchestration.
For more information, see EKS Capabilities in the Amazon EKS User Guide.
Parameters:
-
capability_name(String) –A unique name for the capability. The name must be unique within your cluster and can contain alphanumeric characters, hyphens, and underscores.
-
cluster_name(String) –The name of the Amazon EKS cluster where you want to create the capability.
-
client_request_token(Optional[String], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.
-
type(CapabilityType) –The type of capability to create. Valid values are:
-
ACK– Amazon Web Services Controllers for Kubernetes (ACK), which lets you manage resources directly from Kubernetes. -
ARGOCD– Argo CD for GitOps-based continuous delivery. -
KRO– Kube Resource Orchestrator (KRO) for composing and managing custom Kubernetes resources.
-
-
role_arn(String) –The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. This role must have a trust policy that allows the EKS service principal to assume it, and it must have the necessary permissions for the capability type you're creating.
For ACK capabilities, the role needs permissions to manage the resources you want to control through Kubernetes. For Argo CD capabilities, the role needs permissions to access Git repositories and Secrets Manager. For KRO capabilities, the role needs permissions based on the resources you'll be orchestrating.
-
configuration(Optional[CapabilityConfigurationRequest], default:None) –The configuration settings for the capability. The structure of this object varies depending on the capability type. For Argo CD capabilities, you can configure IAM Identity CenterIAM; Identity Center integration, RBAC role mappings, and network access settings.
-
delete_propagation_policy(CapabilityDeletePropagationPolicy) –Specifies how Kubernetes resources managed by the capability should be handled when the capability is deleted. Currently, the only supported value is
RETAINwhich retains all Kubernetes resources managed by the capability when the capability is deleted.Because resources are retained, all Kubernetes resources created by the capability should be deleted from the cluster before deleting the capability itself. After the capability is deleted, these resources become difficult to manage because the controller is no longer available.
Raises:
-
AccessDeniedException–You don't have permissions to perform the requested operation. The IAM principal making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access management in the IAM User Guide.
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
InvalidRequestException–The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.
-
ResourceInUseException–The specified resource is in use.
-
ResourceLimitExceededException–You have encountered a service limit on the specified resource.
-
ServerException–These errors are usually caused by a server-side issue.
-
ThrottlingException–The request or operation couldn't be performed because a service is throttling requests.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_eks/_services/async_eks.py
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 | |