ListAIPromptVersionsCommand

Lists AI Prompt versions.

Example Syntax

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

import { QConnectClient, ListAIPromptVersionsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, ListAIPromptVersionsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // ListAIPromptVersionsRequest
  assistantId: "STRING_VALUE", // required
  aiPromptId: "STRING_VALUE", // required
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  origin: "STRING_VALUE",
};
const command = new ListAIPromptVersionsCommand(input);
const response = await client.send(command);
// { // ListAIPromptVersionsResponse
//   aiPromptVersionSummaries: [ // AIPromptVersionSummariesList // required
//     { // AIPromptVersionSummary
//       aiPromptSummary: { // AIPromptSummary
//         name: "STRING_VALUE", // required
//         assistantId: "STRING_VALUE", // required
//         assistantArn: "STRING_VALUE", // required
//         aiPromptId: "STRING_VALUE", // required
//         type: "STRING_VALUE", // required
//         aiPromptArn: "STRING_VALUE", // required
//         modifiedTime: new Date("TIMESTAMP"),
//         templateType: "STRING_VALUE", // required
//         modelId: "STRING_VALUE", // required
//         apiFormat: "STRING_VALUE", // required
//         visibilityStatus: "STRING_VALUE", // required
//         origin: "STRING_VALUE",
//         description: "STRING_VALUE",
//         status: "STRING_VALUE",
//         tags: { // Tags
//           "<keys>": "STRING_VALUE",
//         },
//       },
//       versionNumber: Number("long"),
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListAIPromptVersionsCommand Input

Parameter
Type
Description
aiPromptId
Required
string | undefined

The identifier of the Amazon Q in Connect AI prompt for which versions are to be listed.

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.

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.

origin
Origin | undefined

The origin of the AI Prompt versions to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

ListAIPromptVersionsCommand Output

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

The summaries of the AI Prompt versions.

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.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ResourceNotFoundException
client

The specified resource does not exist.

ThrottlingException
client

The throttling limit has been exceeded.

ValidationException
client

The input fails to satisfy the constraints specified by a service.

QConnectServiceException
Base exception class for all service exceptions from QConnect service.