Skip to content

search_associated_transcripts async

search_associated_transcripts(
    bot_id: Id,
    bot_version: BotVersion,
    locale_id: LocaleId,
    bot_recommendation_id: Id,
    filters: AssociatedTranscriptFilters,
    *,
    config_overrides: Optional[AsyncLexModelsV2ClientConfig] = None,
    search_order: Optional[SearchOrder] = None,
    max_results: Optional[MaxResults] = None,
    next_index: Optional[NextIndex] = None,
) -> SearchAssociatedTranscriptsResponse

Search for associated transcripts that meet the specified criteria.

Parameters:

  • bot_id (Id) –

    The unique identifier of the bot associated with the transcripts that you are searching.

  • bot_version (BotVersion) –

    The version of the bot containing the transcripts that you are searching.

  • locale_id (LocaleId) –

    The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages

  • bot_recommendation_id (Id) –

    The unique identifier of the bot recommendation associated with the transcripts to search.

  • search_order (Optional[SearchOrder], default: None ) –

    How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending.

  • filters (AssociatedTranscriptFilters) –

    A list of filter objects.

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

    The maximum number of bot recommendations to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • next_index (Optional[NextIndex], default: None ) –

    If the response from the SearchAssociatedTranscriptsRequest operation contains more results than specified in the maxResults parameter, an index is returned in the response. Use that index in the nextIndex parameter to return the next page of results.

Raises:

Source code in docs_src/capo_lex_models_v2/_services/async_lex_models_v2.py
async def search_associated_transcripts(
    self,
    bot_id: "capo_lex_models_v2.types.id.Id",
    bot_version: "capo_lex_models_v2.types.bot_version.BotVersion",
    locale_id: "capo_lex_models_v2.types.locale_id.LocaleId",
    bot_recommendation_id: "capo_lex_models_v2.types.id.Id",
    filters: "capo_lex_models_v2.types.associated_transcript_filters.AssociatedTranscriptFilters",
    *,
    config_overrides: Optional[AsyncLexModelsV2ClientConfig] = None,
    search_order: Optional[
        "capo_lex_models_v2.types.search_order.SearchOrder"
    ] = None,
    max_results: Optional["capo_lex_models_v2.types.max_results.MaxResults"] = None,
    next_index: Optional["capo_lex_models_v2.types.next_index.NextIndex"] = None,
) -> "capo_lex_models_v2.types.search_associated_transcripts_response.SearchAssociatedTranscriptsResponse":
    """<p>Search for associated transcripts that meet the specified criteria.</p>

    Args:
        bot_id: <p>The unique identifier of the bot associated with the transcripts that you are searching.</p>
        bot_version: <p>The version of the bot containing the transcripts that you are searching.</p>
        locale_id: <p>The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a> </p>
        bot_recommendation_id: <p>The unique identifier of the bot recommendation associated with the transcripts to search.</p>
        search_order: <p>How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending.</p>
        filters: <p>A list of filter objects.</p>
        max_results: <p>The maximum number of bot recommendations to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.</p>
        next_index: <p>If the response from the SearchAssociatedTranscriptsRequest operation contains more results than specified in the maxResults parameter, an index is returned in the response. Use that index in the nextIndex parameter to return the next page of results.</p>

    Raises:
        capo_lex_models_v2.errors.internal_server_exception.InternalServerException: <p>The service encountered an unexpected condition. Try your request again.</p>
        capo_lex_models_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again.</p>
        capo_lex_models_v2.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have reached a quota for your bot. </p>
        capo_lex_models_v2.errors.throttling_exception.ThrottlingException: <p>Your request rate is too high. Reduce the frequency of requests.</p>
        capo_lex_models_v2.errors.validation_exception.ValidationException: <p>One of the input parameters in your request isn't valid. Check the parameters and try your request again.</p>
        capo_lex_models_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lex_models_v2.types.search_associated_transcripts_request.SearchAssociatedTranscriptsRequest]",
    ) -> AsyncOperationResponse[
        "capo_lex_models_v2.types.search_associated_transcripts_response.SearchAssociatedTranscriptsResponse"
    ]:
        import capo_lex_models_v2._operations.lex_model_building_service_v2.search_associated_transcripts

        (
            output,
            http_response,
        ) = await capo_lex_models_v2._operations.lex_model_building_service_v2.search_associated_transcripts.async_search_associated_transcripts(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SearchAssociatedTranscripts")
    )
    input_: capo_lex_models_v2.types.search_associated_transcripts_request.SearchAssociatedTranscriptsRequest = {
        "bot_id": bot_id,
        "bot_version": bot_version,
        "locale_id": locale_id,
        "bot_recommendation_id": bot_recommendation_id,
        "filters": filters,
    }
    if search_order is not None:
        input_["search_order"] = search_order
    if max_results is not None:
        input_["max_results"] = max_results
    if next_index is not None:
        input_["next_index"] = next_index

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