Update Auto-Renewal Switch
Enable or disable auto-renewal for one resource. Only the switch of an existing policy is modified; SKU, package and currency are not submitted or modified.
Interface Address:
text
/papi/wallet/auto-renew/updateRequest Method:
text
POSTContent-Type:
text
application/jsonHeader Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| X-Access-Key | string | Yes | API access key ID. See API Rules for authentication |
| X-Signature | string | Yes | Signature value, Base64-encoded HMAC-SHA256 result |
| X-Timestamp | string | Yes | Millisecond-level Unix timestamp (13 digits) |
| X-Nonce | string | Yes | Random string, 10~32 lowercase letters and digits |
Body Parameters (single resource):
| Parameter | Type | Required | Description |
|---|---|---|---|
| resourceType | integer | Yes | Resource type: 1 cloud phone, 4 proxy IP, 6 cloud disk; one request covers one resource type |
| resourceUid | string | Yes | Resource identifier from the policy list |
| enabled | boolean | Yes | true to enable, false to disable |
Request Example (single resource):
json
{
"resourceType": 1,
"resourceUid": "resourceUid from the policy list",
"enabled": true
}Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| code | integer | Error code. See Error Codes |
| data | object | Updated policy object |
| ├─ resourceType | integer | Resource type: 1 cloud phone, 4 proxy IP, 6 cloud disk |
| ├─ resourceUid | string | Resource identifier |
| ├─ enabled | integer | Auto-renewal switch: 0 disabled, 1 enabled (boolean is used in requests) |
| ├─ status | string | Policy status |
| ├─ currency | string | Currency code |
| ├─ skuCode | string | SKU code |
| ├─ packageCode | string | Package code |
| msg | string | Error message |
Response Example:
json
{
"code": 0,
"data": {
"resourceType": 1,
"resourceUid": "",
"enabled": 1,
"status": "",
"currency": "USD",
"skuCode": "",
"packageCode": ""
},
"msg": ""
}Notes:
- The policy must exist and the payer, team and resource ownership checks must pass; enabling also validates the resource, SKU, package and validity period.
- Disabling keeps the existing resource and package information; cloud disks are per purchase record and cannot be replaced with a team ID.
