Batch Convert to Postpay
Updated at:2025-10-20
This API is used to batch convert the charge type of BCC instances from pay-as-you-go (postpay) to subscription (prepay).
Request structure
Plain Text
1 POST /v{version}/instance/batch/charging?{action} HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
4
5 {
6 "config": [
7 {
8 "instanceId": instanceId,
9 "cdsList": [volumeId1, volumeId2]
10 },
11 {
12 "instanceId": instanceId1,
13 "cdsList": [volumeId2, volumeId3]
14 }
15 ]
16 }
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number |
| action | String | Yes | Query | Operation executed on the instance, current value: toPostpay |
| config | List<[PostpayConfig](BCC/API Reference/Appendix.md#PostpayConfig)> | Yes | RequestBody | Instances for batch convert to postpay, maximum 20 instances |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| orderId | String | Order ID |
Request example
Plain Text
1POST /v2/instance/batch/charging?toPostpay HTTP/1.1
2Host: bcc.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048f***
5{
6 "config": [
7 {
8 "instanceId": "i-43TqYnng",
9 "cdsList":["v-tP2MJ3YI", "v-9eLRwv8n"]
10 },
11 {
12 "instanceId": "i-4D3Jinng",
13 "cdsList":["all"]
14 }
15 ]
16}
17
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 817d964c-9dda-43a0-8484-dbe48522cd10
3Date: Thu, 23 Mar 2023 06:30:58 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "orderId": "5c001b75e24d***,6c001b75e24d***,7c001b75e24d***,8c001b75e24d***,9c001b75e24d***"
8}
