createVirtualCluster method

Future<CreateVirtualClusterResponse> createVirtualCluster({
  1. required ContainerProvider containerProvider,
  2. required String name,
  3. String? clientToken,
  4. String? securityConfigurationId,
  5. Map<String, String>? tags,
})

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.

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

Parameter containerProvider : The container provider of the virtual cluster.

Parameter name : The specified name of the virtual cluster.

Parameter clientToken : The client token of the virtual cluster.

Parameter securityConfigurationId : The ID of the security configuration.

Parameter tags : The tags assigned to the virtual cluster.

Implementation

Future<CreateVirtualClusterResponse> createVirtualCluster({
  required ContainerProvider containerProvider,
  required String name,
  String? clientToken,
  String? securityConfigurationId,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'containerProvider': containerProvider,
    'name': name,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (securityConfigurationId != null)
      'securityConfigurationId': securityConfigurationId,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/virtualclusters',
    exceptionFnMap: _exceptionFns,
  );
  return CreateVirtualClusterResponse.fromJson(response);
}