createVpcLink method
Creates a VPC link.
May throw BadRequestException. May throw TooManyRequestsException.
Parameter name
:
The name of the VPC link.
Parameter subnetIds
:
A list of subnet IDs to include in the VPC link.
Parameter securityGroupIds
:
A list of security group IDs for the VPC link.
Parameter tags
:
A list of tags.
Implementation
Future<CreateVpcLinkResponse> createVpcLink({
required String name,
required List<String> subnetIds,
List<String>? securityGroupIds,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(name, 'name');
ArgumentError.checkNotNull(subnetIds, 'subnetIds');
final $payload = <String, dynamic>{
'name': name,
'subnetIds': subnetIds,
if (securityGroupIds != null) 'securityGroupIds': securityGroupIds,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/vpclinks',
exceptionFnMap: _exceptionFns,
);
return CreateVpcLinkResponse.fromJson(response);
}