All Products
Search
Document Center

ApsaraMQ for RocketMQ:CreateInstance

Last Updated:Feb 04, 2026

Creates an ApsaraMQ for RocketMQ 5.x instance.

Operation description

Important The OpenAPI provided by Alibaba Cloud is a management API used to manage and query resources of Alibaba Cloud services. Integrate OpenAPI for management purposes only. Do not rely on OpenAPI for core data links that send and receive messages. This can put your links at risk.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:CreateInstance

create

*Instance

acs:rocketmq:{#regionId}:{#accountId}: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 the idempotence of the request. The token must be unique across different requests and can be up to 64 ASCII characters in length.

c2c5d1274a8d4317a13bc5b0d4******

body

object

No

The request body.

instanceName

string

No

The name of the instance to be created.

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. The service code for ApsaraMQ for RocketMQ is rmq.

rmq

seriesCode

string

Yes

The primary series code of the instance. For more information about the differences between primary series, see Product selection.

Valid values:

  • standard: Standard Edition

  • ultimate: Platinum Edition

  • professional: Professional Edition

  • dedicated: Exclusive Edition

  • shared: Shared Edition

Important After an instance is created, 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 an instance from Standard Edition to Professional Edition, but you cannot downgrade it from Professional Edition to Standard Edition.

Valid values:

  • standard :

    Standard Edition

  • ultimate :

    Platinum Edition

  • professional :

    Professional Edition

standard

subSeriesCode

string

Yes

The sub-series code of the instance. For more information about the differences between sub-series, see Product selection.

Valid values:

  • cluster_ha: High-availability Cluster Edition

  • single_node: Single-node Testing Edition

  • serverless: Serverless instance

If you set the primary series to ultimate (Platinum Edition), you must set the sub-series to cluster_ha (High-availability Cluster Edition).

Important After an instance is created, you cannot change its sub-series.

Valid values:

  • serverless :

    Serverless Edition

  • cluster_ha :

    High-availability Cluster Edition

  • single_node :

    Single-node Testing Edition

cluster_ha

paymentType

string

Yes

The billing method of the instance. ApsaraMQ for RocketMQ supports subscription and pay-as-you-go.

Valid values:

  • PayAsYouGo: pay-as-you-go. This is a postpaid mode where you are billed for the resources you use.

  • Subscription: subscription. This is a prepaid mode where you pay before you use the resources.

For more information, see Billing methods.

Valid values:

  • PayAsYouGo :

    pay-as-you-go

  • Subscription :

    subscription

Subscription

period

integer

No

The subscription duration. This parameter is valid only when paymentType is set to Subscription.

Valid values:

  • If you purchase by month: 1, 2, 3, 4, 5, and 6

  • If you purchase by year: 1, 2, and 3

3

periodUnit

string

No

The unit of the subscription duration.

Valid values:

  • Month: purchase by month

  • Year: purchase by year

Valid values:

  • Month :

    purchase by month

  • Year :

    purchase by year

Month

autoRenew

boolean

No

Specifies whether to enable auto-renewal. This parameter is valid only when paymentType is set to Subscription.

  • true: enables auto-renewal

  • false: disables auto-renewal

Valid values:

  • true :

    enables auto-renewal

  • false :

    disables auto-renewal

true

autoRenewPeriod

integer

No

The auto-renewal cycle. This parameter is valid only if autoRenew is set to true. Unit: months.

Valid values:

  • If you renew by month: 1, 2, 3, 6, and 12

3

remark

string

No

The remarks on the instance.

This is the remark for test.

productInfo

object

No

The specifications of the instance.

msgProcessSpec

string

No

The computing specification for message sending and receiving. For more information about the TPS limit for message sending and receiving, see Instance types.

rmq.s2.2xlarge

sendReceiveRatio

number

No

The ratio of message sending TPS to the total TPS of the instance.

For example, if the total TPS of an instance is 1,000 and the ratio is 0.8, the sending TPS is 800 and the receiving TPS is 200.

Valid values: [0.05, 0.95]. Default value: 0.5.

0.5

autoScaling

boolean

No

Specifies whether to enable burst scaling beyond the specifications.

Valid values:

  • true: enables burst scaling

  • false: disables burst scaling

If you enable burst scaling, you can exceed the base TPS of the instance. You are charged for the extra TPS. For more information about billing, see Computing fees.

Note

Only some instance types support burst scaling. For more information about the supported instance types, see Instance types.

Valid values:

  • true :

    enables burst scaling

  • false :

    disables burst scaling

true

messageRetentionTime

integer

No

The message retention period. Unit: hours.

For information about the valid values, see the "Message Retention Period" section in the "Resource Quotas" topic of Limits.

The message storage of ApsaraMQ for RocketMQ is serverless and elastic. You are charged for the actual storage that you use. You can 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. `provisioned`: reserved and elastic. `onDemand`: pay-as-you-go.

provisioned

provisionedCapacity

integer

No

The reserved capacity.

5000

traceOn

boolean

No

Specifies whether to enable the message trace feature.

true: enables the message trace feature. false: disables the message trace feature. This parameter is valid only for Serverless instances. If you enable the message trace feature, you are charged for message traces. For more information about billing, see Serverless billing. This parameter is not valid for pay-as-you-go and subscription instances. The message trace feature is enabled for these instances by default.

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 is connected.

Note

After an ApsaraMQ for RocketMQ instance is created, you cannot change the VPC. 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 there are multiple vSwitches, separate their IDs with a vertical bar (|).

Note

After an ApsaraMQ for RocketMQ instance is created, you cannot change the vSwitch. To change the vSwitch, you must release the instance and purchase 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 an ApsaraMQ for RocketMQ instance is created, you cannot change the vSwitch. To change the vSwitch, you must release the instance and purchase a new one.

Important This is a required parameter. Because the vSwitchId parameter is deprecated, use this parameter to specify vSwitches.

object

No

vSwitchId

string

No

The ID of the vSwitch to which the instance is connected.

vsw-uf6gwtbn6etadpv*******

internetInfo

object

Yes

The public network configuration.

internetSpec

string

Yes

Specifies whether to enable public network access.

Valid values:

  • enable: enables public network access

  • disable: disables public network access

By default, instances are accessed over a VPC. If you enable public network access, you are charged for public downstream bandwidth fees. For more information about billing, see Public network access fees.

Valid values:

  • enable :

    enables public network access

  • disable :

    disables public network access

disable

flowOutType

string

Yes

The billing method for public network access.

Valid values:

  • payByBandwidth: pay-by-bandwidth. Set the parameter to this value when you enable public network access.

  • payByTraffic: pay-by-data-transfer. Set the parameter to this value when you enable public network access.

  • uninvolved: not involved. Set the parameter to this value when you disable public network access.

Valid values:

  • payByBandwidth :

    pay-by-bandwidth

  • payByTraffic :

    pay-by-data-transfer

  • uninvolved :

    not involved

uninvolved

flowOutBandwidth

integer

No

The public bandwidth. Unit: Mbit/s.

This parameter is required only if you set flowOutType to payByBandwidth.

Valid values: 1 to 1000.

100

ipWhitelist deprecated

array

No

The public access IP address whitelist. You can configure an IP address whitelist only for public endpoints. VPC endpoints are not supported.

  • If you do not configure an IP address whitelist, all IP addresses can access the ApsaraMQ for RocketMQ server over the public network.

  • If you configure an IP address whitelist, only the IP addresses in the whitelist can access the ApsaraMQ for RocketMQ server over the public network.

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_intl: pay-as-you-go

  • ons_rmqsub_public_intl: subscription

  • ons_rmqsrvlesspost_public_intl: Serverless instance This parameter is required for Serverless instances.

ons_ rmqpost_public_cn

resourceGroupId

string

No

The resource group ID.

rg-aekzy6pist7uuna

tags

array<object>

No

The list of resource tags.

object

No

Tags that you can assign to the resource.

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 VPC for intelligent identity recognition.

  • true: enables passwordless access

  • false: disables passwordless access

false

Response elements

Element

Type

Description

Example

object

The returned data.

requestId

string

The request ID. Each request has a unique ID that you can use to troubleshoot issues.

AF9A8B10-C426-530F-A0DD-96320B39****

success

boolean

Indicates whether the call 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.