LexRuntimeServiceClient#
Index > LexRuntimeService > LexRuntimeServiceClient
Auto-generated documentation for LexRuntimeService type annotations stubs module types-boto3-lex-runtime.
LexRuntimeServiceClient#
Type annotations and code completion for boto3.client("lex-runtime")
.
boto3 documentation
# LexRuntimeServiceClient usage example
from boto3.session import Session
from types_boto3_lex_runtime.client import LexRuntimeServiceClient
def get_lex-runtime_client() -> LexRuntimeServiceClient:
return Session().client("lex-runtime")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("lex-runtime").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("lex-runtime")
try:
do_something(client)
except (
client.exceptions.BadGatewayException,
client.exceptions.BadRequestException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.DependencyFailedException,
client.exceptions.InternalFailureException,
client.exceptions.LimitExceededException,
client.exceptions.LoopDetectedException,
client.exceptions.NotAcceptableException,
client.exceptions.NotFoundException,
client.exceptions.RequestTimeoutException,
client.exceptions.UnsupportedMediaTypeException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from types_boto3_lex_runtime.client import Exceptions
def handle_error(exc: Exceptions.BadGatewayException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("lex-runtime").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("lex-runtime").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
delete_session#
Removes session information for a specified bot, alias, and user ID.
Type annotations and code completion for boto3.client("lex-runtime").delete_session
method.
boto3 documentation
# delete_session method definition
def delete_session(
self,
*,
botName: str,
botAlias: str,
userId: str,
) -> DeleteSessionResponseTypeDef: # (1)
...
# delete_session method usage example with argument unpacking
kwargs: DeleteSessionRequestRequestTypeDef = { # (1)
"botName": ...,
"botAlias": ...,
"userId": ...,
}
parent.delete_session(**kwargs)
get_session#
Returns session information for a specified bot, alias, and user ID.
Type annotations and code completion for boto3.client("lex-runtime").get_session
method.
boto3 documentation
# get_session method definition
def get_session(
self,
*,
botName: str,
botAlias: str,
userId: str,
checkpointLabelFilter: str = ...,
) -> GetSessionResponseTypeDef: # (1)
...
# get_session method usage example with argument unpacking
kwargs: GetSessionRequestRequestTypeDef = { # (1)
"botName": ...,
"botAlias": ...,
"userId": ...,
}
parent.get_session(**kwargs)
post_content#
Sends user input (text or speech) to Amazon Lex.
Type annotations and code completion for boto3.client("lex-runtime").post_content
method.
boto3 documentation
# post_content method definition
def post_content(
self,
*,
botName: str,
botAlias: str,
userId: str,
contentType: str,
inputStream: BlobTypeDef,
sessionAttributes: str = ...,
requestAttributes: str = ...,
accept: str = ...,
activeContexts: str = ...,
) -> PostContentResponseTypeDef: # (1)
...
# post_content method usage example with argument unpacking
kwargs: PostContentRequestRequestTypeDef = { # (1)
"botName": ...,
"botAlias": ...,
"userId": ...,
"contentType": ...,
"inputStream": ...,
}
parent.post_content(**kwargs)
post_text#
Sends user input to Amazon Lex.
Type annotations and code completion for boto3.client("lex-runtime").post_text
method.
boto3 documentation
# post_text method definition
def post_text(
self,
*,
botName: str,
botAlias: str,
userId: str,
inputText: str,
sessionAttributes: Mapping[str, str] = ...,
requestAttributes: Mapping[str, str] = ...,
activeContexts: Sequence[ActiveContextUnionTypeDef] = ..., # (1)
) -> PostTextResponseTypeDef: # (2)
...
# post_text method usage example with argument unpacking
kwargs: PostTextRequestRequestTypeDef = { # (1)
"botName": ...,
"botAlias": ...,
"userId": ...,
"inputText": ...,
}
parent.post_text(**kwargs)
put_session#
Creates a new session or modifies an existing session with an Amazon Lex bot.
Type annotations and code completion for boto3.client("lex-runtime").put_session
method.
boto3 documentation
# put_session method definition
def put_session(
self,
*,
botName: str,
botAlias: str,
userId: str,
sessionAttributes: Mapping[str, str] = ...,
dialogAction: DialogActionTypeDef = ..., # (1)
recentIntentSummaryView: Sequence[IntentSummaryUnionTypeDef] = ..., # (2)
accept: str = ...,
activeContexts: Sequence[ActiveContextTypeDef] = ..., # (3)
) -> PutSessionResponseTypeDef: # (4)
...
- See DialogActionTypeDef
- See IntentSummaryTypeDef IntentSummaryOutputTypeDef
- See ActiveContextTypeDef
- See PutSessionResponseTypeDef
# put_session method usage example with argument unpacking
kwargs: PutSessionRequestRequestTypeDef = { # (1)
"botName": ...,
"botAlias": ...,
"userId": ...,
}
parent.put_session(**kwargs)