Class: AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::FixedResponseConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::FixedResponseConfigProperty
- Defined in:
- elastic_load_balancingv2/cfn_listener_rule.rb
Overview
Specifies information required when returning a custom HTTP response.
Instance Attribute Summary collapse
-
#content_type ⇒ String?
readonly
The content type.
-
#message_body ⇒ String?
readonly
The message.
-
#status_code ⇒ String
readonly
The HTTP response code (2XX, 4XX, or 5XX).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status_code:, content_type: nil, message_body: nil) ⇒ FixedResponseConfigProperty
constructor
A new instance of FixedResponseConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(status_code:, content_type: nil, message_body: nil) ⇒ FixedResponseConfigProperty
Returns a new instance of FixedResponseConfigProperty.
971 972 973 974 975 976 977 978 |
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 971 def initialize(status_code:, content_type: nil, message_body: nil) @status_code = status_code Jsii::Type.check_type(@status_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statusCode") @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)
The content type.
Valid Values: text/plain | text/css | text/html | application/javascript | application/json
991 992 993 |
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 991 def content_type @content_type end |
#message_body ⇒ String? (readonly)
The message.
996 997 998 |
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 996 def @message_body end |
#status_code ⇒ String (readonly)
The HTTP response code (2XX, 4XX, or 5XX).
984 985 986 |
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 984 def status_code @status_code end |
Class Method Details
.jsii_properties ⇒ Object
998 999 1000 1001 1002 1003 1004 |
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 998 def self.jsii_properties { :status_code => "statusCode", :content_type => "contentType", :message_body => "messageBody", } end |
Instance Method Details
#to_jsii ⇒ Object
1006 1007 1008 1009 1010 1011 1012 1013 1014 |
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1006 def to_jsii result = {} result.merge!({ "statusCode" => @status_code, "contentType" => @content_type, "messageBody" => @message_body, }) result.compact end |