Class: AWSCDK::GlobalAccelerator::EndpointGroupProps

Inherits:
EndpointGroupOptions
  • Object
show all
Defined in:
global_accelerator/endpoint_group_props.rb

Overview

Property of the EndpointGroup.

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, listener:) ⇒ EndpointGroupProps

Returns a new instance of EndpointGroupProps.

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.

  • listener (AWSCDK::Interfaces::AWSGlobalaccelerator::IListenerRef)

    The Amazon Resource Name (ARN) of the listener.



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

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, listener:)
  @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?
  @listener = listener
  Jsii::Type.check_type(@listener, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19nbG9iYWxhY2NlbGVyYXRvci5JTGlzdGVuZXJSZWYifQ==")), "listener")
end

Instance Attribute Details

#endpoint_group_nameString? (readonly)

Note:

Default: - logical ID of the resource

Name of the endpoint group.

Returns:

  • (String, nil)


47
48
49
# File 'global_accelerator/endpoint_group_props.rb', line 47

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:



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

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:



59
60
61
# File 'global_accelerator/endpoint_group_props.rb', line 59

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)


64
65
66
# File 'global_accelerator/endpoint_group_props.rb', line 64

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)


69
70
71
# File 'global_accelerator/endpoint_group_props.rb', line 69

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.



74
75
76
# File 'global_accelerator/endpoint_group_props.rb', line 74

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)


79
80
81
# File 'global_accelerator/endpoint_group_props.rb', line 79

def health_check_threshold
  @health_check_threshold
end

#listenerAWSCDK::Interfaces::AWSGlobalaccelerator::IListenerRef (readonly)

The Amazon Resource Name (ARN) of the listener.



105
106
107
# File 'global_accelerator/endpoint_group_props.rb', line 105

def listener
  @listener
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.



87
88
89
# File 'global_accelerator/endpoint_group_props.rb', line 87

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)


92
93
94
# File 'global_accelerator/endpoint_group_props.rb', line 92

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)


101
102
103
# File 'global_accelerator/endpoint_group_props.rb', line 101

def traffic_dial_percentage
  @traffic_dial_percentage
end

Class Method Details

.jsii_propertiesObject



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'global_accelerator/endpoint_group_props.rb', line 107

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",
    :listener => "listener",
  }
end

Instance Method Details

#to_jsiiObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'global_accelerator/endpoint_group_props.rb', line 123

def to_jsii
  result = {}
  result.merge!(super)
  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,
    "listener" => @listener,
  })
  result.compact
end