updateDomainContactPrivacy method

Future<UpdateDomainContactPrivacyResponse> updateDomainContactPrivacy({
  1. required String domainName,
  2. bool? adminPrivacy,
  3. bool? registrantPrivacy,
  4. bool? techPrivacy,
})

This operation updates the specified domain contact's privacy setting. When privacy protection is enabled, contact information such as email address is replaced either with contact information for Amazon Registrar (for .com, .net, and .org domains) or with contact information for our registrar associate, Gandi.

This operation affects only the contact information for the specified contact type (registrant, administrator, or tech). If the request succeeds, Amazon Route 53 returns an operation ID that you can use with GetOperationDetail to track the progress and completion of the action. If the request doesn't complete 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 update the privacy setting for.

Parameter adminPrivacy : 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.

Parameter registrantPrivacy : 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).

Parameter techPrivacy : 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.

Implementation

Future<UpdateDomainContactPrivacyResponse> updateDomainContactPrivacy({
  required String domainName,
  bool? adminPrivacy,
  bool? registrantPrivacy,
  bool? techPrivacy,
}) 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.UpdateDomainContactPrivacy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DomainName': domainName,
      if (adminPrivacy != null) 'AdminPrivacy': adminPrivacy,
      if (registrantPrivacy != null) 'RegistrantPrivacy': registrantPrivacy,
      if (techPrivacy != null) 'TechPrivacy': techPrivacy,
    },
  );

  return UpdateDomainContactPrivacyResponse.fromJson(jsonResponse.body);
}