createPrivateVirtualInterface method

Future<VirtualInterface> createPrivateVirtualInterface({
  1. required String connectionId,
  2. required NewPrivateVirtualInterface newPrivateVirtualInterface,
})

Creates a private virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A private virtual interface can be connected to either a Direct Connect gateway or a Virtual Private Gateway (VGW). Connecting the private virtual interface to a Direct Connect gateway enables the possibility for connecting to multiple VPCs, including VPCs in different AWS Regions. Connecting the private virtual interface to a VGW only provides access to a single VPC within the same Region.

Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call DescribeConnections. To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces.

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

Parameter connectionId : The ID of the connection.

Parameter newPrivateVirtualInterface : Information about the private virtual interface.

Implementation

Future<VirtualInterface> createPrivateVirtualInterface({
  required String connectionId,
  required NewPrivateVirtualInterface newPrivateVirtualInterface,
}) async {
  ArgumentError.checkNotNull(connectionId, 'connectionId');
  ArgumentError.checkNotNull(
      newPrivateVirtualInterface, 'newPrivateVirtualInterface');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.CreatePrivateVirtualInterface'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'connectionId': connectionId,
      'newPrivateVirtualInterface': newPrivateVirtualInterface,
    },
  );

  return VirtualInterface.fromJson(jsonResponse.body);
}