EMRContainers / Client / list_virtual_clusters



Lists information about the specified virtual cluster. Virtual cluster is a managed entity on Amazon EMR on EKS. You can create, describe, list and delete virtual clusters. They do not consume any additional resource in your system. A single virtual cluster maps to a single Kubernetes namespace. Given this relationship, you can model virtual clusters the same way you model Kubernetes namespaces to meet your requirements.

See also: AWS API Documentation

Request Syntax

response = client.list_virtual_clusters(
    createdAfter=datetime(2015, 1, 1),
    createdBefore=datetime(2015, 1, 1),
  • containerProviderId (string) – The container provider ID of the virtual cluster.

  • containerProviderType (string) – The container provider type of the virtual cluster. Amazon EKS is the only supported type as of now.

  • createdAfter (datetime) – The date and time after which the virtual clusters are created.

  • createdBefore (datetime) – The date and time before which the virtual clusters are created.

  • states (list) –

    The states of the requested virtual clusters.

    • (string) –

  • maxResults (integer) – The maximum number of virtual clusters that can be listed.

  • nextToken (string) – The token for the next set of virtual clusters to return.

Return type:



Response Syntax

    'virtualClusters': [
            'id': 'string',
            'name': 'string',
            'arn': 'string',
            'containerProvider': {
                'type': 'EKS',
                'id': 'string',
                'info': {
                    'eksInfo': {
                        'namespace': 'string'
            'createdAt': datetime(2015, 1, 1),
            'tags': {
                'string': 'string'
    'nextToken': 'string'

Response Structure

  • (dict) –

    • virtualClusters (list) –

      This output lists the specified virtual clusters.

      • (dict) –

        This entity describes a virtual cluster. A virtual cluster is a Kubernetes namespace that Amazon EMR is registered with. Amazon EMR uses virtual clusters to run jobs and host endpoints. Multiple virtual clusters can be backed by the same physical cluster. However, each virtual cluster maps to one namespace on an Amazon EKS cluster. Virtual clusters do not create any active resources that contribute to your bill or that require lifecycle management outside the service.

        • id (string) –

          The ID of the virtual cluster.

        • name (string) –

          The name of the virtual cluster.

        • arn (string) –

          The ARN of the virtual cluster.

        • state (string) –

          The state of the virtual cluster.

        • containerProvider (dict) –

          The container provider of the virtual cluster.

          • type (string) –

            The type of the container provider. Amazon EKS is the only supported type as of now.

          • id (string) –

            The ID of the container cluster.

          • info (dict) –

            The information about the container cluster.


            This is a Tagged Union structure. Only one of the following top level keys will be set: eksInfo. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            • eksInfo (dict) –

              The information about the Amazon EKS cluster.

              • namespace (string) –

                The namespaces of the Amazon EKS cluster.

        • createdAt (datetime) –

          The date and time when the virtual cluster is created.

        • tags (dict) –

          The assigned tags of the virtual cluster.

          • (string) –

            • (string) –

    • nextToken (string) –

      This output displays the token for the next set of virtual clusters.


  • EMRContainers.Client.exceptions.ValidationException

  • EMRContainers.Client.exceptions.InternalServerException