Class: AWSCDK::ValidationRuleSource

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
validation_rule_source.rb

Overview

A custom rule source for the validation engine.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, name:) ⇒ ValidationRuleSource

Returns a new instance of ValidationRuleSource.

Parameters:

  • content (String)

    The rule content (e.g., Rego policy source code).

  • name (String)

    The name of the rule source.



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

#contentString (readonly)

The rule content (e.g., Rego policy source code).

Returns:

  • (String)


19
20
21
# File 'validation_rule_source.rb', line 19

def content
  @content
end

#nameString (readonly)

The name of the rule source.

Returns:

  • (String)


23
24
25
# File 'validation_rule_source.rb', line 23

def name
  @name
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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