AppMonetization / Paginator / ListMetrics
ListMetrics¶
- class AppMonetization.Paginator.ListMetrics¶
paginator = client.get_paginator('list_metrics')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
AppMonetization.Client.list_metrics().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( appId='string', stage='DRAFT'|'PUBLISHED', scope='sandbox'|'live', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
appId (string) –
[REQUIRED]
The ID of the app.
stage (string) – The offering stage to list metrics from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox. A stage with nothing published lists as empty.
scope (string) –
[REQUIRED]
Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app’s draft (what the sandbox runs).
PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextTokenwill be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextTokenfrom a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'metrics': [ { 'appId': 'string', 'metricId': 'string', 'name': 'string', 'description': 'string', 'eventType': 'string', 'unitName': 'string', 'definition': { 'filters': [ { 'field': 'string', 'operator': 'EQUALS'|'NOT_EQUALS'|'IN'|'NOT_IN', 'values': [ 'string', ] }, ], 'function': 'SUM'|'COUNT'|'MAX', 'functionField': 'string', 'groupBy': [ 'string', ], 'period': 'MONTHLY' }, 'arn': 'string', 'stage': 'DRAFT'|'PUBLISHED' }, ], 'NextToken': 'string' }
Response Structure
(dict) –
Output for ListMetrics.
metrics (list) –
A list of metrics.
(dict) –
A usage metric definition for an app. Metrics aggregate raw usage events (by event type) into a metered quantity used for quota enforcement and usage-based billing.
appId (string) –
The ID of the app the metric belongs to.
metricId (string) –
The ID of the metric. We assign this value when you create the metric; it is unique within the app. Treat it as opaque.
name (string) –
A human-readable display name for the metric.
description (string) –
A description of what the metric measures.
eventType (string) –
The event type this metric aggregates.
unitName (string) –
The unit of measure for the metric.
definition (dict) –
The aggregation definition: filters, aggregation function, grouping, and period.
filters (list) –
The predicates selecting which events contribute to the metric. Combined with logical AND.
(dict) –
A single predicate that selects which events contribute to a metric.
field (string) –
The event property key the filter is evaluated against.
operator (string) –
The comparison operator (EQUALS, NOT_EQUALS, IN, or NOT_IN).
values (list) –
The values the field is compared against.
(string) –
A value the field is compared against, 1-256 characters. Single quotes (’) and backslashes () are not allowed.
function (string) –
The aggregation function applied to matching events (SUM, COUNT, or MAX).
functionField (string) –
The event property key the aggregation function operates on. Required for SUM and MAX; ignored for COUNT.
groupBy (list) –
The event fields to group aggregated results by.
(string) –
Name of an event property key referenced by a metric filter or aggregation (filter field, functionField, groupBy). Lowercase snake_case, 1-64 characters: letters, digits, and underscores only, starting with a letter. Unlike PropertyKey, dots are not allowed, so a metric can’t reference a property whose key contains a dot.
period (string) –
The reset or rollup period for the aggregation.
arn (string) –
The Amazon Resource Name (ARN) of the metric. Output only.
stage (string) –
The offering stage this metric was read from: DRAFT or PUBLISHED. Present on metric reads; absent on write responses.
NextToken (string) –
A token to resume pagination.