createTransitGatewayPeering method
Creates a transit gateway peering connection.
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.
Parameter transitGatewayArn :
The ARN of the transit gateway for the peering request.
Parameter clientToken :
The client token associated with the request.
Parameter tags :
The list of key-value tags associated with the request.
Implementation
Future<CreateTransitGatewayPeeringResponse> createTransitGatewayPeering({
required String coreNetworkId,
required String transitGatewayArn,
String? clientToken,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'CoreNetworkId': coreNetworkId,
'TransitGatewayArn': transitGatewayArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/transit-gateway-peerings',
exceptionFnMap: _exceptionFns,
);
return CreateTransitGatewayPeeringResponse.fromJson(response);
}