updateVirtualInterfaceAttributes method

Future<VirtualInterface> updateVirtualInterfaceAttributes({
  1. required String virtualInterfaceId,
  2. bool? enableSiteLink,
  3. int? mtu,
  4. String? virtualInterfaceName,
})

Updates the specified attributes of the specified virtual private interface.

Setting the MTU of a virtual interface to 8500 (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 DirectConnectClientException. May throw DirectConnectServerException.

Parameter virtualInterfaceId : The ID of the virtual private interface.

Parameter enableSiteLink : Indicates whether to enable or disable SiteLink.

Parameter mtu : The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.

Parameter virtualInterfaceName : The name of the virtual private interface.

Implementation

Future<VirtualInterface> updateVirtualInterfaceAttributes({
  required String virtualInterfaceId,
  bool? enableSiteLink,
  int? mtu,
  String? virtualInterfaceName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OvertureService.UpdateVirtualInterfaceAttributes'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'virtualInterfaceId': virtualInterfaceId,
      if (enableSiteLink != null) 'enableSiteLink': enableSiteLink,
      if (mtu != null) 'mtu': mtu,
      if (virtualInterfaceName != null)
        'virtualInterfaceName': virtualInterfaceName,
    },
  );

  return VirtualInterface.fromJson(jsonResponse.body);
}