createPublicVirtualInterface method

Future<VirtualInterface> createPublicVirtualInterface({
  1. required String connectionId,
  2. required NewPublicVirtualInterface newPublicVirtualInterface,
})

Creates a public virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A public virtual interface supports sending traffic to public services of AWS such as Amazon S3.

When creating an IPv6 public virtual interface (addressFamily is ipv6), leave the customer and amazon address fields blank to use auto-assigned IPv6 space. Custom IPv6 addresses are not supported.

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

Parameter connectionId : The ID of the connection.

Parameter newPublicVirtualInterface : Information about the public virtual interface.

Implementation

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

  return VirtualInterface.fromJson(jsonResponse.body);
}