interface CfnGuardrailProps
Language | Type name |
---|---|
![]() | Amazon.CDK.aws_bedrock.CfnGuardrailProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrock#CfnGuardrailProps |
![]() | software.amazon.awscdk.services.bedrock.CfnGuardrailProps |
![]() | aws_cdk.aws_bedrock.CfnGuardrailProps |
![]() | aws-cdk-lib » aws_bedrock » CfnGuardrailProps |
Properties for defining a CfnGuardrail
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-guardrail.html
Example
import * as bedrockl1 from 'aws-cdk-lib/aws-bedrock';
// Import a guardrail created through the L1 CDK CfnGuardrail construct
const l1guardrail = new bedrockl1.CfnGuardrail(this, 'MyCfnGuardrail', {
blockedInputMessaging: 'blockedInputMessaging',
blockedOutputsMessaging: 'blockedOutputsMessaging',
name: 'namemycfnguardrails',
wordPolicyConfig: {
wordsConfig: [
{
text: 'drugs',
},
],
},
});
const importedGuardrail = bedrock.Guardrail.fromCfnGuardrail(l1guardrail);
Properties
Name | Type | Description |
---|---|---|
blocked | string | The message to return when the guardrail blocks a prompt. |
blocked | string | The message to return when the guardrail blocks a model response. |
name | string | The name of the guardrail. |
content | IResolvable | Content | The content filter policies to configure for the guardrail. |
contextual | IResolvable | Contextual | Contextual grounding policy config for a guardrail. |
cross | IResolvable | Guardrail | The system-defined guardrail profile that you're using with your guardrail. |
description? | string | A description of the guardrail. |
kms | string | The ARN of the AWS KMS key that you use to encrypt the guardrail. |
sensitive | IResolvable | Sensitive | The sensitive information policy to configure for the guardrail. |
tags? | Cfn [] | The tags that you want to attach to the guardrail. |
topic | IResolvable | Topic | The topic policies to configure for the guardrail. |
word | IResolvable | Word | The word policy you configure for the guardrail. |
blockedInputMessaging
Type:
string
The message to return when the guardrail blocks a prompt.
blockedOutputsMessaging
Type:
string
The message to return when the guardrail blocks a model response.
name
Type:
string
The name of the guardrail.
contentPolicyConfig?
Type:
IResolvable
|
Content
(optional)
The content filter policies to configure for the guardrail.
contextualGroundingPolicyConfig?
Type:
IResolvable
|
Contextual
(optional)
Contextual grounding policy config for a guardrail.
crossRegionConfig?
Type:
IResolvable
|
Guardrail
(optional)
The system-defined guardrail profile that you're using with your guardrail.
Guardrail profiles define the destination AWS Regions where guardrail inference requests can be automatically routed. Using guardrail profiles helps maintain guardrail performance and reliability when demand increases.
For more information, see the Amazon Bedrock User Guide .
description?
Type:
string
(optional)
A description of the guardrail.
kmsKeyArn?
Type:
string
(optional)
The ARN of the AWS KMS key that you use to encrypt the guardrail.
sensitiveInformationPolicyConfig?
Type:
IResolvable
|
Sensitive
(optional)
The sensitive information policy to configure for the guardrail.
tags?
Type:
Cfn
[]
(optional)
The tags that you want to attach to the guardrail.
topicPolicyConfig?
Type:
IResolvable
|
Topic
(optional)
The topic policies to configure for the guardrail.
wordPolicyConfig?
Type:
IResolvable
|
Word
(optional)
The word policy you configure for the guardrail.