enableDomainTransferLock method

Future<EnableDomainTransferLockResponse> enableDomainTransferLock({
  1. required String domainName,
})

This operation sets the transfer lock on the domain (specifically the clientTransferProhibited status) to prevent domain transfers. Successful submission returns an operation ID that you can use to track the progress and completion of the action. If the request is not completed successfully, the domain registrant will be notified by email.

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

Parameter domainName : The name of the domain that you want to set the transfer lock for.

Implementation

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

  return EnableDomainTransferLockResponse.fromJson(jsonResponse.body);
}