Class: AWSCDK::VPCLattice::CfnListener::FixedResponseProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
vpc_lattice/cfn_listener.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.



656
657
658
659
# File 'vpc_lattice/cfn_listener.rb', line 656

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.



667
668
669
# File 'vpc_lattice/cfn_listener.rb', line 667

def status_code
  @status_code
end

Class Method Details

.jsii_propertiesObject



669
670
671
672
673
# File 'vpc_lattice/cfn_listener.rb', line 669

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

Instance Method Details

#to_jsiiObject



675
676
677
678
679
680
681
# File 'vpc_lattice/cfn_listener.rb', line 675

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