- 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.
GetAIGuardrailCommand
Gets the Amazon Q in Connect AI Guardrail.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, GetAIGuardrailCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, GetAIGuardrailCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // GetAIGuardrailRequest
assistantId: "STRING_VALUE", // required
aiGuardrailId: "STRING_VALUE", // required
};
const command = new GetAIGuardrailCommand(input);
const response = await client.send(command);
// { // GetAIGuardrailResponse
// aiGuardrail: { // AIGuardrailData
// assistantId: "STRING_VALUE", // required
// assistantArn: "STRING_VALUE", // required
// aiGuardrailArn: "STRING_VALUE", // required
// aiGuardrailId: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// visibilityStatus: "STRING_VALUE", // required
// blockedInputMessaging: "STRING_VALUE", // required
// blockedOutputsMessaging: "STRING_VALUE", // required
// description: "STRING_VALUE",
// topicPolicyConfig: { // AIGuardrailTopicPolicyConfig
// topicsConfig: [ // GuardrailTopicsConfig // required
// { // GuardrailTopicConfig
// name: "STRING_VALUE", // required
// definition: "STRING_VALUE", // required
// examples: [ // GuardrailTopicExamples
// "STRING_VALUE",
// ],
// type: "STRING_VALUE", // required
// },
// ],
// },
// contentPolicyConfig: { // AIGuardrailContentPolicyConfig
// filtersConfig: [ // GuardrailContentFiltersConfig // required
// { // GuardrailContentFilterConfig
// type: "STRING_VALUE", // required
// inputStrength: "STRING_VALUE", // required
// outputStrength: "STRING_VALUE", // required
// },
// ],
// },
// wordPolicyConfig: { // AIGuardrailWordPolicyConfig
// wordsConfig: [ // GuardrailWordsConfig
// { // GuardrailWordConfig
// text: "STRING_VALUE", // required
// },
// ],
// managedWordListsConfig: [ // GuardrailManagedWordListsConfig
// { // GuardrailManagedWordsConfig
// type: "STRING_VALUE", // required
// },
// ],
// },
// sensitiveInformationPolicyConfig: { // AIGuardrailSensitiveInformationPolicyConfig
// piiEntitiesConfig: [ // GuardrailPiiEntitiesConfig
// { // GuardrailPiiEntityConfig
// type: "STRING_VALUE", // required
// action: "STRING_VALUE", // required
// },
// ],
// regexesConfig: [ // GuardrailRegexesConfig
// { // GuardrailRegexConfig
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// pattern: "STRING_VALUE", // required
// action: "STRING_VALUE", // required
// },
// ],
// },
// contextualGroundingPolicyConfig: { // AIGuardrailContextualGroundingPolicyConfig
// filtersConfig: [ // GuardrailContextualGroundingFiltersConfig // required
// { // GuardrailContextualGroundingFilterConfig
// type: "STRING_VALUE", // required
// threshold: Number("double"), // required
// },
// ],
// },
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// status: "STRING_VALUE",
// modifiedTime: new Date("TIMESTAMP"),
// },
// versionNumber: Number("long"),
// };
GetAIGuardrailCommand Input
See GetAIGuardrailCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
aiGuardrailId Required | string | undefined | The identifier of the Amazon Q in Connect AI Guardrail. |
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. |
GetAIGuardrailCommand Output
See GetAIGuardrailCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
aiGuardrail | AIGuardrailData | undefined | The data of the AI Guardrail. |
versionNumber | number | undefined | The version number of the AI Guardrail version (returned if an AI Guardrail version was specified via use of a qualifier for the |
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. |