Skip to main content

ai_guardrails

Creates, updates, deletes or gets an ai_guardrail resource or lists ai_guardrails in a region

Overview

Nameai_guardrails
TypeResource
DescriptionDefinition of AWS::Wisdom::AIGuardrail Resource Type
Idaws.wisdom.ai_guardrails

Fields

NameDatatypeDescription
assistant_idstring
assistant_arnstring
a_iguardrail_arnstring
a_iguardrail_idstring
namestring
blocked_input_messagingstringMessaging for when violations are detected in text
blocked_outputs_messagingstringMessaging for when violations are detected in text
descriptionstringDescription of the guardrail or its version
topic_policy_configobjectTopic policy config for a guardrail.
content_policy_configobjectContent policy config for a guardrail.
word_policy_configobjectWord policy config for a guardrail.
sensitive_information_policy_configobjectSensitive information policy config for a guardrail.
contextual_grounding_policy_configobjectContextual grounding policy config for a guardrail.
tagsobject
regionstringAWS region.

For more information, see AWS::Wisdom::AIGuardrail.

Methods

NameAccessible byRequired Params
create_resourceINSERTAssistantId, BlockedInputMessaging, BlockedOutputsMessaging, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all ai_guardrails in a region.

SELECT
region,
assistant_id,
assistant_arn,
a_iguardrail_arn,
a_iguardrail_id,
name,
blocked_input_messaging,
blocked_outputs_messaging,
description,
topic_policy_config,
content_policy_config,
word_policy_config,
sensitive_information_policy_config,
contextual_grounding_policy_config,
tags
FROM aws.wisdom.ai_guardrails
WHERE region = 'us-east-1';

Gets all properties from an individual ai_guardrail.

SELECT
region,
assistant_id,
assistant_arn,
a_iguardrail_arn,
a_iguardrail_id,
name,
blocked_input_messaging,
blocked_outputs_messaging,
description,
topic_policy_config,
content_policy_config,
word_policy_config,
sensitive_information_policy_config,
contextual_grounding_policy_config,
tags
FROM aws.wisdom.ai_guardrails
WHERE region = 'us-east-1' AND data__Identifier = '<AIGuardrailId>|<AssistantId>';

INSERT example

Use the following StackQL query and manifest file to create a new ai_guardrail resource, using stack-deploy.

/*+ create */
INSERT INTO aws.wisdom.ai_guardrails (
AssistantId,
BlockedInputMessaging,
BlockedOutputsMessaging,
region
)
SELECT
'{{ AssistantId }}',
'{{ BlockedInputMessaging }}',
'{{ BlockedOutputsMessaging }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.wisdom.ai_guardrails
WHERE data__Identifier = '<AIGuardrailId|AssistantId>'
AND region = 'us-east-1';

Permissions

To operate on the ai_guardrails resource, the following permissions are required:

Create

wisdom:CreateAIGuardrail,
wisdom:TagResource

Read

wisdom:GetAIGuardrail

Update

wisdom:UpdateAIGuardrail

Delete

wisdom:DeleteAIGuardrail

List

wisdom:ListAIGuardrails