All Products
Search
Document Center

ApsaraMQ for RabbitMQ:CreateInstance

Last Updated:Dec 19, 2025

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 billing method. Valid values:

  • Subscription: subscription

  • PayAsYouGo: pay-as-you-go for Serverless instances

Valid values:

  • PayAsYouGo :

    PayAsYouGo

  • Subscription :

    Subscription

Subscription

Period

integer

No

The subscription duration. The unit of the duration is specified by the PeriodCycle parameter.

Note

This parameter is valid only when PaymentType is set to Subscription. The default value is 1.

1

PeriodCycle

string

No

The unit of the subscription duration. Valid values:

  • Month

  • Year

This parameter is valid only when PaymentType is set to Subscription. The default value is Month.

Valid values:

  • Month :

    Month

  • Year :

    Year

Month

AutoRenew

boolean

No

The renewal method. Valid values:

  • true: auto-renewal

  • false: manual renewal

false

AutoRenewPeriod

integer

No

The auto-renewal duration. The unit is specified by the RenewalDurationUnit parameter. The default unit is Month.

Note

This parameter is valid only when AutoRenew is set to true. The default value is 1.

1

RenewStatus

string

No

The renewal status. This parameter is equivalent to AutoRenew. You can specify either of them. Valid value:

  • AutoRenewal: auto-renewal

Note

Both AutoRenew and RenewStatus specify the renewal method. If you specify both parameters, the value of RenewStatus takes precedence.

false

RenewalDurationUnit

string

No

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

  • Month

  • Year

Valid values:

  • Month :

    Month

  • Year :

    Year

Month

InstanceType

string

No

The instance type. For subscription instances, valid values are:

  • professional: Professional Edition

  • enterprise: Enterprise Edition

  • vip: Platinum Edition

For Serverless instances, you do not need to specify this parameter.

Valid values:

  • enterprise :

    enterprise

  • vip :

    vip

  • professional :

    professional

professional

ServerlessChargeType

string

No

The billing method for Serverless instances. Valid value:

  • onDemand: pay-as-you-go

onDemand

InstanceName

string

No

The instance name. The name can be up to 64 characters in length.

amqp-xxxxx

MaxPrivateTps

integer

No

The peak TPS for private endpoints. Unit: calls/second.

Set the value based on the options provided on the ApsaraMQ for RabbitMQ buy page.

1000

SupportEip

boolean

No

Specifies whether to enable Internet access. Valid values:

  • true: Internet access is enabled.

  • false: Internet access is disabled.

true

MaxEipTps

integer

No

The peak TPS for Internet access. Unit: TPS.

Set the value based on the options provided on the ApsaraMQ for RabbitMQ buy page.

128

QueueCapacity

integer

No

The number of queues.

Set the value based on the options provided on the ApsaraMQ for RabbitMQ buy page.

1000

MaxConnections

integer

No

The maximum number of connections.

Set the value based on the options provided on the ApsaraMQ for RabbitMQ buy page.

50000

StorageSize

integer

No

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

  • Professional and Enterprise instances: The value is fixed at 0.

Note

A value of 0 indicates that storage fees are not charged for Professional and Enterprise instances. It does not mean that there is no storage space.

  • Platinum instances: m × 100, where m is an integer from 7 to 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 not enabled.

Note
  • Platinum instances include a 15-day free trial of the message trace feature. For these instances, this feature must be enabled and the retention period must be set to 15 days.

  • For other instance types, you can enable or disable this feature as needed.

true

TracingStorageTime

integer

No

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

  • 3

  • 7

  • 15

This parameter is valid 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 available only for dedicated instances. Specifies whether to enable data storage encryption for the instance.

false

KmsKeyId

string

No

This feature is available only for dedicated instances. You must specify this parameter if EncryptedInstance is set to true. The ID of the KMS key used for data storage encryption. The key must meet the following requirements:

  • It cannot be a service key.

  • The key must be active.

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

  • The key must be used for encryption and decryption.

  • If the KMS key expires or is deleted, data reads and writes become unavailable, and the ApsaraMQ for RabbitMQ instance may fail.

key-xxx

ProvisionedCapacity

integer

No

The provisioned TPS capacity for a reserved and flexible instance.

2000

Edition

string

No

The deployment architecture of the Serverless instance. Valid values:

  • shared: a shared architecture. This architecture applies to reserved and flexible (shared) instances and pay-as-you-go instances.

  • dedicated: a dedicated architecture. This architecture applies to reserved and flexible (dedicated) instances.

shared

Tags

array<object>

No

The resource tags.

object

No

The tag object.

Key

string

No

The key of the resource tag.

testKey

Value

string

No

The value of the resource tag.

testValue

Response elements

Element

Type

Description

Example

object

JsonResult

RequestId

string

A common parameter. The ID of the request. Each request ID is unique. You can use the request ID to troubleshoot issues.

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

Code

integer

The return code. A value of 200 indicates that the request was successful.

200

Message

string

The returned 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.