SageMaker.Client.
list_monitoring_alert_history
(**kwargs)¶Gets a list of past alerts in a model monitoring schedule.
See also: AWS API Documentation
Request Syntax
response = client.list_monitoring_alert_history(
MonitoringScheduleName='string',
MonitoringAlertName='string',
SortBy='CreationTime'|'Status',
SortOrder='Ascending'|'Descending',
NextToken='string',
MaxResults=123,
CreationTimeBefore=datetime(2015, 1, 1),
CreationTimeAfter=datetime(2015, 1, 1),
StatusEquals='InAlert'|'OK'
)
CreationTime
.Ascending
or Descending
, of the alert history. The default is Descending
.ListMonitoringAlertHistory
request was truncated, the response includes a NextToken
. To retrieve the next set of alerts in the history, use the token in the next request.dict
Response Syntax
{
'MonitoringAlertHistory': [
{
'MonitoringScheduleName': 'string',
'MonitoringAlertName': 'string',
'CreationTime': datetime(2015, 1, 1),
'AlertStatus': 'InAlert'|'OK'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
MonitoringAlertHistory (list) --
An alert history for a model monitoring schedule.
(dict) --
Provides summary information of an alert's history.
MonitoringScheduleName (string) --
The name of a monitoring schedule.
MonitoringAlertName (string) --
The name of a monitoring alert.
CreationTime (datetime) --
A timestamp that indicates when the first alert transition occurred in an alert history. An alert transition can be from status InAlert
to OK
, or from OK
to InAlert
.
AlertStatus (string) --
The current alert status of an alert.
NextToken (string) --
If the response is truncated, SageMaker returns this token. To retrieve the next set of alerts, use it in the subsequent request.
Exceptions
SageMaker.Client.exceptions.ResourceNotFound