createVpcLink method
Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational. The caller must have permissions to create and update VPC Endpoint services.
May throw UnauthorizedException. May throw BadRequestException. May throw TooManyRequestsException.
Parameter name
:
Required
The name used to label and identify the VPC link.
Parameter targetArns
:
Required
The ARN of the network load balancer of the VPC targeted by the
VPC link. The network load balancer must be owned by the same AWS account
of the API owner.
Parameter description
:
The description of the VPC link.
Parameter tags
:
The key-value map of strings. The valid character set is a-zA-Z+-=._:/
.
The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
Implementation
Future<VpcLink> createVpcLink({
required String name,
required List<String> targetArns,
String? description,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(name, 'name');
ArgumentError.checkNotNull(targetArns, 'targetArns');
final $payload = <String, dynamic>{
'name': name,
'targetArns': targetArns,
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/vpclinks',
exceptionFnMap: _exceptionFns,
);
return VpcLink.fromJson(response);
}