You can call this operation to expand the capacity of a cluster.

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 ResizeClusterV2

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

ClusterId String Yes C-D7958B72E59BAB88

The ID of the cluster.

RegionId String Yes cn-hangzhou

The ID of the region where your cluster resides.

AccessKeyId String No LTAI8ljWyu7yj9yG

The AccessKey ID provided to you by Alibaba Cloud, which specifies the ID of the user.

AutoPayOrder Boolean No true

Specifies whether to enable automatic payment.

HostComponentInfo.N.ComponentNameList.N RepeatList No NAMENODE

The list of the components.

HostComponentInfo.N.HostName String No emr-header-1

The name of the host.

HostComponentInfo.N.ServiceName String No HDFS

The name of the service.

HostGroup.N.AutoRenew Boolean No false

Specifies whether to automatically renew the subscription host group.

HostGroup.N.ChargeType String No PostPaid

The billing method of the host group.

HostGroup.N.ClusterId String No C-D7958B72E59BAB88

The ID of the target cluster.

HostGroup.N.Comment String No 0

A reserved parameter.

HostGroup.N.CreateType String No 0

A reserved parameter.

HostGroup.N.DiskCapacity Integer No 120

The data disk capacity of the host group.

HostGroup.N.DiskCount Integer No 4

The number of data disks of the host group.

HostGroup.N.DiskType String No CLOUD_SSD

The type of the data disk.

HostGroup.N.HostGroupId String No G-48E83B43E97111BE

The ID of the target host group in the cluster.

HostGroup.N.HostGroupName String No Task instance group

The name of the host group.

HostGroup.N.HostGroupType String No TASK

The type of the host group.

HostGroup.N.HostKeyPairName String No test-pair

The Secure Shell (SSH) key pair of the host group. Currently, you can only use the key pair to access a gateway node.

HostGroup.N.HostPassword String No pwd

The password for the hosts in the host group. Currently, you can only use the password to access a gateway node.

HostGroup.N.InstanceType String No ecs.mn4.2xlarge

The instance type of the host group.

HostGroup.N.NodeCount Integer No 1

The number of nodes in the host group.

HostGroup.N.Period Integer No 1

The validity period of the subscription host group. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

HostGroup.N.SysDiskCapacity Integer No 120

The capacity of system disks.

HostGroup.N.SysDiskType String No SSD_CLOUD

The type of the system disk.

HostGroup.N.VswitchId Integer No 0

The VSwitch ID of the host group.

IsOpenPublicIp Boolean No false

Specifies whether to assign a public IP address to the EMR cluster.

VswitchId String No vsw-bp10tvjyc77psy0z5h0ni

The VSwitch ID of the cluster.

Response parameters

Parameter Type Example Description
ClusterId String C-D7958B72E59BAB88

The ID of the cluster.

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

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ResizeClusterV2
&ClusterId=C-D7958B72E59BAB88
&HostGroup.1.HostGroupType=TASK
&HostGroup.1.InstanceType=ecs.mn4.2xlarge
&HostGroup.1.1odeCount=1
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ResizeClusterV2Response>  
	  <ClusterId>C-D7958B72E59B****</ClusterId>
	  <RequestId>BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22</RequestId>
 </ResizeClusterV2Response>

JSON format

{
	"ClusterId":"C-D7958B72E59B****",
	"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.
400 Cluster. HasTooMany. Nodes a cluster can have at most 50 core instances. The error message returned because the number of core nodes in the cluster has reached the limit. Reduce the number of core nodes.
400 ECSInfo.DiskSize.TooSmall disk size per ecs should be >= 80GB. The error message returned because the disk capacity cannot meet the current requirements. Extend the disk capacity.
400 Resize. Cannot. ResizeMaster Can not resize master instances The error message returned because the capacity of the master node cannot be expanded.
400 Resize. Cannot. ResizeTask Can not resize task instances The error message returned because the capacity of the task node cannot be expanded.
400 Resize. Reduce. NotSupport reducing instances is not supported The error message returned because the scale-in operation is not supported.
400 Resize. GetImageInfo. Failed can not get image info when resize cluster The error message returned because the image cannot be found when you expanded the capacity of a cluster.
400 Resize. GetImageID. Failed can not get image id when resize cluster The error message returned because the image ID does not exist when you expanded the capacity of a cluster.
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource The error message returned because you are not allowed to manage resources of other users.
403 User.Account.Abnormal The User Account maybe is out of service! The error message returned because the Alibaba Cloud account is invalid.
400 InvalidParameter.Period Invalid parameter 'period'. The error message returned because the period parameter for the subscription cluster is invalid.
400 Create.PrePaid.Cluster.Failed Create prepaid cluster order failed:[%s] The error message returned because an error occurred when you created the subscription cluster.
404 ClusterId.NotFound ClusterId [%s] does not exist. The error message returned because the ID of the specified cluster does not exist. Check the ID of the cluster.
400 Have.Orders.Wait.For.Pay Have other orders wait for pay The error message returned because you need to pay for other orders.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error has occurred. Submit a ticket.

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