delete method

Future<Operation> delete(
  1. String name, {
  2. String? requestId,
  3. String? $fields,
})

Deletes a single backup.

Request parameters:

name - Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/services/\[^/\]+/backups/\[^/\]+$.

requestId - Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Operation.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Operation> delete(
  core.String name, {
  core.String? requestId,
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if (requestId != null) 'requestId': [requestId],
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v1beta/' + core.Uri.encodeFull('$name');

  final _response = await _requester.request(
    _url,
    'DELETE',
    queryParams: _queryParams,
  );
  return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
}