describe_target_health
¶
describe_target_health(
*,
config_overrides: Optional[ElasticLoadBalancingv2ClientConfig] = None,
target_group_arn: Optional[TargetGroupArn] = None,
targets: Optional[TargetDescriptions] = None,
include: Optional[ListOfDescribeTargetHealthIncludeOptions] = None,
) -> DescribeTargetHealthOutput
Describes the health of the specified targets or all of your targets.
Parameters:
-
target_group_arn(Optional[TargetGroupArn], default:None) –The Amazon Resource Name (ARN) of the target group.
-
targets(Optional[TargetDescriptions], default:None) –The targets.
-
include(Optional[ListOfDescribeTargetHealthIncludeOptions], default:None) –Used to include anomaly detection information.
Raises:
-
HealthUnavailableException–The health of the specified targets could not be retrieved due to an internal error.
-
InvalidTargetException–The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.
-
TargetGroupNotFoundException–The specified target group does not exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe the health of the targets for a target group This example describes the health of the targets for the specified target group. One target is healthy but the other is not specified in an action, so it can't receive traffic from the load balancer.
>>> client.describe_target_health(target_group_arn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067')
To describe the health of a target
This example describes the health of the specified target. This target is healthy.
>>> client.describe_target_health(target_group_arn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', targets=[{'Id': 'i-0f76fade', 'Port': 80}])
Source code in docs_src/capo_elastic_load_balancing_v2/_services/elastic_load_balancingv2.py
2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 | |