transferDomainToAnotherAwsAccount method

Future<TransferDomainToAnotherAwsAccountResponse> transferDomainToAnotherAwsAccount({
  1. required String accountId,
  2. required String domainName,
})

Transfers a domain from the current Amazon Web Services account to another Amazon Web Services account. Note the following:

Use either ListOperations or GetOperationDetail to determine whether the operation succeeded. GetOperationDetail provides additional information, for example, Domain Transfer from Aws Account 111122223333 has been cancelled.

May throw DuplicateRequest. May throw InvalidInput. May throw OperationLimitExceeded. May throw UnsupportedTLD.

Parameter accountId : The account ID of the Amazon Web Services 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 Amazon Web Services account to another account.

Implementation

Future<TransferDomainToAnotherAwsAccountResponse>
    transferDomainToAnotherAwsAccount({
  required String accountId,
  required String domainName,
}) async {
  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);
}