Creates a Message Queue for RabbitMQ instance. When you call this operation, the system generates a purchase order and automatically completes the payment.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateInstance

The operation that you want to perform. Set the value to CreateInstance.

Parameter.N.Code String Yes InstanceType

The code of the Nth attribute configured for the instance. For each attribute that you want to configure, specify a unique value for N that is a positive integer or 0. If you want to configure multiple attributes for the instance, concatenate the parameter settings for the attributes.

This parameter must be used together with the Parameter.N.Value parameter. For more information about how to configure more attributes to create a Message Queue for RabbitMQ instance, see Table 1.

Parameter.N.Value String Yes professional

The value of the attribute whose code is Parameter.N.Code. For each attribute that you want to configure, specify a unique value for N that is a positive integer or 0. If you want to configure multiple attributes for the instance, concatenate the parameter settings for the attributes.

ProductCode String Yes ons The code of the service. Set the value to ons.
ProductType String Yes ons_onsproxy_public_intl The type of the service. Set the value to ons_onsproxy_public_intl.
SubscriptionType String Yes Subscription
The billing method of the instance. Valid values:
  • Subscription: the subscription billing method
  • PayAsYouGo: the pay-as-you-go billing method

Message Queue for RabbitMQ instances do not support the pay-as-you-go billing method. Set this parameter to Subscription.

RenewalStatus String No AutoRenewal

The renewal method of the instance. Valid values:

  • AutoRenewal: auto-renewal
  • ManualRenewal: manual renewal
RenewPeriod Integer No 1

The auto-renewal period of the instance. Unit: month.

Note This parameter is required if the RenewalStatus parameter is set to AutoRenewal.
Period Integer No 1

The subscription period of the instance. Unit: month. If you want to create a yearly subscription instance, specify an integral multiple of 12.

Note If you want to create a subscription instance, this parameter is required.
ClientToken String No JASIOFKVNVIXXXXXX

The client token that is used to ensure the idempotence of the request. The server checks whether a request with the same client token has been received. If a request with the same client token has been received, the server returns the same query result of the request.

Table 1. Configure the Parameter.N.Code parameter
Parameter Value Required Description
Parameter.0.Code InstanceType No The type of the instance. Parameter.0.Value that corresponds to this parameter can be set to one of the following values:
  • professional: Professional Edition
  • VIP: Enterprise Platinum Edition
Parameter.1.Code Region Yes The region where the instance is deployed. Parameter.1.Value that corresponds to this parameter can be set to an available region, such as cn-shenzhen.
Parameter.2.Code SupportEip Yes Specifies whether the instance can be accessed over the Internet. Parameter.2.Value that corresponds to this parameter can be set to one of the following values:
  • eip_true: The instance can be accessed over the Internet.
  • eip_false: The instance cannot be accessed over the Internet.
Parameter.3.Code MaxEipTps Yes The maximum number of Internet-based transactions per second on the instance. Parameter. 3.Value that corresponds to this parameter must be set to one of the peak TPS values on the buy page in the Message Queue for RabbitMQ console.
Parameter.4.Code MaxTps Yes The maximum number of virtual private cloud (VPC)-based transactions per second on the instance. Parameter. 4.Value that corresponds to this parameter must be set to one of the peak TPS values on the buy page in the Message Queue for RabbitMQ console.
Parameter.5.Code QueueCapacity Yes The maximum number of queues that can be created in the instance. Parameter.5.Valid that corresponds to this parameter can be set to an integer value that ranges from 50 to 6000.
Parameter.6.Code OrderNum Yes The number of instances that you want to create. Parameter.6.Valid that corresponds to this parameter can be set to an integer value that ranges from 1 to 9999.
Parameter.7.Code StorageSize Yes The instance storage that can be used to store messages. Parameter.7.Value that corresponds to this parameter can be set to one of the following values based on the edition of the instance:
  • 200: Use this value if the instance edition is Professional Edition. Unit: GB.
  • m × 100: Use this value if you are using an Enterprise Platinum Edition instance. This value is an integral multiple of 100. m is an integer that ranges from 7 to 28. Unit: GB.

Response parameters

Parameter Type Example Description
Code String Success

The HTTP status code.

Data Struct

The returned data.

InstanceId String amqp-cn-zvp2ajsj****

The ID of the instance that corresponds to the order.

OrderId String 21014976059****

The ID of the order that was created.

Message String Successful!

The prompt message.

RequestId String B62C712B-1789-5114-B0BB-80CB2AFD****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://business.aliyuncs.com/?Action=CreateInstance
&Parameter.0.Code=InstanceType
&Parameter.0.Value=professional
&Parameter.1.Code=Region
&Parameter.1.Value=cn-shenzhen
&Parameter.2.Code=SupportEip
&Parameter.2.Value=eip_true
&Parameter.3.Code=MaxEipTps
&Parameter.3.Value=640
&Parameter.4.Code=MaxTps
&Parameter.4.Value=1000
&Parameter.5.Code=QueueCapacity
&Parameter.5.Value=200
&Parameter.6.Code=StorageSize
&Parameter.6.Value=200
&Parameter.7.Code=OrderNum
&Parameter.7.Value=1
&ProductCode=ons
&ProductType=ons_onsproxy_public_intl
&SubscriptionType=Subscription
&Period=1
&RenewPeriod=1
&RenewalStatus=AutoRenewal
&<Common request parameters>

Sample success responses

XML format

<CreateInstanceResponse>
      <RequestId>B62C712B-1789-5114-B0BB-80CB2AFD****</RequestId>
      <Message>Successful!</Message>
      <Data>
            <InstanceId>amqp-cn-zvp2ajsj****</InstanceId>
            <OrderId>21014976059****</OrderId>
      </Data>
      <Code>Success</Code>
      <Success>true</Success>
</CreateInstanceResponse>

JSON format

{
  "RequestId": "B62C712B-1789-5114-B0BB-80CB2AFD****",
  "Message": "Successful!",
  "Data": {
    "InstanceId": "amqp-cn-zvp2ajsj****",
    "OrderId": 21014976059****
  },
  "Code": "Success",
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.