CreateInstance

Updated at:

Creates an ApsaraMQ for RocketMQ 5.x series instance.

Operation description

Important The OpenAPI provided by Alibaba Cloud is a management and control API used to manage and query resources of Alibaba Cloud services. Integrate it only into the management and control link. Do not rely on OpenAPI in the core data link for message sending and receiving. Otherwise, risks may occur on the link.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:CreateInstance

create

*Instance

acs:rocketmq:{#regionId}:{#accountId}:Instance/*

  • rocketmq:InternetSpec
None

Request syntax

POST /instances HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

clientToken

string

No

The client token that is used to ensure the idempotence of the request. The client generates the value of this parameter, which must be unique among different requests. The token can be up to 64 ASCII characters in length.

c2c5d1274a8d4317a13bc5b0d4******

body

object

No

The body parameters.

instanceName

string

No

The name of the instance to be created.

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

rmq-cn-72u3048uxxx

serviceCode

string

Yes

The service encoding of the instance. The service encoding for MSMQ for RocketMQ is rmq.

rmq

seriesCode

string

Yes

The primary series encoding of the instance. For more information about the differences between primary series, see Product selection.

Valid values:

  • standard :

    Standard Edition

  • dedicated :

    Dedicated Edition

  • shared :

    Shared Edition

  • ultimate :

    Platinum Edition

  • professional :

    Professional Edition

standard

subSeriesCode

string

Yes

The sub-series encoding of the instance. For more information about the differences between sub-series, see Product selection.

If the primary series is set to ultimate (Platinum Edition), the sub-series can only be set to cluster_ha (Cluster High Availability Edition).

Important After the instance is created, the sub-series cannot be changed.

Valid values:

  • serverless :

    Serverless Edition

  • cluster_ha :

    Cluster High Availability Edition

  • single_node :

    Single-node Testing Edition

cluster_ha

paymentType

string

Yes

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

For more information, see Billable methods.

Valid values:

  • PayAsYouGo :

    Pay-as-you-go. A post-payment pattern in which you use resources first and pay later.

  • Subscription :

    Subscription. An upfront pattern in which you pay first and use resources later.

Subscription

period

integer

No

The subscription duration. This parameter takes effect only when the billing method of the instance is set to Subscription.

Valid values:

  • Monthly subscription: 1, 2, 3, 4, 5, 6

  • Yearly subscription: 1, 2, 3

3

periodUnit

string

No

The minimum epoch unit of the subscription duration.

Valid values:

  • Month :

    Monthly subscription

  • Year :

    Yearly subscription

Month

autoRenew

boolean

No

Specifies whether to enable auto-renewal. This parameter takes effect only when the billing method of the instance is set to Subscription.

Valid values:

  • true :

    Auto-renewal is enabled.

  • false :

    Auto-renewal is disabled.

true

autoRenewPeriod

integer

No

The Unified Auto Renewal Cycle. This parameter takes effect only when auto-renewal is enabled. Unit: months.

Valid values:

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

3

remark

string

No

The remarks of the instance.

This is the remark for test.

productInfo

object

No

The instance specification information.

msgProcessSpec

string

No

The message sending and receiving computing specification. For more information about the TPS upper limit for message sending and receiving, see Instance specifications.

rmq.s2.2xlarge

sendReceiveRatio

number

No

The ratio of message sending TPS to the total message sending and accepting TPS of the instance.

For example, if the TPS upper limit for message sending and accepting of the instance is 1000 per second and the message sending ratio is 0.8, the TPS upper limit for message sending is 800 per second and the TPS upper limit for message accepting is 200 per second.

Valid values: [0.05, 0.95]. Default value: 0.5.

0.5

autoScaling

boolean

No

Specifies whether to enable burstable elastic capacity beyond the specification.

After burstable elastic capacity is enabled, MSMQ for RocketMQ allows the instance to exceed the TPS limit of the base specification within a certain range. The portion that exceeds the base specification incurs additional elastic specification fees. For more information about billing, see Computing fees.

Note

Only instances of certain specifications support burstable elastic capacity. For more information about supported instances, see Instance specifications.

Valid values:

  • true :

    Elastic capacity is enabled.

  • false :

    Elastic capacity is disabled.

true

messageRetentionTime

integer

No

The message retention period. Unit: hours.

For the valid value range, see Limits > Resource Quotas > Message Retention Period.

The log broker in MSMQ for RocketMQ is fully serverless and elastic. Fees are charged based on the actual storage space used. You can control the storage capacity by adjusting the message retention period. For more information, see Storage fees.

72

storageEncryption

boolean

No

Indicates whether storage encryption is enabled.

false

storageSecretKey

string

No

The key for storage encryption.

xxxxx

capacityType

string

No

The capacity pattern.

Valid values:

  • provisioned :

    Provisioned + elastic

  • ondemand :

    Pay-as-you-go

provisioned

provisionedCapacity

integer

No

The provisioned capacity.

5000

traceOn

boolean

No

Specifies whether to enable the message trace feature.

true: Enable the message trace feature. false: Shutdown the message trace feature. This parameter takes effect only for Serverless instances. If the message trace feature is enabled, message trace fees are incurred. For more information about billing, see the Serverless billing description. For pay-as-you-go and subscription instances, this parameter does not take effect. The message trace feature is supported by default regardless of whether this parameter is enabled.

true

drReplicationMode

string

No

The cross-region replication pattern.

Valid values:

  • async_cross_az :

    Asynchronous replication

  • sync_cross_az :

    Synchronous replication

async_cross_az

adaptiveElasticity

boolean

No

Specifies whether to enable adaptive elasticity. A value of true indicates that adaptive elasticity is enabled. A value of false indicates that adaptive elasticity is shutdown.

networkInfo

object

Yes

The network configuration information.

vpcInfo

object

Yes

The VPC configuration information.

vpcId

string

Yes

The ID of the VPC to associate with the instance.

Note

After an ApsaraMQ for RocketMQ instance is created, the selected VPC cannot be changed. To modify the associated VPC, release the existing ApsaraMQ for RocketMQ instance and purchase a new one.

vpc-wz9qt50xhtj9krb******

vSwitchId deprecated

string

No

The ID of the vSwitch associated with the instance. If multiple vSwitches exist, separate them with vertical bars (|).

Note

After an ApsaraMQ for RocketMQ instance is created, the selected vSwitch cannot be changed. To modify the associated vSwitch, release the existing ApsaraMQ for RocketMQ instance and purchase a new one.

Important This field is not recommended. Use the vSwitches field instead.

vsw-uf6gwtbn6etadpv*******

securityGroupIds

string

No

The security group ID.

sg-bp17hpmgz96tvnsdy6so

vSwitches

array<object>

No

The list of vSwitches.

Note

After an ApsaraMQ for RocketMQ instance is created, the selected vSwitch cannot be changed. To modify the associated vSwitch, release the existing ApsaraMQ for RocketMQ instance and purchase a new one.

Important This is a required field. Because the vSwitchId field is no longer recommended, use this field to configure vSwitches.

object

No

vSwitchId

string

No

The ID of the vSwitch associated with the instance.

vsw-uf6gwtbn6etadpv*******

internetInfo

object

Yes

The Internet configuration information.

internetSpec

string

Yes

Specifies whether to enable public network access.

By default, instances support VPC access. If you enable public network access, ApsaraMQ for RocketMQ charges fees for public network downstream bandwidth. For more information about billing, see Public network access fees.

Valid values:

  • enable :

    Enable public network access.

  • disable :

    Disable public network access.

disable

flowOutType

string

Yes

The Internet billing type.

Valid values:

  • payByBandwidth :

    Fixed bandwidth billing. Set this parameter to this value when public network access is enabled.

  • payByTraffic :

    Pay-by-traffic billing. Set this parameter to this value when public network access is enabled.

  • uninvolved :

    Not applicable. Set this parameter to this value when public network access is disabled.

uninvolved

flowOutBandwidth

integer

No

The Internet bandwidth specification. Unit: Mb/s.

This parameter is required only when the Internet billing type is set to fixed bandwidth billing.

Valid values: 1 to 1000.

100

ipWhitelist deprecated

array

No

The public network access IP whitelist. Only public endpoints support IP whitelist configuration. VPC endpoints do not support this feature.

  • If no IP whitelist is configured, all IP address ranges are allowed to access the ApsaraMQ for RocketMQ server over the Internet by default.

  • If an IP whitelist is configured, only the IP addresses in the whitelist are allowed to access the ApsaraMQ for RocketMQ server over the Internet.

string

No

The CIDR block in the public network access whitelist.

192.168.x.x/24

commodityCode deprecated

string

No

The commodity code.

  • ons_rmqsub_public_cn: subscription instance.

  • ons_rmqpost_public_cn: pay-as-you-go instance.

  • ons_rmqsrvlesspost_public_cn: serverless instance.

  • This parameter is required for serverless instances.

ons_ rmqpost_public_cn

resourceGroupId

string

No

The resource group ID.

rg-aekzy6pist7uuna

tags

array<object>

No

The list of resource tags.

object

No

The resource tag.

key

string

No

The key of the resource tag.

xxxKey

value

string

No

The value of the resource tag.

xxxValue

aclInfo

object

No

The access control information.

defaultVpcAuthFree

boolean

No

Specifies whether to enable authentication-free access for VPC endpoints when the intelligent identity recognition type is used. Valid values:

  • true: Enable authentication-free access.

  • false: Disable authentication-free access.

false

Response elements

Element

Type

Description

Example

object

The response parameters.

requestId

string

The request ID. Each request ID is unique and can be used to troubleshoot issues.

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

success

boolean

Indicates whether the operation is successful.

true

data

string

The ID of the created instance.

rmq-cn-7e22ody****

code

string

The error code.

200

message

string

The error message.

Success

httpStatusCode

integer

The HTTP status code.

200

dynamicCode

string

The dynamic error code.

InstanceId

dynamicMessage

string

The dynamic error message.

instanceId

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.