Changes the billing method of an ApsaraDB for Redis instance from subscription to pay-as-you-go.
Operation Description
Before you call this operation, make sure that you understand relevant precautions and billing rules. For more information, see the following topics:
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the instance. You can call the DescribeInstances operation to query the ID of the instance. | r-bp1zxszhcgatnx**** |
Period | long | No | The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36. NoteThis parameter is valid and required only if you set the ChargeType parameter to PrePaid. | 1 |
AutoPay | boolean | No | Specifies whether to enable automatic payment. Default value: true. Valid values:
| true |
ChargeType | string | Yes | The new billing method. Valid values:
| PrePaid |
Response parameters
Examples
Sample success responses
JSON
format
{
"EndTime": "2021-05-13T00:00:00Z",
"RequestId": "82C791FB-8979-489E-853D-706D7743****",
"OrderId": "20881824000****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter | Period is mandatory for this action. | - |
400 | InvalidParam | Period is invalid | The specified subscription duration is invalid. |
400 | ResourceNotAvailable | Resource you requested is not available for finance user. | The requested resource is unavailable to users of Alibaba Finance Cloud. |
400 | InsufficientBalance | Your account does not have enough balance. | Your account balance is insufficient. Add funds to your account and try again. |
400 | Order.LatestOrderIsHanding | Latest order is handing, please retry later. | - |
403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | Your account has not completed real-name verification. |
For a list of error codes, visit the Service error codes.