All Products
Search
Document Center

Enterprise Distributed Application Service:InsertCluster

Last Updated:Mar 01, 2024

Creates a cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
edas:CreateClusterWrite
  • All Resources
    *
    none
none

Request syntax

POST /pop/v5/resource/cluster

Request parameters

ParameterTypeRequiredDescriptionExample
LogicalRegionIdstringNo

The ID of the custom namespace. The ID is in the physical region ID:custom namespace identifier format. Example: cn-hangzhou:test.

cn-beijing:td****
ClusterNamestringYes

The name of the cluster.

****_product_test2
ClusterTypeintegerYes

The type of the cluster. Valid values:

  • 2: Elastic Compute Service (ECS) cluster
  • 3: self-managed Kubernetes cluster in Enterprise Distributed Application Service (EDAS)
  • 5: Kubernetes cluster
2
NetworkModeintegerYes

The network type of the cluster. Valid values:

  • 1: classic network
  • 2: virtual private cloud (VPC)
2
VpcIdstringNo

The ID of the VPC. This parameter is required if you set the NetworkMode parameter to 2.

vpc-2zef6ob8mrlzv8x3q****
OversoldFactorintegerNo

This parameter is deprecated. The CPU overcommit ratio supported by a Docker cluster. Valid values:

  • 2: 1:2, which means that resources are overcommitted by 1:2.
  • 4: 1:4, which means that resources are overcommitted by 1:4.
  • 8: 1:8, which means that resources are overcommitted by 1:8.
2
IaasProviderstringNo

The provider of Infrastructure as a Service (IaaS) resources that are used in the cluster.

When you use Alibaba Cloud, set the value to ALIYUN. The value is case-sensitive.

ALIYUN

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The additional information that is returned.

success
RequestIdstring

The ID of the request.

b197-40ab-9155-****
Clusterobject

The information about the cluster that was created.

VpcIdstring

The ID of the VPC.

vpc-2zef6ob8mrlzv8x3q****
OversoldFactorinteger

This parameter is deprecated. The CPU overcommit ratio supported by the Docker cluster. Valid values:

  • 2: 1:2, which means that resources are overcommitted by 1:2.
  • 4: 1:4, which means that resources are overcommitted by 1:4.
  • 8: 1:8, which means that resources are overcommitted by 1:8.
1
NetworkModeinteger

The network type of the cluster. Valid values:

  • 1: classic network
  • 2. VPC
2
IaasProviderstring

The provider of the IaaS resources that are used in the cluster.

ALIYUN
ClusterTypeinteger

The type of the cluster. Valid values:

  • 2: ECS cluster
  • 3: self-managed Kubernetes cluster in EDAS
  • 5: Kubernetes cluster
2
ClusterNamestring

The name of the cluster.

****_product_test2
ClusterIdstring

The ID of cluster.

8705ad13-5d86-47fc-b68f-257b59ed****
RegionIdstring

The ID of the region in which the cluster resides.

cn-beijing

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "success",
  "RequestId": "b197-40ab-9155-****",
  "Cluster": {
    "VpcId": "vpc-2zef6ob8mrlzv8x3q****",
    "OversoldFactor": 1,
    "NetworkMode": 2,
    "IaasProvider": "ALIYUN",
    "ClusterType": 2,
    "ClusterName": "****_product_test2",
    "ClusterId": "8705ad13-5d86-47fc-b68f-257b59ed****",
    "RegionId": "cn-beijing"
  }
}

Error codes

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