Skip to content

get_health_check async

get_health_check(
    health_check_id: HealthCheckId,
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
) -> GetHealthCheckResponse

Gets information about a specified health check.

Parameters:

  • health_check_id (HealthCheckId) –

    The identifier that Amazon Route 53 assigned to the health check when you created it. When you add or update a resource record set, you use this value to specify which health check to use. The value can be up to 64 characters long.

Raises:

Source code in docs_src/capo_route_53/_services/async_route53.py
async def get_health_check(
    self,
    health_check_id: "capo_route_53.types.health_check_id.HealthCheckId",
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
) -> "capo_route_53.types.get_health_check_response.GetHealthCheckResponse":
    """<p>Gets information about a specified health check.</p>

    Args:
        health_check_id: <p>The identifier that Amazon Route 53 assigned to the health check when you created it. When you add or update a resource record set, you use this value to specify which health check to use. The value can be up to 64 characters long.</p>

    Raises:
        capo_route_53.errors.incompatible_version.IncompatibleVersion: <p>The resource you're trying to access is unsupported on this Amazon Route 53 endpoint.</p>
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.no_such_health_check.NoSuchHealthCheck: <p>No health check exists with the specified ID.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53.types.get_health_check_request.GetHealthCheckRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53.types.get_health_check_response.GetHealthCheckResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.get_health_check

        (
            output,
            http_response,
        ) = await capo_route_53._operations.aws_dns_v20130401.get_health_check.async_get_health_check(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetHealthCheck")
    )
    input_: capo_route_53.types.get_health_check_request.GetHealthCheckRequest = {
        "health_check_id": health_check_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output