All Products
Search
Document Center

ApsaraMQ for RabbitMQ:CreateInstance

Last Updated:Feb 04, 2024

Creates an ApsaraMQ for RabbitMQ instance.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateInstance

The operation that you want to perform. Set this parameter to CreateInstance.

ClientToken

String

No

c2c5d1274axxxxxxxx

The client token.

PaymentType

String

Yes

Subscription

The billing method of the instance. Valid values:

  • Subscription: the subscription billing method.

This parameter can be set only to Subscription because the CreateInstance operation allows you to create only subscription instances.

AutoRenew

Boolean

No

false

Specifies whether to enable auto-renewal.

  • true: enables auto-renewal.

  • false: disables auto-renewal. If you select this value, you must manually renew the instance.

AutoRenewPeriod

Integer

No

1

The auto-renewal duration. Unit: months.

This parameter is valid only if you set AutoRenew to true. Default value: 1.

Period

Integer

No

1

The subscription period. The unit of the subscription period is specified by periodCycle.

This parameter is valid only if you set PaymentType to Subscription. Default value: 1.

PeriodCycle

String

No

Month

The unit of the subscription period. Valid values:

  • Month

  • Year

This parameter is valid only if you set PaymentType to Subscription. Default value: Month.

InstanceType

String

Yes

professional

The instance edition. Valid values:

  • professional: Professional Edition

  • enterprise: Enterprise Edition

  • vip: Enterprise Platinum Edition

MaxPrivateTps

Long

Yes

1000

The maximum number of virtual private cloud (VPC)-based transactions per second (TPS) on the instance.

Configure this parameter based on the values provided on the ApsaraMQ for RocketMQ buy page.

SupportEip

Boolean

No

true

Specifies whether Elastic IP addresses (EIPs) are supported. Valid values:

  • True

  • False

MaxEipTps

Long

No

128

The maximum number of EIP-based TPS on the instance.

Configure this parameter based on the values provided on the ApsaraMQ for RocketMQ buy page.

QueueCapacity

Integer

Yes

1000

The number of queues. Valid values:

  • Professional Edition: 50 to 1000. The number of queues must increase in increments of 5.

  • Enterprise Edition: 200 to 6000. The number of queues must increase in increments of 100.

  • Enterprise Platinum Edition: 10000 to 80000. The number of queues must increase in increments of 100.

MaxConnections

Integer

No

50000

The maximum number of connections that can be established to the instance.

Configure this parameter based on the values provided on the ApsaraMQ for RocketMQ buy page.

StorageSize

Integer

No

7

Specifies the storage capacity. Unit: GB. Valid values:

  • Professional Edition and Enterprise Edition instances: Set this parameter to 0.

Note

The value 0 specifies that storage space is available but no storage fees are generated.

  • Enterprise Platinum Edition instances: Set this parameter to an integer multiple of 100. The integer multiple ranges from 7 to 28.

SupportTracing

Boolean

No

true

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

  • true

  • false

Note
  • Enterprise Platinum Edition instances allow you to retain message traces for 15 days free of charge. If you use an Enterprise Platinum Edition instance, you can set this parameter only to true and TracingStorageTime only to 15.

  • For instances of other editions, you can set this parameter to true or false.

TracingStorageTime

Integer

No

3

The retention period of messages. Unit: days. Valid values:

  • 3

  • 7

  • 15

This parameter is valid only if you set SupportTracing to true.

Response parameters

Parameter

Type

Example

Description

RequestId

String

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

The request ID. You can use the ID to troubleshoot issues. This parameter is a common parameter.

Code

Integer

200

The HTTP status code. The status code 200 indicates that the request is successful.

Message

String

xxx failed,xxxx

The returned data.

Data

Any

amqp-cn-xxxxx

The ID of the created instance.

Success

Boolean

true

Indicates whether the request is successful.

Examples

Sample request

http(s)://[Endpoint]/?Action=CreateInstance
&ClientToken=c2c5d1274axxxxxxxx
&PaymentType=Subscription
&AutoRenew=false
&AutoRenewPeriod=1
&Period=1
&PeriodCycle=Month
&InstanceType=professional
&MaxPrivateTps=1000
&SupportEip=true
&MaxEipTps=128
&QueueCapacity=1000
&MaxConnections=50000
&StorageSize=7
&SupportTracing=true
&TracingStorageTime=3
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateInstanceResponse>
    <RequestId>CCBB1225-C392-480E-8C7F-D09AB2CD2***</RequestId>
    <Code>200</Code>
    <Message>xxx failed,xxxx</Message>
    <Data>amqp-cn-xxxxx</Data>
    <Success>true</Success>
</CreateInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

For a list of error codes, see Service error codes.