delete method
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. 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.
After January 2024 you will only be able to delete Registration
resources when state
is one of: EXPORTED
,
EXPIRED
,REGISTRATION_FAILED
or TRANSFER_FAILED
. See
Cloud Domains feature deprecation
for more details.
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_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}