describe_target_health
async
¶
describe_target_health(
*,
config_overrides: Optional[AsyncElasticLoadBalancingv2ClientConfig] = 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.
>>> await 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.
>>> await 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/async_elastic_load_balancingv2.py
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 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 | |