Class: AWSCDK::Bedrock::CfnGuardrail::ManagedWordsConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnGuardrail::ManagedWordsConfigProperty
- Defined in:
- bedrock/cfn_guardrail.rb
Overview
The managed word list to configure for the guardrail.
Instance Attribute Summary collapse
-
#input_action ⇒ String?
readonly
Specifies the action to take when harmful content is detected in the input.
-
#input_enabled ⇒ Boolean, ...
readonly
Specifies whether to enable guardrail evaluation on the input.
-
#output_action ⇒ String?
readonly
Specifies the action to take when harmful content is detected in the output.
-
#output_enabled ⇒ Boolean, ...
readonly
Specifies whether to enable guardrail evaluation on the output.
-
#type ⇒ String
readonly
The managed word type to configure for the guardrail.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, input_action: nil, input_enabled: nil, output_action: nil, output_enabled: nil) ⇒ ManagedWordsConfigProperty
constructor
A new instance of ManagedWordsConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, input_action: nil, input_enabled: nil, output_action: nil, output_enabled: nil) ⇒ ManagedWordsConfigProperty
Returns a new instance of ManagedWordsConfigProperty.
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'bedrock/cfn_guardrail.rb', line 1162 def initialize(type:, input_action: nil, input_enabled: nil, output_action: nil, output_enabled: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @input_action = input_action Jsii::Type.check_type(@input_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputAction") unless @input_action.nil? @input_enabled = input_enabled Jsii::Type.check_type(@input_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "inputEnabled") unless @input_enabled.nil? @output_action = output_action Jsii::Type.check_type(@output_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputAction") unless @output_action.nil? @output_enabled = output_enabled Jsii::Type.check_type(@output_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "outputEnabled") unless @output_enabled.nil? end |
Instance Attribute Details
#input_action ⇒ String? (readonly)
Specifies the action to take when harmful content is detected in the input. Supported values include:.
BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
1187 1188 1189 |
# File 'bedrock/cfn_guardrail.rb', line 1187 def input_action @input_action end |
#input_enabled ⇒ Boolean, ... (readonly)
Specifies whether to enable guardrail evaluation on the input.
When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.
1194 1195 1196 |
# File 'bedrock/cfn_guardrail.rb', line 1194 def input_enabled @input_enabled end |
#output_action ⇒ String? (readonly)
Specifies the action to take when harmful content is detected in the output. Supported values include:.
BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
1202 1203 1204 |
# File 'bedrock/cfn_guardrail.rb', line 1202 def output_action @output_action end |
#output_enabled ⇒ Boolean, ... (readonly)
Specifies whether to enable guardrail evaluation on the output.
When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.
1209 1210 1211 |
# File 'bedrock/cfn_guardrail.rb', line 1209 def output_enabled @output_enabled end |
#type ⇒ String (readonly)
The managed word type to configure for the guardrail.
1179 1180 1181 |
# File 'bedrock/cfn_guardrail.rb', line 1179 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
1211 1212 1213 1214 1215 1216 1217 1218 1219 |
# File 'bedrock/cfn_guardrail.rb', line 1211 def self.jsii_properties { :type => "type", :input_action => "inputAction", :input_enabled => "inputEnabled", :output_action => "outputAction", :output_enabled => "outputEnabled", } end |
Instance Method Details
#to_jsii ⇒ Object
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 |
# File 'bedrock/cfn_guardrail.rb', line 1221 def to_jsii result = {} result.merge!({ "type" => @type, "inputAction" => @input_action, "inputEnabled" => @input_enabled, "outputAction" => @output_action, "outputEnabled" => @output_enabled, }) result.compact end |