You can call this operation to query the information of hosts in an E-MapReduce (EMR) cluster, including configurations of disks, CPUs, and memory.

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 ListClusterHost

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

ClusterId String Yes C-D7CA98AAA96A****

The ID of the cluster.

RegionId String Yes cn-hangzhou-b

The ID of the region where your cluster resides.

AccessKeyId String No LTAI8ljWyu7y****

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

ComponentName String No HiveServer2

The name of the component.

GroupType String No MASTER

The type of the host group.

HostGroupId String No G-A5EA210E15FCFF8E

The ID of the host group.

HostInstanceId String No i-bp11vdyh3l6xvmnl****

The ID of the Elastic Compute Service (ECS) instance.

HostName String No emr-header-1

The name of the host.

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.

PrivateIp String No 192.***. ***. ***

The internal IP address of the host.

PublicIp String No 47.***. ***. ***

The public IP address of the host.

StatusList.N RepeatList No ["NORMAL"]

The list of the host status.

Response parameters

Parameter Type Example Description 
HostList

The list of hosts.

Host

The information of a host.

ChargeType String PostPaid

The billing method of the host.

Cpu Integer 4

The number of CPU cores.

CreateTime String 11

The time when the host was created.

DiskList

The list of disks.

Disk

The information of a disk.

Device String 11

The name of the disk.

DiskId String d-bp1aq78lhbig6ielbur8

The ID of the disk.

DiskSize Integer 80

The disk capacity.

DiskType String CLOUD_EFFICIENCY

The type of the disk.

Type String data

Specifies whether the disk is a data disk or system disk.

EmrExpiredTime String 11

The time when the EMR cluster expires.

ExpiredTime Long 32493801600000

The time when the host expires.

HostGroupId String G-A5EA210E15FCFF8E

The ID of the host group.

HostInstanceId String i-bp1cfwf2cwgji7ds****

The ID of the ECS instance.

HostName String emr-header-1

The name of the host.

InstanceStatus String NORMAL

The status of the ECS instance.

InstanceType String ecs.mn4.xlarge

The instance type of the host.

Memory Integer 16

The memory size of the host. Unit: GB.

PrivateIp String 192.168.25.220

The internal IP address of the host.

PublicIp String 47.110.77.16

The public IP address of the host.

Role String MASTER

The role of the host in the cluster.

SerialNumber String 3c2a5078-778d-4c18-87e4-1a38fbcbc306

The serial number of the host.

Status String NORMAL

The status of the host.

SupportIpV6 Boolean  false

Specifies whether the IPv6 protocol is supported.

Type String VM

The type of the host.

ZoneId String 11

The ID of the region.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer   10

The number of entries returned per page.

RequestId String 0A46EB54-0D98-4BFA-B712-1A474925E9D4

The ID of the request.

Total Integer 12

The total number of hosts that you have queried.

Examples

Sample requests


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

Sample success responses

XML format

<ListClusterHostResponse>
	  <hostList>
		    <chargeType>PostPaid</chargeType>
		    <cpu>4</cpu>
		    <diskList>
			      <diskId>d-bp1d2duao4slg805dmg8</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1974rijbh940n5ih4q</diskId>
			      <diskSize>120</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>system</type>
		    </diskList>
		    <expiredTime>32493801600000</expiredTime>
		    <hostInstanceId>i-bp1cfwf2cwgji7ds****</hostInstanceId>
		    <hostName>emr-header-1</hostName>
		    <instanceType>ecs.mn4.xlarge</instanceType>
		    <memory>16</memory>
		    <privateIp>192. ***. ***.***</privateIp>
		    <publicIp>47. ***. ***.***</publicIp>
		    <role>MASTER</role>
		    <serialNumber>3c2a5078-778d-4c18-87e4-1a38fbcbc306</serialNumber>
		    <status>NORMAL</status>
	  </hostList>
	  <hostList>
		    <chargeType>PostPaid</chargeType>
		    <cpu>4</cpu>
		    <diskList>
			      <diskId>d-bp1aq78lhbig6ielbur8</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1iply35zhdge3nbqxf</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp19gcyyon6nx2lahx9x</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1974rijbh940n5ih4r</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1558hztv9c3q3gl7nn</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>system</type>
		    </diskList>
		    <expiredTime>32493801600000</expiredTime>
		    <hostInstanceId>i-bp18sb2w8oj9p6yf****</hostInstanceId>
		    <hostName>emr-worker-1</hostName>
		    <instanceType>ecs.n4.xlarge</instanceType>
		    <memory>8</memory>
		    <privateIp>192. ***. ***.***</privateIp>
		    <publicIp></publicIp>
		    <role>CORE</role>
		    <serialNumber>d4dbd488-8684-4742-b178-5565ef38c6f9</serialNumber>
		    <status>NORMAL</status>
	  </hostList>
	  <hostList>
		    <chargeType>PostPaid</chargeType>
		    <cpu>4</cpu>
		    <diskList>
			      <diskId>d-bp19gcyyon6nx2lahx9y</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1314ka4c7qmhpadwhf</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1558hztv9c3q3gl7no</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1e82xlhob2n2e7q5rd</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>data</type>
		    </diskList>
		    <diskList>
			      <diskId>d-bp1gpdc9x4o051udcmd3</diskId>
			      <diskSize>80</diskSize>
			      <diskType>CLOUD_EFFICIENCY</diskType>
			      <type>system</type>
		    </diskList>
		    <expiredTime>32493801600000</expiredTime>
		    <hostInstanceId>i-bp14rtl1gqupopgm****</hostInstanceId>
		    <hostName>emr-worker-2</hostName>
		    <instanceType>ecs.n4.xlarge</instanceType>
		    <memory>8</memory>
		    <privateIp>192. ***. ***.***</privateIp>
		    <publicIp></publicIp>
		    <role>CORE</role>
		    <serialNumber>e8d25d43-2df6-4054-9861-53d1c12d08cb</serialNumber>
		    <status>NORMAL</status>
	  </hostList>
	  <pageNumber>1</pageNumber>
	  <pageSize>10</pageSize>
	  <requestId>0A46EB54-0D98-4BFA-B712-1A474925E9D4</requestId>
	  <total>3</total>
