TransformToPrePaid
Converts a pay-as-you-go ApsaraDB for MongoDB instance to a subscription instance.
Operation description
Before you call this operation, make sure that you fully understand the billing methods and pricing of ApsaraDB for MongoDB.
Subscription instances cannot be converted to pay-as-you-go instances. Proceed with caution to avoid wasting resources.
When you call this operation, the instance must meet the following conditions:
The instance status is Running.
The billing method of the instance is pay-as-you-go.
The instance does not have unpaid orders for converting to a subscription instance.
The instance type is not a legacy instance type (no longer available for sale). For a list of legacy instance types, see Instance types.
To convert an instance of a legacy instance type to a subscription instance, call the ModifyDBInstanceSpec or ModifyNodeSpec operation to change the instance type first.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:TransformToPrePaid |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
dds-bp1366caac83**** |
| Period |
integer |
Yes |
The subscription duration. Unit: months. Valid values: 1 to 9, 12, 24, and 36. |
1 |
| AutoPay |
boolean |
No |
Specifies whether automatic payment is enabled for the order. Valid values:
Note
Default value: true. |
true |
| BusinessInfo |
string |
No |
The additional parameter for business information. |
{“ActivityId":"000000000"} |
| AutoRenew |
string |
No |
Specifies whether to enable auto-renewal upon expiration. Valid values:
Note
Default value: false. |
true |
| CouponNo |
string |
No |
Specifies whether to use a coupon. Valid values:
|
default |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| OrderId |
string |
The order ID. |
21022019252**** |
| RequestId |
string |
The request ID. |
2F42BB4E-461F-5B55-A37C-53B1141C**** |
Examples
Success response
JSON format
{
"OrderId": "21022019252****",
"RequestId": "2F42BB4E-461F-5B55-A37C-53B1141C****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | Period is mandatory for this action. | |
| 400 | InvalidParam | Period is invalid | |
| 400 | ResourceNotAvailable | Resource you requested is not available for finance user. | |
| 400 | InsufficientBalance | Your account does not have enough balance. | The payment failed. Please add another payment method. You can also top up or add funds to your account. |
| 403 | AlreadyPrePaid | This instance is already prepaid | The instance already uses the subscription billing method. |
| 403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | Real-name verification has not been completed for the Alibaba Cloud account. Complete real-name verification and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.