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 node group information of clusters that are in a running state.
Require API Approval or Not
No
URI
GET /v1/emr/openapi/cluster/clusterNodeGroup/getByClusterId
Content-Type
application/json
Path Parameter
None
Query Parameter
Parameter | Required or Not | Parameter Type | Description | Example |
clusterId | Yes | String | Cluster ID | da595eb1d81503b323fdc01d9bf786b7 |
Request Header Parameter
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
Cluster-Id | Yes | String | Cluster ID | da595eb1d81503b323fdc01d9bf786b7 | / |
Request Body Parameter
None
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 | Array of Objects | 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 | Number of CPU cores | 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 | / |
Enumeration Parameters
None
Request Header Example
{
"Cluster-Id":"da595eb1d81503b323fdc01d9bf786b7"
}
Request URL Example
https://emr-global.ctapi.ctyun.cn/v1/emr/openapi/cluster/clusterNodeGroup/getByClusterId?clusterId=da595eb1d81503b323fdc01d9bf786b7
Request Body Example
None
Response Example
Successful request return value example
{
"statusCode": 200,
"message": "success",
"returnObj": [
{
"id": "1751878497877790722",
"clusterId": "da595eb1d81503b323fdc01d9bf786b7",
"payType": 1,
"nodeGroupType": "MASTER",
"nodeGroupName": "master",
"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\",\"diskTypeName\":\"Cloud Disk\",\"ioType\":\"SSD-genric\",\"ioTypeName\":\"General Purpose SSD\",\"volume\":200,\"diskNum\":1},{\"diskFunctionType\":2,\"diskFunctionName\":\"Data Disk\",\"diskType\":\"cloud\",\"diskTypeName\":\"Cloud Disk\",\"ioType\":\"SSD-genric\",\"ioTypeName\":\"General Purpose SSD\",\"volume\":200,\"diskNum\":2}]",
"createTime": 1706515356000,
"updateTime": 1706515356000,
"mountPublicIp": false,
"iaasVmSpecId": "b307034d-cbc3-27bb-24f7-a97565814236",
"highest": null
},
{
"id": "1751878497890373634",
"clusterId": "da595eb1d81503b323fdc01d9bf786b7",
"payType": 1,
"nodeGroupType": "CORE",
"nodeGroupName": "core",
"imageId": "f8d28855-ffda-426d-96e2-0f6bf46877e0",
"hostNum": 1,
"computeSpecificationId": 101,
"iaasVmSpecCode": "s7.2xlarge.4",
"cpuNum": 8,
"memory": 32,
"diskSpecificationList": "[{\"diskFunctionType\":1,\"diskFunctionName\":\"System Disk\",\"diskType\":\"cloud\",\"diskTypeName\":\"Cloud Disk\",\"ioType\":\"SSD-genric\",\"ioTypeName\":\"General Purpose SSD\",\"volume\":200,\"diskNum\":1},{\"diskFunctionType\":2,\"diskFunctionName\":\"Data Disk\",\"diskType\":\"cloud\",\"diskTypeName\":\"Cloud Disk\",\"ioType\":\"SSD-genric\",\"ioTypeName\":\"General Purpose SSD\",\"volume\":200,\"diskNum\":2}]",
"createTime": 1706515356000,
"updateTime": 1706515356000,
"mountPublicIp": false,
"iaasVmSpecId": "b307034d-cbc3-27bb-24f7-a97565814236",
"highest": null
}
]
}
Failed request return value example
{
"statusCode": 200,
"error": "EMR_400021",
"message": "Invalid cluster ID",
"returnObj": []
}