getHealthCheckLastFailureReason method

Future<GetHealthCheckLastFailureReasonResponse> getHealthCheckLastFailureReason({
  1. required String healthCheckId,
})

Gets the reason that a specified health check failed most recently.

May throw InvalidInput. May throw NoSuchHealthCheck.

Parameter healthCheckId : The ID for the health check for which you want the last failure reason. When you created the health check, CreateHealthCheck returned the ID in the response, in the HealthCheckId element.

Implementation

Future<GetHealthCheckLastFailureReasonResponse>
    getHealthCheckLastFailureReason({
  required String healthCheckId,
}) async {
  final $result = await _protocol.send(
    method: 'GET',
    requestUri:
        '/2013-04-01/healthcheck/${Uri.encodeComponent(healthCheckId)}/lastfailurereason',
    exceptionFnMap: _exceptionFns,
  );
  return GetHealthCheckLastFailureReasonResponse.fromXml($result.body);
}