modify_target_group
async
¶
modify_target_group(
*,
config_overrides: Optional[AsyncElasticLoadBalancingv2ClientConfig] = None,
target_group_arn: Optional[TargetGroupArn] = None,
health_check_protocol: Optional[ProtocolEnum] = None,
health_check_port: Optional[HealthCheckPort] = None,
health_check_path: Optional[Path] = None,
health_check_enabled: Optional[HealthCheckEnabled] = None,
health_check_interval_seconds: Optional[HealthCheckIntervalSeconds] = None,
health_check_timeout_seconds: Optional[HealthCheckTimeoutSeconds] = None,
healthy_threshold_count: Optional[HealthCheckThresholdCount] = None,
unhealthy_threshold_count: Optional[HealthCheckThresholdCount] = None,
matcher: Optional[Matcher] = None,
) -> ModifyTargetGroupOutput
Modifies the health checks used when evaluating the health state of the targets in the specified target group.
Parameters:
-
target_group_arn(Optional[TargetGroupArn], default:None) –The Amazon Resource Name (ARN) of the target group.
-
health_check_protocol(Optional[ProtocolEnum], default:None) –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. It is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The GENEVE, TLS, UDP, TCP_UDP, QUIC, and TCP_QUIC protocols are not supported for health checks.
-
health_check_port(Optional[HealthCheckPort], default:None) –The port the load balancer uses when performing health checks on targets.
-
health_check_path(Optional[Path], default:None) –[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 /Amazon Web Services.ALB/healthcheck.
-
health_check_enabled(Optional[HealthCheckEnabled], default:None) –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 isinstance,ip, oralb, health checks are always enabled and can't be disabled. -
health_check_interval_seconds(Optional[HealthCheckIntervalSeconds], default:None) –The approximate amount of time, in seconds, between health checks of an individual target.
-
health_check_timeout_seconds(Optional[HealthCheckTimeoutSeconds], default:None) –[HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check.
-
healthy_threshold_count(Optional[HealthCheckThresholdCount], default:None) –The number of consecutive health checks successes required before considering an unhealthy target healthy.
-
unhealthy_threshold_count(Optional[HealthCheckThresholdCount], default:None) –The number of consecutive health check failures required before considering the target unhealthy.
-
matcher(Optional[Matcher], default:None) –[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 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.
Raises:
-
InvalidConfigurationRequestException–The requested configuration is not valid.
-
TargetGroupNotFoundException–The specified target group does not exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To modify the health check configuration for a target group This example changes the configuration of the health checks used to evaluate the health of the targets for the specified target group.
>>> await client.modify_target_group(target_group_arn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-https-targets/2453ed029918f21f', health_check_protocol='HTTPS', health_check_port='443')
Source code in docs_src/capo_elastic_load_balancing_v2/_services/async_elastic_load_balancingv2.py
3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 | |