Creates an ApsaraMQ for RocketMQ 5.x instance.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:CreateInstance |
create |
*Instance
|
None | None |
Request syntax
POST /instances HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clientToken |
string |
No |
A client-generated token that ensures request idempotence. The token must be unique across requests. It can be up to 64 ASCII characters long. |
c2c5d1274a8d4317a13bc5b0d4****** |
| body |
object |
No |
The request body. |
|
| instanceName |
string |
No |
The name of the instance to create. If you do not specify this parameter, the instance ID is used as the instance name. |
rmq-cn-72u3048uxxx |
| serviceCode |
string |
Yes |
The service code of the instance. For ApsaraMQ for RocketMQ, the service code is `rmq`. |
rmq |
| seriesCode |
string |
Yes |
The primary series code of the instance. For differences between primary series, see Product selection. Valid values:
Important After creating an instance, you can only upgrade its primary series. You cannot downgrade it. The upgrade path is: Standard Edition → Professional Edition → Platinum Edition. For example, you can upgrade from Standard Edition to Professional Edition, but not from Professional Edition to Standard Edition. Valid values:
|
standard |
| subSeriesCode |
string |
Yes |
The sub-series code of the instance. For differences between sub-series, see Product selection. Valid values:
If you set the primary series to `ultimate` (Platinum Edition), you can only set the sub-series to `cluster_ha` (High-availability Cluster Edition). Important After creating an instance, you cannot change its sub-series. Valid values:
|
cluster_ha |
| paymentType |
string |
Yes |
The billing method for the instance. ApsaraMQ for RocketMQ supports subscription and pay-as-you-go. Valid values:
For more information, see Billing methods. Valid values:
|
Subscription |
| period |
integer |
No |
The subscription duration. This parameter is valid only when `paymentType` is set to `Subscription`. Valid values:
|
3 |
| periodUnit |
string |
No |
The unit of the subscription duration. Valid values:
Valid values:
|
Month |
| autoRenew |
boolean |
No |
Specifies whether to enable auto-renewal. This parameter is valid only when `paymentType` is set to `Subscription`.
Valid values:
|
true |
| autoRenewPeriod |
integer |
No |
The auto-renewal period. This parameter is valid only when auto-renewal is enabled. Unit: months. Valid values:
|
3 |
| remark |
string |
No |
Remarks about the instance. |
This is the remark for test. |
| productInfo |
object |
No |
The instance specifications. |
|
| msgProcessSpec |
string |
No |
The computing specification for message sending and receiving. For maximum TPS limits, see Instance types. |
rmq.s2.2xlarge |
| sendReceiveRatio |
number |
No |
The ratio of the TPS for sending messages to the total TPS of the instance. For example, if the maximum TPS of an instance is 1,000 and the ratio is 0.8, the maximum TPS for sending messages is 800 and the maximum TPS for receiving messages is 200. The value must be in the range [0.05, 0.95]. Default: 0.5. |
0.5 |
| autoScaling |
boolean |
No |
Specifies whether to enable elastic TPS. Valid values:
If you enable elastic TPS, ApsaraMQ for RocketMQ lets the instance exceed the TPS limit of its basic specifications within a certain range. You are charged for the extra TPS. For billing details, see Computing fees. Note
Elastic TPS is supported only for specific instance types. For more information, see Instance types. Valid values:
|
true |
| messageRetentionTime |
integer |
No |
The message retention period. Unit: hours. For valid values, see the message retention period limits in the "Resource quotas" section of Limits. ApsaraMQ for RocketMQ provides serverless and elastic message storage. You are charged for actual storage used. Change the message retention period to control storage capacity. For more information, see Storage fees. |
72 |
| storageEncryption |
boolean |
No |
Specifies whether to enable storage encryption. |
false |
| storageSecretKey |
string |
No |
The key for storage encryption. |
xxxxx |
| capacityType |
string |
No |
The capacity mode. Valid values: `provisioned` (reserved and elastic) and `ondemand` (pay-as-you-go). |
provisioned |
| provisionedCapacity |
integer |
No |
The reserved capacity. |
5000 |
| traceOn |
boolean |
No |
Specifies whether to enable the message trace feature. Valid values: true and false. This parameter is valid only for Serverless instances. If you enable message tracing, you are charged for traces. For billing details, see Serverless billing. This parameter is not valid for pay-as-you-go or subscription instances. Message tracing is enabled by default for those instances. |
true |
| networkInfo |
object |
Yes |
The network configuration. |
|
| vpcInfo |
object |
Yes |
The VPC configuration. |
|
| vpcId |
string |
Yes |
The ID of the VPC to which the instance connects. Note
After creating an ApsaraMQ for RocketMQ instance, you cannot change its VPC. To change the VPC, release the instance and buy a new one. |
vpc-wz9qt50xhtj9krb****** |
vSwitchId
deprecated
|
string |
No |
The ID of the vSwitch to which the instance connects. If there are multiple vSwitches, separate their IDs with vertical bars (|). Note
After creating an ApsaraMQ for RocketMQ instance, you cannot change its vSwitch. To change the vSwitch, release the instance and buy a new one. Important This parameter is deprecated. Use the vSwitches parameter instead. |
vsw-uf6gwtbn6etadpv******* |
| securityGroupIds |
string |
No |
The security group ID. |
sg-bp17hpmgz96tvnsdy6so |
| vSwitches |
array<object> |
No |
The list of vSwitches. Note
After creating an ApsaraMQ for RocketMQ instance, you cannot change its vSwitch. To change the vSwitch, release the instance and buy a new one. Important This is a required parameter. Because vSwitchId is deprecated, use this parameter to configure vSwitches. |
|
|
object |
No |
|||
| vSwitchId |
string |
No |
The ID of the vSwitch to which the instance connects. |
vsw-uf6gwtbn6etadpv******* |
| internetInfo |
object |
Yes |
The Internet configuration. |
|
| internetSpec |
string |
Yes |
Specifies whether to enable Internet access. Valid values:
By default, instances connect over a VPC. If you enable Internet access, you are charged for downstream Internet bandwidth. For billing details, see Internet access fees. Valid values:
|
disable |
| flowOutType |
string |
Yes |
The billing method for Internet access. Valid values:
Valid values:
|
uninvolved |
| flowOutBandwidth |
integer |
No |
The Internet bandwidth specification. Unit: Mbit/s. This parameter is required only when the billing method for Internet access is pay-by-bandwidth. Value range: 1 to 1000. |
100 |
ipWhitelist
deprecated
|
array |
No |
The public access whitelist. You can configure an IP address whitelist only for Internet endpoints. VPC endpoints are not supported.
|
|
|
string |
No |
The IP address range in the public access whitelist. |
192.168.x.x/24 |
|
| commodityCode |
string |
No |
The commodity code.
|
ons_ rmqpost_public_cn |
| resourceGroupId |
string |
No |
The resource group ID. |
rg-aekzy6pist7uuna |
| tags |
array<object> |
No |
The list of resource tags. |
|
|
object |
No |
The resource tag. |
||
| key |
string |
No |
The key of the resource tag. |
xxxKey |
| value |
string |
No |
The value of the resource tag. |
xxxValue |
| aclInfo |
object |
No |
The access control information. |
|
| defaultVpcAuthFree |
boolean |
No |
Specifies whether to enable passwordless access over a VPC for intelligent identity recognition.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| requestId |
string |
The request ID. Each request ID is unique. Use it to troubleshoot issues. |
AF9A8B10-C426-530F-A0DD-96320B39**** |
| success |
boolean |
Indicates whether the request succeeded. |
true |
| data |
string |
The ID of the created instance. |
rmq-cn-7e22ody**** |
| code |
string |
The error code. |
200 |
| message |
string |
The error message. |
Success |
| httpStatusCode |
integer |
The HTTP status code. |
200 |
| dynamicCode |
string |
The dynamic error code. |
InstanceId |
| dynamicMessage |
string |
The dynamic error message. |
instanceId |
Examples
Success response
JSON format
{
"requestId": "AF9A8B10-C426-530F-A0DD-96320B39****",
"success": true,
"data": "rmq-cn-7e22ody****",
"code": "200",
"message": "Success",
"httpStatusCode": 200,
"dynamicCode": "InstanceId",
"dynamicMessage": "instanceId"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.