Class: AWSCDK::ElasticLoadBalancingv2::FixedResponseOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::FixedResponseOptions
- Defined in:
- elastic_load_balancingv2/fixed_response_options.rb
Overview
Options for ListenerAction.fixedResponse().
Instance Attribute Summary collapse
-
#content_type ⇒ String?
readonly
Content Type of the response.
-
#message_body ⇒ String?
readonly
The response body.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_type: nil, message_body: nil) ⇒ FixedResponseOptions
constructor
A new instance of FixedResponseOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_type: nil, message_body: nil) ⇒ FixedResponseOptions
Returns a new instance of FixedResponseOptions.
9 10 11 12 13 14 |
# File 'elastic_load_balancingv2/fixed_response_options.rb', line 9 def initialize(content_type: nil, message_body: nil) @content_type = content_type Jsii::Type.check_type(@content_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentType") unless @content_type.nil? @message_body = Jsii::Type.check_type(@message_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "messageBody") unless @message_body.nil? end |
Instance Attribute Details
#content_type ⇒ String? (readonly)
Note:
Default: - Automatically determined
Content Type of the response.
Valid Values: text/plain | text/css | text/html | application/javascript | application/json
22 23 24 |
# File 'elastic_load_balancingv2/fixed_response_options.rb', line 22 def content_type @content_type end |
#message_body ⇒ String? (readonly)
Note:
Default: - No body
The response body.
27 28 29 |
# File 'elastic_load_balancingv2/fixed_response_options.rb', line 27 def @message_body end |
Class Method Details
.jsii_properties ⇒ Object
29 30 31 32 33 34 |
# File 'elastic_load_balancingv2/fixed_response_options.rb', line 29 def self.jsii_properties { :content_type => "contentType", :message_body => "messageBody", } end |
Instance Method Details
#to_jsii ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'elastic_load_balancingv2/fixed_response_options.rb', line 36 def to_jsii result = {} result.merge!({ "contentType" => @content_type, "messageBody" => @message_body, }) result.compact end |