TargetGroupHealth

class aws_cdk.aws_elasticloadbalancingv2.TargetGroupHealth(*, dns_minimum_healthy_target_count=None, dns_minimum_healthy_target_percentage=None, routing_minimum_healthy_target_count=None, routing_minimum_healthy_target_percentage=None)

Bases: object

Properties for configuring a target group health.

Parameters:
  • dns_minimum_healthy_target_count (Union[int, float, None]) – The minimum number of targets that must be healthy for DNS failover. If below this value, mark the zone as unhealthy in DNS. Use 0 for “off”. Default: 1

  • dns_minimum_healthy_target_percentage (Union[int, float, None]) – The minimum percentage of targets that must be healthy for DNS failover. If below this value, mark the zone as unhealthy in DNS. Use 0 for “off”. Default: 0

  • routing_minimum_healthy_target_count (Union[int, float, None]) – The minimum number of targets that must be healthy for unhealthy state routing. If below this value, send traffic to all targets including unhealthy ones. Default: 1

  • routing_minimum_healthy_target_percentage (Union[int, float, None]) – The minimum percentage of targets that must be healthy for unhealthy state routing. If below this value, send traffic to all targets including unhealthy ones. Use 0 for “off”. Default: 0

See:

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes

ExampleMetadata:

infused

Example:

# vpc: ec2.Vpc


target_group = elbv2.ApplicationTargetGroup(self, "TargetGroup",
    vpc=vpc,
    port=80,
    target_group_health=elbv2.TargetGroupHealth(
        dns_minimum_healthy_target_count=3,
        dns_minimum_healthy_target_percentage=70,
        routing_minimum_healthy_target_count=2,
        routing_minimum_healthy_target_percentage=50
    )
)

Attributes

dns_minimum_healthy_target_count

The minimum number of targets that must be healthy for DNS failover.

If below this value, mark the zone as unhealthy in DNS. Use 0 for “off”.

Default:

1

dns_minimum_healthy_target_percentage

The minimum percentage of targets that must be healthy for DNS failover.

If below this value, mark the zone as unhealthy in DNS. Use 0 for “off”.

Default:

0

routing_minimum_healthy_target_count

The minimum number of targets that must be healthy for unhealthy state routing.

If below this value, send traffic to all targets including unhealthy ones.

Default:

1

routing_minimum_healthy_target_percentage

The minimum percentage of targets that must be healthy for unhealthy state routing.

If below this value, send traffic to all targets including unhealthy ones. Use 0 for “off”.

Default:

0