You need to enable JavaScript to run this app.
Message Queue for RocketMQ

Message Queue for RocketMQ

Copy page
Download PDF
Instance management
ModifyInstanceChargeType - change billing method
Copy page
Download PDF
ModifyInstanceChargeType - change billing method
Call the ModifyInstanceChargeType API to change the instance billing method.​
Instructions​
This API changes the instance's billing method and currently only supports switching pay-as-you-go instances to subscriptions. This operation does not affect the instance's running.​
tip​
  • The status of the instance is Running.​
  • When switching from pay-as-you-go to subscriptions, you need to settle the pay-as-you-go instance and prepay for the annual and monthly fees. Ensure that balance in your account is sufficient.​
  • Currently, only switching from pay-as-you-go to subscriptions is supported. Confirm the instance's billing method is pay-as-you-go before proceeding.​
  • Once the API call is successful, the billing method adjustment takes effect in about 30 seconds. Please wait patiently.​
Note​
Request frequency: This API limits requests to 100 times per second; the per-user request frequency limit is 20 times per second.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the unique request parameters of this interface and some common parameters are listed below. For more information, see common parameters.​
ActionstringrequiredExample value: ModifyInstanceChargeType​
Action to perform, value: ModifyInstanceChargeType.​
​
Version string requiredExample value: 2023-01-01​
API version, value: 2023-01-01.​
​
InstanceId string required Example: rocketmq-cnai1f0c29ca****​
Instance ID.​
​
ChargeInfo object required Example: /​
Billing method after switching​
Currently, only instances with pay-as-you-go billing can be switched to Subscription instances.​
ChargeType string required Example value: PrePaid​
Payment type. Value:​
  • PostPaid: pay-as-you-go​
  • PrePaid (default): Subscription​
​
AutoRenew boolean Optional Example: true​
whether to auto-renew after the subscription instance expires.​
  • true: Auto-renewal enabled.​
  • -false: Auto-renewal disabled. manual renewal is required after expiration. Otherwise, the instance will be shut down.​
tip​
Required only for Subscription type instances, that is, must be specified when ChargeType is set to PrePaid.​
​
PeriodUnit string Optional Example value: Monthly​
Subscription instance lifecycle unit, supports purchasing in months or years. The components are:​
  • Monthly: (default) monthly subscription​
  • Yearly: annual subscription​
tip​
Only subscription instances need to be specified, i.e. when ChargeType is set to PrePaid, it is required.​
​
Period integer Optional Example value: 1​
Subscription duration for subscription-type instances.​
  • When PeriodUnit is set to Monthly, the range is 1–9.​
  • When PeriodUnit is set to Yearly, the range is 1–3.​
tip​
Only subscription-type instances need to be specified. This is mandatory if ChargeType is set to PrePaid.​
​
​
​
​
Response parameters​
Only the unique response parameters of this API are listed below. For more details, see response structure.​
OrderId string Example value: order-71208966164****​
Order ID.​
​
​
​
Request example​
​
POST /?Action=ModifyInstanceChargeType&Version=2023-01-01 HTTP/1.1​
Host: rocketmq.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20260109T072918Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260109/cn-beijing/RocketMQ/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"InstanceId": "rocketmq-cnai1f0c29ca****",​
"ChargeInfo": {​
"ChargeType": "zhangsan"​
}​
}​
​
Response example​
​
{​
"ResponseMetadata": {​
"RequestId": "202302271903349B56E707EFFA7E69****",​
"Action": "ModifyInstanceChargeType",​
"Version": "2023-01-01",​
"Service": "RocketMQ",​
"Region": "cn-shanghai"​
},​
"Result": {​
"OrderId": "Order720478887683310****"​
}​
}​
​
Error code​
The following table lists error codes related to this interface and business logic. Refer to the Public error codes section for common error codes.​
​
Status code​
Error code​
Error message​
description​
200​
OK​
OK​
Success.​
400​
InvalidParameter​
The specified parameter %s is not valid.​
The parameter value %s is invalid. Check and try again.​
400​
NotModifiedParameter​
The resource was not changed.​
No configuration changed.​
400​
OperationDenied.InvalidRequest​
The request that you specified is not valid.​
Request error. Check and try again.​
400​
InvalidPara​
The specified parameter is not valid.​
The parameter value is invalid.​
403​
OperationDenied_AccountNotAuthorized​
You are not authorized to perform this operation.​
You are not authorized. Authorize or switch accounts and try again.​
403​
OperationDenied_InvalidInstanceStatus​
The operation is not valid for the current status of the instance.​
The current instance state does not allow this operation.​
403​
OperationDenied.VersionUnsupported​
The current instance version does not support this operation.Please upgrade the instance and try again.​
The current instance version does not support this operation. Please upgrade the instance and try again.​
403​
OperationDenied.TaskIsRunning​
An operation is currently in progress. Try again later.​
Background tasks are running, please try again later.​
403​
OperationDenied.InvalidInstanceStatus​
The operation is not valid for the current status of the instance.​
The current instance state does not allow this operation.​
403​
OperationDenied.ResourceOccupied​
The resource is busy now, please try again later.​
The resource is busy, possibly because it is being accessed or reclaimed.​
403​
OperationDenied.AccountNotAuthorized​
You are not authorized to perform this operation.​
You do not have the required permissions. Authorize or switch accounts and try again.​
404​
InvalidInstanceId_NotFound​
The specified Instance ID does not exist.​
Instance does not exist.​
404​
InvalidInstanceId.NotFound​
The specified Instance ID does not exist.​
Instance does not exist.​
500​
ServerInternalError​
The request failed due to some unknown error, exception or failure.​
Internal service error.​
500​
InternalError​
The request failed due to some unknown error, exception or failure.​
Internal error. Try again later.​
500​
ResourceIsBusy​
The resource is busy now, please try again later.​
The resource is busy, possibly because it is being accessed or reclaimed.​
503​
ServiceUnavailable​
The request failed due to a temporary failure of the server.​
The service is temporarily unavailable.​
​
Last updated: 2026.02.09 11:43:18