CfnGuardrailProps
- class aws_cdk.aws_bedrock.CfnGuardrailProps(*, blocked_input_messaging, blocked_outputs_messaging, name, content_policy_config=None, contextual_grounding_policy_config=None, description=None, kms_key_arn=None, sensitive_information_policy_config=None, tags=None, topic_policy_config=None, word_policy_config=None)
Bases:
object
Properties for defining a
CfnGuardrail
.- Parameters:
blocked_input_messaging (
str
) – The message to return when the guardrail blocks a prompt.blocked_outputs_messaging (
str
) – The message to return when the guardrail blocks a model response.name (
str
) – The name of the guardrail.content_policy_config (
Union
[IResolvable
,ContentPolicyConfigProperty
,Dict
[str
,Any
],None
]) – The content filter policies to configure for the guardrail.contextual_grounding_policy_config (
Union
[IResolvable
,ContextualGroundingPolicyConfigProperty
,Dict
[str
,Any
],None
]) – Contextual grounding policy config for a guardrail.description (
Optional
[str
]) – A description of the guardrail.kms_key_arn (
Optional
[str
]) – The ARN of the AWS KMS key that you use to encrypt the guardrail.sensitive_information_policy_config (
Union
[IResolvable
,SensitiveInformationPolicyConfigProperty
,Dict
[str
,Any
],None
]) – The sensitive information policy to configure for the guardrail.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – The tags that you want to attach to the guardrail.topic_policy_config (
Union
[IResolvable
,TopicPolicyConfigProperty
,Dict
[str
,Any
],None
]) – The topic policies to configure for the guardrail.word_policy_config (
Union
[IResolvable
,WordPolicyConfigProperty
,Dict
[str
,Any
],None
]) – The word policy you configure for the guardrail.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-guardrail.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bedrock as bedrock cfn_guardrail_props = bedrock.CfnGuardrailProps( blocked_input_messaging="blockedInputMessaging", blocked_outputs_messaging="blockedOutputsMessaging", name="name", # the properties below are optional content_policy_config=bedrock.CfnGuardrail.ContentPolicyConfigProperty( filters_config=[bedrock.CfnGuardrail.ContentFilterConfigProperty( input_strength="inputStrength", output_strength="outputStrength", type="type" )] ), contextual_grounding_policy_config=bedrock.CfnGuardrail.ContextualGroundingPolicyConfigProperty( filters_config=[bedrock.CfnGuardrail.ContextualGroundingFilterConfigProperty( threshold=123, type="type" )] ), description="description", kms_key_arn="kmsKeyArn", sensitive_information_policy_config=bedrock.CfnGuardrail.SensitiveInformationPolicyConfigProperty( pii_entities_config=[bedrock.CfnGuardrail.PiiEntityConfigProperty( action="action", type="type" )], regexes_config=[bedrock.CfnGuardrail.RegexConfigProperty( action="action", name="name", pattern="pattern", # the properties below are optional description="description" )] ), tags=[CfnTag( key="key", value="value" )], topic_policy_config=bedrock.CfnGuardrail.TopicPolicyConfigProperty( topics_config=[bedrock.CfnGuardrail.TopicConfigProperty( definition="definition", name="name", type="type", # the properties below are optional examples=["examples"] )] ), word_policy_config=bedrock.CfnGuardrail.WordPolicyConfigProperty( managed_word_lists_config=[bedrock.CfnGuardrail.ManagedWordsConfigProperty( type="type" )], words_config=[bedrock.CfnGuardrail.WordConfigProperty( text="text" )] ) )
Attributes
- blocked_input_messaging
The message to return when the guardrail blocks a prompt.
- blocked_outputs_messaging
The message to return when the guardrail blocks a model response.
- content_policy_config
The content filter policies to configure for the guardrail.
- contextual_grounding_policy_config
Contextual grounding policy config for a guardrail.
- description
A description of the guardrail.
- kms_key_arn
The ARN of the AWS KMS key that you use to encrypt the guardrail.
- name
The name of the guardrail.
- sensitive_information_policy_config
The sensitive information policy to configure for the guardrail.
- tags
The tags that you want to attach to the guardrail.
- topic_policy_config
The topic policies to configure for the guardrail.
- word_policy_config
The word policy you configure for the guardrail.