delete method

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

Deletes a Registration resource.

This method works on any Registration resource using [Subscription or Commitment billing](/domains/pricing#billing-models), provided that the resource was created at least 1 day in the past. For Registration resources using [Monthly billing](/domains/pricing#billing-models), this method works if: * state is EXPORTED with expire_time in the past * state is REGISTRATION_FAILED * state is TRANSFER_FAILED When an active registration is successfully deleted, you can continue to use the domain in Google Domains until it expires. The calling user becomes the domain's sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.

Request parameters:

name - Required. The name of the Registration to delete, in the format projects / * /locations / * /registrations / * . Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/registrations/\[^/\]+$.

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

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

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