YI-MapReduce

Query Cluster Node Group Details

2025-07-25 01:56:16

API Introduction

This API provides the function to query the details of cluster node groups. The system takes query conditions from user input and returns the details of the cluster node groups that meet these conditions.

API Restrictions

You can only query details of node groups from clusters that are in a running state.

Require API Approval or Not

No

URI

POST /v1/emr/openapi/cluster/clusterNodeGroup/getGroupAndHostByCondition

Content-Type

application/json

Path Parameter

None

Query Parameter

None

Request Header Parameter

Parameter

Required   or Not

Parameter   Type

Description

Example

Lower-level   Object

Cluster-Id

Yes

String

Cluster   ID

bdbbc8cc1288a78e5851839dc26f58b9

/

Request Body Parameter

Parameter

Required   or Not

Parameter  Type 

Description

Example

Lower-level   Object

clusterId

Yes

String

Cluster   ID

6695c8e7c34af9

27e860ba1f043c8c91

/

nodeState

No

Integer

Host   status (1: Starting, 2: Shutting down, 4: Deleted, 8: Running, 9: Shutdown).

1

/

selectKey

No

String

A   fuzzy query parameter that enables fuzzy searches through the node name,  

 internal IP, or external IP.

10.0.02

/

Response Parameter

Parameter

Parameter   Type

Description

Example

Lower-level   Object

statusCode

Integer

Status   Code

200

/

message

String

Brief   summary of the current API call status and necessary prompt information.

Requested

/

error

String

Error   code. This field is not returned when the request is successful.

EMR_400001

/

returnObj

Object

Return   result.

/

returnObj

Table returnObj

Parameter

Parameter   Type

Description

Example

Lower-level   Object

id

String

Node   Group ID

175187849787779

/

clusterId

String

Cluster   ID

da595eb1d81503b323fdc01d9bf786b7

/

payType

Integer

Payment   Type

1

/

nodeGroupType

String

Code   for the node type

MASTER

/

nodeGroupName

String

Code   value of the node type

master

/

imageId

String

Image   ID

f8d28855-ffda-426d-96e2-0f6bf46877e0

/

hostNum

Integer

Number   of hosts

3

/

computeSpecificationId

Integer

ID   of the host specification

101

/

iaasVmSpecCode

String

Code   for the IAAS VM specification

s7.2xlarge.4

/

cpuNum

Integer

List   of cluster CPU core numbers

8

/

memory

Integer

Size   of memory

32

/

diskSpecificationList

String

List   of disk specifications

[{diskFunctionType:1,diskFunctionName:System  Disk,

diskType:cloud,

diskTypeName:Cloud Disk,ioType:SSD-genric,

ioTypeName:General   Purpose SSD,volume:200,diskNum:1}]

/

createTime

Integer

Creation   time

1706515356000

/

updateTime

Integer

Update   time

1706515356000

/

mountPublicIp

Boolean

Whether   public IP is mounted

false

/

iaasVmSpecId

String

ID   of the IAAS VM specification

b307034d-cbc3-27bb-24f7-a97565814236

/

highest

Boolean

Whether   the node group 

specification is the highest

false

/

regionId

String

Resource   pool ID

bb9fdb42056f11eda1610242ac110002

/

availableZoneId

String

Availability   zone ID

cn-huadong1-jsnj1A-public-ctcloud

/

vpcId

String

VPC   ID

vpc-fr2xjo1gj0

/

clusterHostDtoList

Array   of Objects

List   of cluster node groups

/

clusterHostDtoList

Table clusterHostDtoList

Parameter

Parameter   Type

Description

Example

Lower-level   Object

id

String

Primary   key ID

0088babec7bab47b20409df6646db856

/

nodeGroupId

String

Node   Group ID

1753298494213554178

/

iaasHostId

String

Platform   host ID

b2f2377d-3f0b-bc74-b9c5-67bb557b0e63

/

hostName

String

Host   Name

bigdata-emr-vm-l7zb3wnk

/

manageIp

String

Management   IP

10.2.3.0

/

serviceIp

String

Intranet   IP

192.168.0.149

/

publicIp

String

Internet   IP

212.168.0.150

