Updated on 2023-11-07 GMT+08:00

Pay-per-Use Billing

Pay-per-use billing means you pay nothing up front and are not tied into any contract or commitment. This section describes the billing rules for pay-per-use DEW instances.

Application Scenarios

Pay-per-use billing is good for short-term, bursty, or unpredictable workloads that cannot tolerate any interruptions, such as applications for e-commerce flash sales, temporary testing, and scientific computing.

Billed Items

The following billing items support pay-per-use billing.

Table 1 Applicable billing items

Billing Items

Description

KMS

Fees for key instances created on demand and API requests generated by keys.

CSMS

Fees for key instances created on demand and API requests generated by keys.

Assume that you create a symmetric key whose key algorithm is AES_256. At the bottom of the creation page, you can view the fee details, as shown in Example prices.

Figure 1 Example prices

The fee calculation includes:

  • Key instance fee: The created key is charged by duration.
  • API request fee: After a key is created, you are charged based on the number of API requests. Each key has 20,000 free requests per month.

Billed Usage Period

In pay-per-use billing mode, KMS resources are billed by hour. The key instance fee is generated once a day (UTC+8), and the key API request fee is generated once a month (UTC+8). After the bill is generated, a new billing cycle starts. The billing starts when the key is successfully created and ends when the key is scheduled to be deleted.

For example, if you created a custom key at 8:45:30 and deleted it at 9:40:08, the billing cycle is from 8:00:00 to 10:00:00. You are billed for the 600 seconds from 8:45:30 to 8:55:30.

Billing Examples

Suppose you created a custom key at June 8, 2023, 9:59:30 and deleted it on June 8, 2023, 10:45:46. The number of API calls using keys is 36,594 within a billing period. The usage period as follows:

  • The first billing period is from 9:00:00 to 10:00:00. Fees are generated from 9:59:30 to 10:00:00. The billing duration is 30 seconds within the period.
  • The second billing period is from 10:00:00 to 11:00:00. Fees are generated from 10:00:00 to 10:45:46. The billing duration is 2,746 seconds within the period.

You need to pay for each billing cycle. Each resource is billed separately. For details, see Billing formula. The price of a resource listed in the product pricing details is per hour, so divide it by 3,600 to obtain the price for each second.

Table 2 Billing formula

Resource

Formula

Custom keys

Key instance fee x Duration + Number of API requests x API request fee

Total price for a pay-per-use KMS shows how the total price is calculated.

The prices in the figure are examples only. The actual prices are those displayed on DEW Pricing Details.

Figure 2 Total price for a pay-per-use KMS

Impact of Arrears

Lifecycle of a pay-per-use KMS shows the statuses a pay-per-use KMS can have throughout its lifecycle. After you purchase a KMS resource, the resource runs properly within the billing period. This phase is the validity period. If you do not need to use the resource, the resource enters the retention period. After the retention period ends, the resource is deleted.

Figure 3 Lifecycle of a pay-per-use KMS

Arrears Reminder

The system will bill you for pay-per-use resources after each billing cycle ends. If your account goes into arrears, we will notify you by email, SMS, or in-app message.

Impacts of Arrears

If your account is insufficient to pay your amount, your account goes into arrears, and the pay-per-use KMS enters the grace period. Your account goes into arrears, and the pay-per-use KMS enters the grace period. You are still responsible for expenditures generated during the grace period. You can view the charges on the Billing Center > Overview page and pay any past due balance as needed.

If you do not bring your account balance current before the grace period expires, the status turns to Frozen and enters a retention period. You cannot perform any operations on a pay-per-use KMS in the Frozen status.

After the retention period ends, the resources in DEW will be released and data cannot be restored.