ListAIPromptsCommand

Lists the AI Prompts available on the Amazon Q in Connect assistant.

Example Syntax

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

import { QConnectClient, ListAIPromptsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, ListAIPromptsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // ListAIPromptsRequest
  assistantId: "STRING_VALUE", // required
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  origin: "STRING_VALUE",
};
const command = new ListAIPromptsCommand(input);
const response = await client.send(command);
// { // ListAIPromptsResponse
//   aiPromptSummaries: [ // AIPromptSummaryList // required
//     { // 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",
//       },
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListAIPromptsCommand Input

See ListAIPromptsCommandInput 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.

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 Prompts 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.

ListAIPromptsCommand Output

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

The summaries of the AI Prompts.

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.