deleteSession method

Future<void> deleteSession({
  1. required String sessionIdentifier,
})

Deletes a session that you ended. You can't delete a session with an ACTIVE status. To delete an active session, you must first end it with the EndSession 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 be deleted. You can specify either the session's sessionId or its Amazon Resource Name (ARN).

Implementation

Future<void> deleteSession({
  required String sessionIdentifier,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/sessions/${Uri.encodeComponent(sessionIdentifier)}/',
    exceptionFnMap: _exceptionFns,
  );
}