delete method

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.

For more information, seeDeleting snapshots.

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

Future<Operation> delete(DeleteSnapshotRequest request) async {
  final url = _endPoint.replace(
    path:
        '/compute/v1/projects/${request.project}/global/snapshots/${request.snapshot}',
    queryParameters: {'requestId': ?request.requestId},
  );
  final response = await _client.delete(url);
  return Operation.fromJson(response);
}