Class: AWSCDK::ElasticLoadBalancingv2::ApplicationLoadBalancerProps
- Inherits:
-
BaseLoadBalancerProps
- Object
- BaseLoadBalancerProps
- AWSCDK::ElasticLoadBalancingv2::ApplicationLoadBalancerProps
- Defined in:
- elastic_load_balancingv2/application_load_balancer_props.rb
Overview
Properties for defining an Application Load Balancer.
Instance Attribute Summary collapse
-
#client_keep_alive ⇒ AWSCDK::Duration?
readonly
The client keep alive duration.
-
#cross_zone_enabled ⇒ Boolean?
readonly
Indicates whether cross-zone load balancing is enabled.
-
#deletion_protection ⇒ Boolean?
readonly
Indicates whether deletion protection is enabled.
-
#deny_all_igw_traffic ⇒ Boolean?
readonly
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
-
#desync_mitigation_mode ⇒ AWSCDK::ElasticLoadBalancingv2::DesyncMitigationMode?
readonly
Determines how the load balancer handles requests that might pose a security risk to your application.
-
#drop_invalid_header_fields ⇒ Boolean?
readonly
Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).
-
#http2_enabled ⇒ Boolean?
readonly
Indicates whether HTTP/2 is enabled.
-
#idle_timeout ⇒ AWSCDK::Duration?
readonly
The load balancer idle timeout, in seconds.
-
#internet_facing ⇒ Boolean?
readonly
Whether the load balancer has an internet-routable address.
-
#ip_address_type ⇒ AWSCDK::ElasticLoadBalancingv2::IPAddressType?
readonly
The type of IP addresses to use.
-
#load_balancer_name ⇒ String?
readonly
Name of the load balancer.
-
#minimum_capacity_unit ⇒ Numeric?
readonly
The minimum capacity (LCU) for a load balancer.
-
#preserve_host_header ⇒ Boolean?
readonly
Indicates whether the Application Load Balancer should preserve the host header in the HTTP request and send it to the target without any change.
-
#preserve_xff_client_port ⇒ Boolean?
readonly
Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.
-
#security_group ⇒ AWSCDK::EC2::ISecurityGroup?
readonly
Security group to associate with this load balancer.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC network to place the load balancer in.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Which subnets place the load balancer in.
-
#waf_fail_open ⇒ Boolean?
readonly
Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF.
-
#x_amzn_tls_version_and_cipher_suite_headers ⇒ Boolean?
readonly
Indicates whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target.
-
#xff_header_processing_mode ⇒ AWSCDK::ElasticLoadBalancingv2::XffHeaderProcessingMode?
readonly
Enables you to modify, preserve, or remove the X-Forwarded-For header in the HTTP request before the Application Load Balancer sends the request to the target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, cross_zone_enabled: nil, deletion_protection: nil, deny_all_igw_traffic: nil, internet_facing: nil, load_balancer_name: nil, minimum_capacity_unit: nil, vpc_subnets: nil, client_keep_alive: nil, desync_mitigation_mode: nil, drop_invalid_header_fields: nil, http2_enabled: nil, idle_timeout: nil, ip_address_type: nil, preserve_host_header: nil, preserve_xff_client_port: nil, security_group: nil, waf_fail_open: nil, x_amzn_tls_version_and_cipher_suite_headers: nil, xff_header_processing_mode: nil) ⇒ ApplicationLoadBalancerProps
constructor
A new instance of ApplicationLoadBalancerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, cross_zone_enabled: nil, deletion_protection: nil, deny_all_igw_traffic: nil, internet_facing: nil, load_balancer_name: nil, minimum_capacity_unit: nil, vpc_subnets: nil, client_keep_alive: nil, desync_mitigation_mode: nil, drop_invalid_header_fields: nil, http2_enabled: nil, idle_timeout: nil, ip_address_type: nil, preserve_host_header: nil, preserve_xff_client_port: nil, security_group: nil, waf_fail_open: nil, x_amzn_tls_version_and_cipher_suite_headers: nil, xff_header_processing_mode: nil) ⇒ ApplicationLoadBalancerProps
Returns a new instance of ApplicationLoadBalancerProps.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 29 def initialize(vpc:, cross_zone_enabled: nil, deletion_protection: nil, deny_all_igw_traffic: nil, internet_facing: nil, load_balancer_name: nil, minimum_capacity_unit: nil, vpc_subnets: nil, client_keep_alive: nil, desync_mitigation_mode: nil, drop_invalid_header_fields: nil, http2_enabled: nil, idle_timeout: nil, ip_address_type: nil, preserve_host_header: nil, preserve_xff_client_port: nil, security_group: nil, waf_fail_open: nil, x_amzn_tls_version_and_cipher_suite_headers: nil, xff_header_processing_mode: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @cross_zone_enabled = cross_zone_enabled Jsii::Type.check_type(@cross_zone_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "crossZoneEnabled") unless @cross_zone_enabled.nil? @deletion_protection = deletion_protection Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deletionProtection") unless @deletion_protection.nil? @deny_all_igw_traffic = deny_all_igw_traffic Jsii::Type.check_type(@deny_all_igw_traffic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "denyAllIgwTraffic") unless @deny_all_igw_traffic.nil? @internet_facing = internet_facing Jsii::Type.check_type(@internet_facing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "internetFacing") unless @internet_facing.nil? @load_balancer_name = load_balancer_name Jsii::Type.check_type(@load_balancer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "loadBalancerName") unless @load_balancer_name.nil? @minimum_capacity_unit = minimum_capacity_unit Jsii::Type.check_type(@minimum_capacity_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minimumCapacityUnit") unless @minimum_capacity_unit.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? @client_keep_alive = client_keep_alive Jsii::Type.check_type(@client_keep_alive, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "clientKeepAlive") unless @client_keep_alive.nil? @desync_mitigation_mode = desync_mitigation_mode Jsii::Type.check_type(@desync_mitigation_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5EZXN5bmNNaXRpZ2F0aW9uTW9kZSJ9")), "desyncMitigationMode") unless @desync_mitigation_mode.nil? @drop_invalid_header_fields = drop_invalid_header_fields Jsii::Type.check_type(@drop_invalid_header_fields, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "dropInvalidHeaderFields") unless @drop_invalid_header_fields.nil? @http2_enabled = http2_enabled Jsii::Type.check_type(@http2_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "http2Enabled") unless @http2_enabled.nil? @idle_timeout = idle_timeout Jsii::Type.check_type(@idle_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "idleTimeout") unless @idle_timeout.nil? @ip_address_type = ip_address_type Jsii::Type.check_type(@ip_address_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JcEFkZHJlc3NUeXBlIn0=")), "ipAddressType") unless @ip_address_type.nil? @preserve_host_header = preserve_host_header Jsii::Type.check_type(@preserve_host_header, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "preserveHostHeader") unless @preserve_host_header.nil? @preserve_xff_client_port = preserve_xff_client_port Jsii::Type.check_type(@preserve_xff_client_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "preserveXffClientPort") unless @preserve_xff_client_port.nil? @security_group = security_group Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil? @waf_fail_open = waf_fail_open Jsii::Type.check_type(@waf_fail_open, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "wafFailOpen") unless @waf_fail_open.nil? @x_amzn_tls_version_and_cipher_suite_headers = x_amzn_tls_version_and_cipher_suite_headers Jsii::Type.check_type(@x_amzn_tls_version_and_cipher_suite_headers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "xAmznTlsVersionAndCipherSuiteHeaders") unless @x_amzn_tls_version_and_cipher_suite_headers.nil? @xff_header_processing_mode = xff_header_processing_mode Jsii::Type.check_type(@xff_header_processing_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5YZmZIZWFkZXJQcm9jZXNzaW5nTW9kZSJ9")), "xffHeaderProcessingMode") unless @xff_header_processing_mode.nil? end |
Instance Attribute Details
#client_keep_alive ⇒ AWSCDK::Duration? (readonly)
Default: - Duration.seconds(3600)
The client keep alive duration.
The valid range is 60 to 604800 seconds (1 minute to 7 days).
119 120 121 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 119 def client_keep_alive @client_keep_alive end |
#cross_zone_enabled ⇒ Boolean? (readonly)
Default: - false for Network Load Balancers and true for Application Load Balancers. This can not be false for Application Load Balancers.
Indicates whether cross-zone load balancing is enabled.
81 82 83 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 81 def cross_zone_enabled @cross_zone_enabled end |
#deletion_protection ⇒ Boolean? (readonly)
Default: false
Indicates whether deletion protection is enabled.
86 87 88 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 86 def deletion_protection @deletion_protection end |
#deny_all_igw_traffic ⇒ Boolean? (readonly)
Default: - false for internet-facing load balancers and true for internal load balancers
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
91 92 93 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 91 def deny_all_igw_traffic @deny_all_igw_traffic end |
#desync_mitigation_mode ⇒ AWSCDK::ElasticLoadBalancingv2::DesyncMitigationMode? (readonly)
Default: DesyncMitigationMode.DEFENSIVE
Determines how the load balancer handles requests that might pose a security risk to your application.
124 125 126 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 124 def desync_mitigation_mode @desync_mitigation_mode end |
#drop_invalid_header_fields ⇒ Boolean? (readonly)
Default: false
Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).
129 130 131 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 129 def drop_invalid_header_fields @drop_invalid_header_fields end |
#http2_enabled ⇒ Boolean? (readonly)
Default: true
Indicates whether HTTP/2 is enabled.
134 135 136 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 134 def http2_enabled @http2_enabled end |
#idle_timeout ⇒ AWSCDK::Duration? (readonly)
Default: 60
The load balancer idle timeout, in seconds.
139 140 141 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 139 def idle_timeout @idle_timeout end |
#internet_facing ⇒ Boolean? (readonly)
Default: false
Whether the load balancer has an internet-routable address.
96 97 98 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 96 def internet_facing @internet_facing end |
#ip_address_type ⇒ AWSCDK::ElasticLoadBalancingv2::IPAddressType? (readonly)
Default: IpAddressType.IPV4
The type of IP addresses to use.
144 145 146 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 144 def ip_address_type @ip_address_type end |
#load_balancer_name ⇒ String? (readonly)
Default: - Automatically generated name.
Name of the load balancer.
101 102 103 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 101 def load_balancer_name @load_balancer_name end |
#minimum_capacity_unit ⇒ Numeric? (readonly)
Default: undefined - ELB default is 0 LCU
The minimum capacity (LCU) for a load balancer.
107 108 109 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 107 def minimum_capacity_unit @minimum_capacity_unit end |
#preserve_host_header ⇒ Boolean? (readonly)
Default: false
Indicates whether the Application Load Balancer should preserve the host header in the HTTP request and send it to the target without any change.
149 150 151 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 149 def preserve_host_header @preserve_host_header end |
#preserve_xff_client_port ⇒ Boolean? (readonly)
Default: false
Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.
154 155 156 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 154 def preserve_xff_client_port @preserve_xff_client_port end |
#security_group ⇒ AWSCDK::EC2::ISecurityGroup? (readonly)
Default: A security group is created
Security group to associate with this load balancer.
159 160 161 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 159 def security_group @security_group end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC network to place the load balancer in.
75 76 77 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 75 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the Vpc default strategy.
Which subnets place the load balancer in.
112 113 114 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 112 def vpc_subnets @vpc_subnets end |
#waf_fail_open ⇒ Boolean? (readonly)
Default: false
Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF.
164 165 166 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 164 def waf_fail_open @waf_fail_open end |
#x_amzn_tls_version_and_cipher_suite_headers ⇒ Boolean? (readonly)
Default: false
Indicates whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target.
The x-amzn-tls-version header has information about the TLS protocol version negotiated with the client, and the x-amzn-tls-cipher-suite header has information about the cipher suite negotiated with the client.
Both headers are in OpenSSL format.
174 175 176 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 174 def x_amzn_tls_version_and_cipher_suite_headers @x_amzn_tls_version_and_cipher_suite_headers end |
#xff_header_processing_mode ⇒ AWSCDK::ElasticLoadBalancingv2::XffHeaderProcessingMode? (readonly)
Default: XffHeaderProcessingMode.APPEND
Enables you to modify, preserve, or remove the X-Forwarded-For header in the HTTP request before the Application Load Balancer sends the request to the target.
179 180 181 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 179 def xff_header_processing_mode @xff_header_processing_mode end |
Class Method Details
.jsii_properties ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 181 def self.jsii_properties { :vpc => "vpc", :cross_zone_enabled => "crossZoneEnabled", :deletion_protection => "deletionProtection", :deny_all_igw_traffic => "denyAllIgwTraffic", :internet_facing => "internetFacing", :load_balancer_name => "loadBalancerName", :minimum_capacity_unit => "minimumCapacityUnit", :vpc_subnets => "vpcSubnets", :client_keep_alive => "clientKeepAlive", :desync_mitigation_mode => "desyncMitigationMode", :drop_invalid_header_fields => "dropInvalidHeaderFields", :http2_enabled => "http2Enabled", :idle_timeout => "idleTimeout", :ip_address_type => "ipAddressType", :preserve_host_header => "preserveHostHeader", :preserve_xff_client_port => "preserveXffClientPort", :security_group => "securityGroup", :waf_fail_open => "wafFailOpen", :x_amzn_tls_version_and_cipher_suite_headers => "xAmznTlsVersionAndCipherSuiteHeaders", :xff_header_processing_mode => "xffHeaderProcessingMode", } end |
Instance Method Details
#to_jsii ⇒ Object
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'elastic_load_balancingv2/application_load_balancer_props.rb', line 206 def to_jsii result = {} result.merge!(super) result.merge!({ "vpc" => @vpc, "crossZoneEnabled" => @cross_zone_enabled, "deletionProtection" => @deletion_protection, "denyAllIgwTraffic" => @deny_all_igw_traffic, "internetFacing" => @internet_facing, "loadBalancerName" => @load_balancer_name, "minimumCapacityUnit" => @minimum_capacity_unit, "vpcSubnets" => @vpc_subnets, "clientKeepAlive" => @client_keep_alive, "desyncMitigationMode" => @desync_mitigation_mode, "dropInvalidHeaderFields" => @drop_invalid_header_fields, "http2Enabled" => @http2_enabled, "idleTimeout" => @idle_timeout, "ipAddressType" => @ip_address_type, "preserveHostHeader" => @preserve_host_header, "preserveXffClientPort" => @preserve_xff_client_port, "securityGroup" => @security_group, "wafFailOpen" => @waf_fail_open, "xAmznTlsVersionAndCipherSuiteHeaders" => @x_amzn_tls_version_and_cipher_suite_headers, "xffHeaderProcessingMode" => @xff_header_processing_mode, }) result.compact end |