Class: AWSCDK::ValidationRuleSource
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ValidationRuleSource
- Defined in:
- validation_rule_source.rb
Overview
A custom rule source for the validation engine.
Instance Attribute Summary collapse
-
#content ⇒ String
readonly
The rule content (e.g., Rego policy source code).
-
#name ⇒ String
readonly
The name of the rule source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content:, name:) ⇒ ValidationRuleSource
constructor
A new instance of ValidationRuleSource.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content:, name:) ⇒ ValidationRuleSource
Returns a new instance of ValidationRuleSource.
9 10 11 12 13 14 |
# File 'validation_rule_source.rb', line 9 def initialize(content:, name:) @content = content Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "content") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") end |
Instance Attribute Details
#content ⇒ String (readonly)
The rule content (e.g., Rego policy source code).
19 20 21 |
# File 'validation_rule_source.rb', line 19 def content @content end |
#name ⇒ String (readonly)
The name of the rule source.
23 24 25 |
# File 'validation_rule_source.rb', line 23 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
25 26 27 28 29 30 |
# File 'validation_rule_source.rb', line 25 def self.jsii_properties { :content => "content", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'validation_rule_source.rb', line 32 def to_jsii result = {} result.merge!({ "content" => @content, "name" => @name, }) result.compact end |