All Products
Search
Document Center

ApsaraDB for Redis:TransformInstanceChargeType

Last Updated:Mar 20, 2023

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

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

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

r-bp1zxszhcgatnx****
PeriodlongNo

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
AutoPaybooleanNo

Specifies whether to enable automatic payment. Default value: true. Valid values:

  • true: Automatic payment is enabled.
  • false: Automatic payment is disabled. If automatic payment is disabled, you must perform the following steps to complete the payment: In the top navigation bar of the ApsaraDB for Redis console, choose Expenses > Renewal Management. In the left-side navigation pane of the Billing Management console, click Orders. On the Orders page, find the order and complete the payment.
true
ChargeTypestringYes

The new billing method. Valid values:

  • PrePaid: subscription. If you set this parameter to PrePaid, you must also set the Period parameter.
  • PostPaid: pay-as-you-go.
PrePaid

Response parameters

ParameterTypeDescriptionExample
object
EndTimestring

The time when the instance expires.

NoteA value is returned for this parameter only if the instance was changed from pay-as-you-go to subscription.
2021-05-13T00:00:00Z
RequestIdstring

The ID of the request.

82C791FB-8979-489E-853D-706D7743****
OrderIdstring

The ID of the order.

20881824000****

Examples

Sample success responses

JSONformat

{
  "EndTime": "2021-05-13T00:00:00Z",
  "RequestId": "82C791FB-8979-489E-853D-706D7743****",
  "OrderId": "20881824000****"
}

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.-
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.