Skip to content

search_vocabularies async

search_vocabularies(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    max_results: Optional[MaxResult100] = None,
    next_token: Optional[VocabularyNextToken] = None,
    state: Optional[VocabularyState] = None,
    name_starts_with: Optional[VocabularyName] = None,
    language_code: Optional[VocabularyLanguageCode] = None,
) -> SearchVocabulariesResponse

Searches for vocabularies within a specific Connect Customer instance using State, NameStartsWith, and LanguageCode.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

    The maximum number of results to return per page.

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

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • state (Optional[VocabularyState], default: None ) –

    The current state of the custom vocabulary.

  • name_starts_with (Optional[VocabularyName], default: None ) –

    The starting pattern of the name of the vocabulary.

  • language_code (Optional[VocabularyLanguageCode], default: None ) –

    The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see What is Amazon Transcribe?

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def search_vocabularies(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    max_results: Optional["capo_connect.types.max_result100.MaxResult100"] = None,
    next_token: Optional[
        "capo_connect.types.vocabulary_next_token.VocabularyNextToken"
    ] = None,
    state: Optional["capo_connect.types.vocabulary_state.VocabularyState"] = None,
    name_starts_with: Optional[
        "capo_connect.types.vocabulary_name.VocabularyName"
    ] = None,
    language_code: Optional[
        "capo_connect.types.vocabulary_language_code.VocabularyLanguageCode"
    ] = None,
) -> "capo_connect.types.search_vocabularies_response.SearchVocabulariesResponse":
    """<p>Searches for vocabularies within a specific Connect Customer instance using <code>State</code>, <code>NameStartsWith</code>, and <code>LanguageCode</code>.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        max_results: <p>The maximum number of results to return per page.</p>
        next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
        state: <p>The current state of the custom vocabulary.</p>
        name_starts_with: <p>The starting pattern of the name of the vocabulary.</p>
        language_code: <p>The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html">What is Amazon Transcribe?</a> </p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.search_vocabularies_request.SearchVocabulariesRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.search_vocabularies_response.SearchVocabulariesResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.search_vocabularies

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.search_vocabularies.async_search_vocabularies(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SearchVocabularies")
    )
    input_: capo_connect.types.search_vocabularies_request.SearchVocabulariesRequest = {
        "instance_id": instance_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if state is not None:
        input_["state"] = state
    if name_starts_with is not None:
        input_["name_starts_with"] = name_starts_with
    if language_code is not None:
        input_["language_code"] = language_code

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