Class: AWSCDK::GlobalAcceleratorEndpoints::NetworkLoadBalancerEndpointProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
global_accelerator_endpoints/network_load_balancer_endpoint_props.rb

Overview

Properties for a NetworkLoadBalancerEndpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(preserve_client_ip: nil, weight: nil) ⇒ NetworkLoadBalancerEndpointProps

Returns a new instance of NetworkLoadBalancerEndpointProps.

Parameters:

  • preserve_client_ip (Boolean, nil) (defaults to: nil)

    Forward the client IP address in an X-Forwarded-For header.

  • weight (Numeric, nil) (defaults to: nil)

    Endpoint weight across all endpoints in the group.



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_ipBoolean? (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.

Returns:

  • (Boolean, nil)


26
27
28
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 26

def preserve_client_ip
  @preserve_client_ip
end

#weightNumeric? (readonly)

Note:

Default: 128

Endpoint weight across all endpoints in the group.

Must be a value between 0 and 255.

Returns:

  • (Numeric, nil)


33
34
35
# File 'global_accelerator_endpoints/network_load_balancer_endpoint_props.rb', line 33

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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