All Products
Search
Document Center

Microservices Engine:CreateCluster

Last Updated:Dec 12, 2024

Creates a Microservices Engine (MSE) instance, such as an MSE ZooKeeper instance or an MSE Nacos instance.

Operation description

Before you call this API operation, you must make sure that you fully understand the billing methods and pricing of MSE.

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
mse:CreateClustercreate
*Cluster
acs:mse:{#regionId}:{#accountId}:instance/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PubNetworkFlowstringNo

This parameter is valid only if the ConnectionType parameter is set to slb. The value 0 indicates that the Server Load Balancer (SLB) instance is not connected over the Internet. A value greater than 1 indicates the fixed bandwidth that is used to access the SLB instance over the Internet. Unit: Mbit/s.

Valid values: 0 to 5000.

0
PubSlbSpecificationdeprecatedstringNo

This parameter is obsolete.

slb.s1.small
DiskTypedeprecatedstringNo

This parameter is obsolete.

alicloud-disk-ssd
VpcIdstringNo

The ID of the virtual private cloud (VPC).

vpc-bp1t50e045b5g7i3p****
NetTypestringYes

The network type of the MSE instance. Valid values:

  • privatenet: VPC
  • pubnet: Internet
privatenet
VSwitchIdstringNo

The ID of the vSwitch.

vsw-bp17opt4v18sto39k****
InstanceCountintegerYes

The number of nodes in the instance. Valid values: 1 to 9.

[Professional Edition]

  • The value must be greater than or equal to 3 and must be an odd number.

[Developer Edition]

  • The value must be 1.

[Serverless Edition]

Ignore this parameter.

3
ClusterSpecificationstringYes

The engine specifications. Valid values:

[Professional Edition]

  • MSE_SC_2_4_60_c: 2 vCPUs and 4 GB of memory
  • MSE_SC_1_2_60_c: 1 vCPU and 2 GB of memory
  • MSE_SC_4_8_60_c: 4 vCPUs and 8 GB of memory
  • MSE_SC_8_16_60_c: 8 vCPUs and 16 GB of memory
  • MSE_SC_16_32_60_c: 16 vCPUs and 32 GB of memory

[Developer Edition]

  • MSE_SC_1_2_60_c: 1 vCPU and 2 GB of memory
  • MSE_SC_2_4_60_c: 2 vCPUs and 4 GB of memory

[Serverless Edition]

Ignore this parameter or set this parameter to MSE_SC_SERVERLESS.

MSE_SC_2_4_60_c
ClusterVersionstringYes

The engine version of the instance. Valid values:

[Professional Edition]

  • NACOS_2_0_0
  • ZooKeeper_3_8_0

[Developer Edition]

  • NACOS_2_0_0
  • ZooKeeper_3_8_0

[Serverless Edition]

  • NACOS_2_0_0
  • ZooKeeper_3_8_0
NACOS_2_0_0
ClusterTypestringYes

The type of the instance. Valid values: ZooKeeper and Nacos-Ans.

Nacos-Ans
RegionstringYes

The region where the instance resides. Examples:

  • cn-hangzhou: China (Hangzhou)
  • cn-beijing: China (Beijing)
  • cn-shanghai: China (Shanghai)
  • cn-zhangjiakou: China (Zhangjiakou)
  • cn-shenzhen: China (Shenzhen)
cn-hangzhou
PrivateSlbSpecificationdeprecatedstringNo

This parameter is obsolete.

slb.s1.small
ConnectionTypestringNo

The network connection type. Valid values: slb or single_eni. For instances of the Developer Edition in some regions, only the value single_eni is supported.

slb
RequestParsstringNo

The extended request parameters in the JSON format.

{}
MseVersionstringNo

Configure this parameter unless otherwise specified. Valid values:

  • mse_pro: Professional Edition
  • mse_dev: Developer Edition
  • mse_dev: Serverless Edition
mse_pro
InstanceNamestringNo

The custom name of the instance.

tanshuyingtest001
ResourceGroupIdstringNo

The ID of the resource group. For the details of resource groups, see View basic information of a resource group.

rg-aekzcqmoay3dlyq
Tagarray<object>No

The tags to add to the resource. You can specify up to 20 tags.

objectNo

The tags.

KeystringNo

The key of tag N to add to the resource.

env
ValuestringNo

The value of tag N to add to the resource.

prd
ChargeTypestringNo

The billing method. Valid values: PREPAY and POSTPAY.

Ignore this parameter for serverless instances.

POSTPAY
SecurityGroupTypestringNo

The type of the security group to which the instance belongs. This parameter is valid only if the ConnectionType parameter is set to single_eni.

Enumeration Value:
  • enterprise
  • normal
enterprise
EipEnabledbooleanNo

Specifies whether to enable elastic IP addresses. This parameter is valid only if the ConnectionType parameter is set to single_eni.

Valid values:

  • true
  • false
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object

The string object.

RequestIdstring

The ID of the request.

dc63-465d-8ef5-20dc18af****
Messagestring

The message returned.

The request is successfully processed.
InstanceIdstring

The ID of the instance.

mse-cn-st21ri2****
ErrorCodestring

The error code returned if the request failed.

mse-100-000
OrderIdstring

The ID of the order.

20574710974****
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "dc63-465d-8ef5-20dc18af****",
  "Message": "The request is successfully processed.\n",
  "InstanceId": "mse-cn-st21ri2****",
  "ErrorCode": "mse-100-000",
  "OrderId": "20574710974****",
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalRequestInvalid request:%sInvalid request: %s
400InvalidParameterParameter error:%sRequest parameter error: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404NotFoundNot found:%sThe resource does not exist:%s
500InternalErrorConsole error. Try again later:%sConsole error. Try again later: %s

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

Change history

Change timeSummary of changesOperation
2023-08-29The request parameters of the API has changedView Change Details
2023-05-09The request parameters of the API has changedView Change Details
2022-08-11The request parameters of the API has changedView Change Details