Returns information about an intent. In addition to the intent name, you must specify the intent version.
This operation requires permissions to perform the lex:GetIntent action.
Parameters:
-
name
(IntentName)
–
The name of the intent. The name is case sensitive.
-
version
(Version)
–
The version of the intent.
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 a information about an intent
This example shows how to get information about an intent.
>>> client.get_intent(name='DocOrderPizza', version='$LATEST')
Source code in docs_src/capo_lex_model_building_service/_services/lex_model_building_service.py
| def get_intent(
self,
name: "capo_lex_model_building_service.types.intent_name.IntentName",
version: "capo_lex_model_building_service.types.version.Version",
*,
config_overrides: Optional[LexModelBuildingServiceClientConfig] = None,
) -> "capo_lex_model_building_service.types.get_intent_response.GetIntentResponse":
"""<p> Returns information about an intent. In addition to the intent name, you must specify the intent version. </p> <p> This operation requires permissions to perform the <code>lex:GetIntent</code> action. </p>
Args:
name: <p>The name of the intent. The name is case sensitive. </p>
version: <p>The version of the intent.</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 a information about an intent
This example shows how to get information about an intent.
>>> client.get_intent(name='DocOrderPizza', version='$LATEST')
"""
def _handler(
req: "OperationRequest[capo_lex_model_building_service.types.get_intent_request.GetIntentRequest]",
) -> OperationResponse[
"capo_lex_model_building_service.types.get_intent_response.GetIntentResponse"
]:
import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_intent
output, http_response = (
capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_intent.get_intent(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetIntent")
)
input_: capo_lex_model_building_service.types.get_intent_request.GetIntentRequest = {
"name": name,
"version": version,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|