endSession method
Ends the session. After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter sessionIdentifier :
The unique identifier for the session to end. You can specify either the
session's sessionId or its Amazon Resource Name (ARN).
Implementation
Future<EndSessionResponse> endSession({
required String sessionIdentifier,
}) async {
final response = await _protocol.send(
payload: null,
method: 'PATCH',
requestUri: '/sessions/${Uri.encodeComponent(sessionIdentifier)}',
exceptionFnMap: _exceptionFns,
);
return EndSessionResponse.fromJson(response);
}