Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must specify the slot type version.
This operation requires permissions for the lex:GetSlotType action.
Parameters:
-
name
(SlotTypeName)
–
The name of the slot type. The name is case sensitive.
-
version
(Version)
–
The version of the slot type.
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.
-
NotFoundException
–
The resource specified in the request was not found. Check the resource and try again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To get information about a slot type
This example shows how to get information about a slot type.
>>> await client.get_slot_type(name='DocPizzaCrustType', version='$LATEST')
Source code in docs_src/capo_lex_model_building_service/_services/async_lex_model_building_service.py
| async def get_slot_type(
self,
name: "capo_lex_model_building_service.types.slot_type_name.SlotTypeName",
version: "capo_lex_model_building_service.types.version.Version",
*,
config_overrides: Optional[AsyncLexModelBuildingServiceClientConfig] = None,
) -> "capo_lex_model_building_service.types.get_slot_type_response.GetSlotTypeResponse":
"""<p>Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must specify the slot type version.</p> <p>This operation requires permissions for the <code>lex:GetSlotType</code> action.</p>
Args:
name: <p>The name of the slot type. The name is case sensitive. </p>
version: <p>The version of the slot type. </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.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource and try again.</p>
capo_lex_model_building_service.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To get information about a slot type
This example shows how to get information about a slot type.
>>> await client.get_slot_type(name='DocPizzaCrustType', version='$LATEST')
"""
async def _handler(
req: "AsyncOperationRequest[capo_lex_model_building_service.types.get_slot_type_request.GetSlotTypeRequest]",
) -> AsyncOperationResponse[
"capo_lex_model_building_service.types.get_slot_type_response.GetSlotTypeResponse"
]:
import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_slot_type
(
output,
http_response,
) = await capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_slot_type.async_get_slot_type(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetSlotType")
)
input_: capo_lex_model_building_service.types.get_slot_type_request.GetSlotTypeRequest = {
"name": name,
"version": version,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|