transferDomainToAnotherAwsAccount method
Transfers a domain from the current AWS account to another AWS account. Note the following:
- The AWS account that you're transferring the domain to must accept the transfer. If the other account doesn't accept the transfer within 3 days, we cancel the transfer. See AcceptDomainTransferFromAnotherAwsAccount.
- You can cancel the transfer before the other account accepts it. See CancelDomainTransferToAnotherAwsAccount.
- The other account can reject the transfer. See RejectDomainTransferFromAnotherAwsAccount.
Domain Transfer from
Aws Account 111122223333 has been cancelled
.
May throw InvalidInput. May throw OperationLimitExceeded. May throw DuplicateRequest.
Parameter accountId
:
The account ID of the AWS account that you want to transfer the domain to,
for example, 111122223333
.
Parameter domainName
:
The name of the domain that you want to transfer from the current AWS
account to another account.
Implementation
Future<TransferDomainToAnotherAwsAccountResponse>
transferDomainToAnotherAwsAccount({
required String accountId,
required String domainName,
}) async {
ArgumentError.checkNotNull(accountId, 'accountId');
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.TransferDomainToAnotherAwsAccount'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
'DomainName': domainName,
},
);
return TransferDomainToAnotherAwsAccountResponse.fromJson(
jsonResponse.body);
}