interface CfnGuardrailProps
Language | Type name |
---|---|
.NET | Amazon.CDK.aws_bedrock.CfnGuardrailProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrock#CfnGuardrailProps |
Java | software.amazon.awscdk.services.bedrock.CfnGuardrailProps |
Python | aws_cdk.aws_bedrock.CfnGuardrailProps |
TypeScript | 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
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const cfnGuardrailProps: bedrock.CfnGuardrailProps = {
blockedInputMessaging: 'blockedInputMessaging',
blockedOutputsMessaging: 'blockedOutputsMessaging',
name: 'name',
// the properties below are optional
contentPolicyConfig: {
filtersConfig: [{
inputStrength: 'inputStrength',
outputStrength: 'outputStrength',
type: 'type',
}],
},
contextualGroundingPolicyConfig: {
filtersConfig: [{
threshold: 123,
type: 'type',
}],
},
description: 'description',
kmsKeyArn: 'kmsKeyArn',
sensitiveInformationPolicyConfig: {
piiEntitiesConfig: [{
action: 'action',
type: 'type',
}],
regexesConfig: [{
action: 'action',
name: 'name',
pattern: 'pattern',
// the properties below are optional
description: 'description',
}],
},
tags: [{
key: 'key',
value: 'value',
}],
topicPolicyConfig: {
topicsConfig: [{
definition: 'definition',
name: 'name',
type: 'type',
// the properties below are optional
examples: ['examples'],
}],
},
wordPolicyConfig: {
managedWordListsConfig: [{
type: 'type',
}],
wordsConfig: [{
text: 'text',
}],
},
};
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. |
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.
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.