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:
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.
|
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:
This parameter is valid only if you set PaymentType to Subscription. Default value: Month. |
InstanceType | String | Yes | professional | The instance edition. Valid values:
|
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:
|
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:
|
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:
Note The value 0 specifies that storage space is available but no storage fees are generated.
|
SupportTracing | Boolean | No | true | Specifies whether to enable the message trace feature. Valid values:
Note
|
TracingStorageTime | Integer | No | 3 | The retention period of messages. Unit: days. Valid values:
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.