SearchSessionsCommand

Searches for sessions.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { QConnectClient, SearchSessionsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, SearchSessionsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // SearchSessionsRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  assistantId: "STRING_VALUE", // required
  searchExpression: { // SearchExpression
    filters: [ // FilterList // required
      { // Filter
        field: "STRING_VALUE", // required
        operator: "STRING_VALUE", // required
        value: "STRING_VALUE", // required
      },
    ],
  },
};
const command = new SearchSessionsCommand(input);
const response = await client.send(command);
// { // SearchSessionsResponse
//   sessionSummaries: [ // SessionSummaries // required
//     { // SessionSummary
//       sessionId: "STRING_VALUE", // required
//       sessionArn: "STRING_VALUE", // required
//       assistantId: "STRING_VALUE", // required
//       assistantArn: "STRING_VALUE", // required
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

SearchSessionsCommand Input

See SearchSessionsCommandInput for more details

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.

searchExpression
Required
SearchExpression | undefined

The search expression to filter results.

maxResults
number | undefined

The maximum number of results to return per page.

nextToken
string | undefined

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

SearchSessionsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
sessionSummaries
Required
SessionSummary[] | undefined

Summary information about the sessions.

nextToken
string | undefined

If there are additional results, this is the token for the next set of results.

Throws

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.