- Documentation
Elastic Compute Service
Elastic Compute Service
API Reference
Volumes
ModifyVolumeChargeType - Switch volume billing method
Volumes
ModifyVolumeChargeType - Switch volume billing method
ModifyVolumeChargeType - Switch volume billing method
Call the ModifyVolumeChargeType API to change the volume billing method.
precautions
- Switch from pay-as-you-go to annual or monthly subscription
- Only pay-as-you-go data volumes mounted on annual or monthly ECS instances can be converted individually to annual or monthly subscription data volumes, and the expiration of the data volume will match the ECS instance.
- Switch from annual or monthly subscription to pay-as-you-go
- If an annual or monthly system volume needs to be converted to pay-as-you-go, it must be switched together with the attached ECS instance. For details, see Switch from annual or monthly subscription to pay-as-you-go. Annual or monthly data volumes can be converted individually to pay-as-you-go, or together with the instance.
- When a yearly or monthly volume is converted to pay-as-you-go, the platform will deduct the used amount and refund the remaining amount paid (in cash, excluding coupon deductions) to your Volcano Engine account balance. Used coupons are non-refundable. For detailed rules on refund calculation, see cancellation instructions.
Debugging
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
request parameters
Only the unique request parameters and some common parameters for this interface are listed below. For more information, see common parameters. Action string required Example value: ModifyVolumeChargeType
Operation to perform, value: ModifyVolumeChargeType.
Version string required Example: 2020-04-01
The version of the API is: 2020-04-01.
InstanceId string required Example: i-bp1i778bq705cvx1****
Mounted volume instance ID.
warning
Only pay-as-you-go data disks attached to subscription instances can be converted to subscription.
DiskChargeType string required Example: PrePaid
Volume billing method. Value descriptions are as follows:
- PrePaid: Convert pay-as-you-go data disks to subscription data disks.
- PostPaid: Convert subscription data disks to pay-as-you-go data disks.
AutoPay boolean Optional Example: true
Enable automatic payment. Value descriptions are as follows:
- true (default): Automatic payment. Ensure your account balance is sufficient, as insufficient funds will result in abnormal orders that can only be voided.
- false: Only generates an order without charging the account. If your account balance is insufficient, a normal unpaid order will be generated. You can log in to the ECS console to pay for this order.
VolumeIds.N string[] required Example: VolumeIds.1=vol-3tiz8tg97u3vj0x0**** VolumeIds.2=vol-3tj20xxpd63vj0wy****
List of volume IDs to be converted for billing method.
tip
Supports batch conversion. Only data volumes mounted on the same subscription instance can be converted in bulk.
Response parameters
Only the unique response parameters for this interface are listed below. For more details, refer to response structure. Number string Example value: Order708151602546642****
The returned order number.
Request example
Back to example
error code
The following table lists error codes related to this interface and business logic. For public error codes, refer to the Public Error Codes documentation.
Last updated: 2026.01.09 18:19:56