Domain name for API request: emr.tencentcloudapi.com.
This API is used to query the information of instances in a cluster.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeInstances. |
Version | Yes | String | Common Params. The value used for this API: 2019-01-03. |
Region | No | String | Common Params. This parameter is not required for this API. |
DisplayStrategy | Yes | String | Cluster filtering policy. Valid values:monitorManage . |
InstanceIds.N | No | Array of String | Queries by one or more instance IDs in the format of emr-xxxxxxxx . For the format of this parameter, please see the id.N section in API Overview. If no instance ID is entered, the list of all instances under this APPID will be returned. |
Offset | No | Integer | Page number. Default value: 0, indicating the first page. |
Limit | No | Integer | Number of returned results per page. Default value: 10. Maximum value: 100 |
ProjectId | No | Integer | ID of the project to which the instance belongs. This parameter can be obtained from the projectId field in the return value of the DescribeProject API. If this value is -1, the list of all instances will be returned. |
OrderField | No | String | Sorting field. Valid values: |
Asc | No | Integer | Sorts according to OrderField in ascending or descending order. Valid values: |
Parameter Name | Type | Description |
---|---|---|
TotalCnt | Integer | Number of eligible instances. |
ClusterList | Array of ClusterInstancesInfo | List of EMR instance details. Note: this field may return null, indicating that no valid values can be obtained. |
TagKeys | Array of String | List of tag keys associated to an instance. Note: this field may return null, indicating that no valid values can be obtained. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
Querying Instance Details
POST / HTTP/1.1
Host: emr.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeInstances
<Common request parameters>
{
"DisplayStrategy": "clusterList",
"ProjectId": "0",
"Asc": "0",
"Limit": "10",
"OrderField": "clusterid",
"Offset": "0",
"InstanceIds": [
"emr-p9f700x8"
]
}
{
"Response": {
"ClusterList": [
{
"AddTime": "2021-01-20 21:28:05",
"AlarmInfo": "",
"AliasInfo": "eyJjb21tb24iOiJjb21tb24iLCJjb3JlIjoiY29yZSIsIm1hc3RlciI6Im1hc3RlciIsInRhc2siOiJ0YXNrIn0=",
"AppId": 1258469122,
"ChargeType": 1,
"ClusterId": "emr-myzhptk6",
"ClusterName": "ganlu-hdfs-study-do not delete",
"Config": {
"ApplicationRole": "",
"CbsEncrypt": 0,
"ChargeType": 1,
"ComNodeSize": 0,
"ComResource": {
"Cpu": 0,
"DiskSize": 0,
"DiskType": "",
"InstanceType": "",
"MemSize": 0,
"RootSize": 0,
"Spec": "",
"SpecName": "",
"StorageType": 0
},
"CoreNodeSize": 2,
"CoreResource": {
"Cpu": 4,
"DiskSize": 100,
"DiskType": "CLOUD_PREMIUM",
"InstanceType": "",
"MemSize": 8192,
"RootSize": 0,
"Spec": "CVM.S2",
"SpecName": "EMR Standard S2",
"StorageType": 5
},
"MasterNodeSize": 1,
"MasterResource": {
"Cpu": 4,
"DiskSize": 100,
"DiskType": "CLOUD_PREMIUM",
"InstanceType": "",
"MemSize": 8192,
"RootSize": 0,
"Spec": "CVM.S2",
"SpecName": "EMR Standard S2",
"StorageType": 5
},
"OnCos": false,
"RouterNodeSize": 0,
"SecurityGroup": "sg-9zhz084e",
"SecurityGroups": [
"sg-9zhz084e"
],
"SecurityOn": false,
"SoftInfo": [
"zookeeper-3.6.1",
"yarn-3.1.2",
"hdfs-3.1.2",
"knox-1.2.0",
"hive-3.1.1",
"tez-0.9.2"
],
"SupportHA": false,
"TaskNodeSize": 2,
"TaskResource": {
"Cpu": 4,
"DiskSize": 100,
"DiskType": "CLOUD_PREMIUM",
"InstanceType": "",
"MemSize": 8192,
"RootSize": 0,
"Spec": "CVM.S2",
"SpecName": "EMR Standard S2",
"StorageType": 5
}
},
"EmrVersion": "EMR-V3.1.0",
"Ftitle": "Installing components in the cluster",
"HiveMetaDb": "cdb-709c8dh9",
"Id": 150118,
"IsTradeCluster": 0,
"IsWoodpeckerCluster": 1,
"MasterIp": "170.106.101.90",
"MetaDb": "cdb-709c8dh9",
"ProductId": 25,
"ProjectId": 0,
"RegionId": 15,
"ResourceOrderId": 0,
"RunTime": "146 days 21 hours 50 minutes 30 seconds",
"ServiceClass": "HADOOP",
"Status": 6,
"SubnetId": 85503,
"Tags": [],
"TradeVersion": 1,
"Uin": "100008965662",
"VpcId": 848834,
"Zone": "na-siliconvalley-2",
"ZoneId": 150002
}
],
"RequestId": "7ee88474-b29a-45b8-9ecc-595d03c4ef95",
"TagKeys": [],
"TotalCnt": 1
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | Operation failed. |
FailedOperation.DescribeResourceTagsFailed | Failed to fetch resource tag. |
FailedOperation.GetCamRoleFailed | Failed to query the CAM role. |
FailedOperation.GetCamServerFailed | Failed to call the CAM service. |
InternalError | Internal error. |
InternalError.AccountCgwError | An error occurred while calling another service API. |
InternalError.CamCgwError | An error occurred while calling another service API. |
InternalError.CamError | An error occurred while calling another service API. |
InternalError.CbsCgwError | An error occurred while calling another service API. |
InternalError.CbsError | An error occurred while calling another service API. |
InternalError.CdbCgwError | An error occurred while calling another service API. |
InternalError.CdbError | An error occurred while calling another service API. |
InternalError.ConfigCgwError | An error occurred while calling another service API. |
InternalError.CvmError | An error occurred while calling another service API. |
InternalError.KmsError | An error occurred while calling another service API. |
InternalError.ProjectCgwError | An error occurred while calling another service API. |
InternalError.SgError | An error occurred when calling a security group API. |
InternalError.TagError | An error occurred while calling another service API. |
InternalError.TradeCgwError | An error occurred while calling another service API. |
InternalError.VpcCgwError | An error occurred while calling another service API. |
InternalError.VpcError | An error occurred while calling another service API. |
InternalError.WoodServerError | An error occurred while calling another service API. |
InvalidParameter | Invalid parameter. |
InvalidParameter.DisplayStrategyNotMatch | Incorrect display policy. |
InvalidParameter.InvalidClusterId | Invalid parameter: ClusterId. |
InvalidParameter.InvalidInstanceName | Invalid cluster name. |
InvalidParameter.OrderFieldNotMatch | Invalid sorting field. |
ResourceNotFound.ClusterNotFound | The instance was not found. |
ResourceNotFound.HardwareInfoNotFound | No hardware information found. |
ResourceNotFound.InstanceNotFound | The instance was not found. |
UnauthorizedOperation.CheckCamAuth | Unauthorized operation. |
本页内容是否解决了您的问题?