Changing the Cluster Billing Mode from Pay-per-use to Yearly/Monthly
Function
This API is used to change the cluster billing mode from pay-per-use to yearly/monthly.
Debugging
You can debug this API through automatic authentication in API Explorer.
URI
POST /v1.0/{project_id}/cluster/{cluster_id}/period
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. |
cluster_id |
Yes |
String |
ID of the cluster that you want to change the billing mode to yearly/monthly. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
periodType |
Yes |
Integer |
Subscription type.
|
periodNum |
Yes |
Integer |
Subscribed periods.
|
isAutoRenew |
No |
Integer |
Whether to automatically renew the subscription. If this parameter is not specified, the subscription is not automatically renewed.
|
isAutoPay |
No |
Integer |
Indicates whether to enable automatic payment from your Huawei Cloud account. This parameter takes effect only for yearly/monthly clusters.
|
consoleURL |
No |
String |
URL of the cloud service console. After the subscription is completed, this URL can be used to switch to the cloud service console page to view the information. (This parameter is used only for manual payment.) |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
orderId |
String |
Order ID. (The order is a new purchase.) |
Example Requests
Change the cluster billing mode from pay-per-use to yearly/monthly.
{ "periodType" : 2, "periodNum" : 1, "isAutoRenew" : 1, "isAutoPay" : 0, "consoleURL" : "https://console.xxx.huawei.com/elasticsearch-pre/?locale=zh-cn®ion=xxx#/es/management/elasticsearch" }
Example Responses
Status code: 200
Request succeeded.
{ "orderId" : "CS2112281600EBHKR" }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Invalid request. Modify the request before retry. |
403 |
Identity authentication failed. The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot