- 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.
ListAIGuardrailsCommand
Lists the AI Guardrails 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, ListAIGuardrailsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, ListAIGuardrailsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // ListAIGuardrailsRequest
assistantId: "STRING_VALUE", // required
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListAIGuardrailsCommand(input);
const response = await client.send(command);
// { // ListAIGuardrailsResponse
// aiGuardrailSummaries: [ // AIGuardrailSummariesList // required
// { // AIGuardrailSummary
// name: "STRING_VALUE", // required
// assistantId: "STRING_VALUE", // required
// assistantArn: "STRING_VALUE", // required
// aiGuardrailId: "STRING_VALUE", // required
// aiGuardrailArn: "STRING_VALUE", // required
// modifiedTime: new Date("TIMESTAMP"),
// visibilityStatus: "STRING_VALUE", // required
// description: "STRING_VALUE",
// status: "STRING_VALUE",
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListAIGuardrailsCommand 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. |
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. |
ListAIGuardrailsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
aiGuardrailSummaries Required | AIGuardrailSummary[] | undefined | The summaries of the AI Guardrails. |
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 |
---|
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. |