Skip to content

update_domain_contact_privacy async

update_domain_contact_privacy(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
    admin_privacy: Optional[Boolean] = None,
    registrant_privacy: Optional[Boolean] = None,
    tech_privacy: Optional[Boolean] = None,
    billing_privacy: Optional[Boolean] = None,
) -> UpdateDomainContactPrivacyResponse

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 owner."

While some domains may allow different privacy settings per contact, we recommend specifying the same privacy setting for all contacts.

This operation affects only the contact information for the specified contact type (administrative, registrant, or technical). 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.

By disabling the privacy service via API, you consent to the publication of the contact information provided for this domain via the public WHOIS database. You certify that you are the registrant of this domain name and have the authority to make this decision. You may withdraw your consent at any time by enabling privacy protection using either UpdateDomainContactPrivacy or the Route 53 console. Enabling privacy protection removes the contact information provided for this domain from the WHOIS database. For more information on our privacy practices, see https://aws.amazon.com/privacy/.

Parameters:

  • domain_name (DomainName) –

    The name of the domain that you want to update the privacy setting for.

  • admin_privacy (Optional[Boolean], default: None ) –

    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.

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

  • registrant_privacy (Optional[Boolean], default: None ) –

    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).

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

  • tech_privacy (Optional[Boolean], default: None ) –

    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.

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

  • billing_privacy (Optional[Boolean], default: None ) –

    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.

    You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.

Raises:

  • DuplicateRequest –

    The request is already in progress for the domain.

  • InvalidInput –

    The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, the password might be invalid.

  • OperationLimitExceeded –

    The number of operations or jobs running exceeded the allowed threshold for the account.

  • TLDRulesViolation –

    The top-level domain does not support this operation.

  • UnsupportedTLD –

    Amazon Route 53 does not support this top-level domain (TLD).

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route_53_domains/_services/async_route53_domains.py
async def update_domain_contact_privacy(
    self,
    domain_name: "capo_route_53_domains.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
    admin_privacy: Optional["capo_route_53_domains.types.boolean.Boolean"] = None,
    registrant_privacy: Optional[
        "capo_route_53_domains.types.boolean.Boolean"
    ] = None,
    tech_privacy: Optional["capo_route_53_domains.types.boolean.Boolean"] = None,
    billing_privacy: Optional["capo_route_53_domains.types.boolean.Boolean"] = None,
) -> "capo_route_53_domains.types.update_domain_contact_privacy_response.UpdateDomainContactPrivacyResponse":
    """<p>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 <domain name> owner."</p> <note> <p>While some domains may allow different privacy settings per contact, we recommend specifying the same privacy setting for all contacts.</p> </note> <p>This operation affects only the contact information for the specified contact type (administrative, registrant, or technical). If the request succeeds, Amazon Route 53 returns an operation ID that you can use with <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html">GetOperationDetail</a> to track the progress and completion of the action. If the request doesn't complete successfully, the domain registrant will be notified by email.</p> <important> <p>By disabling the privacy service via API, you consent to the publication of the contact information provided for this domain via the public WHOIS database. You certify that you are the registrant of this domain name and have the authority to make this decision. You may withdraw your consent at any time by enabling privacy protection using either <code>UpdateDomainContactPrivacy</code> or the Route 53 console. Enabling privacy protection removes the contact information provided for this domain from the WHOIS database. For more information on our privacy practices, see <a href="https://aws.amazon.com/privacy/">https://aws.amazon.com/privacy/</a>.</p> </important>

    Args:
        domain_name: <p>The name of the domain that you want to update the privacy setting for.</p>
        admin_privacy: <p>Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the admin contact.</p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note>
        registrant_privacy: <p>Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the registrant contact (domain owner).</p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note>
        tech_privacy: <p>Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the technical contact.</p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note>
        billing_privacy: <p> Whether you want to conceal contact information from WHOIS queries. If you specify <code>true</code>, WHOIS ("who is") queries return contact information either for Amazon Registrar or for our registrar associate, Gandi. If you specify <code>false</code>, WHOIS queries return the information that you entered for the billing contact. </p> <note> <p>You must specify the same privacy setting for the administrative, billing, registrant, and technical contacts.</p> </note>

    Raises:
        capo_route_53_domains.errors.duplicate_request.DuplicateRequest: <p>The request is already in progress for the domain.</p>
        capo_route_53_domains.errors.invalid_input.InvalidInput: <p>The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For <code>AcceptDomainTransferFromAnotherAwsAccount</code>, the password might be invalid.</p>
        capo_route_53_domains.errors.operation_limit_exceeded.OperationLimitExceeded: <p>The number of operations or jobs running exceeded the allowed threshold for the account.</p>
        capo_route_53_domains.errors.tld_rules_violation.TLDRulesViolation: <p>The top-level domain does not support this operation.</p>
        capo_route_53_domains.errors.unsupported_tld.UnsupportedTLD: <p>Amazon Route 53 does not support this top-level domain (TLD).</p>
        capo_route_53_domains.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53_domains.types.update_domain_contact_privacy_request.UpdateDomainContactPrivacyRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53_domains.types.update_domain_contact_privacy_response.UpdateDomainContactPrivacyResponse"
    ]:
        import capo_route_53_domains._operations.route53_domains_v20140515.update_domain_contact_privacy

        (
            output,
            http_response,
        ) = await capo_route_53_domains._operations.route53_domains_v20140515.update_domain_contact_privacy.async_update_domain_contact_privacy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDomainContactPrivacy")
    )
    input_: capo_route_53_domains.types.update_domain_contact_privacy_request.UpdateDomainContactPrivacyRequest = {
        "domain_name": domain_name
    }
    if admin_privacy is not None:
        input_["admin_privacy"] = admin_privacy
    if registrant_privacy is not None:
        input_["registrant_privacy"] = registrant_privacy
    if tech_privacy is not None:
        input_["tech_privacy"] = tech_privacy
    if billing_privacy is not None:
        input_["billing_privacy"] = billing_privacy

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output