CreateInstance

更新时间:
复制 MD 格式

Creates an ApsaraMQ for RabbitMQ instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateInstance

The operation that you want to perform. Set the value 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 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 response code. The value 200 indicates that the request was 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 was successful.

Examples

Parameters for subscription instances

If you set PaymentType to Subscription for an ApsaraMQ for RabbitMQ instance, you must configure the following parameters:

&PaymentType=Subscription
&AutoRenew=true
&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

The following table describes limits on the message traces of subscription ApsaraMQ for RabbitMQ instances.

InstanceType

SupportTracing

TracingStorageTime

  • professional

  • enterprise

false

0

  • professional

  • enterprise

true

  • 3

  • 7

  • 15

vip

true

15

Parameters for serverless instances

If you set PaymentType to PayAsYouGo for a serverless ApsaraMQ for RabbitMQ instance, you must configure the following parameters:

&PaymentType=PayAsYouGo
&ServerlessChargeType=onDemand
&SupportEip=true
&SupportTracing=true
&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

VisitError Centerto view more error codes。