create_one_time_price
async
¶
create_one_time_price(
app_id: AppId,
definition: OneTimePriceDefinition,
*,
config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagMap] = None,
) -> CreateOneTimePriceResponse
Creates a one-time price for an app. The one-time price exists on the draft (DRAFT) offering until published.
Parameters:
-
app_id(AppId) –The ID of the app the one-time price belongs to.
-
definition(OneTimePriceDefinition) –The definition of the one-time price to create, including its display name, price, metric, and credited capacity.
-
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.
-
tags(Optional[TagMap], default:None) –Optional tags to add to the one-time price when it is created. Tagging on create also requires permission for appmonetization:TagResource.
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.
-
IdempotencyConflictException–The clientToken was reused with a request that differs from the original request. Retry the operation with a new clientToken.
-
InternalServerException–An unexpected error occurred while processing the request.
-
InvalidConfigurationException–The requested configuration is not valid.
-
ResourceNotFoundException–The referenced resource does not exist.
-
RevisionConflictException–The request's revision does not match the resource's current revision. Retry with the current revision.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
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.