transferDomain method
- required ContactDetail adminContact,
- required String domainName,
- required int durationInYears,
- required ContactDetail registrantContact,
- required ContactDetail techContact,
- String? authCode,
- bool? autoRenew,
- String? idnLangCode,
- List<
Nameserver> ? nameservers, - bool? privacyProtectAdminContact,
- bool? privacyProtectRegistrantContact,
- bool? privacyProtectTechContact,
Transfers a domain from another registrar to Amazon Route 53. When the transfer is complete, the domain is registered either with Amazon Registrar (for .com, .net, and .org domains) or with our registrar associate, Gandi (for all other TLDs).
For more information about transferring domains, see the following topics:
- For transfer requirements, a detailed procedure, and information about viewing the status of a domain that you're transferring to Route 53, see Transferring Registration for a Domain to Amazon Route 53 in the Amazon Route 53 Developer Guide.
- For information about how to transfer a domain from one AWS account to another, see TransferDomainToAnotherAwsAccount.
- For information about how to transfer a domain to another domain registrar, see Transferring a Domain from Amazon Route 53 to Another Registrar in the Amazon Route 53 Developer Guide.
May throw InvalidInput. May throw UnsupportedTLD. May throw DuplicateRequest. May throw TLDRulesViolation. May throw DomainLimitExceeded. May throw OperationLimitExceeded.
Parameter adminContact
:
Provides detailed contact information.
Parameter domainName
:
The name of the domain that you want to transfer to Route 53. The
top-level domain (TLD), such as .com, must be a TLD that Route 53
supports. For a list of supported TLDs, see Domains
that You Can Register with Amazon Route 53 in the Amazon Route 53
Developer Guide.
The domain name can contain only the following characters:
- Letters a through z. Domain names are not case sensitive.
- Numbers 0 through 9.
- Hyphen (-). You can't specify a hyphen at the beginning or end of a label.
-
Period (.) to separate the labels in the name, such as the
.
inexample.com
.
Parameter durationInYears
:
The number of years that you want to register the domain for. Domains are
registered for a minimum of one year. The maximum period depends on the
top-level domain.
Default: 1
Parameter registrantContact
:
Provides detailed contact information.
Parameter techContact
:
Provides detailed contact information.
Parameter authCode
:
The authorization code for the domain. You get this value from the current
registrar.
Parameter autoRenew
:
Indicates whether the domain will be automatically renewed (true) or not
(false). Autorenewal only takes effect after the account is charged.
Default: true
Parameter idnLangCode
:
Reserved for future use.
Parameter nameservers
:
Contains details for the host and glue IP addresses.
Parameter privacyProtectAdminContact
:
Whether you want to conceal contact information from WHOIS queries. If you
specify true
, WHOIS ("who is") queries return contact
information either for Amazon Registrar (for .com, .net, and .org domains)
or for our registrar associate, Gandi (for all other TLDs). If you specify
false
, WHOIS queries return the information that you entered
for the admin contact.
Default: true
Parameter privacyProtectRegistrantContact
:
Whether you want to conceal contact information from WHOIS queries. If you
specify true
, WHOIS ("who is") queries return contact
information either for Amazon Registrar (for .com, .net, and .org domains)
or for our registrar associate, Gandi (for all other TLDs). If you specify
false
, WHOIS queries return the information that you entered
for the registrant contact (domain owner).
Default: true
Parameter privacyProtectTechContact
:
Whether you want to conceal contact information from WHOIS queries. If you
specify true
, WHOIS ("who is") queries return contact
information either for Amazon Registrar (for .com, .net, and .org domains)
or for our registrar associate, Gandi (for all other TLDs). If you specify
false
, WHOIS queries return the information that you entered
for the technical contact.
Default: true
Implementation
Future<TransferDomainResponse> transferDomain({
required ContactDetail adminContact,
required String domainName,
required int durationInYears,
required ContactDetail registrantContact,
required ContactDetail techContact,
String? authCode,
bool? autoRenew,
String? idnLangCode,
List<Nameserver>? nameservers,
bool? privacyProtectAdminContact,
bool? privacyProtectRegistrantContact,
bool? privacyProtectTechContact,
}) async {
ArgumentError.checkNotNull(adminContact, 'adminContact');
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
0,
255,
isRequired: true,
);
ArgumentError.checkNotNull(durationInYears, 'durationInYears');
_s.validateNumRange(
'durationInYears',
durationInYears,
1,
10,
isRequired: true,
);
ArgumentError.checkNotNull(registrantContact, 'registrantContact');
ArgumentError.checkNotNull(techContact, 'techContact');
_s.validateStringLength(
'authCode',
authCode,
0,
1024,
);
_s.validateStringLength(
'idnLangCode',
idnLangCode,
0,
3,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Domains_v20140515.TransferDomain'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AdminContact': adminContact,
'DomainName': domainName,
'DurationInYears': durationInYears,
'RegistrantContact': registrantContact,
'TechContact': techContact,
if (authCode != null) 'AuthCode': authCode,
if (autoRenew != null) 'AutoRenew': autoRenew,
if (idnLangCode != null) 'IdnLangCode': idnLangCode,
if (nameservers != null) 'Nameservers': nameservers,
if (privacyProtectAdminContact != null)
'PrivacyProtectAdminContact': privacyProtectAdminContact,
if (privacyProtectRegistrantContact != null)
'PrivacyProtectRegistrantContact': privacyProtectRegistrantContact,
if (privacyProtectTechContact != null)
'PrivacyProtectTechContact': privacyProtectTechContact,
},
);
return TransferDomainResponse.fromJson(jsonResponse.body);
}