All Products
Search
Document Center

ApsaraMQ for RabbitMQ:CreateInstance

Last Updated:Jun 25, 2026

Creates an ApsaraMQ for RabbitMQ instance.

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

amqp:CreateInstance

create

*All Resource

*

  • amqp:InstanceType
  • amqp:SupportEIP
  • amqp:ServerlessChargeType
None

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The client token.

c2c5d1274axxxxxxxx

PaymentType

string

Yes

The payment type. Valid values:

  • Subscription: subscription

  • PayAsYouGo: Serverless.

Valid values:

  • PayAsYouGo :

    PayAsYouGo

  • Subscription :

    Subscription

Subscription

Period

integer

No

The subscription period. Unit: periodCycle.

Note

This parameter takes effect only when PaymentType is set to Subscription. Default value: 1.

1

PeriodCycle

string

No

The unit of the subscription period. Valid values:

  • Month: month

  • Year: year

This parameter takes effect only when PaymentType is set to Subscription. Default value: Month.

Valid values:

  • Month :

    Month

  • Year :

    Year

Month

AutoRenew

boolean

No

The renewal method. Valid values:

  • true: Auto-renewal is enabled.

  • false: Manual renewal is required.

false

AutoRenewPeriod

integer

No

The auto-renewal epoch. Unit: the value of RenewalDurationUnit. Default unit: month.

Note

This parameter takes effect only when AutoRenew is set to true. Default value: 1.

1

RenewStatus

string

No

The renewal status. This parameter is equivalent to autoRenew. Specify only one of the two parameters. Valid values:

  • AutoRenewal: auto-renewal is enabled.

Note

Both autoRenew and renewStatus specify the renewal method. If both are specified, renewStatus takes precedence.

false

RenewalDurationUnit

string

No

The unit of the auto-renewal epoch. Valid values:

  • Month: month

  • Year: year.

Valid values:

  • Month :

    Month

  • Year :

    Year

Month

InstanceType

string

No

The instance type. Valid values for subscription instances:

  • professional: Professional Edition

  • enterprise: Enterprise Edition

  • vip: Platinum Edition

You do not need to specify this parameter for Serverless instances.

Valid values:

  • enterprise :

    enterprise

  • vip :

    vip

  • professional :

    professional

professional

ServerlessChargeType

string

No

The billing type of the Serverless instance. Valid values:

  • onDemand: pay-as-you-go.

onDemand

InstanceName

string

No

The instance name. We recommend that the name does not exceed 64 characters in length.

amqp-xxxxx

MaxPrivateTps

integer

No

The private network TPS traffic. Unit: transactions per second.

Configure the settings based on the values provided on the ApsaraMQ for RabbitMQ buy page.

1000

SupportEip

boolean

No

Specifies whether to support public network access. Valid values:

  • true: Public network access is supported.

  • false: Public network access is not supported.

true

MaxEipTps

integer

No

The peak public network TPS traffic. Unit: TPS.

Configure the settings based on the values provided on the ApsaraMQ for RabbitMQ buy page.

128

QueueCapacity

integer

No

The number of queues.

Configure the settings based on the values provided on the ApsaraMQ for RabbitMQ buy page.

1000

MaxConnections

integer

No

The maximum number of connections.

Configure the settings based on the values provided on the ApsaraMQ for RabbitMQ buy page.

50000

StorageSize

integer

No

The message storage space. Unit: GB. Valid values:

  • Professional Edition and Enterprise instance: fixed at 0.

Note

A value of 0 indicates that no storage fees are charged for Professional Edition and Enterprise instances, not that no storage space is available.

  • Platinum Edition instances: m × 100, where m ranges from [7,28].

7

SupportTracing

boolean

No

Specifies whether to enable the message trace feature. Valid values:

  • true: The message trace feature is enabled.

  • false: The message trace feature is disabled.

Note
  • Platinum Edition instances provide the message trace feature free of charge for 15 days. The trace feature can only be enabled, and the trace retention period can only be set to 15 days.

  • Instances of other types can enable or disable the trace feature.

true

TracingStorageTime

integer

No

The retention period of message traces. Unit: days. Valid values:

  • 3: 3 days

  • 7: 7 days

  • 15: 15 days

This parameter takes effect only when SupportTracing is set to true.

3

ResourceGroupId

string

No

The ID of the resource group to which the instance belongs.

rg-acfmvvajg5qkxhi

EncryptedInstance

boolean

No

This feature is exclusive to dedicated instances. Specifies whether to enable data storage encryption for the instance.

false

KmsKeyId

string

No

This feature is exclusive to dedicated instances. This parameter is required when EncryptedInstance is set to true. The ID of the KMS key used for data encryption at rest. The key must meet the following requirements:

  • The key cannot be a service key.

  • The key must be in the active state.

  • The key must be a symmetric key, not an asymmetric key.

  • The key usage must be encryption and decryption.

  • If the KMS key expires or is deleted, data reads and writes become unavailable, and the RabbitMQ instance failures occur.

key-xxx

ProvisionedCapacity

integer

No

The provisioned TPS capacity for provisioned + elastic instances.

2000

Edition

string

No

The deployment architecture of the Serverless instance. Valid values:

  • shared: shared architecture. Applicable to provisioned + elastic (shared) and pay-as-you-go editions.

  • dedicated: dedicated architecture. Applicable to provisioned + elastic (dedicated) edition.

shared

Tags

array<object>

No

The resource tags.

object

No

The tag object.

Key

string

No

The tag key.

testKey

Value

string

No

The tag value.

testValue

VpcId

string

Yes

The VPC ID used to create a PrivateLink endpoint.

vpc-xxx

VswitchIds

array

Yes

The vSwitch IDs used to create a PrivateLink endpoint when creating the instance.

  1. Two vSwitch IDs are required, and they must belong to different zones (except for regions with a single zone).

  2. The vSwitches must belong to the specified VPC.

  3. The vSwitch status must be Available.

  4. Each vSwitch must have at least 20 available IP addresses.

  5. The zone of each vSwitch must support NLB creation.

string

Yes

The vSwitch ID specified when creating the instance.

vsw-xxx

SecurityGroupId

string

Yes

The security group used to create a PrivateLink endpoint.

  1. Add an inbound access policy that allows the protocol type TCP on destination ports 5672 and 5671.

  2. Managed security groups are not supported.

  3. The security group must belong to the specified VPC.

sg-xxx

ListenerMode

string

No

Specifies whether the instance enables only TLS-encrypted ports. This parameter is supported only for dedicated provisioned + elastic instances and Platinum Edition instances.

tcp_and_ssl

AuthModel

string

No

ram openSource

ServerlessSwitch

boolean

No

Response elements

Element

Type

Description

Example

object

JsonResult

RequestId

string

The common parameter. Each request has a unique ID that can be used for troubleshooting.

CCBB1225-C392-480E-8C7F-D09AB2CD2***

Code

integer

The response code. A value of 200 indicates success.

200

Message

string

The response message.

xxx failed,xxxx

Data

any

The ID of the created instance.

amqp-cn-xxxxx

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "RequestId": "CCBB1225-C392-480E-8C7F-D09AB2CD2***",
  "Code": 200,
  "Message": "xxx failed,xxxx",
  "Data": "amqp-cn-xxxxx",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.