All Products
Search
Document Center

CloudOps Orchestration Service:Change the billing method of multiple ECS instances at a time

Last Updated:Feb 28, 2026

Use the ACS-ECS-BulkyModifyInstanceChargeType public template in CloudOps Orchestration Service (OOS) to change the billing method of multiple Elastic Compute Service (ECS) instances in a single automated execution. You can switch instances from subscription to pay-as-you-go, or from pay-as-you-go to subscription, without modifying each instance individually.

ECS supports two billing methods. For details, see Subscription and Pay-as-you-go.

Prerequisites

Make sure you meet the prerequisites for the billing method change you want to perform:

Procedure

  1. Go to the Automated Task > Public Template page in the OOS console.

  2. In the search box, enter ACS-ECS-BulkyModifyInstanceChargeType and click the Search icon. Find the template in the results, and then click Create Execution.

  3. On the Create Task page, configure the required parameters in the Basic Information step, and then click Next Step: Parameter Settings.

  4. In the Parameter Settings step, configure the billing, instance selection, and execution parameters. For details about each parameter, see Parameter reference.

  5. Click Next Step: OK. Review your settings, and then click Create.

  6. On the Task Execution Management page, find the execution you created and check its status: To view detailed progress, click Details in the Actions column to open the execution logs. You can monitor the execution progress and status of each instance in real time.

    • Running -- The billing method of the specified ECS instances is being changed.

    • Success -- The billing method change is complete. You can verify the new billing method on the Instance page of the ECS console.

Parameter reference

The following tables describe the parameters you configure when creating the execution.

Billing parameters

Parameter

Description

Default

Required

InstanceChargeType

The target billing method for the instances. Valid values: PostPaid (pay-as-you-go), PrePaid (subscription).

PostPaid

Yes

NetworkChargeType

The billing method for network usage. Valid values: PayByBandwidth, PayByTraffic, or empty (keeps the current network billing method unchanged).

PayByTraffic

Yes

Period

The subscription duration. If PeriodUnit is set to Week, valid values are 1 to 4. If PeriodUnit is set to Month, valid values are 1 to 12, 24, 36, 48, and 60.

1

Required when InstanceChargeType is PrePaid

PeriodUnit

The time unit of the subscription duration. Valid values: Week, Month.

Month

Required when InstanceChargeType is PrePaid

IncludeDataDisks

Specifies whether to change the billing method of all data disks attached to the instances from pay-as-you-go to subscription. Valid values: true, false.

false

Required when InstanceChargeType is PrePaid

Instance selection

Parameter

Description

Required

RegionId

The ID of the region where the target instances are located.

Yes

TargetInstance

The ECS instances for which you want to change the billing method.

Yes

Execution options

OOS processes billing changes across instances in parallel. The following optional parameters control how the execution runs.

Parameter

Description

Default

Required

RateControl

The concurrency settings for the execution. Concurrency controls how many instances are processed at the same time. MaxErrors sets how many failures are allowed before the execution stops.

Mode: Concurrency, MaxErrors: 0, Concurrency: 10

No

OOSAssumeRole

The Resource Access Management (RAM) role to be assumed by OOS.

OOSServiceRole

No

Template reference

This procedure uses the ACS-ECS-BulkyModifyInstanceChargeType public template. You can view the full template definition on the template details page in the OOS console.