retrieveDomainAuthCode method
This operation returns the AuthCode for the domain. To transfer a domain to another registrar, you provide this value to the new registrar.
May throw InvalidInput. May throw UnsupportedTLD.
Parameter domainName
:
The name of the domain that you want to get an authorization code for.
Implementation
Future<RetrieveDomainAuthCodeResponse> retrieveDomainAuthCode({
required String domainName,
}) async {
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
0,
255,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Domains_v20140515.RetrieveDomainAuthCode'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DomainName': domainName,
},
);
return RetrieveDomainAuthCodeResponse.fromJson(jsonResponse.body);
}