Skip to content

update_virtual_cluster

update_virtual_cluster(
    id: ResourceIdString,
    client_token: ClientToken,
    *,
    config_overrides: Optional[EMRcontainersClientConfig] = None,
    scheduler_configuration: Optional[SchedulerConfiguration] = None,
) -> UpdateVirtualClusterResponse

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.

Parameters:

  • id (ResourceIdString) –

    The ID of the virtual cluster to update.

  • scheduler_configuration (Optional[SchedulerConfiguration], default: None ) –

    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.

  • client_token (ClientToken) –

    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.

Raises:

Source code in docs_src/capo_emr_containers/_services/em_rcontainers.py
def update_virtual_cluster(
    self,
    id: "capo_emr_containers.types.resource_id_string.ResourceIdString",
    client_token: "capo_emr_containers.types.client_token.ClientToken",
    *,
    config_overrides: Optional[EMRcontainersClientConfig] = None,
    scheduler_configuration: Optional[
        "capo_emr_containers.types.scheduler_configuration.SchedulerConfiguration"
    ] = None,
) -> "capo_emr_containers.types.update_virtual_cluster_response.UpdateVirtualClusterResponse":
    """<p>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.</p>

    Args:
        id: <p>The ID of the virtual cluster to update.</p>
        scheduler_configuration: <p>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.</p>
        client_token: <p>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.</p>

    Raises:
        capo_emr_containers.errors.internal_server_exception.InternalServerException: <p>This is an internal server exception.</p>
        capo_emr_containers.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_emr_containers.errors.validation_exception.ValidationException: <p>There are invalid parameters in the client request.</p>
        capo_emr_containers.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr_containers.types.update_virtual_cluster_request.UpdateVirtualClusterRequest]",
    ) -> OperationResponse[
        "capo_emr_containers.types.update_virtual_cluster_response.UpdateVirtualClusterResponse"
    ]:
        import capo_emr_containers._operations.aws_chicago_web_service.update_virtual_cluster

        output, http_response = (
            capo_emr_containers._operations.aws_chicago_web_service.update_virtual_cluster.update_virtual_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateVirtualCluster")
    )
    input_: capo_emr_containers.types.update_virtual_cluster_request.UpdateVirtualClusterRequest = {
        "id": id,
        "client_token": client_token,
    }
    if scheduler_configuration is not None:
        input_["scheduler_configuration"] = scheduler_configuration

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output