AWS::Bedrock::Guardrail
Creates a guardrail to block topics and to implement safeguards for your generative AI applications. You can configure denied topics to disallow undesirable topics and content filters to block harmful content in model inputs and responses. For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Bedrock::Guardrail", "Properties" : { "BlockedInputMessaging" :
String
, "BlockedOutputsMessaging" :String
, "ContentPolicyConfig" :ContentPolicyConfig
, "Description" :String
, "KmsKeyArn" :String
, "Name" :String
, "SensitiveInformationPolicyConfig" :SensitiveInformationPolicyConfig
, "Tags" :[ Tag, ... ]
, "TopicPolicyConfig" :TopicPolicyConfig
, "WordPolicyConfig" :WordPolicyConfig
} }
YAML
Type: AWS::Bedrock::Guardrail Properties: BlockedInputMessaging:
String
BlockedOutputsMessaging:String
ContentPolicyConfig:ContentPolicyConfig
Description:String
KmsKeyArn:String
Name:String
SensitiveInformationPolicyConfig:SensitiveInformationPolicyConfig
Tags:- Tag
TopicPolicyConfig:TopicPolicyConfig
WordPolicyConfig:WordPolicyConfig
Properties
BlockedInputMessaging
-
The message to return when the guardrail blocks a prompt.
Required: Yes
Type: String
Minimum:
1
Maximum:
500
Update requires: No interruption
BlockedOutputsMessaging
-
The message to return when the guardrail blocks a model response.
Required: Yes
Type: String
Minimum:
1
Maximum:
500
Update requires: No interruption
ContentPolicyConfig
Property description not available.
Required: No
Type: ContentPolicyConfig
Update requires: No interruption
Description
-
A description of the guardrail.
Required: No
Type: String
Minimum:
1
Maximum:
200
Update requires: No interruption
KmsKeyArn
-
The ARN of the Amazon KMS key used to encrypt the guardrail.
Required: No
Type: String
Pattern:
^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$
Minimum:
1
Maximum:
2048
Update requires: No interruption
Name
-
The name of the guardrail.
Required: Yes
Type: String
Pattern:
^[0-9a-zA-Z-_]+$
Minimum:
1
Maximum:
50
Update requires: No interruption
SensitiveInformationPolicyConfig
Property description not available.
Required: No
Type: SensitiveInformationPolicyConfig
Update requires: No interruption
-
Metadata that you can assign to a guardrail as key-value pairs. For more information, see the following resources:
Required: No
Type: Array of Tag
Minimum:
0
Maximum:
200
Update requires: No interruption
TopicPolicyConfig
Property description not available.
Required: No
Type: TopicPolicyConfig
Update requires: No interruption
WordPolicyConfig
Property description not available.
Required: No
Type: WordPolicyConfig
Update requires: No interruption
Return values
Ref
Fn::GetAtt
CreatedAt
-
The date and time at which the guardrail was created.
FailureRecommendations
Property description not available.
GuardrailArn
-
The Amazon Resource Name (ARN) of the guardrail. This a the primary identifier for the guardrail.
GuardrailId
-
The unique identifier of the guardrail.
Status
StatusReasons
UpdatedAt
-
The date and time at which the guardrail was last updated.
Version
-
The version of the guardrail.