remove method

Future<Operation> remove(
  1. RemoveDnsRecordSetRequest request,
  2. String parent, {
  3. String? $fields,
})

Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.

request - The metadata request object.

Request parameters:

parent - Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is services/servicenetworking.googleapis.com. Value must have pattern ^services/\[^/\]+$.

$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> remove(
  RemoveDnsRecordSetRequest request,
  core.String parent, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'v1/' + core.Uri.encodeFull('$parent') + '/dnsRecordSets:remove';

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