Class: AWSCDK::GlobalAccelerator::EndpointGroupProps
- Inherits:
-
EndpointGroupOptions
- Object
- EndpointGroupOptions
- AWSCDK::GlobalAccelerator::EndpointGroupProps
- Defined in:
- global_accelerator/endpoint_group_props.rb
Overview
Property of the EndpointGroup.
Instance Attribute Summary collapse
-
#endpoint_group_name ⇒ String?
readonly
Name of the endpoint group.
-
#endpoints ⇒ Array<AWSCDK::GlobalAccelerator::IEndpoint>?
readonly
Initial list of endpoints for this group.
-
#health_check_interval ⇒ AWSCDK::Duration?
readonly
The time between health checks for each endpoint.
-
#health_check_path ⇒ String?
readonly
The ping path for health checks (if the protocol is HTTP(S)).
-
#health_check_port ⇒ Numeric?
readonly
The port used to perform health checks.
-
#health_check_protocol ⇒ AWSCDK::GlobalAccelerator::HealthCheckProtocol?
readonly
The protocol used to perform health checks.
-
#health_check_threshold ⇒ Numeric?
readonly
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.
-
#listener ⇒ AWSCDK::Interfaces::AWSGlobalaccelerator::IListenerRef
readonly
The Amazon Resource Name (ARN) of the listener.
-
#port_overrides ⇒ Array<AWSCDK::GlobalAccelerator::PortOverride>?
readonly
Override the destination ports used to route traffic to an endpoint.
-
#region ⇒ String?
readonly
The AWS Region where the endpoint group is located.
-
#traffic_dial_percentage ⇒ Numeric?
readonly
The percentage of traffic to send to this AWS Region.
Class Method Summary collapse
Instance Method Summary collapse
-
#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
constructor
A new instance of EndpointGroupProps.
- #to_jsii ⇒ Object
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.
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_name ⇒ String? (readonly)
Default: - logical ID of the resource
Name of the endpoint group.
47 48 49 |
# File 'global_accelerator/endpoint_group_props.rb', line 47 def endpoint_group_name @endpoint_group_name end |
#endpoints ⇒ Array<AWSCDK::GlobalAccelerator::IEndpoint>? (readonly)
Default: - Group is initially empty
Initial list of endpoints for this group.
52 53 54 |
# File 'global_accelerator/endpoint_group_props.rb', line 52 def endpoints @endpoints end |
#health_check_interval ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(30)
The time between health checks for each endpoint.
Must be either 10 or 30 seconds.
59 60 61 |
# File 'global_accelerator/endpoint_group_props.rb', line 59 def health_check_interval @health_check_interval end |
#health_check_path ⇒ String? (readonly)
Default: '/'
The ping path for health checks (if the protocol is HTTP(S)).
64 65 66 |
# File 'global_accelerator/endpoint_group_props.rb', line 64 def health_check_path @health_check_path end |
#health_check_port ⇒ Numeric? (readonly)
Default: - The listener's port
The port used to perform health checks.
69 70 71 |
# File 'global_accelerator/endpoint_group_props.rb', line 69 def health_check_port @health_check_port end |
#health_check_protocol ⇒ AWSCDK::GlobalAccelerator::HealthCheckProtocol? (readonly)
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_threshold ⇒ Numeric? (readonly)
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.
79 80 81 |
# File 'global_accelerator/endpoint_group_props.rb', line 79 def health_check_threshold @health_check_threshold end |
#listener ⇒ AWSCDK::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_overrides ⇒ Array<AWSCDK::GlobalAccelerator::PortOverride>? (readonly)
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 |
#region ⇒ String? (readonly)
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.
92 93 94 |
# File 'global_accelerator/endpoint_group_props.rb', line 92 def region @region end |
#traffic_dial_percentage ⇒ Numeric? (readonly)
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.
101 102 103 |
# File 'global_accelerator/endpoint_group_props.rb', line 101 def traffic_dial_percentage @traffic_dial_percentage end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |