updateSessionData method
Updates the data stored on an Amazon Q in Connect Session.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter assistantId :
The identifier of the Amazon Q in Connect assistant. Can be either the ID
or the ARN. URLs cannot contain the ARN.
Parameter data :
The data stored on the Amazon Q in Connect Session.
Parameter sessionId :
The identifier of the session. Can be either the ID or the ARN. URLs
cannot contain the ARN.
Parameter namespace :
The namespace into which the session data is stored. Supported namespaces
are: Custom
Implementation
Future<UpdateSessionDataResponse> updateSessionData({
required String assistantId,
required List<RuntimeSessionData> data,
required String sessionId,
SessionDataNamespace? namespace,
}) async {
final $payload = <String, dynamic>{
'data': data,
if (namespace != null) 'namespace': namespace.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/assistants/${Uri.encodeComponent(assistantId)}/sessions/${Uri.encodeComponent(sessionId)}/data',
exceptionFnMap: _exceptionFns,
);
return UpdateSessionDataResponse.fromJson(response);
}