Auto-renewal

更新时间:
复制 MD 格式

If you have a subscription ECS instance with a short billing cycle (for example, three months or less) and plan to use the service long-term, we recommend enabling auto-renewal. This practice helps prevent service interruptions and data loss from an expired instance and reduces manual overhead.

Prerequisites

Ensure the following conditions are met before you begin:

  • Auto-renewal settings take effect the following day. Therefore, enable auto-renewal at least two days before your subscription instance expires.

    Note

    If your instance is due to expire the next day, we recommend performing a manual renewal.

  • Auto-renewal requires a successful payment. Make sure your account balance and any available vouchers are sufficient to cover the renewal fee.

Auto-renewal rules

  • Deduction time

    The system starts charging your account 9 days before the instance expires (T-9). If a payment fails due to an insufficient account balance, the system retries daily until the payment succeeds. If the payment continues to fail, the instance is stopped upon expiration.

    If an auto-renewal payment fails, the system sends you an SMS notification and sends a notification to your registered email address. To avoid service interruptions for your ECS instance, check your notifications and resolve the payment issue promptly.

  • Renewal duration

    The renewal uses the renewal duration that you set. For example, if you select a 3-month renewal duration, the system automatically renews the instance for 3 months before it expires.

  • Manual renewal after auto-renewal is enabled

    If you perform a manual renewal after enabling auto-renewal but before the scheduled payment date, the system adjusts the next auto-renewal date based on the new expiration date.

Note

For more information about renewal rules, see Renew expiring resources.

Enable auto-renewal during instance creation

Console

When creating an ECS instance, you can enable auto-renewal by selecting the Auto-renewal checkbox in the purchase duration section of the creation page.

When auto-renewal is enabled, the renewal duration defaults to your initial subscription period. For example, if you purchase an instance with a one-month subscription, the renewal duration is also set to one month. This means the system automatically renews the instance for one month before it expires. If the default renewal duration does not meet your needs, you can change it after the instance is created. For more information, see the next section.

API

When calling the RunInstances operation, set the AutoRenew parameter to true to enable auto-renewal.

Configure auto-renewal

Console

For existing instances, you can enable or disable auto-renewal, or modify the renewal duration.

  1. Go to the ECS console - Instances page.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. Find the target instance and click its ID to go to the Instance Details page. From the All Actions menu, select Configure Auto-renewal .

  1. Configure the auto-renewal settings.

    • To enable auto-renewal: Turn on the Enable Auto-renewal switch, set the Renewal Duration, then click Confirm. After the settings are applied, the system automatically deducts the fee for the next billing cycle from your account before the subscription expires, provided your account balance is sufficient.

    • To disable auto-renewal: Turn off the Enable Auto-renewal switch, then click Confirm.

    • To modify the renewal duration: While auto-renewal is enabled, select a new Renewal Duration, then click Confirm.

Note

To configure auto-renewal for multiple ECS instances at once, see Perform batch operations on the Instance page.

API

Important

Calling this API operation may incur charges.

For existing instances, you can call the ModifyInstanceAutoRenewAttribute operation to configure up to 100 subscription instances in a single request by specifying their InstanceId values.

  • Check renewal prices: Before you configure auto-renewal, you can call the DescribeRenewalPrice operation to query renewal prices.

  • Enable auto-renewal: Set the RenewalStatus parameter to AutoRenewal and specify values for the Duration (renewal duration) and PeriodUnit (time unit for the renewal duration) parameters.

  • Disable auto-renewal: Set the RenewalStatus parameter to Normal.

    Note

    You can also set the RenewalStatus parameter to NotRenewal to enable non-renewal. When this feature is enabled, the system sends a non-renewal reminder only on the third day before the expiration date. An ECS instance set to non-renewal can be reverted to Normal (pending renewal), after which you can perform a manual renewal or enable auto-renewal for the instance.

  • Modify the renewal duration: If an instance is set to AutoRenewal, you can change its renewal duration by specifying new values for the Duration and PeriodUnit parameters.

View auto-renewal status

Console

You can check an instance's auto-renewal status and duration on its Instance Details page in the ECS console.

  1. Go to the ECS console - Instances page.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. Find the instance that you want to check and click the instance ID to go to the Instance Details page. In the Configuration Information section, check the status in the Auto-renewal field.

    • If the status is auto-renewal <X> Week(s)/Month(s)/Year(s), auto-renewal is enabled.

    • If the status is Manual Renewal or Not Renewal, auto-renewal is disabled.

API

You can call the DescribeInstanceAutoRenewAttribute operation to query the auto-renewal properties of up to 100 subscription instances in a single request by specifying their InstanceId values. The response includes the auto-renewal status, renewal duration, and other details for each ECS instance.

You can also use the RenewalStatus parameter to filter the results and list only the instances with a specific status.