Skip to content

LexRuntimeServiceClient

Index > LexRuntimeService > LexRuntimeServiceClient

Auto-generated documentation for LexRuntimeService type annotations stubs module mypy-boto3-lex-runtime.

LexRuntimeServiceClient

Type annotations and code completion for boto3.client("lex-runtime"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_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.

Usage example
client = boto3.client("lex-runtime")

try:
    do_something(client)
except (
    client.BadGatewayException,
    client.BadRequestException,
    client.ClientError,
    client.ConflictException,
    client.DependencyFailedException,
    client.InternalFailureException,
    client.LimitExceededException,
    client.LoopDetectedException,
    client.NotAcceptableException,
    client.NotFoundException,
    client.RequestTimeoutException,
    client.UnsupportedMediaTypeException,
) as e:
    print(e)
Type checking example
from mypy_boto3_lex_runtime.client import Exceptions

def handle_error(exc: Exceptions.BadGatewayException) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("lex-runtime").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("lex-runtime").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

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

Method definition
def delete_session(
    self,
    *,
    botName: str,
    botAlias: str,
    userId: str,
) -> DeleteSessionResponseTypeDef:  # (1)
    ...
  1. See DeleteSessionResponseTypeDef
Usage example with kwargs
kwargs: DeleteSessionRequestRequestTypeDef = {  # (1)
    "botName": ...,
    "botAlias": ...,
    "userId": ...,
}

parent.delete_session(**kwargs)
  1. See DeleteSessionRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("lex-runtime").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

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

Method definition
def get_session(
    self,
    *,
    botName: str,
    botAlias: str,
    userId: str,
    checkpointLabelFilter: str = ...,
) -> GetSessionResponseTypeDef:  # (1)
    ...
  1. See GetSessionResponseTypeDef
Usage example with kwargs
kwargs: GetSessionRequestRequestTypeDef = {  # (1)
    "botName": ...,
    "botAlias": ...,
    "userId": ...,
}

parent.get_session(**kwargs)
  1. See GetSessionRequestRequestTypeDef

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

Method definition
def post_content(
    self,
    *,
    botName: str,
    botAlias: str,
    userId: str,
    contentType: str,
    inputStream: Union[str, bytes, IO[Any], StreamingBody],
    sessionAttributes: str = ...,
    requestAttributes: str = ...,
    accept: str = ...,
    activeContexts: str = ...,
) -> PostContentResponseTypeDef:  # (1)
    ...
  1. See PostContentResponseTypeDef
Usage example with kwargs
kwargs: PostContentRequestRequestTypeDef = {  # (1)
    "botName": ...,
    "botAlias": ...,
    "userId": ...,
    "contentType": ...,
    "inputStream": ...,
}

parent.post_content(**kwargs)
  1. See PostContentRequestRequestTypeDef

post_text

Sends user input to Amazon Lex.

Type annotations and code completion for boto3.client("lex-runtime").post_text method. boto3 documentation

Method definition
def post_text(
    self,
    *,
    botName: str,
    botAlias: str,
    userId: str,
    inputText: str,
    sessionAttributes: Mapping[str, str] = ...,
    requestAttributes: Mapping[str, str] = ...,
    activeContexts: Sequence[ActiveContextTypeDef] = ...,  # (1)
) -> PostTextResponseTypeDef:  # (2)
    ...
  1. See ActiveContextTypeDef
  2. See PostTextResponseTypeDef
Usage example with kwargs
kwargs: PostTextRequestRequestTypeDef = {  # (1)
    "botName": ...,
    "botAlias": ...,
    "userId": ...,
    "inputText": ...,
}

parent.post_text(**kwargs)
  1. See PostTextRequestRequestTypeDef

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

Method definition
def put_session(
    self,
    *,
    botName: str,
    botAlias: str,
    userId: str,
    sessionAttributes: Mapping[str, str] = ...,
    dialogAction: DialogActionTypeDef = ...,  # (1)
    recentIntentSummaryView: Sequence[IntentSummaryTypeDef] = ...,  # (2)
    accept: str = ...,
    activeContexts: Sequence[ActiveContextTypeDef] = ...,  # (3)
) -> PutSessionResponseTypeDef:  # (4)
    ...
  1. See DialogActionTypeDef
  2. See IntentSummaryTypeDef
  3. See ActiveContextTypeDef
  4. See PutSessionResponseTypeDef
Usage example with kwargs
kwargs: PutSessionRequestRequestTypeDef = {  # (1)
    "botName": ...,
    "botAlias": ...,
    "userId": ...,
}

parent.put_session(**kwargs)
  1. See PutSessionRequestRequestTypeDef