Class: AWSCDK::VPCLattice::CfnRule::FixedResponseProperty

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

Overview

Describes an action that returns a custom HTTP response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code:) ⇒ FixedResponseProperty

Returns a new instance of FixedResponseProperty.

Parameters:

  • status_code (Numeric)

    The HTTP response code.



654
655
656
657
# File 'vpc_lattice/cfn_rule.rb', line 654

def initialize(status_code:)
  @status_code = status_code
  Jsii::Type.check_type(@status_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "statusCode")
end

Instance Attribute Details

#status_codeNumeric (readonly)

The HTTP response code.

Only 404 and 500 status codes are supported.



665
666
667
# File 'vpc_lattice/cfn_rule.rb', line 665

def status_code
  @status_code
end

Class Method Details

.jsii_propertiesObject



667
668
669
670
671
# File 'vpc_lattice/cfn_rule.rb', line 667

def self.jsii_properties
  {
    :status_code => "statusCode",
  }
end

Instance Method Details

#to_jsiiObject



673
674
675
676
677
678
679
# File 'vpc_lattice/cfn_rule.rb', line 673

def to_jsii
  result = {}
  result.merge!({
    "statusCode" => @status_code,
  })
  result.compact
end