AppMonetization / Paginator / GetMetricUsage
GetMetricUsage¶
- class AppMonetization.Paginator.GetMetricUsage¶
paginator = client.get_paginator('get_metric_usage')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
AppMonetization.Client.get_metric_usage().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( appId='string', userId='string', startedAt=datetime(2015, 1, 1), endedAt=datetime(2015, 1, 1), scope='sandbox'|'live', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
appId (string) –
[REQUIRED]
The ID of the app.
userId (string) –
[REQUIRED]
The end user whose usage is read. Do not include personally identifiable or otherwise sensitive data in this value.
startedAt (datetime) –
[REQUIRED]
Inclusive start of the reporting window (half-open [startedAt, endedAt)).
endedAt (datetime) –
[REQUIRED]
Exclusive end of the reporting window. Must be after startedAt; the window may span at most 744 hours (31 days, the longest monthly billing period). Must not be in the future beyond a small clock-skew allowance.
scope (string) –
[REQUIRED]
Required. The environment: live or sandbox. sandbox reads the app’s isolated test environment. Usage is kept separately per environment.
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
{ 'usage': [ { 'metricId': 'string', 'quantity': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) –
Output for GetMetricUsage.
usage (list) –
One entry per metric in this page, carrying its usage over the window. A metric with no events in the window is returned with usage = 0.
(dict) –
A single metric’s raw usage over the window.
metricId (string) –
The metric this usage is for.
quantity (string) –
The metric’s usage over the window, as a plain decimal string (for example, “1500” or “12.5”). For a SUM or COUNT metric this is the total; for a MAX metric it is the largest value recorded. Within a fixed window the value can only grow, as late-arriving events are counted.
NextToken (string) –
A token to resume pagination.