createClusterV2 method
Creates a new MSK cluster.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter clusterName :
The name of the cluster.
Parameter provisioned :
Information about the provisioned cluster.
Parameter serverless :
Information about the serverless cluster.
Parameter tags :
A map of tags that you want the cluster to have.
Implementation
Future<CreateClusterV2Response> createClusterV2({
required String clusterName,
ProvisionedRequest? provisioned,
ServerlessRequest? serverless,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'clusterName': clusterName,
if (provisioned != null) 'provisioned': provisioned,
if (serverless != null) 'serverless': serverless,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/api/v2/clusters',
exceptionFnMap: _exceptionFns,
);
return CreateClusterV2Response.fromJson(response);
}