All Products
Search
Document Center

ApsaraMQ for RabbitMQ:CreateInstance

Last Updated:Apr 02, 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.
  • PayAsYouGo: the pay-as-you-go billing method.
Period Integer No 1

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

Note 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.

AutoRenew Boolean No false

Specifies whether to enable auto-renewal. Valid values:

  • 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 period. The unit of the auto-renewal period is specified by RenewalDurationUnit. Default value: Month.

Note This parameter is valid only if you set AutoRenew to true. Default value: 1.
RenewStatus String No false

The renewal status. This parameter is the same as AutoRenew. You can configure one of these parameters. Valid value:

  • AutoRenewal
Note If you configure both this parameter and AutoRenew, the value of this parameter is used.
RenewalDurationUnit String No Month

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

  • Month
  • Year
InstanceType String No professional

The instance edition.

The following editions are available for subscription instances:

  • professional: Professional Edition.
  • enterprise: Enterprise Edition.
  • vip: Enterprise Platinum Edition.

If your instance is a pay-as-you-go instance, you do not need to configure this parameter.

ServerlessChargeType String No onDemand

The billing method of the pay-as-you-go instance. Valid values:

  • onDemand: You are charged based on your actual usage.
InstanceName String No amqp-xxxxx

The instance name. We recommend that you specify a name that does not exceed 64 characters in length.

MaxPrivateTps Long No 1000

The maximum number of virtual private cloud (VPC)-based transactions per second (TPS) in 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 transactions per second (TPS) in the instance.

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

QueueCapacity Integer No 1000

The number of queues on the instance.

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

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

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 returned HTTP status code. The status code 200 indicates that the request is successful.

Message String xxx failed,xxxx

The returned message.

Data Any amqp-cn-xxxxx

The ID of the created instance.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

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.