createSiteToSiteVpnAttachment method
Creates an Amazon Web Services site-to-site VPN attachment on an edge location of a core network.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter coreNetworkId :
The ID of a core network where you're creating a site-to-site VPN
attachment.
Parameter vpnConnectionArn :
The ARN identifying the VPN attachment.
Parameter clientToken :
The client token associated with the request.
Parameter routingPolicyLabel :
The routing policy label to apply to the Site-to-Site VPN attachment for
traffic routing decisions.
Parameter tags :
The tags associated with the request.
Implementation
Future<CreateSiteToSiteVpnAttachmentResponse> createSiteToSiteVpnAttachment({
required String coreNetworkId,
required String vpnConnectionArn,
String? clientToken,
String? routingPolicyLabel,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'CoreNetworkId': coreNetworkId,
'VpnConnectionArn': vpnConnectionArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (routingPolicyLabel != null) 'RoutingPolicyLabel': routingPolicyLabel,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/site-to-site-vpn-attachments',
exceptionFnMap: _exceptionFns,
);
return CreateSiteToSiteVpnAttachmentResponse.fromJson(response);
}