You can call the ResizeClusterV2 operation to scale out a cluster based on the configuration.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

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-D7958B72E59B****

The ID of the cluster. You can call ListClusters Interface to view the cluster ID.

HostGroup.N.HostGroupType String Yes TASK

Machine group type:

  • MASTER: The MASTER instance node.
  • CORE: CORE instance node
  • TASK: compute instance node
HostGroup.N.InstanceType String Yes ecs.mn4.2xlarge

The instance type of the host group.

HostGroup.N.NodeCount Integer Yes 1

The number of nodes in host group N.

RegionId String Yes cn-hangzhou

The ID of the region to which the cluster belongs.

AutoPayOrder Boolean No true

Specifies whether automatic payment is enabled for the instance.

VswitchId String No vsw-bp10tvjyc77psy0z5****

The VSwitch ID of the host group.

IsOpenPublicIp Boolean No false

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

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

The name of a host.

HostComponentInfo.N.ServiceName String No HDFS

The name of a service.

HostComponentInfo.N.ComponentNameList.N RepeatList No NAMENODE

The list of the components.

HostGroup.N.ClusterId String No C-D7958B72E59B****

The ID of the target cluster.

HostGroup.N.HostGroupId String No G-48E83B43E971****

The ID of the target host group in the cluster.

HostGroup.N.HostGroupName String No Task instance group

The name of the machine group.

HostGroup.N.Comment String No 0

A reserved parameter. You do not need to specify this parameter.

HostGroup.N.CreateType String No 0

A reserved parameter. You do not need to specify this parameter.

HostGroup.N.ChargeType String No PostPaid

The billing method of the host group. Valid values:

  • PostPaid: pay-as-you-go clusters
  • PrePaid: subscription cluster
HostGroup.N.Period Integer No 1

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

HostGroup.N.DiskType String No CLOUD_SSD

The type of data disk. Valid values:

  • CLOUD: basic CLOUD disk
  • CLOUD_EFFICIENCY: Ultra disk
  • CLOUD_SSD: Cloud SSD
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 in the host group.

HostGroup.N.SysDiskType String No CLOUD_SSD

The category of the system disk. Valid values:

  • CLOUD: basic CLOUD disk
  • CLOUD_EFFICIENCY: Ultra disk
  • CLOUD_SSD: Cloud SSD
HostGroup.N.SysDiskCapacity Integer No 120

The capacity of system disks.

HostGroup.N.AutoRenew Boolean No false

Specifies whether to automatically renew the subscription host group. Valid values:

  • true: Auto renewal is enabled.
  • false: Auto renewal is disabled.
HostGroup.N.VswitchId Integer No 0

The VSwitch ID of the host group.

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.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.

PromotionInfo.N.PromotionOptionNo String No []

Promotion information, promotion number.

PromotionInfo.N.PromotionOptionCode String No []

Promotion information, promotion option code.

PromotionInfo.N.ProductCode String No []

Promotion information, product code.

Response parameters

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

The ID of the HPC cluster.

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ResizeClusterV2
&ClusterId=C-D7958B72E59B****
&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

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

JSON Syntax

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

Error codes

HttpCode Error code Error message Description
403 Forbbiden 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 Apsara Stack tenant account 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 authorized to manage the resources of other users.
403 User.Account.Abnormal The User Account maybe is out of service! The error message returned because the Apsara Stack tenant account is out of service.
400 InvalidParameter.Period Invalid parameter 'period'. The error message returned because the Period parameter for the subscription cluster is invalid.
400 Create.PrePaid.Order.Failed Create prepaid 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 specified cluster ID does not exist. Make sure that the cluster ID is valid.
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 the request processing has failed due to an internal error. Submit a ticket.

The port number of a client that accesses a Error CenterFor more information, see error codes.