SageMaker / Client / list_monitoring_alert_history

list_monitoring_alert_history#

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'
)
Parameters:
  • MonitoringScheduleName (string) – The name of a monitoring schedule.

  • MonitoringAlertName (string) – The name of a monitoring alert.

  • SortBy (string) – The field used to sort results. The default is CreationTime.

  • SortOrder (string) – The sort order, whether Ascending or Descending, of the alert history. The default is Descending.

  • NextToken (string) – If the result of the previous 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.

  • MaxResults (integer) – The maximum number of results to display. The default is 100.

  • CreationTimeBefore (datetime) – A filter that returns only alerts created on or before the specified time.

  • CreationTimeAfter (datetime) – A filter that returns only alerts created on or after the specified time.

  • StatusEquals (string) – A filter that retrieves only alerts with a specific status.

Return type:

dict

Returns:

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