put_third_party_cost
async
¶
put_third_party_cost(
app_id: AppId,
label: ThirdPartyCostLabel,
amount: CostValue,
*,
config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
cost_id: Optional[ThirdPartyCostId] = None,
frequency: Optional[ThirdPartyCostFrequency] = None,
currency: Optional[Currency] = None,
description: Optional[ThirdPartyCostDescription] = None,
effective_from: Optional[ThirdPartyCostMonth] = None,
effective_to: Optional[ThirdPartyCostMonth] = None,
client_token: Optional[ClientToken] = None,
) -> PutThirdPartyCostResponse
Adds or updates a seller-declared third-party (non-AWS) monthly cost for an app. Omit the cost identifier to create a new cost, or supply an existing cost identifier to update it in place. The amount is a flat monthly value, and currency defaults to USD when omitted.
Parameters:
-
app_id(AppId) –The ID of the app the cost belongs to.
-
cost_id(Optional[ThirdPartyCostId], default:None) –The ID of the cost. Omit it to create a new cost, or supply an existing cost ID to update that cost in place.
-
label(ThirdPartyCostLabel) –A human-readable label for the cost (for example, "Anthropic API").
-
amount(CostValue) –A flat monthly amount as a decimal string (for example, "12.50").
-
frequency(Optional[ThirdPartyCostFrequency], default:None) –How often the cost recurs. MONTHLY is the only value today.
-
currency(Optional[Currency], default:None) –The currency of the amount. Defaults to USD when omitted (USD is the only supported currency).
-
description(Optional[ThirdPartyCostDescription], default:None) –A free-form description of the cost.
-
effective_from(Optional[ThirdPartyCostMonth], default:None) –First month (YYYY-MM) the cost applies in. Absent means the cost has no start month.
-
effective_to(Optional[ThirdPartyCostMonth], default:None) –Last month (YYYY-MM) the cost applies in. Absent means the cost has no end month. When both are present, effectiveFrom must not be after effectiveTo.
-
client_token(Optional[ClientToken], default:None) –AWS App Monetization does not use this value for this operation. To retry without creating a duplicate cost, pass the
costIdreturned by the first call.
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
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 | |