put_aws_service_event
¶
put_aws_service_event(
app_id: AppId,
user_id: UserId,
service: ServiceName,
operation: OperationName,
timestamp: Timestamp,
scope: RequestScope,
*,
config_overrides: Optional[AppMonetizationClientConfig] = None,
client_token: Optional[ClientToken] = None,
quantity: Optional[Quantity] = None,
aws_region: Optional[Region] = None,
properties: Optional[EventProperties] = None,
) -> PutAwsServiceEventResponse
Records an AWS service usage event for cost attribution. The event is accepted and processed asynchronously.
Parameters:
-
app_id(AppId) –The ID of the app.
-
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) –An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.
-
service(ServiceName) –The AWS service name that emitted the usage event.
-
operation(OperationName) –The AWS operation (API action) that produced the usage event.
-
quantity(Optional[Quantity], default:None) –A non-negative decimal quantity represented as a string (for example, "1500" or "12.5").
-
timestamp(Timestamp) –The time the event occurred, as an ISO-8601 date-time in UTC (for example, "2026-07-26T15:04:05Z").
-
aws_region(Optional[Region], default:None) –The AWS Region in which the event occurred.
-
properties(Optional[EventProperties], default:None) –The key/value properties carried on a usage event. Property values can be referenced by metric filters and grouping.
-
scope(RequestScope) –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.
Raises:
-
AccessDeniedException–The caller does not have sufficient permission to perform this action.
-
ConflictException–The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.
-
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
3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 | |