updateDomainContactPrivacy method

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

This operation updates the specified domain contact's privacy setting. When privacy protection is enabled, your contact information is replaced with contact information for the registrar or with the phrase "REDACTED FOR PRIVACY", or "On behalf of

May throw DuplicateRequest. May throw InvalidInput. May throw OperationLimitExceeded. May throw TLDRulesViolation. 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 or for our registrar associate, Gandi. If you specify false, WHOIS queries return the information that you entered for the admin contact.

Parameter billingPrivacy : 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 or for our registrar associate, Gandi. If you specify false, WHOIS queries return the information that you entered for the billing 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 or for our registrar associate, Gandi. 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 or for our registrar associate, Gandi. 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? billingPrivacy,
  bool? registrantPrivacy,
  bool? techPrivacy,
}) async {
  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 (billingPrivacy != null) 'BillingPrivacy': billingPrivacy,
      if (registrantPrivacy != null) 'RegistrantPrivacy': registrantPrivacy,
      if (techPrivacy != null) 'TechPrivacy': techPrivacy,
    },
  );

  return UpdateDomainContactPrivacyResponse.fromJson(jsonResponse.body);
}