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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 the ListClusters operation to view the ID of the cluster.

HostGroup.N.HostGroupType String Yes TASK

The type of the machine group to be queried. Valid values:

  • MASTER: the primary instance node.
  • CORE: core instance nodes.
  • TASK: compute instance nodes.
Note Currently, both MASTER and CORE can set only one group.
HostGroup.N.InstanceType String Yes ecs.mn4.2xlarge

The type of the ECS instance in the machine group.

HostGroup.N.NodeCount Integer Yes 1

The number of nodes in host group.

RegionId String Yes cn-hangzhou

The ID of the region.

AutoPayOrder Boolean No true

Specifies whether to pay automatically. Valid values:

  • true: automatic payment.
  • false: Do not pay automatically.
VswitchId String No vsw-bp10tvjyc77psy0z5****

The ID of the VSwitch.

IsOpenPublicIp Boolean No false

Specifies whether to enable the public IP address. Valid values:

  • true: enables public IP addresses. If this feature is enabled, it has a bandwidth of 8 MB by default.
  • false: disables the public IP address.
ClickhouseConf String No {"resizeType":"RESIZE_REPLICA"}

For the specific scale-out configuration of the clickhouse cluster, the resizeType value is as follows:

  • RESIZE_SHARD: the number of shards in the clickhouse cluster.
  • RESIZE_REPLICA: the number of replicas of the clickhouse 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 scaled-out cluster.

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

The ID of the machine group to be resized.

HostGroup.N.HostGroupName String No Task instance group

The name of the machine group.

HostGroup.N.Comment String No No default value

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

HostGroup.N.CreateType String No No default value

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

HostGroup.N.ChargeType String No PostPaid

The billing method for host group N. Valid values:

  • PostPaid: pay-as-you-go
  • PrePaid: the subscription billing method.
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.

Note This parameter is required when the HostGroup.n.ChargeType parameter is set to PrePaid.
HostGroup.N.DiskType String No CLOUD_SSD

The category of data disk N. Valid values:

  • CLOUD: basic disk.
  • CLOUD_EFFICIENCY: ultra disk.
  • CLOUD_SSD:SSD.
HostGroup.N.DiskCapacity Integer No 120

The data disk capacity of the host group.

Note If the machine group is added, this parameter is required.
HostGroup.N.DiskCount Integer No 4

The number of data disks in the host group.

Note If the machine group is added, this parameter is required.
HostGroup.N.SysDiskType String No CLOUD_SSD

The type of the system disk. Valid values:

  • CLOUD: basic disk.
  • CLOUD_EFFICIENCY: ultra disk.
  • CLOUD_SSD: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: enables auto-renewal.
  • false: disables auto renewal.
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.

HostGroup.N.PrivatePoolOptionsMatchCriteria String No Target

The type of the private pool. A private pool is generated after an elasticity assurance or a capacity reservation takes effect. You can select the private pool when you create instances. Valid values:

  • Open: open private pool. The system selects a matching open private pool to create the instance. If no matching open private pools are found, resources in the public pool are used. In this mode, you do not need to set the HostGroup.N.PrivatePoolOptionsId parameter.
  • Target: specified private pool. The capacity in a specified private pool is used. If the specified private pool is unavailable, the instance cannot be created. In this mode, you must specify the private pool ID, that is, the HostGroup.N.PrivatePoolOptionsId parameter is required.
  • None: no private pool. The capacity in private pools is not used.
HostGroup.N.PrivatePoolOptionsId String No crp-bp1e4wcvoucrish****

The ID of the private pool. The ID of a private pool is the same as that of the elasticity assurance or capacity reservation for which the private pool is generated.

PromotionInfo.N.PromotionOptionNo String No []

Promotional Information, Promotion No.

PromotionInfo.N.PromotionOptionCode String No []

Promotional information, promotion option code.

PromotionInfo.N.ProductCode String No []

Promotional information, product code.

Response parameters

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

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

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