Creates a Message Queue for Apache RocketMQ instance.

When you call this operation, note that:

  • By default, only Alibaba Cloud accounts can call this operation. Resource Access Management (RAM) users can call this operation only after the RAM users are authorized.
  • A maximum of eight Message Queue for Apache RocketMQ instances can be deployed in each region.
  • The name of a Message Queue for Apache RocketMQ instance must be unique in the region where the instance is deployed.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Required OnsInstanceCreate

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

InstanceName String Required Test instance

The name of the Message Queue for Apache RocketMQ instance.

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 Message Queue for Apache RocketMQ instance.

Response parameters

Parameter Type Example Description
Data Struct

The return results of the operation.

InstanceId String MQ_INST_188077086902****_BXSuW61e

The ID of the Message Queue for Apache RocketMQ instance that was created.

InstanceType Integer 1

The type of the Message Queue for Apache RocketMQ instance. Valid values:

  • 1: Pay-as-you-go
  • 2: Enterprise Platinum Edition
RequestId String A07E3902-B92E-44A6-B6C5-6AA111111****

The ID of the request.

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.