- class aws_cdk.aws_elasticloadbalancingv2.TargetGroupBase(scope, id, base_props, additional_props)
Define the target of a load balancer.
- configure_health_check(*, enabled=None, healthy_grpc_codes=None, healthy_http_codes=None, healthy_threshold_count=None, interval=None, path=None, port=None, protocol=None, timeout=None, unhealthy_threshold_count=None)
Set/replace the target group’s health check.
bool]) – 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 or ip, health checks are always enabled and cannot be disabled. Default: - Determined automatically.
str]) – GRPC code to use when checking for a successful response from a target. You can specify values between 0 and 99. You can specify multiple values (for example, “0,1”) or a range of values (for example, “0-5”). Default: - 12
str]) – HTTP code to use when checking for a successful response from a target. For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values (for example, “200,202”) or a range of values (for example, “200-299”).
None]) – The number of consecutive health checks successes required before considering an unhealthy target healthy. For Application Load Balancers, the default is 5. For Network Load Balancers, the default is 3. Default: 5 for ALBs, 3 for NLBs
Duration]) – The approximate number of seconds between health checks for an individual target. Must be 5 to 300 seconds Default: 10 seconds if protocol is
GENEVE, 35 seconds if target type is
lambda, else 30 seconds
str]) – The ping path destination where Elastic Load Balancing sends health check requests. Default: /
str]) – The port that the load balancer uses when performing health checks on the targets. Default: ‘traffic-port’
Protocol]) – The protocol the load balancer uses when performing health checks on targets. The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The TLS, UDP, and TCP_UDP protocols are not supported for health checks. Default: HTTP for ALBs, TCP for NLBs
Duration]) – The amount of time, in seconds, during which no response from a target means a failed health check. Must be 2 to 120 seconds. Default: 6 seconds if the protocol is HTTP, 5 seconds if protocol is
GENEVE, 30 seconds if target type is
lambda, 10 seconds for TCP, TLS, or HTTPS
None]) – The number of consecutive health check failures required before considering a target unhealthy. For Application Load Balancers, the default is 2. For Network Load Balancers, this value must be the same as the healthy threshold count. Default: 2
- Return type:
- set_attribute(key, value=None)
Set a non-standard attribute on the target group.
- Return type:
Returns a string representation of this construct.
- Return type:
Full name of first load balancer.
This identifier is emitted as a dimensions of the metrics of this target group.
Health check for the members of this target group.
A token representing a list of ARNs of the load balancers that route traffic to this target group.
List of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer.
The tree node.
The ARN of the target group.
The full name of the target group.
ARNs of load balancers load balancing to this TargetGroup.
The name of the target group.
- classmethod is_construct(x)
xis a construct.
Use this method instead of
instanceofto properly detect
Constructinstances, even when the construct library is symlinked.
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the class
Constructin each copy of the
constructslibrary is seen as a different class, and an instance of one class will not test as
instanceofthe other class.
npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the
constructslibrary can be accidentally installed, and
instanceofwill behave unpredictably. It is safest to avoid using
instanceof, and using this type-testing method instead.
Any) – Any object.
- Return type:
xis an object created from a class which extends