ForecastService / Client / list_monitors

list_monitors#

ForecastService.Client.list_monitors(**kwargs)#

Returns a list of monitors created with the CreateMonitor operation and CreateAutoPredictor operation. For each monitor resource, this operation returns of a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve a complete set of properties of a monitor resource by specify the monitor’s ARN in the DescribeMonitor operation.

See also: AWS API Documentation

Request Syntax

response = client.list_monitors(
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Key': 'string',
            'Value': 'string',
            'Condition': 'IS'|'IS_NOT'
        },
    ]
)
Parameters:
  • NextToken (string) – If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

  • MaxResults (integer) – The maximum number of monitors to include in the response.

  • Filters (list) –

    An array of filters. For each filter, provide a condition and a match statement. The condition is either IS or IS_NOT, which specifies whether to include or exclude the resources that match the statement from the list. The match statement consists of a key and a value.

    Filter properties

    • Condition - The condition to apply. Valid values are IS and IS_NOT.

    • Key - The name of the parameter to filter on. The only valid value is Status.

    • Value - The value to match.

    For example, to list all monitors who’s status is ACTIVE, you would specify:

    "Filters": [ { "Condition": "IS", "Key": "Status", "Value": "ACTIVE" } ]

    • (dict) –

      Describes a filter for choosing a subset of objects. Each filter consists of a condition and a match statement. The condition is either IS or IS_NOT, which specifies whether to include or exclude the objects that match the statement, respectively. The match statement consists of a key and a value.

      • Key (string) – [REQUIRED]

        The name of the parameter to filter on.

      • Value (string) – [REQUIRED]

        The value to match.

      • Condition (string) – [REQUIRED]

        The condition to apply. To include the objects that match the statement, specify IS. To exclude matching objects, specify IS_NOT.

Return type:

dict

Returns:

Response Syntax

{
    'Monitors': [
        {
            'MonitorArn': 'string',
            'MonitorName': 'string',
            'ResourceArn': 'string',
            'Status': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModificationTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Monitors (list) –

      An array of objects that summarize each monitor’s properties.

      • (dict) –

        Provides a summary of the monitor properties used in the ListMonitors operation. To get a complete set of properties, call the DescribeMonitor operation, and provide the listed MonitorArn.

        • MonitorArn (string) –

          The Amazon Resource Name (ARN) of the monitor resource.

        • MonitorName (string) –

          The name of the monitor resource.

        • ResourceArn (string) –

          The Amazon Resource Name (ARN) of the predictor being monitored.

        • Status (string) –

          The status of the monitor. States include:

          • ACTIVE

          • ACTIVE_STOPPING, ACTIVE_STOPPED

          • UPDATE_IN_PROGRESS

          • CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED

          • DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED

        • CreationTime (datetime) –

          When the monitor resource was created.

        • LastModificationTime (datetime) –

          The last time the monitor resource was modified. The timestamp depends on the status of the job:

          • CREATE_PENDING - The CreationTime.

          • CREATE_IN_PROGRESS - The current timestamp.

          • STOPPED - When the resource stopped.

          • ACTIVE or CREATE_FAILED - When the monitor creation finished or failed.

    • NextToken (string) –

      If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

Exceptions