Class: AWSCDK::Bedrock::CfnEnforcedGuardrailConfiguration::ModelEnforcementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnEnforcedGuardrailConfiguration::ModelEnforcementProperty
- Defined in:
- bedrock/cfn_enforced_guardrail_configuration.rb
Overview
Model-specific information for the enforced guardrail configuration.
If not present, the configuration is enforced on all models
Instance Attribute Summary collapse
-
#excluded_models ⇒ Array<String>
readonly
Models to exclude from enforcement.
-
#included_models ⇒ Array<String>
readonly
Models to enforce the guardrail on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(excluded_models:, included_models:) ⇒ ModelEnforcementProperty
constructor
A new instance of ModelEnforcementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(excluded_models:, included_models:) ⇒ ModelEnforcementProperty
Returns a new instance of ModelEnforcementProperty.
600 601 602 603 604 605 |
# File 'bedrock/cfn_enforced_guardrail_configuration.rb', line 600 def initialize(excluded_models:, included_models:) @excluded_models = excluded_models Jsii::Type.check_type(@excluded_models, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludedModels") @included_models = included_models Jsii::Type.check_type(@included_models, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includedModels") end |
Instance Attribute Details
#excluded_models ⇒ Array<String> (readonly)
Models to exclude from enforcement.
If a model is in both lists, it is excluded
613 614 615 |
# File 'bedrock/cfn_enforced_guardrail_configuration.rb', line 613 def excluded_models @excluded_models end |
#included_models ⇒ Array<String> (readonly)
Models to enforce the guardrail on.
618 619 620 |
# File 'bedrock/cfn_enforced_guardrail_configuration.rb', line 618 def included_models @included_models end |
Class Method Details
.jsii_properties ⇒ Object
620 621 622 623 624 625 |
# File 'bedrock/cfn_enforced_guardrail_configuration.rb', line 620 def self.jsii_properties { :excluded_models => "excludedModels", :included_models => "includedModels", } end |
Instance Method Details
#to_jsii ⇒ Object
627 628 629 630 631 632 633 634 |
# File 'bedrock/cfn_enforced_guardrail_configuration.rb', line 627 def to_jsii result = {} result.merge!({ "excludedModels" => @excluded_models, "includedModels" => @included_models, }) result.compact end |