Creates an ApsaraMQ for RocketMQ 5.x instance.
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 |
---|---|---|---|---|
rocketmq:CreateInstance | create | *Instance acs:rocketmq:{#regionId}:{#accountId}: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 value of this parameter, but you must ensure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | c2c5d1274a8d4317a13bc5b0d4****** |
body | object | No | The request body. | |
instanceName | string | No | The name of the instance that you want to create. If you leave this parameter empty, the instance ID is used as the instance name. | rmq-cn-72u3048uxxx |
serviceCode | string | Yes | The code of the service to which the instance belongs. The service code of ApsaraMQ for RocketMQ is rmq. | rmq |
seriesCode | string | Yes | The primary edition of the instance. For information about the differences among primary edition instances, see Instance selection. Valid values:
Note
After you create an instance, you can only upgrade the primary edition of the instance. The following editions are sorted in ascending order: Standard Edition, Professional Edition, Enterprise Platinum Edition. For example, you can upgrade an instance from Standard Edition to Professional Edition, but you cannot downgrade an instance from Professional Edition to Standard Edition.
| standard |
subSeriesCode | string | Yes | The sub-category edition of the instance. For information about the differences among sub-category edition instances, see Instance selection. Valid values:
If you set seriesCode to ultimate, you can set this parameter only to cluster_ha. Note
After you create an instance, you cannot change the sub-category edition of the instance.
Valid values:
| cluster_ha |
paymentType | string | Yes | The billing method of the instance. ApsaraMQ for RocketMQ supports the subscription and pay-as-you-go billing methods. Valid values:
For more information, see Billing methods. | Subscription |
period | integer | No | The subscription duration of the instance. This parameter takes effect only if you set paymentType to Subscription. Valid values:
| 3 |
periodUnit | string | No | The unit of the subscription duration. Valid values:
| Month |
autoRenew | boolean | No | Specifies whether to enable auto-renewal for the instance. This parameter takes effect only if you set paymentType to Subscription. Valid values:
| true |
autoRenewPeriod | integer | No | The auto-renewal cycle of the instance. This parameter takes effect only if you set autoRenew to true. Unit: months. Valid values:
| 3 |
remark | string | No | The instance description. | This is the remark for test. |
productInfo | object | No | The information about the instance specifications. | |
msgProcessSpec | string | Yes | The computing specification that specifies the messaging transactions per second (TPS) of the instance. For more information, see Instance editions. | rmq.s2.2xlarge |
sendReceiveRatio | float | No | The ratio of the message sending TPS to the messaging TPS of the instance. For example, if the maximum messaging TPS of an instance is 1,000 and the ratio of the message sending TPS to the messaging TPS of the instance is 0.8, the maximum message sending TPS of the instance is 800 and the maximum message receiving TPS is 200. Valid values: 0 to 1. Default value: 0.5. | 0.5 |
autoScaling | boolean | No | Specifies whether to enable the elastic TPS feature for the instance. Valid values:
After you enable the elastic TPS feature for an ApsaraMQ for RocketMQ instance, you can use a specific amount of TPS that exceeds the specification limit. You are charged for the elastic TPS feature. For more information, see Computing fees. Note
The elastic TPS feature is supported only by instances of specific editions. For more information, see Instance editions.
| true |
messageRetentionTime | integer | No | The retention period of messages. Unit: hours. For information about the valid values of this parameter, see the "Limits on resource quotas" section of the Limits topic. ApsaraMQ for RocketMQ supports serverless scaling of message storage. You are charged storage fees based on your actual storage usage. You can change the retention period of messages to manage storage capacity. For more information, see Storage fees. | 72 |
chargeType | string | No | The billing method. Valid values:
| provisioned |
intranetSpec | string | No | This parameter is no longer used. You do not need to configure this parameter. | xxxx |
storageEncryption | boolean | No | Indicates whether storage encryption is enabled. | false |
storageSecretKey | string | No | The storage encryption key. | xxx |
networkInfo | object | Yes | The information about the network. | |
vpcInfo | object | Yes | The virtual private cloud (VPC)-related configurations. | |
vpcId | string | Yes | The ID of the VPC with which the instance to be created is associated. Note
After you create an ApsaraMQ for RocketMQ instance, you cannot change the VPC with which the instance is associated. If you want to change the VPC with which the instance is associated, you must release the instance and create a new instance.
| vpc-wz9qt50xhtj9krb****** |
vSwitchIddeprecated | string | No | The ID of the vSwitch with which the instance is associated. If you want to specify multiple vSwitches, separate the vSwitches with vertical bars (|). Note
After you create an ApsaraMQ for RocketMQ instance, you cannot change the vSwitch with which the instance is associated. If you want to change the vSwitch with which the instance is associated, you must release the instance and purchase a new instance.
Note
We recommend that you configure vSwitches instead of this parameter.
| vsw-uf6gwtbn6etadpv******* |
securityGroupIds | string | No | The ID of the security group to which the instance belongs. | sg-bp17hpmgz96tvnsdy6so |
vSwitches | array<object> | No | The vSwitches. Note
After you create an ApsaraMQ for RocketMQ instance, you cannot change the vSwitch with which the instance is associated. If you want to change the vSwitch with which the instance is associated, you must release the instance and purchase a new instance.
Note
This parameter is required. We recommend that you configure this parameter instead of vSwitchId.
| |
object | No | |||
vSwitchId | string | No | The ID of the vSwitch with which the instance is associated. | vsw-uf6gwtbn6etadpv******* |
internetInfo | object | Yes | The Internet-related configurations. | |
internetSpec | string | Yes | Specifies whether to enable the Internet access feature. Valid values:
By default, ApsaraMQ for RocketMQ allows you to access instances in VPCs. If you enable Internet access for an instance, you can access the instance over the Internet. After you enable this feature, you are charged for outbound Internet traffic. For more information, see Internet access fees. | disable |
flowOutType | string | Yes | The billing method of Internet usage. Valid values:
| uninvolved |
flowOutBandwidth | integer | No | The Internet bandwidth. Unit: MB/s. This parameter is required only if you set flowOutType to payByBandwidth. Valid values: 1 to 1000. | 100 |
ipWhitelistdeprecated | array | No | The whitelist that includes the IP addresses that are allowed to access the ApsaraMQ for RocketMQ broker over the Internet. This parameter can be configured only if you use the public endpoint to access the instance.
| |
string | No | The IP addresses in the whitelist. | 192.168.x.x/24 | |
commodityCode | string | No | The commodity code. Valid values:
| ons_ rmqpost_public_cn |
resourceGroupId | string | No | The ID of the resource group. | rg-aekzy6pist7uuna |
Response parameters
Examples
Sample success responses
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
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-26 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-07-03 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-10-09 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-10-09 | The request parameters of the API has changed | View Change Details |
2023-10-09 | The request parameters of the API has changed | View Change Details |