Skip to content

list_default_vocabularies async

list_default_vocabularies(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    language_code: Optional[VocabularyLanguageCode] = None,
    max_results: Optional[MaxResult100] = None,
    next_token: Optional[VocabularyNextToken] = None,
) -> ListDefaultVocabulariesResponse

Lists the default vocabularies for the specified Connect Customer instance.

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.

  • 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?

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

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def list_default_vocabularies(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    language_code: Optional[
        "capo_connect.types.vocabulary_language_code.VocabularyLanguageCode"
    ] = None,
    max_results: Optional["capo_connect.types.max_result100.MaxResult100"] = None,
    next_token: Optional[
        "capo_connect.types.vocabulary_next_token.VocabularyNextToken"
    ] = None,
) -> "capo_connect.types.list_default_vocabularies_response.ListDefaultVocabulariesResponse":
    """<p>Lists the default vocabularies for the specified Connect Customer instance.</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>
        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>
        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>

    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.list_default_vocabularies_request.ListDefaultVocabulariesRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.list_default_vocabularies_response.ListDefaultVocabulariesResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.list_default_vocabularies

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDefaultVocabularies")
    )
    input_: capo_connect.types.list_default_vocabularies_request.ListDefaultVocabulariesRequest = {
        "instance_id": instance_id
    }
    if language_code is not None:
        input_["language_code"] = language_code
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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