Class: AWSCDK::VPCLattice::CfnRule::ActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
vpc_lattice/cfn_rule.rb

Overview

Describes the action for a rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fixed_response: nil, forward: nil) ⇒ ActionProperty

Returns a new instance of ActionProperty.

Parameters:



608
609
610
611
612
613
# File 'vpc_lattice/cfn_rule.rb', line 608

def initialize(fixed_response: nil, forward: nil)
  @fixed_response = fixed_response.is_a?(Hash) ? ::AWSCDK::VPCLattice::CfnRule::FixedResponseProperty.new(**fixed_response.transform_keys(&:to_sym)) : fixed_response
  Jsii::Type.check_type(@fixed_response, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c192cGNsYXR0aWNlLkNmblJ1bGUuRml4ZWRSZXNwb25zZVByb3BlcnR5In1dfX0=")), "fixedResponse") unless @fixed_response.nil?
  @forward = forward.is_a?(Hash) ? ::AWSCDK::VPCLattice::CfnRule::ForwardProperty.new(**forward.transform_keys(&:to_sym)) : forward
  Jsii::Type.check_type(@forward, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c192cGNsYXR0aWNlLkNmblJ1bGUuRm9yd2FyZFByb3BlcnR5In1dfX0=")), "forward") unless @forward.nil?
end

Instance Attribute Details

#fixed_responseAWSCDK::IResolvable, ... (readonly)

The fixed response action.

The rule returns a custom HTTP response.



621
622
623
# File 'vpc_lattice/cfn_rule.rb', line 621

def fixed_response
  @fixed_response
end

#forwardAWSCDK::IResolvable, ... (readonly)

The forward action.

Traffic that matches the rule is forwarded to the specified target groups.



628
629
630
# File 'vpc_lattice/cfn_rule.rb', line 628

def forward
  @forward
end

Class Method Details

.jsii_propertiesObject



630
631
632
633
634
635
# File 'vpc_lattice/cfn_rule.rb', line 630

def self.jsii_properties
  {
    :fixed_response => "fixedResponse",
    :forward => "forward",
  }
end

Instance Method Details

#to_jsiiObject



637
638
639
640
641
642
643
644
# File 'vpc_lattice/cfn_rule.rb', line 637

def to_jsii
  result = {}
  result.merge!({
    "fixedResponse" => @fixed_response,
    "forward" => @forward,
  })
  result.compact
end