getSession method
Returns session information for a specified bot, alias, and user.
For example, you can use this operation to retrieve session information for a user that has left a long-running session in use.
If the bot, alias, or session identifier doesn't exist, Amazon Lex V2
returns a BadRequestException. If the locale doesn't exist or
is not enabled for the alias, you receive a
BadRequestException.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter botAliasId :
The alias identifier in use for the bot that contains the session data.
Parameter botId :
The identifier of the bot that contains the session data.
Parameter localeId :
The locale where the session is in use.
Parameter sessionId :
The identifier of the session to return.
Implementation
Future<GetSessionResponse> getSession({
required String botAliasId,
required String botId,
required String localeId,
required String sessionId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/bots/${Uri.encodeComponent(botId)}/botAliases/${Uri.encodeComponent(botAliasId)}/botLocales/${Uri.encodeComponent(localeId)}/sessions/${Uri.encodeComponent(sessionId)}',
exceptionFnMap: _exceptionFns,
);
return GetSessionResponse.fromJson(response);
}