If you no longer require an ECS instance for service provision, you can release it to avoid incurring unnecessary costs. This topic explains the process for releasing both pay-as-you-go (including preemptible instances) and subscription instances.
Notes
-
Manual release is available for pay-as-you-go instances, including preemptible instances.
NoteBilling for all resources of a pay-as-you-go instance not in economical mode continues until the instance is released.
-
Subscription instances can be manually released after expiration. Instances not renewed post-expiration are automatically released.
-
Unexpired subscription instances cannot be released. They must be converted to pay-as-you-go instances prior to manual release. For details, see Release an unexpired subscription instance.
-
To prevent accidental data loss, you can activate instance release protection for pay-as-you-go instances. For instructions, see Enable instance release protection.
-
If the Release Disk with Instance feature is off for an attached disk, it becomes a retained pay-as-you-go data disk upon instance release. For more information, see Release a disk.
-
Data is irretrievable once an instance is released. We advise creating snapshots for data backup before releasing an instance. For instructions, see Create a snapshot.
-
Snapshots and manually created images from the instance remain unaffected post-release.
Release an instance through the console
Release a pay-as-you-go instance
You can release a pay-as-you-go instance (including preemptible instances) immediately through the console.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
-
Identify the instance you want to release. In the Operation column, select
. -
Opt for immediate release or schedule it as needed.
-
In the release dialog box, choose Release Settings and click Next.
-
Immediate Release: Select this option and confirm to release the instance and cease billing immediately.
-
Scheduled Release: Choose this option, set the release time, and the system will release the instance and stop billing accordingly.
-
-
Confirm the resources to be released or retained, acknowledge the data risks, and click I Am Aware Of The Resources And Associated Resources To Be Released And Understand The Related Data Risks, then click Confirm.
-
Verify the release result and click Close.
If you've scheduled a release, you can cancel it by clicking Cancel in the billing method column as needed.
-
Release an expired subscription instance
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
-
Find the instance for release. In the Operation column, select
. -
Release the instance immediately.
-
In the release dialog box, select Release Settings as Immediate Release and click Next.
-
After confirming the resources to be released and retained, select I Am Aware Of The Resources And Associated Resources To Be Released And Understand The Related Data Risks, and then click Confirm Release.
-
Verify the release result and click Close.
-
Release an unexpired subscription instance
Subscription instances that have not expired cannot be released. To manually release such an instance, you must first convert it to a pay-as-you-go model. For more information, see how to convert a subscription to pay-as-you-go.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
-
Locate the ECS instance to be transformed. In the Operation column, click
.
```html
-
Review the conversion terms, and if acceptable, select "Elastic Compute Service (ECS) Service Terms" and click Confirm Conversion.
-
Once the conversion is successful, return to the instance list. Locate the instance you want to release. In the Operation column, select
. -
Choose to release the instance immediately or schedule the release as required.
-
In the release dialog box, select Release Settings and click Next.
-
Immediate Release: Select and confirm this option for the system to release the instance and halt billing instantly.
-
Scheduled Release: Choose this option, specify the release time, and the system will execute the release and cease billing at the set time.
-
-
Confirm the resources to be released or retained, acknowledge the data risks, and click I Am Aware Of The Resources And Associated Resources To Be Released And Understand The Related Data Risks, then click Confirm.
-
Check the release outcome and click Close.
If you've scheduled a release, you may cancel it by clicking Cancel in the billing method column as necessary.
-
Release an instance through the API
For guidance on calling OpenAPI, refer to Integration overview.
-
```html
-
For pay-as-you-go, preemptible, or expired subscription instances, you can release one or more ECS instances by invoking the following OpenAPI operations:
-
To release an ECS instance, see DeleteInstance - Delete an ECS instance.
-
To release multiple ECS instances, see DeleteInstances - Batch delete ECS instances.
-
-
If your instance is a subscription instance that has not expired, you must transform it into a pay-as-you-go instance prior to release.
-
To convert an instance to pay-as-you-go, refer to ModifyInstanceChargeType - Modify the billing method of an instance.
-
To release an ECS instance, consult DeleteInstance - Delete an ECS instance.
-
For releasing multiple ECS instances, refer to DeleteInstances - Batch delete ECS instances.
-
Release multiple instances through OOS
For bulk instance release, we recommend using the public templates from CloudOps Orchestration Service (OOS). With just the instance IDs, you can automate the release of all instances, bypassing the need for individual manual releases. For step-by-step guidance, see Batch release ECS instances.