You can call this operation to create a cluster by using a cluster template.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateClusterWithTemplate

The operation that you want to perform. Set the value to CreateClusterWithTemplate.

TemplateBizId String Yes CT-35498C56B3F1****

The ID of the cluster template.

AccessKeyId String No LTAI8ljWyu7y****

The AccessKey ID provided to you by Alibaba Cloud. This parameter identifies the user.

ClusterName String No hadoop_cluster_name_1

The custom name of the cluster.

UniqueTag String No 60a632f0-5909-430d-b65c-1b0f248e4947

The custom tag that identifies the cluster. The value of this parameter does not affect the creation of the cluster.

Response parameters

Parameter Type Example Description
ClusterId String C-D7958B72E59B****

The ID of the cluster.

CoreOrderId String 0

The order ID of the core instance.

EmrOrderId String 0

The order ID of the EMR.

MasterOrderId String 0

The order ID of the master instance.

RequestId String BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/? Action=CreateClusterWithTemplate
&TemplateBizId=CT-35498C56B3F1****
&<Common request parameters>

Sample success responses

XML format

<CreateClusterWithTemplateResponse>
	  <ClusterId>C-956FA9059886****</ClusterId>
	  <RequestId>BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22</RequestId>
</CreateClusterWithTemplateResponse>

JSON format

{
	"ClusterId":"C-956FA9059886****",
	"RequestId":"BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22"
}

Error codes

HTTP status code Error code Error message Description
403 Forbidden User not authorized to operate on the specified resource. The error message returned because you are not authorized to manage the specified resource. Contact the Alibaba Cloud account user for authorization.
500 InternalError The request processing has failed due to some unknown error. The error message returned because the request processing has failed due to an internal error. Submit a ticket.

For a list of error codes, visit the API Error Center.