Updated on 2023-11-27 GMT+08:00

Creating a Cluster (Discarded)

Function

This API is used to create a cluster. The cluster will be bound to specified compute resources.

This API has been discarded and is not recommended.

URI

  • URI format

    POST /v2.0/{project_id}/clusters

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

Request

In addition to the common request header parameters involved in cluster creation, the special request header parameters described in Table 2 are also involved.
Table 2 Header description

Parameter

Mandatory

Description

X-Auth-Token

Yes

User token obtained from IAM.

Accept

Yes

The default value is application/json.

Content-Type

Yes

The value is specified to application/json.

charset

Yes

The encoding format is specified to UTF8.

Table 3 describes the request parameters.

Table 3 Request parameters

Parameter

Mandatory

Type

Description

cluster_name

Yes

String

Name of a new cluster. The name can contain only digits, letters, and underscores (_), but cannot contain only digits or start with an underscore (_).

description

No

String

Description of a cluster.

cu_count

Yes

Integer

Number of compute units (units to be billed) bound to a cluster. You can select 16 CUs, 64 CUs, or 256 CUs. If you need a larger quota, contact the DLI service administrator.

cidr_in_vpc

No

String

VPC CIDR block

cidr_in_mgntsubnet

No

String

CIDR block of the management subnet

cidr_in_subnet

No

String

Special subnet CIDR block

Response

  • Return code

    Code 201 is returned if the operation is successful.

  • Response parameter

    None

Example

  • Example request
    { 
         "cluster_name": "cluster1", 
         "description": "test cluster", 
         "cu_count": 16
    }
  • Example response (successful request)
    None

    If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.