AppMonetization / Client / put_aws_service_event
put_aws_service_event¶
- AppMonetization.Client.put_aws_service_event(**kwargs)¶
Records an AWS service usage event for cost attribution. The event is accepted and processed asynchronously.
See also: AWS API Documentation
Request Syntax
response = client.put_aws_service_event( appId='string', clientToken='string', userId='string', service='string', operation='string', quantity='string', timestamp=datetime(2015, 1, 1), awsRegion='string', properties={ 'string': 'string' }, scope='sandbox'|'live' )
- Parameters:
appId (string) –
[REQUIRED]
The ID of the app.
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]
An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.
service (string) –
[REQUIRED]
The AWS service name that emitted the usage event.
operation (string) –
[REQUIRED]
The AWS operation (API action) that produced the usage event.
quantity (string) – A non-negative decimal quantity represented as a string (for example, “1500” or “12.5”).
timestamp (datetime) –
[REQUIRED]
The time the event occurred, as an ISO-8601 date-time in UTC (for example, “2026-07-26T15:04:05Z”).
awsRegion (string) – The AWS Region in which the event occurred.
properties (dict) –
The key/value properties carried on a usage event. Property values can be referenced by metric filters and grouping.
(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. Specify live to use the live app, or sandbox to use the app’s isolated test environment.
- Return type:
dict
- Returns:
Response Syntax
{ 'eventId': 'string', 'status': 'ACCEPTED' }
Response Structure
(dict) –
Output for PutAwsServiceEvent.
eventId (string) –
The ID assigned to the recorded event.
status (string) –
The processing status of the accepted event.
Exceptions