</ListClusterHostResponse>

JSON format

{
	"total":3,
	"requestId":"0A46EB54-0D98-4BFA-B712-1A474925E9D4",
	"pageSize":10,
	"pageNumber":1,
	"hostList":[
		{
			"diskList":[
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1d2duao4slg805dmg8"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"system",
					"diskSize":120,
					"diskId":"d-bp1974rijbh940n5ih4q"
				}
			],
			"status":"NORMAL",
			"cpu":4,
			"serialNumber":"3c2a5078-778d-4c18-87e4-1a38fbcbc306",
			"hostInstanceId":"i-bp1cfwf2cwgji7ds****",
			"publicIp":"47. ***. ***.***",
			"memory":16,
			"instanceType":"ecs.mn4.xlarge",
			"privateIp":"192. ***. ***.***",
			"expiredTime":32493801600000,
			"hostName":"emr-header-1",
			"role":"MASTER",
			"chargeType":"PostPaid"
		},
		{
			"diskList":[
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1aq78lhbig6ielbur8"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1iply35zhdge3nbqxf"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp19gcyyon6nx2lahx9x"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1974rijbh940n5ih4r"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"system",
					"diskSize":80,
					"diskId":"d-bp1558hztv9c3q3gl7nn"
				}
			],
			"status":"NORMAL",
			"cpu":4,
			"serialNumber":"d4dbd488-8684-4742-b178-5565ef38c6f9",
			"hostInstanceId":"i-bp18sb2w8oj9p6yf****",
			"publicIp":"",
			"memory":8,
			"instanceType":"ecs.n4.xlarge",
			"privateIp":"192. ***. ***.***",
			"expiredTime":32493801600000,
			"hostName":"emr-worker-1",
			"role":"CORE",
			"chargeType":"PostPaid"
		},
		{
			"diskList":[
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp19gcyyon6nx2lahx9y"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1314ka4c7qmhpadwhf"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1558hztv9c3q3gl7no"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"data",
					"diskSize":80,
					"diskId":"d-bp1e82xlhob2n2e7q5rd"
				},
				{
					"diskType":"CLOUD_EFFICIENCY",
					"type":"system",
					"diskSize":80,
					"diskId":"d-bp1gpdc9x4o051udcmd3"
				}
			],
			"status":"NORMAL",
			"cpu":4,
			"serialNumber":"e8d25d43-2df6-4054-9861-53d1c12d08cb",
			"hostInstanceId":"i-bp14rtl1gqupopgm****",
			"publicIp":"",
			"memory":8,
			"instanceType":"ecs.n4.xlarge",
			"privateIp":"192. ***. ***.***",
			"expiredTime":32493801600000,
			"hostName":"emr-worker-2",
			"role":"CORE",
			"chargeType":"PostPaid"
		}
	]
}

Error codes

HTTP status code Error code Error message Description 
403 Params.Illegal The specified parameters are wrongly formed.. The error message returned because the format of the specified parameter is invalid.
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 Invalid.Cluster.Status Invalid cluster status %s in status list The error message returned because the status of the specified cluster is invalid.
403 Invalid.Cluster.Type Invalid cluster type %s in cluster type list The error message returned because the type of the specified cluster is invalid.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error has occurred. Open a ticket.

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