Changes a pay-as-you-go Tair (Redis OSS-compatible) instance to a subscription instance.
Operation description
For more information about how to change the billing method in the ApsaraDB for Redis console, see Switch to subscription.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
kvstore:TransformToPrePaid | update | *DBInstance acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId} |
| none |
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 | Yes | The subscription duration of the instance. Unit: months. Valid values: 1 to 9, 12, 24, and 36. | 12 |
AutoPay | boolean | No | Specifies whether to enable auto-renewal. Default value: false. Valid values:
| true |
Response parameters
Examples
Sample success responses
JSON
format
{
"EndTime": "2019-01-18T16:00:00Z",
"RequestId": "426F1356-B6EF-4DAD-A1C3-DE53B9DAF586",
"OrderId": "111111111111111"
}
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 | AlreadyPrePaid | This instance is already prepaid | The instance has been changed into a subscription one. |
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.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-09 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-07-20 | API Description Update. The Error code has changed | View Change Details |