EKS / Client / create_capability

create_capability

EKS.Client.create_capability(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_capability(
    capabilityName='string',
    clusterName='string',
    clientRequestToken='string',
    type='ACK'|'KRO'|'ARGOCD',
    roleArn='string',
    configuration={
        'argoCd': {
            'namespace': 'string',
            'awsIdc': {
                'idcInstanceArn': 'string',
                'idcRegion': 'string'
            },
            'rbacRoleMappings': [
                {
                    'role': 'ADMIN'|'EDITOR'|'VIEWER',
                    'identities': [
                        {
                            'id': 'string',
                            'type': 'SSO_USER'|'SSO_GROUP'
                        },
                    ]
                },
            ],
            'networkAccess': {
                'vpceIds': [
                    'string',
                ]
            }
        }
    },
    tags={
        'string': 'string'
    },
    deletePropagationPolicy='RETAIN'
)
Parameters:
  • capabilityName (string) –

    [REQUIRED]

    A unique name for the capability. The name must be unique within your cluster and can contain alphanumeric characters, hyphens, and underscores.

  • clusterName (string) –

    [REQUIRED]

    The name of the Amazon EKS cluster where you want to create the capability.

  • clientRequestToken (string) –

    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.

    This field is autopopulated if not provided.

  • type (string) –

    [REQUIRED]

    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.

  • roleArn (string) –

    [REQUIRED]

    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 (dict) –

    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.

    • argoCd (dict) –

      Configuration settings specific to Argo CD capabilities. This field is only used when creating or updating an Argo CD capability.

      • namespace (string) –

        The Kubernetes namespace where Argo CD resources will be created. If not specified, the default namespace is used.

      • awsIdc (dict) – [REQUIRED]

        Configuration for IAM Identity CenterIAM; Identity Center integration. When configured, users can authenticate to Argo CD using their IAM Identity CenterIAM; Identity Center credentials.

        • idcInstanceArn (string) – [REQUIRED]

          The Amazon Resource Name (ARN) of the IAM Identity CenterIAM; Identity Center instance to use for authentication.

        • idcRegion (string) –

          The Region where your IAM Identity CenterIAM; Identity Center instance is located.

      • rbacRoleMappings (list) –

        A list of role mappings that define which IAM Identity CenterIAM; Identity Center users or groups have which Argo CD roles. Each mapping associates an Argo CD role ( ADMIN, EDITOR, or VIEWER) with one or more IAM Identity CenterIAM; Identity Center identities.

        • (dict) –

          A mapping between an Argo CD role and IAM Identity CenterIAM; Identity Center identities. This defines which users or groups have specific permissions in Argo CD.

          • role (string) – [REQUIRED]

            The Argo CD role to assign. Valid values are:

            • ADMIN – Full administrative access to Argo CD.

            • EDITOR – Edit access to Argo CD resources.

            • VIEWER – Read-only access to Argo CD resources.

          • identities (list) – [REQUIRED]

            A list of IAM Identity CenterIAM; Identity Center identities (users or groups) that should be assigned this Argo CD role.

            • (dict) –

              An IAM Identity CenterIAM; Identity Center identity (user or group) that can be assigned permissions in a capability.

              • id (string) – [REQUIRED]

                The unique identifier of the IAM Identity CenterIAM; Identity Center user or group.

              • type (string) – [REQUIRED]

                The type of identity. Valid values are SSO_USER or SSO_GROUP.

      • networkAccess (dict) –

        Configuration for network access to the Argo CD capability’s managed API server endpoint. By default, the Argo CD server is accessible via a public endpoint. You can optionally specify one or more VPC endpoint IDs to enable private connectivity from your VPCs. When VPC endpoints are configured, public access is blocked and the Argo CD server is only accessible through the specified VPC endpoints.

        • vpceIds (list) –

          A list of VPC endpoint IDs to associate with the managed Argo CD API server endpoint. Each VPC endpoint provides private connectivity from a specific VPC to the Argo CD server. You can specify multiple VPC endpoint IDs to enable access from multiple VPCs.

          • (string) –

  • tags (dict) –

    The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

    The following basic restrictions apply to tags:

    • Maximum number of tags per resource – 50

    • For each resource, each tag key must be unique, and each tag key can have only one value.

    • Maximum key length – 128 Unicode characters in UTF-8

    • Maximum value length – 256 Unicode characters in UTF-8

    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

    • Tag keys and values are case-sensitive.

    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

    • (string) –

      One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

      • (string) –

        The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

  • deletePropagationPolicy (string) –

    [REQUIRED]

    Specifies how Kubernetes resources managed by the capability should be handled when the capability is deleted. Currently, the only supported value is RETAIN which 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.

Return type:

dict

Returns:

Response Syntax

{
    'capability': {
        'capabilityName': 'string',
        'arn': 'string',
        'clusterName': 'string',
        'type': 'ACK'|'KRO'|'ARGOCD',
        'roleArn': 'string',
        'status': 'CREATING'|'CREATE_FAILED'|'UPDATING'|'DELETING'|'DELETE_FAILED'|'ACTIVE'|'DEGRADED',
        'version': 'string',
        'configuration': {
            'argoCd': {
                'namespace': 'string',
                'awsIdc': {
                    'idcInstanceArn': 'string',
                    'idcRegion': 'string',
                    'idcManagedApplicationArn': 'string'
                },
                'rbacRoleMappings': [
                    {
                        'role': 'ADMIN'|'EDITOR'|'VIEWER',
                        'identities': [
                            {
                                'id': 'string',
                                'type': 'SSO_USER'|'SSO_GROUP'
                            },
                        ]
                    },
                ],
                'networkAccess': {
                    'vpceIds': [
                        'string',
                    ]
                },
                'serverUrl': 'string'
            }
        },
        'tags': {
            'string': 'string'
        },
        'health': {
            'issues': [
                {
                    'code': 'AccessDenied'|'ClusterUnreachable',
                    'message': 'string'
                },
            ]
        },
        'createdAt': datetime(2015, 1, 1),
        'modifiedAt': datetime(2015, 1, 1),
        'deletePropagationPolicy': 'RETAIN'
    }
}

Response Structure

  • (dict) –

    • capability (dict) –

      An object containing information about the newly created capability, including its name, ARN, status, and configuration.

      • capabilityName (string) –

        The unique name of the capability within the cluster.

      • arn (string) –

        The Amazon Resource Name (ARN) of the capability.

      • clusterName (string) –

        The name of the Amazon EKS cluster that contains this capability.

      • type (string) –

        The type of capability. Valid values are ACK, ARGOCD, or KRO.

      • roleArn (string) –

        The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services.

      • status (string) –

        The current status of the capability. Valid values include:

        • CREATING – The capability is being created.

        • ACTIVE – The capability is running and available.

        • UPDATING – The capability is being updated.

        • DELETING – The capability is being deleted.

        • CREATE_FAILED – The capability creation failed.

        • UPDATE_FAILED – The capability update failed.

        • DELETE_FAILED – The capability deletion failed.

      • version (string) –

        The version of the capability software that is currently running.

      • configuration (dict) –

        The configuration settings for the capability. The structure varies depending on the capability type.

        • argoCd (dict) –

          Configuration settings for an Argo CD capability, including the server URL and other Argo CD-specific settings.

          • namespace (string) –

            The Kubernetes namespace where Argo CD resources are monitored by your Argo CD Capability.

          • awsIdc (dict) –

            The IAM Identity CenterIAM; Identity Center integration configuration.

            • idcInstanceArn (string) –

              The Amazon Resource Name (ARN) of the IAM Identity CenterIAM; Identity Center instance used for authentication.

            • idcRegion (string) –

              The Region where the IAM Identity CenterIAM; Identity Center instance is located.

            • idcManagedApplicationArn (string) –

              The Amazon Resource Name (ARN) of the managed application created in IAM Identity CenterIAM; Identity Center for this Argo CD capability. This application is automatically created and managed by Amazon EKS.

          • rbacRoleMappings (list) –

            The list of role mappings that define which IAM Identity CenterIAM; Identity Center users or groups have which Argo CD roles.

            • (dict) –

              A mapping between an Argo CD role and IAM Identity CenterIAM; Identity Center identities. This defines which users or groups have specific permissions in Argo CD.

              • role (string) –

                The Argo CD role to assign. Valid values are:

                • ADMIN – Full administrative access to Argo CD.

                • EDITOR – Edit access to Argo CD resources.

                • VIEWER – Read-only access to Argo CD resources.

              • identities (list) –

                A list of IAM Identity CenterIAM; Identity Center identities (users or groups) that should be assigned this Argo CD role.

                • (dict) –

                  An IAM Identity CenterIAM; Identity Center identity (user or group) that can be assigned permissions in a capability.

                  • id (string) –

                    The unique identifier of the IAM Identity CenterIAM; Identity Center user or group.

                  • type (string) –

                    The type of identity. Valid values are SSO_USER or SSO_GROUP.

          • networkAccess (dict) –

            The network access configuration for the Argo CD capability’s managed API server endpoint. If VPC endpoint IDs are specified, public access is blocked and the Argo CD server is only accessible through the specified VPC endpoints.

            • vpceIds (list) –

              The list of VPC endpoint IDs associated with the managed Argo CD API server endpoint. Each VPC endpoint provides private connectivity from a specific VPC to the Argo CD server.

              • (string) –

          • serverUrl (string) –

            The URL of the Argo CD server. Use this URL to access the Argo CD web interface and API.

      • tags (dict) –

        The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

        The following basic restrictions apply to tags:

        • Maximum number of tags per resource – 50

        • For each resource, each tag key must be unique, and each tag key can have only one value.

        • Maximum key length – 128 Unicode characters in UTF-8

        • Maximum value length – 256 Unicode characters in UTF-8

        • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

        • Tag keys and values are case-sensitive.

        • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

        • (string) –

          One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

          • (string) –

            The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

      • health (dict) –

        Health information for the capability, including any issues that may be affecting its operation.

        • issues (list) –

          A list of issues affecting the capability. If this list is empty, the capability is healthy.

          • (dict) –

            An issue affecting a capability’s health or operation.

            • code (string) –

              A code identifying the type of issue. This can be used to programmatically handle specific issue types.

            • message (string) –

              A human-readable message describing the issue and potential remediation steps.

      • createdAt (datetime) –

        The Unix epoch timestamp in seconds for when the capability was created.

      • modifiedAt (datetime) –

        The Unix epoch timestamp in seconds for when the capability was last modified.

      • deletePropagationPolicy (string) –

        The delete propagation policy for the capability. Currently, the only supported value is RETAIN, which keeps all resources managed by the capability when the capability is deleted.

Exceptions