updateNetworkInterface method

  1. @override
Future<Operation> updateNetworkInterface(
  1. UpdateNetworkInterfaceInstanceRequest request
)
override

Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Operation> updateNetworkInterface(
  UpdateNetworkInterfaceInstanceRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_updateNetworkInterface case final updateNetworkInterface?) {
    return updateNetworkInterface(request);
  }
  throw UnsupportedError('updateNetworkInterface');
}