stopQAppSession method

Future<void> stopQAppSession({
  1. required String instanceId,
  2. required String sessionId,
})

Stops an active session for an Amazon Q App.This deletes all data related to the session and makes it invalid for future uses. The results of the session will be persisted as part of the conversation.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter instanceId : The unique identifier of the Amazon Q Business application environment instance.

Parameter sessionId : The unique identifier of the Q App session to stop.

Implementation

Future<void> stopQAppSession({
  required String instanceId,
  required String sessionId,
}) async {
  final headers = <String, String>{
    'instance-id': instanceId.toString(),
  };
  final $payload = <String, dynamic>{
    'sessionId': sessionId,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/runtime.deleteMiniAppRun',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}