Skip to content

get_builtin_slot_types async

get_builtin_slot_types(
    *,
    config_overrides: Optional[AsyncLexModelBuildingServiceClientConfig] = None,
    locale: Optional[Locale] = None,
    signature_contains: Optional[String] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> GetBuiltinSlotTypesResponse

Gets a list of built-in slot types that meet the specified criteria.

For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit.

This operation requires permission for the lex:GetBuiltInSlotTypes action.

Parameters:

  • locale (Optional[Locale], default: None ) –

    A list of locales that the slot type supports.

  • signature_contains (Optional[String], default: None ) –

    Substring to match in built-in slot type signatures. A slot type will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."

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

    A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of slot types, specify the pagination token in the next request.

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

    The maximum number of slot types to return in the response. The default is 10.

Raises:

  • BadRequestException –

    The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.

  • InternalFailureException –

    An internal Amazon Lex error occurred. Try your request again.

  • LimitExceededException –

    The request exceeded a limit. Try your request again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lex_model_building_service/_services/async_lex_model_building_service.py
async def get_builtin_slot_types(
    self,
    *,
    config_overrides: Optional[AsyncLexModelBuildingServiceClientConfig] = None,
    locale: Optional["capo_lex_model_building_service.types.locale.Locale"] = None,
    signature_contains: Optional[
        "capo_lex_model_building_service.types.string.String"
    ] = None,
    next_token: Optional[
        "capo_lex_model_building_service.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_lex_model_building_service.types.max_results.MaxResults"
    ] = None,
) -> "capo_lex_model_building_service.types.get_builtin_slot_types_response.GetBuiltinSlotTypesResponse":
    """<p>Gets a list of built-in slot types that meet the specified criteria.</p> <p>For a list of built-in slot types, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference">Slot Type Reference</a> in the <i>Alexa Skills Kit</i>.</p> <p>This operation requires permission for the <code>lex:GetBuiltInSlotTypes</code> action.</p>

    Args:
        locale: <p>A list of locales that the slot type supports.</p>
        signature_contains: <p>Substring to match in built-in slot type signatures. A slot type will be returned if any part of its signature matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
        next_token: <p>A pagination token that fetches the next page of slot types. If the response to this API call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of slot types, specify the pagination token in the next request.</p>
        max_results: <p>The maximum number of slot types to return in the response. The default is 10.</p>

    Raises:
        capo_lex_model_building_service.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
        capo_lex_model_building_service.errors.internal_failure_exception.InternalFailureException: <p>An internal Amazon Lex error occurred. Try your request again.</p>
        capo_lex_model_building_service.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded a limit. Try your request again.</p>
        capo_lex_model_building_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lex_model_building_service.types.get_builtin_slot_types_request.GetBuiltinSlotTypesRequest]",
    ) -> AsyncOperationResponse[
        "capo_lex_model_building_service.types.get_builtin_slot_types_response.GetBuiltinSlotTypesResponse"
    ]:
        import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_builtin_slot_types

        (
            output,
            http_response,
        ) = await capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_builtin_slot_types.async_get_builtin_slot_types(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetBuiltinSlotTypes")
    )
    input_: capo_lex_model_building_service.types.get_builtin_slot_types_request.GetBuiltinSlotTypesRequest = {}
    if locale is not None:
        input_["locale"] = locale
    if signature_contains is not None:
        input_["signature_contains"] = signature_contains
    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