Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias.
This operation requires permissions for the lex:GetBot action.
Parameters:
-
name
(BotName)
–
The name of the bot. The name is case sensitive.
-
version_or_alias
(String)
–
The version or alias of the bot.
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 bot
This example shows how to get configuration information for a bot.
>>> client.get_bot(name='DocOrderPizza', version_or_alias='$LATEST')
Source code in docs_src/capo_lex_model_building_service/_services/lex_model_building_service.py
| def get_bot(
self,
name: "capo_lex_model_building_service.types.bot_name.BotName",
version_or_alias: "capo_lex_model_building_service.types.string.String",
*,
config_overrides: Optional[LexModelBuildingServiceClientConfig] = None,
) -> "capo_lex_model_building_service.types.get_bot_response.GetBotResponse":
"""<p>Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias. </p> <p> This operation requires permissions for the <code>lex:GetBot</code> action. </p>
Args:
name: <p>The name of the bot. The name is case sensitive. </p>
version_or_alias: <p>The version or alias of the bot.</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 bot
This example shows how to get configuration information for a bot.
>>> client.get_bot(name='DocOrderPizza', version_or_alias='$LATEST')
"""
def _handler(
req: "OperationRequest[capo_lex_model_building_service.types.get_bot_request.GetBotRequest]",
) -> OperationResponse[
"capo_lex_model_building_service.types.get_bot_response.GetBotResponse"
]:
import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_bot
output, http_response = (
capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_bot.get_bot(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetBot")
)
input_: capo_lex_model_building_service.types.get_bot_request.GetBotRequest = {
"name": name,
"version_or_alias": version_or_alias,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|