delete method

Future<void> delete(
  1. String projectId,
  2. String jobId, {
  3. String? location,
  4. String? $fields,
})

Requests the deletion of the metadata of a job.

This call returns when the job's metadata is deleted.

Request parameters:

projectId - Required. Project ID of the job for which metadata is to be deleted. Value must have pattern ^\[^/\]+$.

jobId - Required. Job ID of the job for which metadata is to be deleted. If this is a parent job which has child jobs, the metadata from all child jobs will be deleted as well. Direct deletion of the metadata of child jobs is not allowed. Value must have pattern ^\[^/\]+$.

location - The geographic location of the job. Required. See details at: https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

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

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<void> delete(
  core.String projectId,
  core.String jobId, {
  core.String? location,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (location != null) 'location': [location],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'projects/' +
      core.Uri.encodeFull('$projectId') +
      '/jobs/' +
      core.Uri.encodeFull('$jobId') +
      '/delete';

  await _requester.request(
    url_,
    'DELETE',
    queryParams: queryParams_,
    downloadOptions: null,
  );
}