createInterconnect method

Future<Interconnect> createInterconnect({
  1. required String bandwidth,
  2. required String interconnectName,
  3. required String location,
  4. String? lagId,
  5. String? providerName,
  6. List<Tag>? tags,
})

Creates an interconnect between an AWS Direct Connect Partner's network and a specific AWS Direct Connect location.

An interconnect is a connection that is capable of hosting other connections. The AWS Direct Connect partner can use an interconnect to provide AWS Direct Connect hosted connections to customers through their own network services. Like a standard connection, an interconnect links the partner's network to an AWS Direct Connect location over a standard Ethernet fiber-optic cable. One end is connected to the partner's router, the other to an AWS Direct Connect router.

You can automatically add the new interconnect to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect is allocated on the same AWS Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no interconnect is created.

For each end customer, the AWS Direct Connect Partner provisions a connection on their interconnect by calling AllocateHostedConnection. The end customer can then connect to AWS resources by creating a virtual interface on their connection, using the VLAN assigned to them by the AWS Direct Connect Partner.

May throw DuplicateTagKeysException. May throw TooManyTagsException. May throw DirectConnectServerException. May throw DirectConnectClientException.

Parameter bandwidth : The port bandwidth, in Gbps. The possible values are 1 and 10.

Parameter interconnectName : The name of the interconnect.

Parameter location : The location of the interconnect.

Parameter lagId : The ID of the LAG.

Parameter providerName : The name of the service provider associated with the interconnect.

Parameter tags : The tags to associate with the interconnect.

Implementation

Future<Interconnect> createInterconnect({
  required String bandwidth,
  required String interconnectName,
  required String location,
  String? lagId,
  String? providerName,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(bandwidth, 'bandwidth');
  ArgumentError.checkNotNull(interconnectName, 'interconnectName');
  ArgumentError.checkNotNull(location, 'location');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.CreateInterconnect'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'bandwidth': bandwidth,
      'interconnectName': interconnectName,
      'location': location,
      if (lagId != null) 'lagId': lagId,
      if (providerName != null) 'providerName': providerName,
      if (tags != null) 'tags': tags,
    },
  );

  return Interconnect.fromJson(jsonResponse.body);
}