EMRContainers / Client / update_virtual_cluster

update_virtual_cluster

EMRContainers.Client.update_virtual_cluster(**kwargs)

Updates a virtual cluster. Virtual cluster is a managed entity on Amazon EMR on EKS. You can create, update, 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.update_virtual_cluster(
    id='string',
    schedulerConfiguration={
        'maxInQueueJobRuns': 123,
        'maxConcurrentJobRuns': 123
    },
    clientToken='string'
)
Parameters:
  • id (string) –

    [REQUIRED]

    The ID of the virtual cluster to update.

  • schedulerConfiguration (dict) –

    The scheduler configuration to apply to the virtual cluster. The new configuration fully replaces the existing one. If you omit a field, the corresponding limit is removed.

    • maxInQueueJobRuns (integer) –

      The maximum number of job runs that can be in the PENDING or SUBMITTED state at any time for the virtual cluster. When the queue is full, the service rejects StartJobRun requests with a ValidationException. If you omit this field, the service applies no queue-depth limit.

    • maxConcurrentJobRuns (integer) –

      The maximum number of job runs that can be in the RUNNING state at any time for the virtual cluster. As running slots free up, queued job runs start automatically. If you omit this field, the service applies no concurrency limit.

  • clientToken (string) –

    [REQUIRED]

    A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'virtualCluster': {
        'id': 'string',
        'name': 'string',
        'arn': 'string',
        'state': 'RUNNING'|'TERMINATING'|'TERMINATED'|'ARRESTED',
        'containerProvider': {
            'type': 'EKS',
            'id': 'string',
            'info': {
                'eksInfo': {
                    'namespace': 'string',
                    'nodeLabel': 'string'
                }
            }
        },
        'createdAt': datetime(2015, 1, 1),
        'tags': {
            'string': 'string'
        },
        'securityConfigurationId': 'string',
        'sessionEnabled': True|False,
        'schedulerConfiguration': {
            'maxInQueueJobRuns': 123,
            'maxConcurrentJobRuns': 123
        },
        'schedulerStatus': {
            'currentInQueueJobRuns': 123,
            'currentConcurrentJobRuns': 123
        }
    }
}

Response Structure

  • (dict) –

    Contains the virtual cluster returned after a successful update request.

    • virtualCluster (dict) –

      The updated virtual cluster.

      • 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.

          Note

          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.

            • 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.

      • createdAt (datetime) –

        The date and time when the virtual cluster is created.

      • tags (dict) –

        The assigned tags of the virtual cluster.

        • (string) –

          • (string) –

      • securityConfigurationId (string) –

        The ID of the security configuration.

      • sessionEnabled (boolean) –

        Specifies whether the virtual cluster has session support enabled.

      • schedulerConfiguration (dict) –

        The scheduler configuration (concurrency and queue limits) applied to the virtual cluster. The service does not return this field when no scheduler limits are configured.

        • maxInQueueJobRuns (integer) –

          The maximum number of job runs that can be in the PENDING or SUBMITTED state at any time for the virtual cluster. When the queue is full, the service rejects StartJobRun requests with a ValidationException. If you omit this field, the service applies no queue-depth limit.

        • maxConcurrentJobRuns (integer) –

          The maximum number of job runs that can be in the RUNNING state at any time for the virtual cluster. As running slots free up, queued job runs start automatically. If you omit this field, the service applies no concurrency limit.

      • schedulerStatus (dict) –

        The current in-queue and concurrent job-run counts for the virtual cluster.

        • currentInQueueJobRuns (integer) –

          The number of job runs currently waiting in the queue ( PENDING or SUBMITTED) for the virtual cluster.

        • currentConcurrentJobRuns (integer) –

          The number of job runs currently in the RUNNING state for the virtual cluster.

Exceptions

  • EMRContainers.Client.exceptions.ValidationException

  • EMRContainers.Client.exceptions.ResourceNotFoundException

  • EMRContainers.Client.exceptions.InternalServerException