- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateSessionDataCommand
Updates the data stored on an Amazon Q in Connect Session.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, UpdateSessionDataCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, UpdateSessionDataCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // UpdateSessionDataRequest
assistantId: "STRING_VALUE", // required
sessionId: "STRING_VALUE", // required
namespace: "STRING_VALUE",
data: [ // RuntimeSessionDataList // required
{ // RuntimeSessionData
key: "STRING_VALUE", // required
value: { // RuntimeSessionDataValue Union: only one key present
stringValue: "STRING_VALUE",
},
},
],
};
const command = new UpdateSessionDataCommand(input);
const response = await client.send(command);
// { // UpdateSessionDataResponse
// sessionArn: "STRING_VALUE", // required
// sessionId: "STRING_VALUE", // required
// namespace: "STRING_VALUE", // required
// data: [ // RuntimeSessionDataList // required
// { // RuntimeSessionData
// key: "STRING_VALUE", // required
// value: { // RuntimeSessionDataValue Union: only one key present
// stringValue: "STRING_VALUE",
// },
// },
// ],
// };
UpdateSessionDataCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
assistantId Required | string | undefined | The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN. |
data Required | RuntimeSessionData[] | undefined | The data stored on the Amazon Q in Connect Session. |
sessionId Required | string | undefined | The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN. |
namespace | SessionDataNamespace | undefined | The namespace into which the session data is stored. Supported namespaces are: Custom |
UpdateSessionDataCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
data Required | RuntimeSessionData[] | undefined | Data stored in the session. |
namespace Required | SessionDataNamespace | undefined | The namespace into which the session data is stored. Supported namespaces are: Custom |
sessionArn Required | string | undefined | The Amazon Resource Name (ARN) of the session. |
sessionId Required | string | undefined | The identifier of the session. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ResourceNotFoundException | client | The specified resource does not exist. |
ValidationException | client | The input fails to satisfy the constraints specified by a service. |
QConnectServiceException | Base exception class for all service exceptions from QConnect service. |