ResilienceHub / Client / list_metrics

list_metrics#

ResilienceHub.Client.list_metrics(**kwargs)#

Lists the metrics that can be exported.

See also: AWS API Documentation

Request Syntax

response = client.list_metrics(
    conditions=[
        {
            'field': 'string',
            'operator': 'Equals'|'NotEquals'|'GreaterThen'|'GreaterOrEquals'|'LessThen'|'LessOrEquals',
            'value': 'string'
        },
    ],
    dataSource='string',
    fields=[
        {
            'aggregation': 'Min'|'Max'|'Sum'|'Avg'|'Count',
            'name': 'string'
        },
    ],
    maxResults=123,
    nextToken='string',
    sorts=[
        {
            'ascending': True|False,
            'field': 'string'
        },
    ]
)
Parameters:
  • conditions (list) –

    Indicates the list of all the conditions that were applied on the metrics.

    • (dict) –

      Indicates the condition based on which you want to filter the metrics.

      • field (string) – [REQUIRED]

        Indicates the field in the metric.

      • operator (string) – [REQUIRED]

        Indicates the type of operator or comparison to be used when evaluating a condition against the specified field.

      • value (string) –

        Indicates the value or data against which a condition is evaluated.

  • dataSource (string) – Indicates the data source of the metrics.

  • fields (list) –

    Indicates the list of fields in the data source.

    • (dict) –

      Indicates the field or attribute of a resource or data structure on which a condition is being applied or evaluated.

      • aggregation (string) –

        (Optional) Indicates the type of aggregation or summary operation (such as Sum, Average, and so on) to be performed on a particular field or set of data.

      • name (string) – [REQUIRED]

        Name of the field.

  • maxResults (integer) – Maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

  • nextToken (string) – Null, or the token from a previous call to get the next set of results.

  • sorts (list) –

    (Optional) Indicates the order in which you want to sort the fields in the metrics. By default, the fields are sorted in the ascending order.

    • (dict) –

      Indicates the sorting order of the fields in the metrics.

      • ascending (boolean) –

        Indicates the name or identifier of the field or attribute that should be used as the basis for sorting the metrics.

      • field (string) – [REQUIRED]

        Indicates the order in which you want to sort the metrics. By default, the list is sorted in ascending order. To sort the list in descending order, set this field to False.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'rows': [
        [
            'string',
        ],
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      Token for the next set of results, or null if there are no more results.

    • rows (list) –

      Specifies all the list of metric values for each row of metrics.

      • (list) –

        • (string) –

Exceptions

  • ResilienceHub.Client.exceptions.InternalServerException

  • ResilienceHub.Client.exceptions.ThrottlingException

  • ResilienceHub.Client.exceptions.ValidationException

  • ResilienceHub.Client.exceptions.AccessDeniedException