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"
}