:doc:`EMRContainers <../../emr-containers>` / Client / create_virtual_cluster

**********************
create_virtual_cluster
**********************



.. py:method:: EMRContainers.Client.create_virtual_cluster(**kwargs)

  

  Creates a 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 <https://docs.aws.amazon.com/goto/WebAPI/emr-containers-2020-10-01/CreateVirtualCluster>`_  


  **Request Syntax**
  ::

    response = client.create_virtual_cluster(
        name='string',
        containerProvider={
            'type': 'EKS',
            'id': 'string',
            'info': {
                'eksInfo': {
                    'namespace': 'string',
                    'nodeLabel': 'string'
                }
            }
        },
        clientToken='string',
        tags={
            'string': 'string'
        },
        securityConfigurationId='string'
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The specified name of the virtual cluster.

    

  
  :type containerProvider: dict
  :param containerProvider: **[REQUIRED]** 

    The container provider of the virtual cluster.

    

  
    - **type** *(string) --* **[REQUIRED]** 

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

      

    
    - **id** *(string) --* **[REQUIRED]** 

      The ID of the container cluster.

      

    
    - **info** *(dict) --* 

      The information about the container cluster.

      .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``eksInfo``. 

    
      - **eksInfo** *(dict) --* 

        The information about the Amazon EKS cluster.

        

      
        - **namespace** *(string) --* 

          The namespaces of the Amazon EKS cluster.

          

        
        - **nodeLabel** *(string) --* 

          The nodeLabel of the nodes where the resources of this virtual cluster can get scheduled. It requires relevant scaling and policy engine addons.

          

        
      
    
  
  :type clientToken: string
  :param clientToken: **[REQUIRED]** 

    The client token of the virtual cluster.

    This field is autopopulated if not provided.

  
  :type tags: dict
  :param tags: 

    The tags assigned to the virtual cluster.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type securityConfigurationId: string
  :param securityConfigurationId: 

    The ID of the security configuration.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'id': 'string',
          'name': 'string',
          'arn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **id** *(string) --* 

        This output contains the virtual cluster ID.

        
      

      - **name** *(string) --* 

        This output contains the name of the virtual cluster.

        
      

      - **arn** *(string) --* 

        This output contains the ARN of virtual cluster.

        
  
  **Exceptions**
  
  *   :py:class:`EMRContainers.Client.exceptions.ValidationException`

  
  *   :py:class:`EMRContainers.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`EMRContainers.Client.exceptions.InternalServerException`

  
  *   :py:class:`EMRContainers.Client.exceptions.EKSRequestThrottledException`

  