Creates a Message Queue for Apache RocketMQ instance.

Usage notes

An instance is a virtual machine (VM) that is used for the Message Queue for Apache RocketMQ service to store topic and group information. You can call this operation when you need to create new service resources for the release of new business. Take note of the following points when you call this operation:

  • A maximum of eight Message Queue for Apache RocketMQ instances can be deployed in each region.
  • This operation can be called only to create a Standard Edition instance, instead of an Enterprise Platinum Edition instance. You can use the Message Queue for Apache RocketMQ console to create both Standard Edition and Enterprise Platinum Edition instances. For more information, see Manage instances.

QPS limit

The queries-per-second (QPS) limit on this operation is 10 per user. Throttling is triggered when the number of calls to this operation per second exceeds the QPS limit. Throttling may affect your business. Therefore, call this operation based on your needs. For more information, see QPS limits.

Authorization information

By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after they are authorized to use it. The following table lists the authorization information of this operation. For more information, see Policies and examples.

API

Action

Resource

OnsInstanceCreate

mq:CreateInstance

acs:mq:*:*:*

Request parameters

Parameter Type Required Example Description
Action String Yes OnsInstanceCreate

The operation that you want to perform. Set the value to OnsInstanceCreate.

InstanceName String Yes Test instance

The name of the instance. Description of valid values:

  • The name of the instance must be unique in the region where the instance is deployed.
  • The name must be 3 to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_).
Remark String No Description

The description of the instance.

Response parameters

Parameter Type Example Description
Data Struct

The returned results.

InstanceId String MQ_INST_188077086902****_BXSuW61e

The ID of the instance that was created.

InstanceType Integer 1

The type of the instance that was created. Valid values:

  • 1: Standard Edition
RequestId String A07E3902-B92E-44A6-B6C5-6AA111111****

The ID of the request, which is a common parameter. Each request has a unique ID to facilitate troubleshooting and fault locating.

Examples

Sample requests

http(s)://ons.cn-hangzhou.aliyuncs.com/? Action=OnsInstanceCreate
&InstanceName=Test instance
&<Common request parameters>

Sample success responses

XML format

<OnsInstanceCreateResponse>
  <Data>
        <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>
        <InstanceType>1</InstanceType>
  </Data>
  <RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>
</OnsInstanceCreateResponse>

JSON format

{
  "Data": {
    "InstanceId": "MQ_INST_188077086902****_BXSuW61e",
    "InstanceType": 1
  },
  "RequestId": "A07E3902-B92E-44A6-B6C5-6AA111111****"
}

Error codes

For a list of error codes, visit the API Error Center.

Operations in the console

In addition to calling the OnsInstanceCreate operation, you can create an instance in the Message Queue for Apache RocketMQ console. For more information, see Manage instances.