You can call ListClusterHostGroup operation to query host groups in 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 ListClusterHostGroup

The operation that you want to perform. This parameter is required for API requests that you initiate by piecing together HTTP or HTTPS URLs. Set this parameter to ListClusterHostGroup.

ClusterId String Yes C-D7958B72E59B****

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

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

HostGroupId String No G-76D09CF110A3****

The ID of the host group.

HostGroupName String No core_group

The name of the host group you want to query.

HostGroupType String No CORE

The type of machine group to query. Valid values:

  • MASTER: primary instance group
  • CORE: core instance group
  • TASK: compute instance group
StatusList.N RepeatList No NORMAL

The machine group status list to be queried:

  • NORMAL
  • ABNORMAL
  • DELETED
PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

PageSize Integer No 10

The number of entries to return on each page.

Response parameters

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

The ID of the cluster.

HostGroupList Array of HostGroup

The list of host groups in the cluster.

HostGroup
ChargeType String PostPaid

The payment method of the current machine group:

  • PostPaid: pay-as-you-go cluster
  • PrePaid: subscription cluster
Comment String The remarks.

The remarks about the host group.

CostSavingPercent Float 0

A reserved parameter.

Cpu Integer 4

The CPU specifications of nodes in the host group.

DataDiskCount Integer 4

The number of data disks used by nodes in the host group.

DataDiskSize Integer 100

The size of a single data disk used by nodes in the host group. Unit: GB.

DataDiskType String CLOUD_SSD

The type of data disks used by nodes in the host group.

HostGroupChangeStatus String IN_PROGRESS

The execution status of the upgrade task. Valid values:

  • IN_PROGRESS: The instance is being processed.
  • COMPLETED: The job is completed.
  • FAILED: The task failed.
HostGroupChangeType String RESIZE_DISK

machine group the current operation type:

  • RESIZE_DISK: resizes the disk.
  • MODIFY_INSTANCE_TYPE: Modifying an Instance Type
  • RESTART_HOST_GROUP: Restart machine group
HostGroupId String G-EBAA5D6566E7****

The ID of the host group.

HostGroupName String Core_Group

The name of the machine group.

HostGroupSubType String AutoScaling

The subtype of the machine group. such as AutoScaling.

HostGroupType String CORE

machine group type:

  • MASTER: primary instance node
  • CORE: core instance node
  • TASK: compute instance node
InstanceType String ecs.c5.xlarge

The type of instances in the host group.

LockReason String Your account balance is insufficient

The reason why secure DCDN was locked.

LockType String ACCOUNT_ARREARS

machine group lock class:

  • CLUSTER_EXPIRED (cluster expiration)
  • ACCOUNT_ARREARS (account overdue)
Memory Integer 8

The memory specifications of nodes in the host group.

NodeCount Integer 3

The number of nodes in the host group.

PayType String PostPaid

The billing method of the host group.

ScalingGroupActiveStatus String N/A

A reserved parameter.

ScalingGroupBizId String N/A

A reserved parameter.

ScalingGroupConfigState String N/A

A reserved parameter.

ScalingGroupMaxNode Integer 0

A reserved parameter.

ScalingGroupMinNode Integer 0

A reserved parameter.

ScalingInMode String N/A

A reserved parameter.

SecurityGroupId String sg-xxx

The ID of the security group.

Status String NORMAL

The status of the host group.

SystemDiskCount Integer 1

The number of system disks used by nodes in the host group.

SystemDiskSize Integer 40

The size of a single system disk used by nodes in the host group. Unit: GB.

SystemDiskType String CLOUD_SSD

The type of system disks used by nodes in the host group.

VswitchId String vsw-bp1aij6ynkt53ntnf****

The ID of the vSwitch.

gmtCreate String 1597042920000

The time when the media file was created.

gmtModified String 1597043525000

The time when the configuration was updated.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 100

The number of entries to return on each page.

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

The ID of the request.

Total Integer 15

The total number of returned entries.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListClusterHostGroup
&ClusterId=C-D7958B72E59B****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample responses

XML format

