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:
|
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:
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:
|
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:
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:
|
InstanceType | String | No | professional | The instance edition. The following editions are available for subscription instances:
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:
|
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:
|
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:
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 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.