updateVirtualCluster method

Future<UpdateVirtualClusterResponse> updateVirtualCluster({
  1. required String id,
  2. String? clientToken,
  3. SchedulerConfiguration? schedulerConfiguration,
})

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.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter id : The ID of the virtual cluster to update.

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

Parameter schedulerConfiguration : 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.

Implementation

Future<UpdateVirtualClusterResponse> updateVirtualCluster({
  required String id,
  String? clientToken,
  SchedulerConfiguration? schedulerConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (schedulerConfiguration != null)
      'schedulerConfiguration': schedulerConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/virtualclusters/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateVirtualClusterResponse.fromJson(response);
}