Specifies the health check settings to use when evaluating the health state of your EC2 instances.
For more information, see Configure Health Checks for Your Load Balancer in the Classic Load Balancers Guide.
Parameters:
Raises:
Examples:
To specify the health check settings for your backend EC2 instances
This example specifies the health check settings used to evaluate the health of your backend EC2 instances.
>>> await client.configure_health_check(load_balancer_name='my-load-balancer', health_check={'Target': 'HTTP:80/png', 'Interval': 30, 'Timeout': 3, 'UnhealthyThreshold': 2, 'HealthyThreshold': 2})
Source code in docs_src/capo_elastic_load_balancing/_services/async_elastic_load_balancing.py
| async def configure_health_check(
self,
load_balancer_name: "capo_elastic_load_balancing.types.access_point_name.AccessPointName",
health_check: "capo_elastic_load_balancing.types.health_check.HealthCheck",
*,
config_overrides: Optional[AsyncElasticLoadBalancingClientConfig] = None,
) -> "capo_elastic_load_balancing.types.configure_health_check_output.ConfigureHealthCheckOutput":
"""<p>Specifies the health check settings to use when evaluating the health state of your EC2 instances.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html">Configure Health Checks for Your Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
Args:
load_balancer_name: <p>The name of the load balancer.</p>
health_check: <p>The configuration information.</p>
Raises:
capo_elastic_load_balancing.errors.access_point_not_found_exception.AccessPointNotFoundException: <p>The specified load balancer does not exist.</p>
capo_elastic_load_balancing.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To specify the health check settings for your backend EC2 instances
This example specifies the health check settings used to evaluate the health of your backend EC2 instances.
>>> await client.configure_health_check(load_balancer_name='my-load-balancer', health_check={'Target': 'HTTP:80/png', 'Interval': 30, 'Timeout': 3, 'UnhealthyThreshold': 2, 'HealthyThreshold': 2})
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_load_balancing.types.configure_health_check_input.ConfigureHealthCheckInput]",
) -> AsyncOperationResponse[
"capo_elastic_load_balancing.types.configure_health_check_output.ConfigureHealthCheckOutput"
]:
import capo_elastic_load_balancing._operations.elastic_load_balancing_v7.configure_health_check
(
output,
http_response,
) = await capo_elastic_load_balancing._operations.elastic_load_balancing_v7.configure_health_check.async_configure_health_check(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ConfigureHealthCheck")
)
input_: capo_elastic_load_balancing.types.configure_health_check_input.ConfigureHealthCheckInput = {
"load_balancer_name": load_balancer_name,
"health_check": health_check,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|