<RequestId>9807D530-57B4-4BA7-93E8-E4F2B3826345</RequestId>
<PageSize>100</PageSize>
<PageNumber>1</PageNumber>
<HostGroupList>
    <HostGroup>
        <HostGroupType>CORE</HostGroupType>
        <Status>NORMAL</Status>
        <Comment/>
        <gmtModified>1597043525000</gmtModified>
        <NodeCount>2</NodeCount>
        <SystemDiskSize>120</SystemDiskSize>
        <Memory>8</Memory>
        <Cpu>4</Cpu>
        <DataDiskCount>4</DataDiskCount>
        <PayType>PostPaid</PayType>
        <HostGroupName>Core instance group</HostGroupName>
        <gmtCreate>1597042920000</gmtCreate>
        <VswitchId>vsw-bp1aij6ynkt53ntnffynb</VswitchId>
        <SystemDiskType>CLOUD_SSD</SystemDiskType>
        <HostGroupId>G-519D30DDF1D6B3E1</HostGroupId>
        <DataDiskType>CLOUD_SSD</DataDiskType>
        <ChargeType>PostPaid</ChargeType>
        <DataDiskSize>80</DataDiskSize>
        <InstanceType>ecs.n4.xlarge</InstanceType>
    </HostGroup>
    <HostGroup>
        <HostGroupType>MASTER</HostGroupType>
        <Status>NORMAL</Status>
        <Comment/>
        <gmtModified>1597043525000</gmtModified>
        <NodeCount>1</NodeCount>
        <SystemDiskSize>120</SystemDiskSize>
        <Memory>8</Memory>
        <Cpu>4</Cpu>
        <DataDiskCount>1</DataDiskCount>
        <PayType>PostPaid</PayType>
        <HostGroupName>Master instance group</HostGroupName>
        <gmtCreate>1597042920000</gmtCreate>
        <VswitchId>vsw-bp1aij6ynkt53ntnffynb</VswitchId>
        <SystemDiskType>CLOUD_SSD</SystemDiskType>
        <HostGroupId>G-FFE7A21D570D050E</HostGroupId>
        <DataDiskType>CLOUD_SSD</DataDiskType>
        <ChargeType>PostPaid</ChargeType>
        <DataDiskSize>80</DataDiskSize>
        <InstanceType>ecs.n4.xlarge</InstanceType>
    </HostGroup>
</HostGroupList>

JSON format

{
    "RequestId": "9807D530-57B4-4BA7-93E8-E4F2B3826345",
    "PageSize": 100,
    "PageNumber": 1,
    "HostGroupList": {
        "HostGroup": [
            {
                "HostGroupType": "CORE",
                "Status": "NORMAL",
                "Comment": "",
                "gmtModified": 1597043525000,
                "NodeCount": 2,
                "SystemDiskSize": 120,
                "Memory": 8,
                "Cpu": 4,
                "DataDiskCount": 4,
                "PayType": "PostPaid",
                "HostGroupName": "Core instance group",
                "gmtCreate": 1597042920000,
                "VswitchId": "vsw-bp1aij6ynkt53ntnffynb",
                "SystemDiskType": "CLOUD_SSD",
                "HostGroupId": "G-519D30DDF1D6B3E1",
                "DataDiskType": "CLOUD_SSD",
                "ChargeType": "PostPaid",
                "DataDiskSize": 80,
                "InstanceType": "ecs.n4.xlarge"
            },
            {
                "HostGroupType": "MASTER",
                "Status": "NORMAL",
                "Comment": "",
                "gmtModified": 1597043525000,
                "NodeCount": 1,
                "SystemDiskSize": 120,
                "Memory": 8,
                "Cpu": 4,
                "DataDiskCount": 1,
                "PayType": "PostPaid",
                "HostGroupName": "Primary instance group",
                "gmtCreate": 1597042920000,
                "VswitchId": "vsw-bp1aij6ynkt53ntnffynb",
                "SystemDiskType": "CLOUD_SSD",
                "HostGroupId": "G-FFE7A21D570D050E",
                "DataDiskType": "CLOUD_SSD",
                "ChargeType": "PostPaid",
                "DataDiskSize": 80,
                "InstanceType": "ecs.n4.xlarge"
            }
        ]
    }
}