deleteDomain method
This operation deletes the specified domain. This action is permanent. For more information, see Deleting a domain name registration.
To transfer the domain registration to another registrar, use the transfer process that’s provided by the registrar to which you want to transfer the registration. Otherwise, the following apply:
- You can’t get a refund for the cost of a deleted domain registration.
- The registry for the top-level domain might hold the domain name for a brief time before releasing it for other users to register (varies by registry).
-
When the registration has been deleted, we'll send you a confirmation to
the registrant contact. The email will come from
noreply@domainnameverification.netornoreply@emailverification.infoornoreply@registrar.amazon.
May throw DuplicateRequest.
May throw InvalidInput.
May throw TLDRulesViolation.
May throw UnsupportedTLD.
Parameter domainName :
Name of the domain to be deleted.
Implementation
Future<DeleteDomainResponse> deleteDomain({
required String domainName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Domains_v20140515.DeleteDomain'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DomainName': domainName,
},
);
return DeleteDomainResponse.fromJson(jsonResponse.body);
}