Class: AWSCDK::GlobalAccelerator::RawEndpointProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
global_accelerator/raw_endpoint_props.rb

Overview

Properties for RawEndpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_id:, preserve_client_ip: nil, region: nil, weight: nil) ⇒ RawEndpointProps

Returns a new instance of RawEndpointProps.

Parameters:

  • endpoint_id (String)

    Identifier of the endpoint.

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

    Forward the client IP address.

  • region (String, nil) (defaults to: nil)

    The region where this endpoint is located.

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

    Endpoint weight across all endpoints in the group.



11
12
13
14
15
16
17
18
19
20
# File 'global_accelerator/raw_endpoint_props.rb', line 11

def initialize(endpoint_id:, preserve_client_ip: nil, region: nil, weight: nil)
  @endpoint_id = endpoint_id
  Jsii::Type.check_type(@endpoint_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpointId")
  @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?
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
  @weight = weight
  Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil?
end

Instance Attribute Details

#endpoint_idString (readonly)

Identifier of the endpoint.

Load balancer ARN, instance ID or EIP allocation ID.

Returns:

  • (String)


27
28
29
# File 'global_accelerator/raw_endpoint_props.rb', line 27

def endpoint_id
  @endpoint_id
end

#preserve_client_ipBoolean? (readonly)

Note:

Default: true if possible and available

Forward the client IP address.

GlobalAccelerator will create Network Interfaces in your VPC in order to preserve the client IP address.

Only applies to Application Load Balancers and EC2 instances.

Client IP address preservation is supported only in specific AWS Regions. See the GlobalAccelerator Developer Guide for a list.

Returns:

  • (Boolean, nil)


40
41
42
# File 'global_accelerator/raw_endpoint_props.rb', line 40

def preserve_client_ip
  @preserve_client_ip
end

#regionString? (readonly)

Note:

Default: - Unknown what region this endpoint is located

The region where this endpoint is located.

Returns:

  • (String, nil)


45
46
47
# File 'global_accelerator/raw_endpoint_props.rb', line 45

def region
  @region
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)


52
53
54
# File 'global_accelerator/raw_endpoint_props.rb', line 52

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



54
55
56
57
58
59
60
61
# File 'global_accelerator/raw_endpoint_props.rb', line 54

def self.jsii_properties
  {
    :endpoint_id => "endpointId",
    :preserve_client_ip => "preserveClientIp",
    :region => "region",
    :weight => "weight",
  }
end

Instance Method Details

#to_jsiiObject



63
64
65
66
67
68
69
70
71
72
# File 'global_accelerator/raw_endpoint_props.rb', line 63

def to_jsii
  result = {}
  result.merge!({
    "endpointId" => @endpoint_id,
    "preserveClientIp" => @preserve_client_ip,
    "region" => @region,
    "weight" => @weight,
  })
  result.compact
end