tencent cloud

弹性 MapReduce

DescribeInstances

下载
聚焦模式
字号
最后更新时间: 2026-10-10 14:59:15

1. API Description

Domain name for API request: emr.intl.tencentcloudapi.com.

This API is used to query cluster information.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 Yes String Common Params. For more information, please see the list of regions supported by the product.
DisplayStrategy Yes String Cluster filtering policy. Valid values:
  • clusterList: Queries the list of clusters except for those that have been terminated.
  • monitorManage: Queries the list of clusters except for those that have been terminated, are being created, or fail to be created.
  • cloudHardwareManage/componentManage: Currently these two values are reserved and temporarily have the same meaning as monitorManage.
  • InstanceIds.N No Array of String Query by one or more instance IDs. The instance ID is in the format of emr-xxxxxxxx. (For the specific format of this parameter, see the section Ids.N in the API Introduction). If the instance ID is not specified, the list of all the instances for the APPID is returned.
    Offset No Integer
    Limit No Integer Number of items returned per page. Default value: 100. Maximum value: 100.
    ProjectId No Integer It is recommended to set this parameter to -1, indicating all clusters under all projects are pulled.
    If not specified, the default value is 0, indicating the clusters under the default project are pulled.
    ID of the project to which the instance belongs. This parameter can be obtained from the projectId field in the return value of DescribeProjects.
    OrderField No String Sorting field. Valid values:
  • clusterId: sort by instance ID.
  • addTime: sort by instance creation time.
  • status: sort by instance status code.
  • Asc No Integer Sorts by OrderField in ascending or descending order. Valid values:
  • 0: descending order
  • 1: ascending order
  • The default value is 0.

    3. Output Parameters

    Parameter Name Type Description
    TotalCnt Integer
    ClusterList Array of ClusterInstancesInfo
    TagKeys Array of String
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying Instance Details

    This example shows you how to query instance details.

    Input Example

    POST / HTTP/1.1
    Host: emr.intl.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"
        ]
    }

    Output Example

    {
        "Response": {
            "ClusterList": [
                {
                    "AddTime": "2024-11-05 20:39:44",
                    "AlarmInfo": "",
                    "AliasInfo": "eyJjb21tb24iOiJjb21tb24iLCJjb3JlIjoiY29yZSIsIm1hc3RlciI6Im1hc3RlciIsInRhc2siOiJ0YXNrIn0=",
                    "AppId": 1334143,
                    "ChargeType": 0,
                    "ClusterExternalServiceInfo": null,
                    "ClusterId": "emr-hvijzo6n",
                    "ClusterName": "odinlli_test_1105",
                    "ClusterTitle": "The cluster is running.",
                    "Config": {
                        "ApplicationRole": "",
                        "CbsEncrypt": 0,
                        "ChargeType": 0,
                        "ComNodeSize": 0,
                        "ComResource": {
                            "Cpu": 0,
                            "DiskSize": 0,
                            "DiskType": "",
                            "InstanceType": "",
                            "MemSize": 0,
                            "RootSize": 0,
                            "Spec": "",
                            "SpecName": "",
                            "StorageType": 0
                        },
                        "CoreNodeSize": 2,
                        "CoreResource": {
                            "Cpu": 4,
                            "DiskSize": 200,
                            "DiskType": "CLOUD_SSD",
                            "InstanceType": "",
                            "MemSize": 8192,
                            "RootSize": 70,
                            "Spec": "CVM.S5",
                            "SpecName": "EMR Standard S5",
                            "StorageType": 4
                        },
                        "MasterNodeSize": 1,
                        "MasterResource": {
                            "Cpu": 8,
                            "DiskSize": 200,
                            "DiskType": "CLOUD_SSD",
                            "InstanceType": "",
                            "MemSize": 16384,
                            "RootSize": 70,
                            "Spec": "CVM.S5",
                            "SpecName": "EMR Standard S5",
                            "StorageType": 4
                        },
                        "OnCos": false,
                        "PublicKeyId": "",
                        "RouterNodeSize": 0,
                        "SecurityGroup": "sg-jfluz1nt",
                        "SecurityGroups": [
                            "sg-jfluz1nt"
                        ],
                        "SecurityOn": false,
                        "SoftInfo": [
                            "hdfs-3.2.2",
                            "yarn-3.2.2",
                            "zookeeper-3.6.3",
                            "openldap-2.4.44",
                            "knox-1.6.1"
                        ],
                        "SupportHA": false,
                        "TaskNodeSize": 0,
                        "TaskResource": {
                            "Cpu": 0,
                            "DiskSize": 0,
                            "DiskType": "",
                            "InstanceType": "",
                            "MemSize": 0,
                            "RootSize": 0,
                            "Spec": "",
                            "SpecName": "",
                            "StorageType": 0
                        }
                    },
                    "ConfigDetail": {
                        "ApplicationRole": "",
                        "CbsEncrypt": 0,
                        "ChargeType": 0,
                        "ComNodeSize": 0,
                        "ComResource": {
                            "Cpu": 0,
                            "DiskSize": 0,
                            "DiskType": "",
                            "InstanceType": "",
                            "MemSize": 0,
                            "RootSize": 0,
                            "Spec": "",
                            "SpecName": "",
                            "StorageType": 0
                        },
                        "CoreNodeSize": 2,
                        "CoreResource": {
                            "Cpu": 4,
                            "DiskSize": 200,
                            "DiskType": "CLOUD_SSD",
                            "InstanceType": "",
                            "MemSize": 8192,
                            "RootSize": 70,
                            "Spec": "CVM.S5",
                            "SpecName": "EMR Standard S5",
                            "StorageType": 4
                        },
                        "MasterNodeSize": 1,
                        "MasterResource": {
                            "Cpu": 8,
                            "DiskSize": 200,
                            "DiskType": "CLOUD_SSD",
                            "InstanceType": "",
                            "MemSize": 16384,
                            "RootSize": 70,
                            "Spec": "CVM.S5",
                            "SpecName": "EMR Standard S5",
                            "StorageType": 4
                        },
                        "OnCos": false,
                        "PublicKeyId": "",
                        "RouterNodeSize": 0,
                        "SecurityGroup": "sg-jfluz1nt",
                        "SecurityGroups": [
                            "sg-jfluz1nt"
                        ],
                        "SecurityOn": false,
                        "SoftInfo": [
                            "hdfs-3.2.2",
                            "yarn-3.2.2",
                            "zookeeper-3.6.3",
                            "openldap-2.4.44",
                            "knox-1.6.1"
                        ],
                        "SupportHA": false,
                        "TaskNodeSize": 0,
                        "TaskResource": {
                            "Cpu": 0,
                            "DiskSize": 0,
                            "DiskType": "",
                            "InstanceType": "",
                            "MemSize": 0,
                            "RootSize": 0,
                            "Spec": "",
                            "SpecName": "",
                            "StorageType": 0
                        }
                    },
                    "DisplayName": "Default scenario",
                    "EmrVersion": "EMR-V3.5.0",
                    "Ftitle": "The cluster is running.",
                    "HiveMetaDb": "",
                    "Id": 1113,
                    "IsCvmReplace": false,
                    "IsMultiZoneCluster": false,
                    "IsTradeCluster": 0,
                    "IsWoodpeckerCluster": 1,
                    "MasterIp": "0.0.0.0",
                    "MetaDb": "",
                    "ProductId": 44,
                    "ProjectId": 0,
                    "RegionId": 1,
                    "ResourceOrderId": 0,
                    "RunTime": "0 days 0 hours 32 minutes 20 seconds",
                    "SceneEmrVersion": "EMR-V3.5.0",
                    "SceneName": "Hadoop-Default",
                    "SceneServiceClass": "Hadoop",
                    "ServiceClass": "HADOOP",
                    "Status": 2,
                    "SubnetId": 6131299,
                    "SubnetName": "vigo-subnet",
                    "Tags": [],
                    "TopologyInfoList": [
                        {
                            "NodeInfoList": [
                                {
                                    "NodeSize": 2,
                                    "NodeType": "Core"
                                },
                                {
                                    "NodeSize": 0,
                                    "NodeType": "Task"
                                },
                                {
                                    "NodeSize": 0,
                                    "NodeType": "Router"
                                },
                                {
                                    "NodeSize": 0,
                                    "NodeType": "Common"
                                },
                                {
                                    "NodeSize": 1,
                                    "NodeType": "Master"
                                }
                            ],
                            "SubnetInfoList": [
                                {
                                    "SubnetId": "subnet-ax8z9f1u",
                                    "SubnetName": "vigo-subnet"
                                }
                            ],
                            "Zone": "ap-guangzhou-3",
                            "ZoneId": 100003
                        }
                    ],
                    "TradeVersion": 1,
                    "Uin": "0000000",
                    "UniqSubnetId": "subnet-ax8z9f1u",
                    "UniqVpcId": "vpc-r2g15ki3",
                    "VpcId": 10421586,
                    "VpcName": "vigo-vpc",
                    "Zone": "ap-guangzhou-3",
                    "ZoneId": 100003
                }
            ],
            "RequestId": "7fd5fb20-1b1f-4425-ad13-1763f0f7f8dc",
            "TagKeys": [],
            "TotalCnt": 1
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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 pull resource tags.
    FailedOperation.GetCamRoleFailed Failed to obtain the CAM role.
    FailedOperation.GetCamServerFailed Failed to call the CAM service.
    InternalError Internal error.
    InternalError.AccountCgwError Internal service call exception.
    InternalError.CamCgwError Internal service call exception.
    InternalError.CamError Internal service call exception.
    InternalError.CbsCgwError Internal service call exception.
    InternalError.CbsError Internal service call exception.
    InternalError.CdbCgwError Internal service call exception.
    InternalError.CdbError Internal service call exception.
    InternalError.ConfigCgwError Internal service call exception.
    InternalError.CvmError Internal service call exception.
    InternalError.KmsError Internal service call exception.
    InternalError.ProjectCgwError Internal service call exception.
    InternalError.SgError An exception occurred when the security group API is called.
    InternalError.TagError Internal service call exception.
    InternalError.TradeCgwError Internal service call exception.
    InternalError.VpcCgwError Internal service call exception.
    InternalError.VpcError Internal service call exception.
    InternalError.WoodServerError Internal service call exception.
    InvalidParameter Parameter error.
    InvalidParameter.DisplayStrategyNotMatch Display policy error.
    InvalidParameter.InvalidClusterId Invalid parameter: ClusterId.
    InvalidParameter.InvalidInstanceName Invalid cluster name.
    InvalidParameter.OrderFieldNotMatch Sorting field error.
    ResourceNotFound.ClusterNotFound The instance cannot be found.
    ResourceNotFound.HardwareInfoNotFound The hardware information cannot be found.
    ResourceNotFound.InstanceNotFound The instance cannot be found.
    UnauthorizedOperation.CheckCamAuth No permission to verify account operations.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