createVpcConnection method
Creates a new MSK VPC connection.
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter authentication :
The authentication type of VPC connection.
Parameter clientSubnets :
The list of client subnets.
Parameter securityGroups :
The list of security groups.
Parameter targetClusterArn :
The cluster Amazon Resource Name (ARN) for the VPC connection.
Parameter vpcId :
The VPC ID of VPC connection.
Parameter tags :
A map of tags for the VPC connection.
Implementation
Future<CreateVpcConnectionResponse> createVpcConnection({
required String authentication,
required List<String> clientSubnets,
required List<String> securityGroups,
required String targetClusterArn,
required String vpcId,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'authentication': authentication,
'clientSubnets': clientSubnets,
'securityGroups': securityGroups,
'targetClusterArn': targetClusterArn,
'vpcId': vpcId,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/vpc-connection',
exceptionFnMap: _exceptionFns,
);
return CreateVpcConnectionResponse.fromJson(response);
}