/

state

Integer

Enumeration   of host states at the 

point of creation, not the real-time state

8

/

vpcId

String

VPC   ID

vpc-fr2xjo1gj0

/

subnetId

String

Subnet   ID

subnet-vkixrw8xw7

/

regionId

String

Resource   pool ID

bb9fdb42056f11eda1610242ac110002

/

availableZoneId

String

Availability   zone ID

cn-huadong1-jsnj1A-public-ctcloud

/

eipId

String

EIP   ID

eip_sssww

/

createTime

Integer

Creation   time

1706515356000

/

updateTime

Integer

Update   time

1706515356000

/

hostStateValue

String

Host   state

Running

/

deployRoleInstance

Array   of Strings

Deployed   role instance

[   "NodeMaster" ]

/

Enumeration Parameters

None

Request Header Example

{
    "Cluster-Id":"bdbbc8cc1288a78e5851839dc26f58b9"
}

Request URL Example

https://emr-global.ctapi.ctyun.cn/v1/emr/cluster/openapi/clusterNodeGroup/getGroupAndHostByCondition

Request Body Example

{
    "clusterId":"bdbbc8cc1288a78e5851839dc26f58b9",
    "selectKey":"192.168.0.208"
}

Response Example

Successful request return value example
{
    "statusCode": 200,
    "message": "success",
    "returnObj": [
        {
            "id": "1759528882838106113",
            "clusterId": "bdbbc8cc1288a78e5851839dc26f58b9",
            "payType": 1,
            "nodeGroupType": "CORE",
            "nodeGroupName": "core",
            "imageId": "f8d28855-ffda-426d-96e2-0f6bf46877e0",
            "hostNum": 3,
            "computeSpecificationId": 101,
            "iaasVmSpecCode": "s7.2xlarge.4",
            "cpuNum": 8,
            "memory": 32,
            "diskSpecificationList": "[{\"diskFunctionType\":1,\"diskFunctionName\":\"System Disk\",\"diskType\":\"cloud\",\"diskTypeNamfe\":\"Cloud Disk\",\"ioType\":\"SATA\",\"ioTypeName\":\"Common IO\",\"volume\":200,\"diskNum\":1},{\"diskFunctionType\":2,\"diskFunctionName\":\"Data Disk\",\"diskType\":\"cloud\",\"diskTypeName\":\"Cloud Disk\",\"ioType\":\"SATA\",\"ioTypeName\":\"Common IO\",\"volume\":200,\"diskNum\":2}]",
            "createTime": 1708339350000,
            "updateTime": 1708339350000,
            "mountPublicIp": false,
            "iaasVmSpecId": "b307034d-cbc3-27bb-24f7-a97565814236",
            "highest": null,
            "regionId": "bb9fdb42056f11eda1610242ac110002",
            "availableZoneId": "cn-huadong1-jsnj1A-public-ctcloud",
            "vpcId": "vpc-fr2xjo1gj0",
            "clusterHostDtoList": [
                {
                    "id": "af84f22fdefd94bb30f7af4c24368337",
                    "nodeGroupId": "1759528882838106113",
                    "iaasHostId": "3d328644-8521-89f7-a114-74b4de602c50",
                    "hostName": "bigdata-emr-vm-iwxkgpil",
                    "manageIp": "-",
                    "serviceIp": "192.168.0.208",
                    "publicIp": "-",
                    "state": 8,
                    "vpcId": "vpc-fr2xjo1gj0",
                    "subnetId": "subnet-vkixrw8xw7",
                    "regionId": "bb9fdb42056f11eda1610242ac110002",
                    "availableZoneId": "cn-huadong1-jsnj1A-public-ctcloud",
                    "eipId": "",
                    "createTime": 1708339353000,
                    "updateTime": 1708339353000,
                    "hostStateValue": "Running",
                    "deployRoleInstance": []
                }
            ]
        }
    ]
}

Failed request return value example
{
    "statusCode": 200,
    "error": "EMR_400010",
    "message": "Error with clusterId parameter type",
    "returnObj": []
}

Status Code

Please refer to status codes

Error Codes

Please refer to error codes


rEbDD_ckqNin