AppMonetization / Client / put_event
put_event¶
- AppMonetization.Client.put_event(**kwargs)¶
Records a usage event for a user of an app. Usage events are the raw input that metrics aggregate.
See also: AWS API Documentation
Request Syntax
response = client.put_event( appId='string', clientToken='string', userId='string', eventType='string', quantity='string', timestamp=datetime(2015, 1, 1), properties={ 'string': 'string' }, scope='sandbox'|'live' )
- Parameters:
appId (string) –
[REQUIRED]
The ID of the app the event belongs to.
clientToken (string) –
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.
This field is autopopulated if not provided.
userId (string) –
[REQUIRED]
The ID of the end user the event is attributed to. Do not include personally identifiable or otherwise sensitive data in this value.
eventType (string) –
[REQUIRED]
The event type. Correlates with the event type of the metrics that aggregate it.
quantity (string) –
[REQUIRED]
The amount of usage the event represents, as a non-negative decimal string (for example, “1” or “12.5”).
timestamp (datetime) –
[REQUIRED]
The time the event occurred.
properties (dict) –
The key/value properties carried on the event, usable in metric filters and grouping. When a metric sums or takes the max of a property, that property’s value must be a plain non-negative decimal (up to 15 digits before the point and 6 after; no sign, exponent, spaces, or commas, for example “1200” or “12.5”), and events that break this are rejected.
(string) –
Key of an event property. Lowercase, starting with a letter; letters, digits, underscore, and dot; 1-64 characters.
(string) –
Value of an event property, up to 256 characters.
scope (string) –
[REQUIRED]
The environment of the app that this operation applies to: the live app or the app’s isolated sandbox test environment.
- Return type:
dict
- Returns:
Response Syntax
{ 'eventId': 'string', 'status': 'string' }
Response Structure
(dict) –
Output for PutEvent.
eventId (string) –
The server-assigned identifier for the recorded event.
status (string) –
The status of the recorded event.
Exceptions