Class: AWSCDK::GlobalAccelerator::EndpointGroupOptions

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

Overview

Basic options for creating a new EndpointGroup.

Direct Known Subclasses

EndpointGroupProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_group_name: nil, endpoints: nil, health_check_interval: nil, health_check_path: nil, health_check_port: nil, health_check_protocol: nil, health_check_threshold: nil, port_overrides: nil, region: nil, traffic_dial_percentage: nil) ⇒ EndpointGroupOptions

Returns a new instance of EndpointGroupOptions.

Parameters:

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

    Name of the endpoint group.

  • endpoints (Array<AWSCDK::GlobalAccelerator::IEndpoint>, nil) (defaults to: nil)

    Initial list of endpoints for this group.

  • health_check_interval (AWSCDK::Duration, nil) (defaults to: nil)

    The time between health checks for each endpoint.

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

    The ping path for health checks (if the protocol is HTTP(S)).

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

    The port used to perform health checks.

  • health_check_protocol (AWSCDK::GlobalAccelerator::HealthCheckProtocol, nil) (defaults to: nil)

    The protocol used to perform health checks.

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

    The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy.

  • port_overrides (Array<AWSCDK::GlobalAccelerator::PortOverride>, nil) (defaults to: nil)

    Override the destination ports used to route traffic to an endpoint.

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

    The AWS Region where the endpoint group is located.

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

    The percentage of traffic to send to this AWS Region.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'global_accelerator/endpoint_group_options.rb', line 17

