Class: AWSCDK::ElasticLoadBalancingv2::AddApplicationTargetsProps
- Inherits:
-
AddRuleProps
- Object
- AddRuleProps
- AWSCDK::ElasticLoadBalancingv2::AddApplicationTargetsProps
- Defined in:
- elastic_load_balancingv2/add_application_targets_props.rb
Overview
Properties for adding new targets to a listener.
Instance Attribute Summary collapse
-
#conditions ⇒ Array<AWSCDK::ElasticLoadBalancingv2::ListenerCondition>?
readonly
Rule applies if matches the conditions.
-
#deregistration_delay ⇒ AWSCDK::Duration?
readonly
The amount of time for Elastic Load Balancing to wait before deregistering a target.
-
#enable_anomaly_mitigation ⇒ Boolean?
readonly
Indicates whether anomaly mitigation is enabled.
-
#health_check ⇒ AWSCDK::ElasticLoadBalancingv2::HealthCheck?
readonly
Health check configuration.
-
#load_balancing_algorithm_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetGroupLoadBalancingAlgorithmType?
readonly
The load balancing algorithm to select targets for routing requests.
-
#port ⇒ Numeric?
readonly
The port on which the listener listens for requests.
-
#priority ⇒ Numeric?
readonly
Priority of this target group.
-
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol?
readonly
The protocol to use.
-
#protocol_version ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocolVersion?
readonly
The protocol version to use.
-
#slow_start ⇒ AWSCDK::Duration?
readonly
The time period during which the load balancer sends a newly registered target a linearly increasing share of the traffic to the target group.
-
#stickiness_cookie_duration ⇒ AWSCDK::Duration?
readonly
The stickiness cookie expiration period.
-
#stickiness_cookie_name ⇒ String?
readonly
The name of an application-based stickiness cookie.
-
#target_group_name ⇒ String?
readonly
The name of the target group.
-
#targets ⇒ Array<AWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancerTarget>?
readonly
The targets to add to this target group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(conditions: nil, priority: nil, deregistration_delay: nil, enable_anomaly_mitigation: nil, health_check: nil, load_balancing_algorithm_type: nil, port: nil, protocol: nil, protocol_version: nil, slow_start: nil, stickiness_cookie_duration: nil, stickiness_cookie_name: nil, target_group_name: nil, targets: nil) ⇒ AddApplicationTargetsProps
constructor
A new instance of AddApplicationTargetsProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(conditions: nil, priority: nil, deregistration_delay: nil, enable_anomaly_mitigation: nil, health_check: nil, load_balancing_algorithm_type: nil, port: nil, protocol: nil, protocol_version: nil, slow_start: nil, stickiness_cookie_duration: nil, stickiness_cookie_name: nil, target_group_name: nil, targets: nil) ⇒ AddApplicationTargetsProps
Returns a new instance of AddApplicationTargetsProps.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 21 def initialize(conditions: nil, priority: nil, deregistration_delay: nil, enable_anomaly_mitigation: nil, health_check: nil, load_balancing_algorithm_type: nil, port: nil, protocol: nil, protocol_version: nil, slow_start: nil, stickiness_cookie_duration: nil, stickiness_cookie_name: nil, target_group_name: nil, targets: nil) @conditions = conditions Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLkxpc3RlbmVyQ29uZGl0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "conditions") unless @conditions.nil? @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil? @deregistration_delay = deregistration_delay Jsii::Type.check_type(@deregistration_delay, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "deregistrationDelay") unless @deregistration_delay.nil? @enable_anomaly_mitigation = enable_anomaly_mitigation Jsii::Type.check_type(@enable_anomaly_mitigation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableAnomalyMitigation") unless @enable_anomaly_mitigation.nil? @health_check = health_check.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::HealthCheck.new(**health_check.transform_keys(&:to_sym)) : health_check Jsii::Type.check_type(@health_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5IZWFsdGhDaGVjayJ9")), "healthCheck") unless @health_check.nil? @load_balancing_algorithm_type = load_balancing_algorithm_type Jsii::Type.check_type(@load_balancing_algorithm_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5UYXJnZXRHcm91cExvYWRCYWxhbmNpbmdBbGdvcml0aG1UeXBlIn0=")), "loadBalancingAlgorithmType") unless @load_balancing_algorithm_type.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sIn0=")), "protocol") unless @protocol.nil? @protocol_version = protocol_version Jsii::Type.check_type(@protocol_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sVmVyc2lvbiJ9")), "protocolVersion") unless @protocol_version.nil? @slow_start = slow_start Jsii::Type.check_type(@slow_start, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "slowStart") unless @slow_start.nil? @stickiness_cookie_duration = Jsii::Type.check_type(@stickiness_cookie_duration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "stickinessCookieDuration") unless @stickiness_cookie_duration.nil? @stickiness_cookie_name = Jsii::Type.check_type(@stickiness_cookie_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stickinessCookieName") unless @stickiness_cookie_name.nil? @target_group_name = target_group_name Jsii::Type.check_type(@target_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetGroupName") unless @target_group_name.nil? @targets = targets Jsii::Type.check_type(@targets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLklBcHBsaWNhdGlvbkxvYWRCYWxhbmNlclRhcmdldCJ9LCJraW5kIjoiYXJyYXkifX0=")), "targets") unless @targets.nil? end |
Instance Attribute Details
#conditions ⇒ Array<AWSCDK::ElasticLoadBalancingv2::ListenerCondition>? (readonly)
Default: - No conditions.
Rule applies if matches the conditions.
57 58 59 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 57 def conditions @conditions end |
#deregistration_delay ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(5)
The amount of time for Elastic Load Balancing to wait before deregistering a target.
The range is 0-3600 seconds.
75 76 77 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 75 def deregistration_delay @deregistration_delay end |
#enable_anomaly_mitigation ⇒ Boolean? (readonly)
Default: false
Indicates whether anomaly mitigation is enabled.
Only available when load_balancing_algorithm_type is TargetGroupLoadBalancingAlgorithmType.WEIGHTED_RANDOM
83 84 85 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 83 def enable_anomaly_mitigation @enable_anomaly_mitigation end |
#health_check ⇒ AWSCDK::ElasticLoadBalancingv2::HealthCheck? (readonly)
Default: - The default value for each property in this configuration varies depending on the target.
Health check configuration.
89 90 91 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 89 def health_check @health_check end |
#load_balancing_algorithm_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetGroupLoadBalancingAlgorithmType? (readonly)
Default: round_robin.
The load balancing algorithm to select targets for routing requests.
94 95 96 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 94 def load_balancing_algorithm_type @load_balancing_algorithm_type end |
#port ⇒ Numeric? (readonly)
Default: Determined from protocol if known
The port on which the listener listens for requests.
99 100 101 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 99 def port @port end |
#priority ⇒ Numeric? (readonly)
Default: Target groups are used as defaults
Priority of this target group.
The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.
Priorities must be unique.
68 69 70 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 68 def priority @priority end |
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)
Default: Determined from port if known
The protocol to use.
104 105 106 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 104 def protocol @protocol end |
#protocol_version ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocolVersion? (readonly)
Default: ApplicationProtocolVersion.HTTP1
The protocol version to use.
109 110 111 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 109 def protocol_version @protocol_version end |
#slow_start ⇒ AWSCDK::Duration? (readonly)
Default: 0
The time period during which the load balancer sends a newly registered target a linearly increasing share of the traffic to the target group.
The range is 30-900 seconds (15 minutes).
116 117 118 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 116 def slow_start @slow_start end |
#stickiness_cookie_duration ⇒ AWSCDK::Duration? (readonly)
Default: Stickiness disabled
The stickiness cookie expiration period.
Setting this value enables load balancer stickiness.
After this period, the cookie is considered stale. The minimum value is 1 second and the maximum value is 7 days (604800 seconds).
126 127 128 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 126 def @stickiness_cookie_duration end |
#stickiness_cookie_name ⇒ String? (readonly)
Default: - If stickinessCookieDuration is set, a load-balancer generated cookie is used. Otherwise, no stickiness is defined.
The name of an application-based stickiness cookie.
Names that start with the following prefixes are not allowed: AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load balancer.
Note: stickiness_cookie_name parameter depends on the presence of stickiness_cookie_duration parameter.
If stickiness_cookie_duration is not set, stickiness_cookie_name will be omitted.
138 139 140 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 138 def @stickiness_cookie_name end |
#target_group_name ⇒ String? (readonly)
Default: Automatically generated
The name of the target group.
This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
147 148 149 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 147 def target_group_name @target_group_name end |
#targets ⇒ Array<AWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancerTarget>? (readonly)
The targets to add to this target group.
Can be Instance, IPAddress, or any self-registering load balancing
target. All target must be of the same type.
154 155 156 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 154 def targets @targets end |
Class Method Details
.jsii_properties ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 156 def self.jsii_properties { :conditions => "conditions", :priority => "priority", :deregistration_delay => "deregistrationDelay", :enable_anomaly_mitigation => "enableAnomalyMitigation", :health_check => "healthCheck", :load_balancing_algorithm_type => "loadBalancingAlgorithmType", :port => "port", :protocol => "protocol", :protocol_version => "protocolVersion", :slow_start => "slowStart", :stickiness_cookie_duration => "stickinessCookieDuration", :stickiness_cookie_name => "stickinessCookieName", :target_group_name => "targetGroupName", :targets => "targets", } end |
Instance Method Details
#to_jsii ⇒ Object
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'elastic_load_balancingv2/add_application_targets_props.rb', line 175 def to_jsii result = {} result.merge!(super) result.merge!({ "conditions" => @conditions, "priority" => @priority, "deregistrationDelay" => @deregistration_delay, "enableAnomalyMitigation" => @enable_anomaly_mitigation, "healthCheck" => @health_check, "loadBalancingAlgorithmType" => @load_balancing_algorithm_type, "port" => @port, "protocol" => @protocol, "protocolVersion" => @protocol_version, "slowStart" => @slow_start, "stickinessCookieDuration" => @stickiness_cookie_duration, "stickinessCookieName" => @stickiness_cookie_name, "targetGroupName" => @target_group_name, "targets" => @targets, }) result.compact end |