delete method

Future<GoogleCloudApigeeV1ResourceFile> delete(
  1. String parent,
  2. String type,
  3. String name, {
  4. String? $fields,
})

Deletes a resource file.

For more information about resource files, see Resource files.

Request parameters:

parent - Required. Name of the environment in the following format: organizations/{org}/environments/{env}. Value must have pattern ^organizations/\[^/\]+/environments/\[^/\]+$.

type - Required. Resource file type. {{ resource_file_type }}

name - Required. ID of the resource file to delete. Must match the regular expression: [a-zA-Z0-9:/\!@#$%^&{}[]()+-=,.~'` ]{1,255}

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

Completes with a GoogleCloudApigeeV1ResourceFile.

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

  final url_ = 'v1/' +
      core.Uri.encodeFull('$parent') +
      '/resourcefiles/' +
      commons.escapeVariable('$type') +
      '/' +
      commons.escapeVariable('$name');

  final response_ = await _requester.request(
    url_,
    'DELETE',
    queryParams: queryParams_,
  );
  return GoogleCloudApigeeV1ResourceFile.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}