Class: AWSCDK::GlobalAccelerator::EndpointGroupOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GlobalAccelerator::EndpointGroupOptions
- Defined in:
- global_accelerator/endpoint_group_options.rb
Overview
Basic options for creating a new EndpointGroup.
Direct Known Subclasses
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.
-
#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) ⇒ EndpointGroupOptions
constructor
A new instance of EndpointGroupOptions.
- #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) ⇒ EndpointGroupOptions
Returns a new instance of EndpointGroupOptions.
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_name ⇒ String? (readonly)
Default: - logical ID of the resource
Name of the endpoint group.
44 45 46 |
# File 'global_accelerator/endpoint_group_options.rb', line 44 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.
49 50 51 |
# File 'global_accelerator/endpoint_group_options.rb', line 49 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.
56 57 58 |
# File 'global_accelerator/endpoint_group_options.rb', line 56 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)).
61 62 63 |
# File 'global_accelerator/endpoint_group_options.rb', line 61 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.
66 67 68 |
# File 'global_accelerator/endpoint_group_options.rb', line 66 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.
71 72 73 |
# File 'global_accelerator/endpoint_group_options.rb', line 71 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.
76 77 78 |
# File 'global_accelerator/endpoint_group_options.rb', line 76 def health_check_threshold @health_check_threshold 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.
84 85 86 |
# File 'global_accelerator/endpoint_group_options.rb', line 84 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.
89 90 91 |
# File 'global_accelerator/endpoint_group_options.rb', line 89 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.
98 99 100 |
# File 'global_accelerator/endpoint_group_options.rb', line 98 def traffic_dial_percentage @traffic_dial_percentage end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |