detachDisk method

  1. @override
Future<Operation> detachDisk(
  1. DetachDiskInstanceRequest request
)
override

Detaches a disk from an instance.

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> detachDisk(DetachDiskInstanceRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_detachDisk case final detachDisk?) {
    return detachDisk(request);
  }
  throw UnsupportedError('detachDisk');
}