Changes the billing method of a PolarDB cluster.
Operation Description
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 |
---|---|---|---|---|
polardb:TransformDBClusterPayType | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The cluster ID. | pc-bp10gr51qasnl**** |
PayType | string | Yes | The billing method of the cluster. Valid values:
| Prepaid |
RegionId | string | Yes | The ID of the region. | cn-hangzhou |
UsedTime | string | No | The subscription duration of the cluster. Valid values:
Note
This parameter is required if you set the PayType parameter to Prepaid.
| 1 |
Period | string | No | The renewal cycle of the cluster. Valid values:
Note
This parameter is required if you set the PayType parameter to Prepaid.
| Month |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfm3f4un32**** |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value. Make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | 6000170000591aed949d0f5******************** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "5E71541A-6007-4DCC-A38A-F872C31FEB45",
"ChargeType": "Prepaid",
"DBClusterId": "pc-bp10gr51qasnl****",
"ExpiredTime": "2020-04-20T10:00:00Z",
"OrderId": "20515760028****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOrderCharge.NotSupport | The specified order charge does not support in PolarDB. | - |
400 | InvalidOrderTask.NotSupport | The Current ClusterId exist Order Task in PolarDB. | - |
400 | InvalidPaymentMethod.Incomplete | No payment method is specified for your account. We recommend that you add a payment method. | The valid payment method of vouchers is not specified for your account. Add a valid payment method. |
403 | OperationDenied.LockMode | The operation is not permitted when the instance is locked. | This operation is not supported while the cluster is in the locked state. |
404 | InvalidDBCluster.NotFound | The specified DBClusterId is not found. | The specified cluster ID does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-09-12 | The error codes of the API operation change. | see changesets | ||||||||
| ||||||||||
2021-05-21 | The error codes of the API operation change. | see changesets | ||||||||
| ||||||||||
2021-05-21 | The error codes of the API operation change. | see changesets | ||||||||
| ||||||||||
2021-05-14 | Add Operation | see changesets |