put_aws_service_event
async
¶
put_aws_service_event(
app_id: AppId,
user_id: UserId,
service: ServiceName,
operation: OperationName,
timestamp: Timestamp,
scope: RequestScope,
*,
config_overrides: Optional[AsyncAppMonetizationClientConfig] = 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/async_app_monetization.py
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 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 | |