cancelDomainTransferToAnotherAwsAccount method

Future<CancelDomainTransferToAnotherAwsAccountResponse> cancelDomainTransferToAnotherAwsAccount({
  1. required String domainName,
})

Cancels the transfer of a domain from the current AWS account to another AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount. 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 InvalidInput. May throw OperationLimitExceeded.

Parameter domainName : The name of the domain for which you want to cancel the transfer to another AWS account.

Implementation

Future<CancelDomainTransferToAnotherAwsAccountResponse>
    cancelDomainTransferToAnotherAwsAccount({
  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.CancelDomainTransferToAnotherAwsAccount'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DomainName': domainName,
    },
  );

  return CancelDomainTransferToAnotherAwsAccountResponse.fromJson(
      jsonResponse.body);
}