Class: AWSCDK::GlobalAcceleratorEndpoints::NetworkLoadBalancerEndpointProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GlobalAcceleratorEndpoints::NetworkLoadBalancerEndpointProps
- Defined in:
- global_accelerator_endpoints/network_load_balancer_endpoint_props.rb
Overview
Properties for a NetworkLoadBalancerEndpoint.
Instance Attribute Summary collapse
-
#preserve_client_ip ⇒ Boolean?
readonly
Forward the client IP address in an
X-Forwarded-Forheader. -
#weight ⇒ Numeric?
readonly
Endpoint weight across all endpoints in the group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(preserve_client_ip: nil, weight: nil) ⇒ NetworkLoadBalancerEndpointProps
constructor
A new instance of NetworkLoadBalancerEndpointProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(preserve_client_ip: nil, weight: nil) ⇒ NetworkLoadBalancerEndpointProps
Returns a new instance of NetworkLoadBalancerEndpointProps.
9 10 11 12 13 14 |
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 9 def initialize(preserve_client_ip: nil, weight: nil) @preserve_client_ip = preserve_client_ip Jsii::Type.check_type(@preserve_client_ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "preserveClientIp") unless @preserve_client_ip.nil? @weight = weight Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil? end |
Instance Attribute Details
#preserve_client_ip ⇒ Boolean? (readonly)
Note:
Default: false
Forward the client IP address in an X-Forwarded-For header.
GlobalAccelerator will create Network Interfaces in your VPC in order to preserve the client IP address.
Client IP address preservation is supported only in specific AWS Regions. See the GlobalAccelerator Developer Guide for a list.
26 27 28 |
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 26 def preserve_client_ip @preserve_client_ip end |
#weight ⇒ Numeric? (readonly)
Note:
Default: 128
Endpoint weight across all endpoints in the group.
Must be a value between 0 and 255.
33 34 35 |
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 33 def weight @weight end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 |
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 35 def self.jsii_properties { :preserve_client_ip => "preserveClientIp", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 42 def to_jsii result = {} result.merge!({ "preserveClientIp" => @preserve_client_ip, "weight" => @weight, }) result.compact end |