getHealthEvent method

Future<GetHealthEventOutput> getHealthEvent({
  1. required String eventId,
  2. required String monitorName,
  3. String? linkedAccountId,
})

Gets information that Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor. This information includes the impacted locations, and all the information related to the event, by location.

The information returned includes the impact on performance, availability, and round-trip time, information about the network providers (ASNs), the event type, and so on.

Information rolled up at the global traffic level is also returned, including the impact type and total traffic impact.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter eventId : The internally-generated identifier of a health event. Because EventID contains the forward slash (“/”) character, you must URL-encode the EventID field in the request URL.

Parameter monitorName : The name of the monitor.

Parameter linkedAccountId : The account ID for an account that you've set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account sharing by using Amazon CloudWatch Observability Access Manager. For more information, see Internet Monitor cross-account observability in the Amazon CloudWatch Internet Monitor User Guide.

Implementation

Future<GetHealthEventOutput> getHealthEvent({
  required String eventId,
  required String monitorName,
  String? linkedAccountId,
}) async {
  final $query = <String, List<String>>{
    if (linkedAccountId != null) 'LinkedAccountId': [linkedAccountId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v20210603/Monitors/${Uri.encodeComponent(monitorName)}/HealthEvents/${Uri.encodeComponent(eventId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetHealthEventOutput.fromJson(response);
}