Class: AWSCDK::ElasticLoadBalancingv2::CfnTargetGroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::CfnTargetGroupProps
- Defined in:
- elastic_load_balancingv2/cfn_target_group_props.rb
Overview
Properties for defining a CfnTargetGroup.
Instance Attribute Summary collapse
-
#health_check_enabled ⇒ Boolean, ...
readonly
Indicates whether health checks are enabled.
-
#health_check_interval_seconds ⇒ Numeric?
readonly
The approximate amount of time, in seconds, between health checks of an individual target.
-
#health_check_path ⇒ String?
readonly
[HTTP/HTTPS health checks] The destination for health checks on the targets.
-
#health_check_port ⇒ String?
readonly
The port the load balancer uses when performing health checks on targets.
-
#health_check_protocol ⇒ String?
readonly
The protocol the load balancer uses when performing health checks on targets.
-
#health_check_timeout_seconds ⇒ Numeric?
readonly
The amount of time, in seconds, during which no response from a target means a failed health check.
-
#healthy_threshold_count ⇒ Numeric?
readonly
The number of consecutive health check successes required before considering a target healthy.
-
#ip_address_type ⇒ String?
readonly
The IP address type.
-
#matcher ⇒ AWSCDK::IResolvable, ...
readonly
[HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
-
#name ⇒ String?
readonly
The name of the target group.
-
#port ⇒ Numeric?
readonly
The port on which the targets receive traffic.
-
#protocol ⇒ String?
readonly
The protocol to use for routing traffic to the targets.
-
#protocol_version ⇒ String?
readonly
[HTTP/HTTPS protocol] The protocol version.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags.
-
#target_control_port ⇒ Numeric?
readonly
The port on which the target control agent and application load balancer exchange management traffic for the target optimizer feature.
-
#target_group_attributes ⇒ AWSCDK::IResolvable, ...
readonly
The target group attributes.
-
#target_type ⇒ String?
readonly
The type of target that you must specify when registering targets with this target group.
-
#targets ⇒ AWSCDK::IResolvable, ...
readonly
The targets.
-
#unhealthy_threshold_count ⇒ Numeric?
readonly
The number of consecutive health check failures required before considering a target unhealthy.
-
#vpc_id ⇒ String, ...
readonly
The identifier of the virtual private cloud (VPC).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(health_check_enabled: nil, health_check_interval_seconds: nil, health_check_path: nil, health_check_port: nil, health_check_protocol: nil, health_check_timeout_seconds: nil, healthy_threshold_count: nil, ip_address_type: nil, matcher: nil, name: nil, port: nil, protocol: nil, protocol_version: nil, tags: nil, target_control_port: nil, target_group_attributes: nil, targets: nil, target_type: nil, unhealthy_threshold_count: nil, vpc_id: nil) ⇒ CfnTargetGroupProps
constructor
A new instance of CfnTargetGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(health_check_enabled: nil, health_check_interval_seconds: nil, health_check_path: nil, health_check_port: nil, health_check_protocol: nil, health_check_timeout_seconds: nil, healthy_threshold_count: nil, ip_address_type: nil, matcher: nil, name: nil, port: nil, protocol: nil, protocol_version: nil, tags: nil, target_control_port: nil, target_group_attributes: nil, targets: nil, target_type: nil, unhealthy_threshold_count: nil, vpc_id: nil) ⇒ CfnTargetGroupProps
Returns a new instance of CfnTargetGroupProps.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 29 def initialize(health_check_enabled: nil, health_check_interval_seconds: nil, health_check_path: nil, health_check_port: nil, health_check_protocol: nil, health_check_timeout_seconds: nil, healthy_threshold_count: nil, ip_address_type: nil, matcher: nil, name: nil, port: nil, protocol: nil, protocol_version: nil, tags: nil, target_control_port: nil, target_group_attributes: nil, targets: nil, target_type: nil, unhealthy_threshold_count: nil, vpc_id: nil) @health_check_enabled = health_check_enabled Jsii::Type.check_type(@health_check_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "healthCheckEnabled") unless @health_check_enabled.nil? @health_check_interval_seconds = health_check_interval_seconds Jsii::Type.check_type(@health_check_interval_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckIntervalSeconds") unless @health_check_interval_seconds.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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthCheckPort") unless @health_check_port.nil? @health_check_protocol = health_check_protocol Jsii::Type.check_type(@health_check_protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthCheckProtocol") unless @health_check_protocol.nil? @health_check_timeout_seconds = health_check_timeout_seconds Jsii::Type.check_type(@health_check_timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckTimeoutSeconds") unless @health_check_timeout_seconds.nil? @healthy_threshold_count = healthy_threshold_count Jsii::Type.check_type(@healthy_threshold_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthyThresholdCount") unless @healthy_threshold_count.nil? @ip_address_type = ip_address_type Jsii::Type.check_type(@ip_address_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipAddressType") unless @ip_address_type.nil? @matcher = matcher.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::CfnTargetGroup::MatcherProperty.new(**matcher.transform_keys(&:to_sym)) : matcher Jsii::Type.check_type(@matcher, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLkNmblRhcmdldEdyb3VwLk1hdGNoZXJQcm9wZXJ0eSJ9XX19")), "matcher") unless @matcher.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil? @protocol_version = protocol_version Jsii::Type.check_type(@protocol_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocolVersion") unless @protocol_version.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @target_control_port = target_control_port Jsii::Type.check_type(@target_control_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetControlPort") unless @target_control_port.nil? @target_group_attributes = target_group_attributes Jsii::Type.check_type(@target_group_attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5DZm5UYXJnZXRHcm91cC5UYXJnZXRHcm91cEF0dHJpYnV0ZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "targetGroupAttributes") unless @target_group_attributes.nil? @targets = targets Jsii::Type.check_type(@targets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5DZm5UYXJnZXRHcm91cC5UYXJnZXREZXNjcmlwdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "targets") unless @targets.nil? @target_type = target_type Jsii::Type.check_type(@target_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetType") unless @target_type.nil? @unhealthy_threshold_count = unhealthy_threshold_count Jsii::Type.check_type(@unhealthy_threshold_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unhealthyThresholdCount") unless @unhealthy_threshold_count.nil? @vpc_id = vpc_id Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQQ1JlZiJ9XX19")), "vpcId") unless @vpc_id.nil? end |
Instance Attribute Details
#health_check_enabled ⇒ Boolean, ... (readonly)
Indicates whether health checks are enabled.
If the target type is lambda , health checks are disabled by default but can be enabled. If the target type is instance , ip , or alb , health checks are always enabled and can't be disabled.
78 79 80 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 78 def health_check_enabled @health_check_enabled end |
#health_check_interval_seconds ⇒ Numeric? (readonly)
The approximate amount of time, in seconds, between health checks of an individual target.
The range is 5-300. If the target group protocol is TCP, TLS, UDP, TCP_UDP, QUIC, TCP_QUIC, HTTP or HTTPS, the default is 30 seconds. If the target group protocol is GENEVE, the default is 10 seconds. If the target type is lambda , the default is 35 seconds.
85 86 87 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 85 def health_check_interval_seconds @health_check_interval_seconds end |
#health_check_path ⇒ String? (readonly)
[HTTP/HTTPS health checks] The destination for health checks on the targets.
[HTTP1 or HTTP2 protocol version] The ping path. The default is /.
[GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is / AWS .ALB/healthcheck.
94 95 96 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 94 def health_check_path @health_check_path end |
#health_check_port ⇒ String? (readonly)
The port the load balancer uses when performing health checks on targets.
If the protocol is HTTP, HTTPS, TCP, TLS, UDP, TCP_UDP, QUIC, or TCP_QUIC the default is traffic-port , which is the port on which each target receives traffic from the load balancer. If the protocol is GENEVE, the default is port 80.
101 102 103 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 101 def health_check_port @health_check_port end |
#health_check_protocol ⇒ String? (readonly)
The protocol the load balancer uses when performing health checks on targets.
For Application Load Balancers, the default is HTTP. For Network Load Balancers and Gateway Load Balancers, the default is TCP. The TCP protocol is not supported for health checks if the protocol of the target group is HTTP or HTTPS. The GENEVE, TLS, UDP, TCP_UDP, QUIC, and TCP_QUIC protocols are not supported for health checks.
108 109 110 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 108 def health_check_protocol @health_check_protocol end |
#health_check_timeout_seconds ⇒ Numeric? (readonly)
The amount of time, in seconds, during which no response from a target means a failed health check.
The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda , the default is 30 seconds.
115 116 117 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 115 def health_check_timeout_seconds @health_check_timeout_seconds end |
#healthy_threshold_count ⇒ Numeric? (readonly)
The number of consecutive health check successes required before considering a target healthy.
The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP or HTTPS, the default is 5. For target groups with a protocol of GENEVE, the default is 5. If the target type is lambda , the default is 5.
122 123 124 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 122 def healthy_threshold_count @healthy_threshold_count end |
#ip_address_type ⇒ String? (readonly)
The IP address type.
The default value is ipv4 .
129 130 131 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 129 def ip_address_type @ip_address_type end |
#matcher ⇒ AWSCDK::IResolvable, ... (readonly)
[HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
For target groups with a protocol of TCP, TCP_UDP, UDP, QUIC, TCP_QUIC, or TLS the range is 200-599. For target groups with a protocol of HTTP or HTTPS, the range is 200-499. For target groups with a protocol of GENEVE, the range is 200-399.
136 137 138 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 136 def matcher @matcher end |
#name ⇒ String? (readonly)
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.
143 144 145 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 143 def name @name end |
#port ⇒ Numeric? (readonly)
The port on which the targets receive traffic.
This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
150 151 152 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 150 def port @port end |
#protocol ⇒ String? (readonly)
The protocol to use for routing traffic to the targets.
For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, TCP_UDP, QUIC, or TCP_QUIC. For Gateway Load Balancers, the supported protocol is GENEVE. A TCP_UDP listener must be associated with a TCP_UDP target group. A TCP_QUIC listener must be associated with a TCP_QUIC target group. If the target is a Lambda function, this parameter does not apply.
157 158 159 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 157 def protocol @protocol end |
#protocol_version ⇒ String? (readonly)
[HTTP/HTTPS protocol] The protocol version.
The possible values are GRPC , HTTP1 , and HTTP2 .
164 165 166 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 164 def protocol_version @protocol_version end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags.
169 170 171 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 169 def @tags end |
#target_control_port ⇒ Numeric? (readonly)
The port on which the target control agent and application load balancer exchange management traffic for the target optimizer feature.
174 175 176 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 174 def target_control_port @target_control_port end |
#target_group_attributes ⇒ AWSCDK::IResolvable, ... (readonly)
The target group attributes.
Attributes that you do not modify retain their current values.
181 182 183 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 181 def target_group_attributes @target_group_attributes end |
#target_type ⇒ String? (readonly)
The type of target that you must specify when registering targets with this target group.
You can't specify targets for a target group using more than one target type.
instance- Register targets by instance ID. This is the default value.ip- Register targets by IP address. You can specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.lambda- Register a single Lambda function as a target.alb- Register a single Application Load Balancer as a target.
198 199 200 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 198 def target_type @target_type end |
#targets ⇒ AWSCDK::IResolvable, ... (readonly)
The targets.
186 187 188 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 186 def targets @targets end |
#unhealthy_threshold_count ⇒ Numeric? (readonly)
The number of consecutive health check failures required before considering a target unhealthy.
The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, QUIC, TCP_QUIC, HTTP or HTTPS, the default is 2. For target groups with a protocol of GENEVE, the default is 2. If the target type is lambda , the default is 5.
205 206 207 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 205 def unhealthy_threshold_count @unhealthy_threshold_count end |
#vpc_id ⇒ String, ... (readonly)
The identifier of the virtual private cloud (VPC).
If the target is a Lambda function, this parameter does not apply. Otherwise, this parameter is required.
212 213 214 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 212 def vpc_id @vpc_id end |
Class Method Details
.jsii_properties ⇒ Object
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 214 def self.jsii_properties { :health_check_enabled => "healthCheckEnabled", :health_check_interval_seconds => "healthCheckIntervalSeconds", :health_check_path => "healthCheckPath", :health_check_port => "healthCheckPort", :health_check_protocol => "healthCheckProtocol", :health_check_timeout_seconds => "healthCheckTimeoutSeconds", :healthy_threshold_count => "healthyThresholdCount", :ip_address_type => "ipAddressType", :matcher => "matcher", :name => "name", :port => "port", :protocol => "protocol", :protocol_version => "protocolVersion", :tags => "tags", :target_control_port => "targetControlPort", :target_group_attributes => "targetGroupAttributes", :targets => "targets", :target_type => "targetType", :unhealthy_threshold_count => "unhealthyThresholdCount", :vpc_id => "vpcId", } end |
Instance Method Details
#to_jsii ⇒ Object
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'elastic_load_balancingv2/cfn_target_group_props.rb', line 239 def to_jsii result = {} result.merge!({ "healthCheckEnabled" => @health_check_enabled, "healthCheckIntervalSeconds" => @health_check_interval_seconds, "healthCheckPath" => @health_check_path, "healthCheckPort" => @health_check_port, "healthCheckProtocol" => @health_check_protocol, "healthCheckTimeoutSeconds" => @health_check_timeout_seconds, "healthyThresholdCount" => @healthy_threshold_count, "ipAddressType" => @ip_address_type, "matcher" => @matcher, "name" => @name, "port" => @port, "protocol" => @protocol, "protocolVersion" => @protocol_version, "tags" => @tags, "targetControlPort" => @target_control_port, "targetGroupAttributes" => @target_group_attributes, "targets" => @targets, "targetType" => @target_type, "unhealthyThresholdCount" => @unhealthy_threshold_count, "vpcId" => @vpc_id, }) result.compact end |