put_event
¶
put_event(
app_id: AppId,
user_id: UserId,
event_type: SourceEventType,
quantity: Quantity,
timestamp: Timestamp,
scope: RequestScope,
*,
config_overrides: Optional[AppMonetizationClientConfig] = 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/app_monetization.py
3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 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 | |