Class: AWSCDK::Bedrock::CfnAutomatedReasoningPolicy::PolicyDefinitionRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_automated_reasoning_policy.rb

Overview

A rule within the policy definition that defines logical constraints.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression:, id:, alternate_expression: nil) ⇒ PolicyDefinitionRuleProperty

Returns a new instance of PolicyDefinitionRuleProperty.

Parameters:

  • expression (String)

    The logical expression that defines the rule.

  • id (String)

    The unique identifier for the policy definition rule.

  • alternate_expression (String, nil) (defaults to: nil)

    An alternative expression for the policy rule.



695
696
697
698
699
700
701
702
# File 'bedrock/cfn_automated_reasoning_policy.rb', line 695

def initialize(expression:, id:, alternate_expression: nil)
  @expression = expression
  Jsii::Type.check_type(@expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression")
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @alternate_expression = alternate_expression
  Jsii::Type.check_type(@alternate_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alternateExpression") unless @alternate_expression.nil?
end

Instance Attribute Details

#alternate_expressionString? (readonly)

An alternative expression for the policy rule.



718
719
720
# File 'bedrock/cfn_automated_reasoning_policy.rb', line 718

def alternate_expression
  @alternate_expression
end

#expressionString (readonly)

The logical expression that defines the rule.



708
709
710
# File 'bedrock/cfn_automated_reasoning_policy.rb', line 708

def expression
  @expression
end

#idString (readonly)

The unique identifier for the policy definition rule.



713
714
715
# File 'bedrock/cfn_automated_reasoning_policy.rb', line 713

def id
  @id
end

Class Method Details

.jsii_propertiesObject



720
721
722
723
724
725
726
# File 'bedrock/cfn_automated_reasoning_policy.rb', line 720

def self.jsii_properties
  {
    :expression => "expression",
    :id => "id",
    :alternate_expression => "alternateExpression",
  }
end

Instance Method Details

#to_jsiiObject



728
729
730
731
732
733
734
735
736
# File 'bedrock/cfn_automated_reasoning_policy.rb', line 728

def to_jsii
  result = {}
  result.merge!({
    "expression" => @expression,
    "id" => @id,
    "alternateExpression" => @alternate_expression,
  })
  result.compact
end