Skip to content

get_similar_profiles async

get_similar_profiles(
    domain_name: name,
    match_type: MatchType,
    search_key: string1To255,
    search_value: string1To255,
    *,
    config_overrides: Optional[AsyncCustomerProfilesClientConfig] = None,
    next_token: Optional[token] = None,
    max_results: Optional[maxSize100] = None,
) -> GetSimilarProfilesResponse

Returns a set of profiles that belong to the same matching group using the matchId or profileId. You can also specify the type of matching that you want for finding similar profiles using either RULE_BASED_MATCHING or ML_BASED_MATCHING.

Parameters:

  • next_token (Optional[token], default: None ) –

    The pagination token from the previous GetSimilarProfiles API call.

  • max_results (Optional[maxSize100], default: None ) –

    The maximum number of objects returned per page.

  • domain_name (name) –

    The unique name of the domain.

  • match_type (MatchType) –

    Specify the type of matching to get similar profiles for.

  • search_key (string1To255) –

    The string indicating the search key to be used.

  • search_value (string1To255) –

    The string based on SearchKey to be searched for similar profiles.

Raises:

Source code in docs_src/capo_customer_profiles/_services/async_customer_profiles.py
async def get_similar_profiles(
    self,
    domain_name: "capo_customer_profiles.types.name.name",
    match_type: "capo_customer_profiles.types.match_type.MatchType",
    search_key: "capo_customer_profiles.types.string1_to255.string1To255",
    search_value: "capo_customer_profiles.types.string1_to255.string1To255",
    *,
    config_overrides: Optional[AsyncCustomerProfilesClientConfig] = None,
    next_token: Optional["capo_customer_profiles.types.token.token"] = None,
    max_results: Optional[
        "capo_customer_profiles.types.max_size100.maxSize100"
    ] = None,
) -> "capo_customer_profiles.types.get_similar_profiles_response.GetSimilarProfilesResponse":
    """<p>Returns a set of profiles that belong to the same matching group using the <code>matchId</code> or <code>profileId</code>. You can also specify the type of matching that you want for finding similar profiles using either <code>RULE_BASED_MATCHING</code> or <code>ML_BASED_MATCHING</code>.</p>

    Args:
        next_token: <p>The pagination token from the previous <code>GetSimilarProfiles</code> API call.</p>
        max_results: <p>The maximum number of objects returned per page.</p>
        domain_name: <p>The unique name of the domain.</p>
        match_type: <p>Specify the type of matching to get similar profiles for.</p>
        search_key: <p>The string indicating the search key to be used.</p>
        search_value: <p>The string based on <code>SearchKey</code> to be searched for similar profiles.</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.get_similar_profiles_request.GetSimilarProfilesRequest]",
    ) -> AsyncOperationResponse[
        "capo_customer_profiles.types.get_similar_profiles_response.GetSimilarProfilesResponse"
    ]:
        import capo_customer_profiles._operations.customer_profiles_20200815.get_similar_profiles

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSimilarProfiles")
    )
    input_: capo_customer_profiles.types.get_similar_profiles_request.GetSimilarProfilesRequest = {
        "domain_name": domain_name,
        "match_type": match_type,
        "search_key": search_key,
        "search_value": search_value,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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