Skip to content

update_domain async

update_domain(
    domain_name: name,
    *,
    config_overrides: Optional[AsyncCustomerProfilesClientConfig] = None,
    default_expiration_days: Optional[expirationDaysInteger] = None,
    default_encryption_key: Optional[encryptionKey] = None,
    dead_letter_queue_url: Optional[sqsQueueUrl] = None,
    matching: Optional[MatchingRequest] = None,
    rule_based_matching: Optional[RuleBasedMatchingRequest] = None,
    data_store: Optional[DataStoreRequest] = None,
    tags: Optional[TagMap] = None,
) -> UpdateDomainResponse

Updates the properties of a domain, including creating or selecting a dead letter queue or an encryption key.

After a domain is created, the name can’t be changed.

Use this API or CreateDomain to enable identity resolution: set Matching to true.

To prevent cross-service impersonation when you call this API, see Cross-service confused deputy prevention for sample policies that you should apply.

To add or remove tags on an existing Domain, see TagResource/UntagResource.

Parameters:

  • domain_name (name) –

    The unique name of the domain.

  • default_expiration_days (Optional[expirationDaysInteger], default: None ) –

    The default number of days until the data within the domain expires.

  • default_encryption_key (Optional[encryptionKey], default: None ) –

    The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.

  • dead_letter_queue_url (Optional[sqsQueueUrl], default: None ) –

    The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.

  • matching (Optional[MatchingRequest], default: None ) –

    The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to detect duplicate profiles in your domains.

    After the Identity Resolution Job completes, use the GetMatches API to return and review the results. Or, if you have configured ExportingConfig in the MatchingRequest, you can download the results from S3.

  • rule_based_matching (Optional[RuleBasedMatchingRequest], default: None ) –

    The process of matching duplicate profiles using the rule-Based matching. If RuleBasedMatching = true, Connect Customer Customer Profiles will start to match and merge your profiles according to your configuration in the RuleBasedMatchingRequest. You can use the ListRuleBasedMatches and GetSimilarProfiles API to return and review the results. Also, if you have configured ExportingConfig in the RuleBasedMatchingRequest, you can download the results from S3.

  • data_store (Optional[DataStoreRequest], default: None ) –

    Set to true to enabled data store for this domain.

  • tags (Optional[TagMap], default: None ) –

    The tags used to organize, track, or control access for this resource.

Raises:

Source code in docs_src/capo_customer_profiles/_services/async_customer_profiles.py
async def update_domain(
    self,
    domain_name: "capo_customer_profiles.types.name.name",
    *,
    config_overrides: Optional[AsyncCustomerProfilesClientConfig] = None,
    default_expiration_days: Optional[
        "capo_customer_profiles.types.expiration_days_integer.expirationDaysInteger"
    ] = None,
    default_encryption_key: Optional[
        "capo_customer_profiles.types.encryption_key.encryptionKey"
    ] = None,
    dead_letter_queue_url: Optional[
        "capo_customer_profiles.types.sqs_queue_url.sqsQueueUrl"
    ] = None,
    matching: Optional[
        "capo_customer_profiles.types.matching_request.MatchingRequest"
    ] = None,
    rule_based_matching: Optional[
        "capo_customer_profiles.types.rule_based_matching_request.RuleBasedMatchingRequest"
    ] = None,
    data_store: Optional[
        "capo_customer_profiles.types.data_store_request.DataStoreRequest"
    ] = None,
    tags: Optional["capo_customer_profiles.types.tag_map.TagMap"] = None,
) -> "capo_customer_profiles.types.update_domain_response.UpdateDomainResponse":
    """<p>Updates the properties of a domain, including creating or selecting a dead letter queue or an encryption key.</p> <p>After a domain is created, the name can’t be changed.</p> <p>Use this API or <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateDomain.html">CreateDomain</a> to enable <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">identity resolution</a>: set <code>Matching</code> to true.</p> <p>To prevent cross-service impersonation when you call this API, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html">Cross-service confused deputy prevention</a> for sample policies that you should apply. </p> <p>To add or remove tags on an existing Domain, see <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_TagResource.html">TagResource</a>/<a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UntagResource.html">UntagResource</a>.</p>

    Args:
        domain_name: <p>The unique name of the domain.</p>
        default_expiration_days: <p>The default number of days until the data within the domain expires.</p>
        default_encryption_key: <p>The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.</p>
        dead_letter_queue_url: <p>The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.</p>
        matching: <p>The process of matching duplicate profiles. If <code>Matching</code> = <code>true</code>, Amazon Connect Customer Profiles starts a weekly batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to detect duplicate profiles in your domains. </p> <p>After the Identity Resolution Job completes, use the <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">GetMatches</a> API to return and review the results. Or, if you have configured <code>ExportingConfig</code> in the <code>MatchingRequest</code>, you can download the results from S3.</p>
        rule_based_matching: <p>The process of matching duplicate profiles using the rule-Based matching. If <code>RuleBasedMatching</code> = true, Connect Customer Customer Profiles will start to match and merge your profiles according to your configuration in the <code>RuleBasedMatchingRequest</code>. You can use the <code>ListRuleBasedMatches</code> and <code>GetSimilarProfiles</code> API to return and review the results. Also, if you have configured <code>ExportingConfig</code> in the <code>RuleBasedMatchingRequest</code>, you can download the results from S3.</p>
        data_store: <p>Set to true to enabled data store for this domain.</p>
        tags: <p>The tags used to organize, track, or control access for this resource.</p>

    Raises:
        capo_customer_profiles.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_customer_profiles.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_customer_profiles.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred.</p>
        capo_customer_profiles.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource does not exist, or access was denied.</p>
        capo_customer_profiles.errors.throttling_exception.ThrottlingException: <p>You exceeded the maximum number of requests.</p>
        capo_customer_profiles.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_customer_profiles.types.update_domain_request.UpdateDomainRequest]",
    ) -> AsyncOperationResponse[
        "capo_customer_profiles.types.update_domain_response.UpdateDomainResponse"
    ]:
        import capo_customer_profiles._operations.customer_profiles_20200815.update_domain

        (
            output,
            http_response,
        ) = await capo_customer_profiles._operations.customer_profiles_20200815.update_domain.async_update_domain(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDomain")
    )
    input_: capo_customer_profiles.types.update_domain_request.UpdateDomainRequest = {
        "domain_name": domain_name
    }
    if default_expiration_days is not None:
        input_["default_expiration_days"] = default_expiration_days
    if default_encryption_key is not None:
        input_["default_encryption_key"] = default_encryption_key
    if dead_letter_queue_url is not None:
        input_["dead_letter_queue_url"] = dead_letter_queue_url
    if matching is not None:
        input_["matching"] = matching
    if rule_based_matching is not None:
        input_["rule_based_matching"] = rule_based_matching
    if data_store is not None:
        input_["data_store"] = data_store
    if tags is not None:
        input_["tags"] = tags

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