ListHealthEvents
Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end times, and the status.
Note
Health events that have start times during the time frame that is requested are not included in the list of health events.
Request Syntax
GET /v20210603/Monitors/MonitorName
/HealthEvents?EndTime=EndTime
&EventStatus=EventStatus
&LinkedAccountId=LinkedAccountId
&MaxResults=MaxResults
&NextToken=NextToken
&StartTime=StartTime
HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- EndTime
-
The time when a health event ended. If the health event is still ongoing, then the end time is not set.
- EventStatus
-
The status of a health event.
Valid Values:
ACTIVE | RESOLVED
- 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.
Length Constraints: Fixed length of 12.
- MaxResults
-
The number of health event objects that you want to return with this call.
Valid Range: Minimum value of 1. Maximum value of 25.
- MonitorName
-
The name of the monitor.
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
[a-zA-Z0-9_.-]+
Required: Yes
- NextToken
-
The token for the next set of results. You receive this token from a previous call.
- StartTime
-
The time when a health event started.
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"HealthEvents": [
{
"CreatedAt": "string",
"EndedAt": "string",
"EventArn": "string",
"EventId": "string",
"HealthScoreThreshold": number,
"ImpactedLocations": [
{
"ASName": "string",
"ASNumber": number,
"CausedBy": {
"AsPath": [
{
"ASName": "string",
"ASNumber": number
}
],
"NetworkEventType": "string",
"Networks": [
{
"ASName": "string",
"ASNumber": number
}
]
},
"City": "string",
"Country": "string",
"CountryCode": "string",
"InternetHealth": {
"Availability": {
"ExperienceScore": number,
"PercentOfClientLocationImpacted": number,
"PercentOfTotalTrafficImpacted": number
},
"Performance": {
"ExperienceScore": number,
"PercentOfClientLocationImpacted": number,
"PercentOfTotalTrafficImpacted": number,
"RoundTripTime": {
"P50": number,
"P90": number,
"P95": number
}
}
},
"Ipv4Prefixes": [ "string" ],
"Latitude": number,
"Longitude": number,
"Metro": "string",
"ServiceLocation": "string",
"Status": "string",
"Subdivision": "string",
"SubdivisionCode": "string"
}
],
"ImpactType": "string",
"LastUpdatedAt": "string",
"PercentOfTotalTrafficImpacted": number,
"StartedAt": "string",
"Status": "string"
}
],
"NextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- HealthEvents
-
A list of health events.
Type: Array of HealthEvent objects
- NextToken
-
The token for the next set of results. You receive this token from a previous call.
Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You don't have sufficient permission to perform this action.
HTTP Status Code: 403
- InternalServerException
-
An internal error occurred.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 429
- ValidationException
-
Invalid request.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: