Create automatic renewal rules
Updated at:2025-10-20
This API allows the creation of automatic renewal rules.
- If your resource is approaching expiration (less than 24 hours remaining), it is recommended to perform a manual renewal first.
- When automatic renewal is enabled, the system will automatically renew the resource 7 days before it expires.
- Automatic renewal will follow the most recently specified renewal period.
- Automatic renewal rules are synchronized for prepaid CDS linked to the instance.
Request structure
Plain Text
1 POST /v{version}/instance/batchCreateAutoRenewRules HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
4
5 {
6 "renewTimeUnit":renewTimeUnit,
7 "renewTime": renewTime,
8 "renewEip": renewEip,
9 "instanceId": instanceId
10 }
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 |
| instanceId | String | Yes | RequestBody | Instance ID |
| renewTimeUnit | String | Yes | RequestBody | Renewal time, in months (supporting 1, 2, 3, 4, 5, 6, 7, 8, 9) or years (supporting 1, 2, 3) |
| renewTime | int | Yes | RequestBody | Renewal period |
| renewEip | boolean | No | RequestBody | Indicate whether to enable auto-renewal for EIP. The default setting is true. |
Response headers
No special headers are required beyond the standard ones.
Request example
Plain Text
1POST /v2/instance/batchCreateAutoRenewRules HTTP/1.1
2Host: bcc.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048f***
5{
6 "renewTimeUnit": "month",
7 "renewTime": 1,
8 "renewEip": false,
9 "instanceId": "i-RrgyXFh4"
10}
11
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 956690b1-f4b0-4452-9e50-8e75cae04333
3Date: Tue, 28 Mar 2023 08:06:35 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
