Class: AWSCDK::ElasticLoadBalancingv2::ApplicationLoadBalancerRedirectConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::ApplicationLoadBalancerRedirectConfig
- Defined in:
- elastic_load_balancingv2/application_load_balancer_redirect_config.rb
Overview
Properties for a redirection config.
Instance Attribute Summary collapse
-
#open ⇒ Boolean?
readonly
Allow anyone to connect to this listener.
-
#source_port ⇒ Numeric?
readonly
The port number to listen to.
-
#source_protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol?
readonly
The protocol of the listener being created.
-
#target_port ⇒ Numeric?
readonly
The port number to redirect to.
-
#target_protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol?
readonly
The protocol of the redirection target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(open: nil, source_port: nil, source_protocol: nil, target_port: nil, target_protocol: nil) ⇒ ApplicationLoadBalancerRedirectConfig
constructor
A new instance of ApplicationLoadBalancerRedirectConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(open: nil, source_port: nil, source_protocol: nil, target_port: nil, target_protocol: nil) ⇒ ApplicationLoadBalancerRedirectConfig
Returns a new instance of ApplicationLoadBalancerRedirectConfig.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 12 def initialize(open: nil, source_port: nil, source_protocol: nil, target_port: nil, target_protocol: nil) @open = open Jsii::Type.check_type(@open, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "open") unless @open.nil? @source_port = source_port Jsii::Type.check_type(@source_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sourcePort") unless @source_port.nil? @source_protocol = source_protocol Jsii::Type.check_type(@source_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sIn0=")), "sourceProtocol") unless @source_protocol.nil? @target_port = target_port Jsii::Type.check_type(@target_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetPort") unless @target_port.nil? @target_protocol = target_protocol Jsii::Type.check_type(@target_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sIn0=")), "targetProtocol") unless @target_protocol.nil? end |
Instance Attribute Details
#open ⇒ Boolean? (readonly)
Default: true
Allow anyone to connect to this listener.
If this is specified, the listener will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet.
If you want to be more selective about who can access this load
balancer, set this to false and use the listener's connections
object to selectively grant access to the listener.
37 38 39 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 37 def open @open end |
#source_port ⇒ Numeric? (readonly)
Default: 80
The port number to listen to.
42 43 44 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 42 def source_port @source_port end |
#source_protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)
Default: HTTP
The protocol of the listener being created.
47 48 49 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 47 def source_protocol @source_protocol end |
#target_port ⇒ Numeric? (readonly)
Default: 443
The port number to redirect to.
52 53 54 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 52 def target_port @target_port end |
#target_protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)
Default: HTTPS
The protocol of the redirection target.
57 58 59 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 57 def target_protocol @target_protocol end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 59 def self.jsii_properties { :open => "open", :source_port => "sourcePort", :source_protocol => "sourceProtocol", :target_port => "targetPort", :target_protocol => "targetProtocol", } end |
Instance Method Details
#to_jsii ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 |
# File 'elastic_load_balancingv2/application_load_balancer_redirect_config.rb', line 69 def to_jsii result = {} result.merge!({ "open" => @open, "sourcePort" => @source_port, "sourceProtocol" => @source_protocol, "targetPort" => @target_port, "targetProtocol" => @target_protocol, }) result.compact end |