Class: AWSCDK::Wisdom::CfnAIGuardrailProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Wisdom::CfnAIGuardrailProps
- Defined in:
- wisdom/cfn_ai_guardrail_props.rb
Overview
Properties for defining a CfnAIGuardrail.
Instance Attribute Summary collapse
-
#assistant_id ⇒ String
readonly
The identifier of the Amazon Q in Connect assistant.
-
#blocked_input_messaging ⇒ String
readonly
The message to return when the AI Guardrail blocks a prompt.
-
#blocked_outputs_messaging ⇒ String
readonly
The message to return when the AI Guardrail blocks a model response.
-
#content_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
Contains details about how to handle harmful content.
-
#contextual_grounding_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
The policy configuration details for the AI Guardrail's contextual grounding policy.
-
#description ⇒ String?
readonly
A description of the AI Guardrail.
-
#name ⇒ String?
readonly
The name of the AI Guardrail.
-
#sensitive_information_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
Contains details about PII entities and regular expressions to configure for the AI Guardrail.
-
#tags ⇒ Hash{String => String}?
readonly
The tags used to organize, track, or control access for this resource.
-
#topic_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
Contains details about topics that the AI Guardrail should identify and deny.
-
#word_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
Contains details about the word policy to configured for the AI Guardrail.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(assistant_id:, blocked_input_messaging:, blocked_outputs_messaging:, content_policy_config: nil, contextual_grounding_policy_config: nil, description: nil, name: nil, sensitive_information_policy_config: nil, tags: nil, topic_policy_config: nil, word_policy_config: nil) ⇒ CfnAIGuardrailProps
constructor
A new instance of CfnAIGuardrailProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(assistant_id:, blocked_input_messaging:, blocked_outputs_messaging:, content_policy_config: nil, contextual_grounding_policy_config: nil, description: nil, name: nil, sensitive_information_policy_config: nil, tags: nil, topic_policy_config: nil, word_policy_config: nil) ⇒ CfnAIGuardrailProps
Returns a new instance of CfnAIGuardrailProps.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 20 def initialize(assistant_id:, blocked_input_messaging:, blocked_outputs_messaging:, content_policy_config: nil, contextual_grounding_policy_config: nil, description: nil, name: nil, sensitive_information_policy_config: nil, tags: nil, topic_policy_config: nil, word_policy_config: nil) @assistant_id = assistant_id Jsii::Type.check_type(@assistant_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assistantId") @blocked_input_messaging = blocked_input_messaging Jsii::Type.check_type(@blocked_input_messaging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "blockedInputMessaging") @blocked_outputs_messaging = blocked_outputs_messaging Jsii::Type.check_type(@blocked_outputs_messaging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "blockedOutputsMessaging") @content_policy_config = content_policy_config.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnAIGuardrail::AIGuardrailContentPolicyConfigProperty.new(**content_policy_config.transform_keys(&:to_sym)) : content_policy_config Jsii::Type.check_type(@content_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuQUlHdWFyZHJhaWwuQUlHdWFyZHJhaWxDb250ZW50UG9saWN5Q29uZmlnUHJvcGVydHkifV19fQ==")), "contentPolicyConfig") unless @content_policy_config.nil? @contextual_grounding_policy_config = contextual_grounding_policy_config.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnAIGuardrail::AIGuardrailContextualGroundingPolicyConfigProperty.new(**contextual_grounding_policy_config.transform_keys(&:to_sym)) : contextual_grounding_policy_config Jsii::Type.check_type(@contextual_grounding_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuQUlHdWFyZHJhaWwuQUlHdWFyZHJhaWxDb250ZXh0dWFsR3JvdW5kaW5nUG9saWN5Q29uZmlnUHJvcGVydHkifV19fQ==")), "contextualGroundingPolicyConfig") unless @contextual_grounding_policy_config.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @sensitive_information_policy_config = sensitive_information_policy_config.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnAIGuardrail::AIGuardrailSensitiveInformationPolicyConfigProperty.new(**sensitive_information_policy_config.transform_keys(&:to_sym)) : sensitive_information_policy_config Jsii::Type.check_type(@sensitive_information_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuQUlHdWFyZHJhaWwuQUlHdWFyZHJhaWxTZW5zaXRpdmVJbmZvcm1hdGlvblBvbGljeUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "sensitiveInformationPolicyConfig") unless @sensitive_information_policy_config.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? @topic_policy_config = topic_policy_config.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnAIGuardrail::AIGuardrailTopicPolicyConfigProperty.new(**topic_policy_config.transform_keys(&:to_sym)) : topic_policy_config Jsii::Type.check_type(@topic_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuQUlHdWFyZHJhaWwuQUlHdWFyZHJhaWxUb3BpY1BvbGljeUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "topicPolicyConfig") unless @topic_policy_config.nil? @word_policy_config = word_policy_config.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnAIGuardrail::AIGuardrailWordPolicyConfigProperty.new(**word_policy_config.transform_keys(&:to_sym)) : word_policy_config Jsii::Type.check_type(@word_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuQUlHdWFyZHJhaWwuQUlHdWFyZHJhaWxXb3JkUG9saWN5Q29uZmlnUHJvcGVydHkifV19fQ==")), "wordPolicyConfig") unless @word_policy_config.nil? end |
Instance Attribute Details
#assistant_id ⇒ String (readonly)
The identifier of the Amazon Q in Connect assistant.
Can be either the ID or the ARN. URLs cannot contain the ARN.
51 52 53 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 51 def assistant_id @assistant_id end |
#blocked_input_messaging ⇒ String (readonly)
The message to return when the AI Guardrail blocks a prompt.
56 57 58 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 56 def blocked_input_messaging @blocked_input_messaging end |
#blocked_outputs_messaging ⇒ String (readonly)
The message to return when the AI Guardrail blocks a model response.
61 62 63 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 61 def blocked_outputs_messaging @blocked_outputs_messaging end |
#content_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
Contains details about how to handle harmful content.
66 67 68 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 66 def content_policy_config @content_policy_config end |
#contextual_grounding_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
The policy configuration details for the AI Guardrail's contextual grounding policy.
71 72 73 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 71 def contextual_grounding_policy_config @contextual_grounding_policy_config end |
#description ⇒ String? (readonly)
A description of the AI Guardrail.
76 77 78 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 76 def description @description end |
#name ⇒ String? (readonly)
The name of the AI Guardrail.
81 82 83 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 81 def name @name end |
#sensitive_information_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
Contains details about PII entities and regular expressions to configure for the AI Guardrail.
86 87 88 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 86 def sensitive_information_policy_config @sensitive_information_policy_config end |
#tags ⇒ Hash{String => String}? (readonly)
The tags used to organize, track, or control access for this resource.
91 92 93 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 91 def @tags end |
#topic_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
Contains details about topics that the AI Guardrail should identify and deny.
96 97 98 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 96 def topic_policy_config @topic_policy_config end |
#word_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
Contains details about the word policy to configured for the AI Guardrail.
101 102 103 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 101 def word_policy_config @word_policy_config end |
Class Method Details
.jsii_properties ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 103 def self.jsii_properties { :assistant_id => "assistantId", :blocked_input_messaging => "blockedInputMessaging", :blocked_outputs_messaging => "blockedOutputsMessaging", :content_policy_config => "contentPolicyConfig", :contextual_grounding_policy_config => "contextualGroundingPolicyConfig", :description => "description", :name => "name", :sensitive_information_policy_config => "sensitiveInformationPolicyConfig", :tags => "tags", :topic_policy_config => "topicPolicyConfig", :word_policy_config => "wordPolicyConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'wisdom/cfn_ai_guardrail_props.rb', line 119 def to_jsii result = {} result.merge!({ "assistantId" => @assistant_id, "blockedInputMessaging" => @blocked_input_messaging, "blockedOutputsMessaging" => @blocked_outputs_messaging, "contentPolicyConfig" => @content_policy_config, "contextualGroundingPolicyConfig" => @contextual_grounding_policy_config, "description" => @description, "name" => @name, "sensitiveInformationPolicyConfig" => @sensitive_information_policy_config, "tags" => @tags, "topicPolicyConfig" => @topic_policy_config, "wordPolicyConfig" => @word_policy_config, }) result.compact end |