createDirectConnectGatewayAttachment method

Future<CreateDirectConnectGatewayAttachmentResponse> createDirectConnectGatewayAttachment({
  1. required String coreNetworkId,
  2. required String directConnectGatewayArn,
  3. required List<String> edgeLocations,
  4. String? clientToken,
  5. String? routingPolicyLabel,
  6. List<Tag>? tags,
})

Creates an Amazon Web Services Direct Connect gateway attachment

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter coreNetworkId : The ID of the Cloud WAN core network that the Direct Connect gateway attachment should be attached to.

Parameter directConnectGatewayArn : The ARN of the Direct Connect gateway attachment.

Parameter edgeLocations : One or more core network edge locations that the Direct Connect gateway attachment is associated with.

Parameter clientToken : client token

Parameter routingPolicyLabel : The routing policy label to apply to the Direct Connect Gateway attachment for traffic routing decisions.

Parameter tags : The key value tags to apply to the Direct Connect gateway attachment during creation.

Implementation

Future<CreateDirectConnectGatewayAttachmentResponse>
    createDirectConnectGatewayAttachment({
  required String coreNetworkId,
  required String directConnectGatewayArn,
  required List<String> edgeLocations,
  String? clientToken,
  String? routingPolicyLabel,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'CoreNetworkId': coreNetworkId,
    'DirectConnectGatewayArn': directConnectGatewayArn,
    'EdgeLocations': edgeLocations,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (routingPolicyLabel != null) 'RoutingPolicyLabel': routingPolicyLabel,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/direct-connect-gateway-attachments',
    exceptionFnMap: _exceptionFns,
  );
  return CreateDirectConnectGatewayAttachmentResponse.fromJson(response);
}