Creates an ApsaraMQ for RocketMQ 5.x series instance.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:CreateInstance |
create |
*Instance
|
|
None |
Request syntax
POST /instances HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
c2c5d1274a8d4317a13bc5b0d4****** |
| body |
object |
No |
The body parameters. |
|
| instanceName |
string |
No |
The name of the instance to be created. |
rmq-cn-72u3048uxxx |
| serviceCode |
string |
Yes |
The service encoding of the instance. The service encoding for MSMQ RocketMQ is rmq. |
rmq |
| seriesCode |
string |
Yes |
The primary series encoding of the instance. For more information about the differences between primary series, see Product selection. Valid values:
|
standard |
| subSeriesCode |
string |
Yes |
The sub-series encoding of the instance. For more information about the differences between sub-series, see Product selection. Valid values:
|
cluster_ha |
| paymentType |
string |
Yes |
The payment type of the instance. MSMQ RocketMQ supports subscription and pay-as-you-go. Valid values:
|
Subscription |
| period |
integer |
No |
The subscription duration. This parameter takes effect only when the payment type of the instance is Subscription. |
3 |
| periodUnit |
string |
No |
The minimum epoch unit of the subscription duration. Valid values:
|
Month |
| autoRenew |
boolean |
No |
Specifies whether to enable auto-renewal. This parameter takes effect only when the payment type of the instance is Subscription. Valid values:
|
true |
| autoRenewPeriod |
integer |
No |
The Unified Auto Renewal Cycle. This parameter takes effect only when auto-renewal is enabled. Unit: months. |
3 |
| remark |
string |
No |
The remarks of the instance. |
This is the remark for test. |
| productInfo |
object |
No |
The instance specification information. |
|
| msgProcessSpec |
string |
No |
The message sending and receiving compute specification. For more information about the TPS upper limit for message sending and receiving, see Instance specifications. |
rmq.s2.2xlarge |
| sendReceiveRatio |
number |
No |
The ratio of message sending TPS to the total message sending and receiving TPS of the instance. |
0.5 |
| autoScaling |
boolean |
No |
Specifies whether to enable burstable elastic scaling beyond the specification. Valid values:
|
true |
| messageRetentionTime |
integer |
No |
The message retention period. Unit: hours. |
72 |
| storageEncryption |
boolean |
No |
Indicates whether storage encryption is enabled. |
false |
| storageSecretKey |
string |
No |
The key for storage encryption. |
xxxxx |
| capacityType |
string |
No |
The capacity pattern. Valid values:
|
provisioned |
| provisionedCapacity |
integer |
No |
The provisioned capacity. |
5000 |
| traceOn |
boolean |
No |
Indicates whether the message trace feature is enabled. |
true |
| drReplicationMode |
string |
No |
The cross-region replication pattern. Valid values:
|
async_cross_az |
| adaptiveElasticity |
boolean |
No |
||
| networkInfo |
object |
Yes |
The network configuration information. |
|
| vpcInfo |
object |
Yes |
The VPC configuration information. |
|
| vpcId |
string |
Yes |
The ID of the VPC to which the instance is connected. Note
After a Message Queue for Apache RocketMQ instance is created, you cannot change the VPC to which the instance is connected. If you want to change the VPC, you must release the instance and purchase a new one. |
vpc-wz9qt50xhtj9krb****** |
vSwitchId
deprecated
|
string |
No |
The ID of the vSwitch to which the instance is connected. If you want to connect the instance to multiple vSwitches, separate the vSwitch IDs with vertical bars (|). Note
After a Message Queue for Apache RocketMQ instance is created, you cannot change the vSwitch to which the instance is connected. If you want to change the vSwitch, you must release the instance and purchase a new one. Important
This parameter is deprecated. We recommend that you use the |
vsw-uf6gwtbn6etadpv******* |
| securityGroupIds |
string |
No |
The ID of the security group. |
sg-bp17hpmgz96tvnsdy6so |
| vSwitches |
array<object> |
No |
The list of vSwitches. Note
After a Message Queue for Apache RocketMQ instance is created, you cannot change the vSwitches for the instance. If you want to change the vSwitches, you must release the instance and purchase a new one. Important
This parameter is required. We recommend that you use this parameter to specify a vSwitch instead of the deprecated |
|
|
object |
No |
The vSwitches. |
||
| vSwitchId |
string |
No |
The ID of the vSwitch to which the instance is connected. |
vsw-uf6gwtbn6etadpv******* |
| internetInfo |
object |
Yes |
The public network configuration information. |
|
| internetSpec |
string |
Yes |
Specifies whether to enable Internet access. By default, instances can be accessed only within a VPC. If you enable Internet access for an instance, you are charged for Internet traffic that is generated by the instance. For more information, see Internet access fees. Valid values:
|
disable |
| flowOutType |
string |
Yes |
The billing method for Internet access. Valid values:
|
uninvolved |
| flowOutBandwidth |
integer |
No |
The Internet bandwidth. 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 IP address whitelist for Internet access. You can configure an IP address whitelist only for public endpoints. VPC endpoints do not support this feature.
|
|
|
string |
No |
An IP address or CIDR block in the whitelist. |
192.168.x.x/24 |
|
commodityCode
deprecated
|
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 allow authentication-free access from VPC endpoints when the intelligent identity recognition type is used. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID. Each request ID is unique and can be used to troubleshoot issues. |
AF9A8B10-C426-530F-A0DD-96320B39**** |
| success |
boolean |
Indicates whether the operation was successful. |
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.