All Products
Search
Document Center

ApsaraMQ for RocketMQ:CreateInstance

Last Updated:Nov 19, 2024

Creates an ApsaraMQ for RocketMQ 5.x instance.

Operation description

Note API operations provided by Alibaba Cloud are used to manage and query resources of Alibaba Cloud services. We recommend that you integrate these API operations only in management systems. Do not use these API operations in the core system of messaging services. Otherwise, system risks may occur.

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:
    • The required resource types are displayed in bold characters.
    • 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
rocketmq:CreateInstancecreate
*Instance
acs:rocketmq:{#regionId}:{#accountId}:Instance/*
    none
none

Request syntax

POST /instances HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
clientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value of this parameter, but you must ensure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

c2c5d1274a8d4317a13bc5b0d4******
bodyobjectNo

The parameters in the message body.

instanceNamestringNo

The name of the instance that you want to create.

If you do not configure this parameter, the instance ID is used as the instance name.

rmq-cn-72u3048uxxx
serviceCodestringYes

The code of the service to which the instance belongs. The service code of ApsaraMQ for RocketMQ is rmq.

rmq
seriesCodestringYes

The primary edition of the instance. For information about the differences between primary edition instances, see Instance selection.

Valid values:

  • standard: Standard Edition
  • ultimate: Enterprise Platinum Edition
  • professional: Professional Edition
Note After an instance is created, you can only upgrade the primary edition of the instance. The following editions are sorted in ascending order: Standard Edition, Professional Edition, Enterprise Platinum Edition. For example, you can upgrade an instance of Standard Edition to Professional Edition, but cannot downgrade an instance of Professional Edition to Standard Edition.
standard
subSeriesCodestringYes

The sub-category edition of the instance. For information about the differences between sub-category edition instances, see Instance selection.

Valid values:

  • cluster_ha: High-availability Cluster Edition
  • single_node: Standalone Edition
  • serverless: Serverless Edition

If you set seriesCode to ultimate, you can set this parameter to only cluster_ha.

Note After an instance is created, you cannot change the sub-category edition of the instance.
cluster_ha
paymentTypestringYes

The billing method of the instance. ApsaraMQ for RocketMQ supports the subscription and pay-as-you-go billing methods.

Valid values:

  • PayAsYouGo: This billing method allows you to use resources before you pay for the resources.
  • Subscription: This billing method allows you to use resources after you pay for the resources.

For more information, see Billing methods.

Subscription
periodintegerNo

The subscription duration of the instance. This parameter takes effect only if you set PaymentType to Subscription.

Valid values:

  • Monthly subscription: 1, 2, 3, 4, 5, and 6
  • Yearly subscription: 1, 2, and 3
3
periodUnitstringNo

The unit of the subscription duration.

Valid values:

  • Month
  • Year
Month
autoRenewbooleanNo

Specifies whether to enable auto-renewal for the instance. This parameter takes effect only if you set PaymentType to Subscription.

  • true: enable
  • false: disable
true
autoRenewPeriodintegerNo

The auto-renewal cycle of the instance. This parameter takes effect only if you set autoRenew to true. Unit: months.

Valid values:

  • Monthly renewal: 1, 2, 3, 6, and 12
3
remarkstringNo

The instance description.

This is the remark for test.
productInfoobjectNo

The information about the instance specifications.

msgProcessSpecstringYes

The computing specification that specifies the messaging transactions per second (TPS) of the instance. For information about computing specification limits, see Instance specifications.

rmq.s2.2xlarge
sendReceiveRatiofloatNo

The proportion of message sending TPS to the messaging TPS on the instance.

For example, you create an instance whose peak messaging TPS is specified as 1,000 and the proportion of message sending TPS is specified as 0.8. In this case, the peak message sending TPS is 800 and the peak message receiving TPS is 200 on the instance.

Valid values: 0 to 1. Default value: 0.5.

0.5
autoScalingbooleanNo

Specifies whether to enable the elastic TPS feature for the instance.

Valid values:

  • true: enable
  • false: disable

After you enable the elastic TPS feature for an ApsaraMQ for RocketMQ instance, you can use a specific number of TPS that exceeds the specification limit. You are charged for using the elastic TPS feature. For more information, see Computing fees.

Note The elastic TPS feature is supported only by instances of specific editions. For more information, see Instance editions.
true
messageRetentionTimeintegerNo

The retention period of messages. Unit: hours.

For information about the valid values of this parameter, see the "Limits on resource quotas" section of the Limits topic.

ApsaraMQ for RocketMQ supports serverless scaling of message storage. You are charged storage fees based on your actual storage usage. You can change the retention period of messages to manage storage capacity. For more information, see Storage fees.

72
chargeTypestringNo

The billing method.

Valid values:

  • provisioned
  • ondemand
provisioned
intranetSpecstringNo

This parameter is no longer used. You do not need to configure this parameter.

xxxx
networkInfoobjectYes

The network configurations.

vpcInfoobjectYes

The virtual private cloud (VPC)-related configurations.

vpcIdstringYes

The ID of the VPC in which you want to deploy the instance.

Note After an ApsaraMQ for RocketMQ instance is created, you cannot change the VPC in which the instance is deployed. If you want to change the VPC in which the instance is deployed, you must release the instance and create a new instance.
vpc-wz9qt50xhtj9krb******
vSwitchIddeprecatedstringNo

The ID of the vSwitch with which you want to associate the instance, If there are multiple vSwitchs, please concatenate them using the "|" character.

Note After an ApsaraMQ for RocketMQ instance is created, you cannot change the vSwitch with which the instance is associated. If you want to change the vSwitch with which the instance is associated, you must release the instance and purchase a new instance.
vsw-uf6gwtbn6etadpv*******
securityGroupIdsstringNo

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

sg-bp17hpmgz96tvnsdy6so
vSwitchesarray<object>No

The vSwitches.

objectNo
vSwitchIdstringNo

The ID of the vSwitch with which the instance is associated.

vsw-uf6gwtbn6etadpv*******
internetInfoobjectYes

The Internet-related configurations.

internetSpecstringYes

Specifies whether to enable the Internet access feature.

Valid values:

  • enable
  • disable

By default, ApsaraMQ for RocketMQ allows you to access instances in VPCs. If you enable Internet access for an instance, you can access the instance over the Internet. After you enable this feature, you are charged for outbound Internet traffic. For more information, see Internet access fee.

disable
flowOutTypestringYes

The billing method of Internet usage.

Valid values:

  • payByBandwidth: pay-by-bandwidth. If Internet access is enabled for an instance, specify this value for the parameter.
  • payByTraffic: pay-by-traffic. If Internet access is enabled for an instance, specify this value for the parameter.
  • uninvolved: No billing method is involved. If Internet access is disabled for an instance, specify this value for the parameter.
uninvolved
flowOutBandwidthintegerNo

The Internet bandwidth. Unit: MB/s.

This parameter is required only if you set flowOutType to payByBandwidth.

Valid values: 1 to 1000.

100
ipWhitelistarrayNo

The whitelist that includes the IP addresses that are allowed to access the ApsaraMQ for RocketMQ broker over the Internet. This parameter can be configured only if you use a public endpoint to access the instance.

  • If you do not configure an IP address whitelist, all CIDR blocks are allowed to access the ApsaraMQ for RocketMQ broker over the Internet.
  • If configure an IP address whitlist, only the IP addresses in the whitelist are allowed to access the ApsaraMQ for RocketMQ broker over the Internet.
stringNo

The IP addresses in the whitelist.

192.168.x.x/24
commodityCodestringNo

The commodity code.

  • ons_rmqpost_public_intl: pay-as-you-go
  • ons_rmqsub_public_intl: subscription
ons_ rmqpost_public_cn
resourceGroupIdstringNo

The resource group ID.

rg-aekzy6pist7uuna

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

requestIdstring

The ID of the request. Each request has a unique ID. You can use this ID to troubleshoot issues.

AF9A8B10-C426-530F-A0DD-96320B39****
successboolean

Indicates whether the call was successful.

true
datastring

The ID of the created instance.

rmq-cn-7e22ody****
codestring

The error code returned if the call failed.

200
messagestring

The error message.

Success
httpStatusCodeinteger

The HTTP status code returned.

200
dynamicCodestring

The dynamic error code.

InstanceId
dynamicMessagestring

The dynamic error message.

instanceId

Examples

Sample success responses

JSONformat

{
  "requestId": "AF9A8B10-C426-530F-A0DD-96320B39****",
  "success": true,
  "data": "rmq-cn-7e22ody****",
  "code": "200",
  "message": "Success",
  "httpStatusCode": 200,
  "dynamicCode": "InstanceId",
  "dynamicMessage": "instanceId"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-03The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-10-09The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-10-09The request parameters of the API has changedView Change Details
2023-10-09The request parameters of the API has changedView Change Details