def initialize(endpoint_group_name: nil, endpoints: nil, health_check_interval: nil, health_check_path: nil, health_check_port: nil, health_check_protocol: nil, health_check_threshold: nil, port_overrides: nil, region: nil, traffic_dial_percentage: nil)
  @endpoint_group_name = endpoint_group_name
  Jsii::Type.check_type(@endpoint_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpointGroupName") unless @endpoint_group_name.nil?
  @endpoints = endpoints
  Jsii::Type.check_type(@endpoints, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbG9iYWxhY2NlbGVyYXRvci5JRW5kcG9pbnQifSwia2luZCI6ImFycmF5In19")), "endpoints") unless @endpoints.nil?
  @health_check_interval = health_check_interval
  Jsii::Type.check_type(@health_check_interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "healthCheckInterval") unless @health_check_interval.nil?
  @health_check_path = health_check_path
  Jsii::Type.check_type(@health_check_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthCheckPath") unless @health_check_path.nil?
  @health_check_port = health_check_port
  Jsii::Type.check_type(@health_check_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckPort") unless @health_check_port.nil?
  @health_check_protocol = health_check_protocol
  Jsii::Type.check_type(@health_check_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2xvYmFsYWNjZWxlcmF0b3IuSGVhbHRoQ2hlY2tQcm90b2NvbCJ9")), "healthCheckProtocol") unless @health_check_protocol.nil?
  @health_check_threshold = health_check_threshold
  Jsii::Type.check_type(@health_check_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckThreshold") unless @health_check_threshold.nil?
  @port_overrides = port_overrides.is_a?(Array) ? port_overrides.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::GlobalAccelerator::PortOverride.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : port_overrides
  Jsii::Type.check_type(@port_overrides, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbG9iYWxhY2NlbGVyYXRvci5Qb3J0T3ZlcnJpZGUifSwia2luZCI6ImFycmF5In19")), "portOverrides") unless @port_overrides.nil?
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
  @traffic_dial_percentage = traffic_dial_percentage
  Jsii::Type.check_type(@traffic_dial_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "trafficDialPercentage") unless @traffic_dial_percentage.nil?
end

Instance Attribute Details

#endpoint_group_nameString? (readonly)

Note:

Default: - logical ID of the resource

Name of the endpoint group.

Returns:

  • (String, nil)


44
45
46
# File 'global_accelerator/endpoint_group_options.rb', line 44

def endpoint_group_name
  @endpoint_group_name
end

#endpointsArray<AWSCDK::GlobalAccelerator::IEndpoint>? (readonly)

Note:

Default: - Group is initially empty

Initial list of endpoints for this group.

Returns:



49
50
51
# File 'global_accelerator/endpoint_group_options.rb', line 49

def endpoints
  @endpoints
end

#health_check_intervalAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(30)

The time between health checks for each endpoint.

Must be either 10 or 30 seconds.

Returns:



56
57
58
# File 'global_accelerator/endpoint_group_options.rb', line 56

def health_check_interval
  @health_check_interval
end

#health_check_pathString? (readonly)

Note:

Default: '/'

The ping path for health checks (if the protocol is HTTP(S)).

Returns:

  • (String, nil)


61
62
63
# File 'global_accelerator/endpoint_group_options.rb', line 61

def health_check_path
  @health_check_path
end

#health_check_portNumeric? (readonly)

Note:

Default: - The listener's port

The port used to perform health checks.

Returns:

  • (Numeric, nil)


66
67
68
# File 'global_accelerator/endpoint_group_options.rb', line 66

def health_check_port
  @health_check_port
end

#health_check_protocolAWSCDK::GlobalAccelerator::HealthCheckProtocol? (readonly)

Note:

Default: HealthCheckProtocol.TCP

The protocol used to perform health checks.



71
72
73
# File 'global_accelerator/endpoint_group_options.rb', line 71

def health_check_protocol
  @health_check_protocol
end

#health_check_thresholdNumeric? (readonly)

Note:

Default: 3

The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy.

Returns:

  • (Numeric, nil)


76
77
78
# File 'global_accelerator/endpoint_group_options.rb', line 76

def health_check_threshold
  @health_check_threshold
end

#port_overridesArray<AWSCDK::GlobalAccelerator::PortOverride>? (readonly)

Note:

Default: - No overrides

Override the destination ports used to route traffic to an endpoint.

Unless overridden, the port used to hit the endpoint will be the same as the port that traffic arrives on at the listener.



84
85
86
# File 'global_accelerator/endpoint_group_options.rb', line 84

def port_overrides
  @port_overrides
end

#regionString? (readonly)

Note:

Default: - region of the first endpoint in this group, or the stack region if that region can't be determined

The AWS Region where the endpoint group is located.

Returns:

  • (String, nil)


89
90
91
# File 'global_accelerator/endpoint_group_options.rb', line 89

def region
  @region
end

#traffic_dial_percentageNumeric? (readonly)

Note:

Default: 100

The percentage of traffic to send to this AWS Region.

The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing. Additional traffic is distributed to other endpoint groups for this listener.

Returns:

  • (Numeric, nil)


98
99
100
# File 'global_accelerator/endpoint_group_options.rb', line 98

def traffic_dial_percentage
  @traffic_dial_percentage
end

Class Method Details

.jsii_propertiesObject



100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'global_accelerator/endpoint_group_options.rb', line 100

def self.jsii_properties
  {
    :endpoint_group_name => "endpointGroupName",
    :endpoints => "endpoints",
    :health_check_interval => "healthCheckInterval",
    :health_check_path => "healthCheckPath",
    :health_check_port => "healthCheckPort",
    :health_check_protocol => "healthCheckProtocol",
    :health_check_threshold => "healthCheckThreshold",
    :port_overrides => "portOverrides",
    :region => "region",
    :traffic_dial_percentage => "trafficDialPercentage",
  }
end

Instance Method Details

#to_jsiiObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'global_accelerator/endpoint_group_options.rb', line 115

def to_jsii
  result = {}
  result.merge!({
    "endpointGroupName" => @endpoint_group_name,
    "endpoints" => @endpoints,
    "healthCheckInterval" => @health_check_interval,
    "healthCheckPath" => @health_check_path,
    "healthCheckPort" => @health_check_port,
    "healthCheckProtocol" => @health_check_protocol,
    "healthCheckThreshold" => @health_check_threshold,
    "portOverrides" => @port_overrides,
    "region" => @region,
    "trafficDialPercentage" => @traffic_dial_percentage,
  })
  result.compact
end