All Products
Search
Document Center

Tair (Redis® OSS-Compatible):TransformToPrePaid

更新時間:Oct 30, 2024

Changes the billing method of an ApsaraDB for Redis instance from pay-as-you-go to subscription.

Operation description

For more information about how to change the billing method in the ApsaraDB for Redis console, see Switch to subscription.

Note You cannot change the billing method of an ApsaraDB for Redis instance from subscription to pay-as-you-go.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:TransformToPrePaidupdate
  • DBInstance
    acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance. You can call the DescribeInstances operation to query the ID of the instance.

r-bp1zxszhcgatnx****
PeriodlongYes

The subscription duration of the instance. Unit: months. Valid values: 1 to 9, 12, 24, and 36.

12
AutoPaybooleanNo

Specifies whether to enable auto-renewal. Default value: false. Valid values:

  • true: yes
  • false: no. In this case, you can renew your instance in the ApsaraDB for Redis console. For more information, see Manually renew an instance.
true

Response parameters

ParameterTypeDescriptionExample
object
EndTimestring

The time when the instance expires after the billing method of the instance is changed from pay-as-you-go to subscription.

2019-01-18T16:00:00Z
RequestIdstring

The ID of the request.

426F1356-B6EF-4DAD-A1C3-DE53B9DAF586
OrderIdstring

The ID of the order.

111111111111111

Examples

Sample success responses

JSONformat

{
  "EndTime": "2019-01-18T16:00:00Z",
  "RequestId": "426F1356-B6EF-4DAD-A1C3-DE53B9DAF586",
  "OrderId": "111111111111111"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterPeriod is mandatory for this action.-
400InvalidParamPeriod is invalidThe specified subscription duration is invalid.
400ResourceNotAvailableResource you requested is not available for finance user.The requested resource is unavailable to users of Alibaba Finance Cloud.
400InsufficientBalanceYour account does not have enough balance.Your account balance is insufficient. Add funds to your account and try again.
400Order.LatestOrderIsHandingLatest order is handing, please retry later.-
403AlreadyPrePaidThis instance is already prepaidThe instance has been changed into a subscription one.
403RealNameAuthenticationErrorYour 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 timeSummary of changesOperation
2024-09-09The Error code has changed. The request parameters of the API has changedView Change Details
2023-07-20API Description Update. The Error code has changedView Change Details