put_event
async
¶
put_event(
app_id: AppId,
user_id: UserId,
event_type: SourceEventType,
quantity: Quantity,
timestamp: Timestamp,
scope: RequestScope,
*,
config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
client_token: Optional[ClientToken] = None,
properties: Optional[EventProperties] = None,
) -> PutEventResponse
Records a usage event for a user of an app. Usage events are the raw input that metrics aggregate.
Parameters:
-
app_id(AppId) –The ID of the app the event belongs to.
-
client_token(Optional[ClientToken], default:None) –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.
-
user_id(UserId) –The ID of the end user the event is attributed to. Do not include personally identifiable or otherwise sensitive data in this value.
-
event_type(SourceEventType) –The event type. Correlates with the event type of the metrics that aggregate it.
-
quantity(Quantity) –The amount of usage the event represents, as a non-negative decimal string (for example, "1" or "12.5").
-
timestamp(Timestamp) –The time the event occurred.
-
properties(Optional[EventProperties], default:None) –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.
-
scope(RequestScope) –The environment of the app that this operation applies to: the live app or the app's isolated sandbox test environment.
Raises:
-
AccessDeniedException–The caller does not have sufficient permission to perform this action.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The referenced resource does not exist.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The request failed input validation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_appmonetization/_services/async_app_monetization.py
3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 | |