All Products
Search
Document Center

ApsaraDB for Redis:TransformToPrePaid

Last Updated:Nov 03, 2023

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

Operation Description

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

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.

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

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

r-bp1zxszhcgatnx****

r-bp1zxszhcgatnx****
PeriodlongYes

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

12
AutoPaybooleanNo

true

true

Response parameters

ParameterTypeDescriptionExample
object
EndTimestring

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.
2019-01-18T16:00:00Z
RequestIdstring

The ID of the request.

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

The operation that you want to perform. Set the value to TransformToPrePaid.

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
2023-07-20API Description Update,The error codes of the API operation change.see changesets
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 403