All Products
Search
Document Center

ApsaraMQ for RabbitMQ:CreateInstance

Last Updated:Feb 05, 2025

Creates an ApsaraMQ for RabbitMQ instance.

Operation description

**Before you call this operation, make sure that you fully understand the billing methods and pricing of ApsaraMQ for RabbitMQ.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
amqp:CreateInstancecreate
*All Resources
*
  • amqp:InstanceType
  • amqp:SupportEIP
  • amqp:ServerlessChargeType
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token.

c2c5d1274axxxxxxxx
PaymentTypestringYes

The billing method of the instance. Valid values:

  • Subscription: subscription instance
  • PayAsYouGo: serverless instance
Subscription
PeriodintegerNo

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

Note This parameter takes effect only if you set PaymentType to Subscription. Default value: 1.
1
PeriodCyclestringNo

The unit of the subscription period. Valid values:

  • Month
  • Year

This parameter is valid only if you set PaymentType to Subscription. Default value: Month.

Month
AutoRenewbooleanNo

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.
AutoRenewal
AutoRenewPeriodintegerNo

The auto-renewal period. The unit of the auto-renewal period is specified by RenewalDurationUnit. Default value: Month.

Note This parameter takes effect only if you set AutoRenew to true. Default value: 1.
1
RenewStatusstringNo

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.
false
RenewalDurationUnitstringNo

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

  • Month
  • Year
Month
InstanceTypestringNo

The instance edition. Valid values if you create a subscription instance:

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

If you create a serverless instance, you do not need to specify this parameter.

professional
ServerlessChargeTypestringNo

The billing method of the serverless instance. Valid value:

  • onDemand: You are charged based on your actual usage.
onDemand
InstanceNamestringNo

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

amqp-xxxxx
MaxPrivateTpslongNo

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.

1000
SupportEipbooleanNo

Specifies whether elastic IP addresses (EIPs) are supported. Valid values:

  • True
  • False
true
MaxEipTpslongNo

The maximum number of Internet-based TPS on the instance.

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

128
QueueCapacityintegerNo

The number of queues on the instance.

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

1000
MaxConnectionsintegerNo

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.

50000
StorageSizeintegerNo

The storage capacity. Unit: GB. Valid values:

  • Professional Edition and Enterprise Edition instances: Set the value to 0.
Note The value 0 specifies that storage space is available for Professional Edition and Enterprise Edition instances, but no storage fees are generated.
  • Enterprise Platinum Edition instances: Set the value to m × 100, where m is an integer that ranges from 7 to 28.
7
SupportTracingbooleanNo

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

true
TracingStorageTimeintegerNo

The retention period of messages. Unit: days. Valid values:

  • 3
  • 7
  • 15

This parameter is valid only if you set SupportTracing to true.

3
ResourceGroupIdstringNo

The ID of the resource group to which the instance belongs.

rg-acfmvvajg5qkxhi
EncryptedInstancebooleanNo

Specifies whether to enable storage encryption for the instance. This parameter is available only for exclusive instances.

false
KmsKeyIdstringNo

The ID of the Key Management Service (KMS)-managed key used for storage encryption. This parameter is available only for exclusive instances and required only if you set EncryptedInstance to true. The key must meet the following conditions:

  • The key cannot be a service key.
  • The key must be in the Enabled state.
  • The key must be a symmetric key.
  • The key must be used for encryption and decryption.
  • After the key is expired or deleted, you cannot read or write data and exceptions can occur in the ApsaraMQ for RabbitMQ instance.
key-xxx

Response parameters

ParameterTypeDescriptionExample
object

JsonResult

RequestIdstring

The request ID. You can use the ID to troubleshoot issues. This parameter is a common parameter.

CCBB1225-C392-480E-8C7F-D09AB2CD2***
Codeinteger

The HTTP status code. The status code 200 indicates that the request is successful.

200
Messagestring

The returned message.

xxx failed,xxxx
Dataany

The ID of the created instance.

amqp-cn-xxxxx
Successboolean

Indicates whether the request is successful.

true

Examples

Sample success responses

JSONformat

{
  "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, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-05The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-11-25The Error code has changed. The request parameters of the API has changedView Change Details
2024-07-30The Error code has changedView Change Details
2024-03-06The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-03-05The request parameters of the API has changedView Change Details
2024-02-27The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-02-22The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-01-24The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-01-24The request parameters of the API has changedView Change Details