attachDisk method

  1. @override
Future<Operation> attachDisk(
  1. AttachDiskInstanceRequest request
)
override

Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, readAdding a persistent disk to your 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> attachDisk(AttachDiskInstanceRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_attachDisk case final attachDisk?) {
    return attachDisk(request);
  }
  throw UnsupportedError('attachDisk');
}