You need to enable JavaScript to run this app.
导航

ListComponents - 组件列表

最近更新时间2024.01.22 15:55:45

首次发布时间2024.01.22 15:55:45

组件列表

使用说明

调用 ListComponents,获取一个 E-MapReduce(EMR)集群组件列表。

注意事项

已拥有火山引擎账号并开通 EMR 权限。

请求说明

请求方式:POST
请求地址:https://open.volcengineapi.com/?Version=2023-08-15&Action=ListComponents

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

ListComponents

要执行的操作,取值:ListComponents

Version
String

2023-08-15

API的版本,取值:2023-08-15

ClusterId
String

emr-xxx

集群ID

ApplicationNames
Array of String

["HDFS"]

服务名称列表

ComponentNames
Array of String

["DATANODE"]

组件名称列表

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
ApplicationName
String

HDFS

应用名称

ComponentName
String

DATANODE

组件名称

Replica
Integer

0

副本数

ClusterId
String

emr-xxx

集群ID

ComponentState
String

STARTED

运行状态

CreateTime
Long

xxx

创建时间

StartTime
Long

xxx

开始时间

请求示例

{
    "RequestId":null,
    "RegionId":"cn-beijing",
    "UserId":xxx,
    "AccountId":xxx,
    "ClusterId":"emr-xxx",
    "ApplicationNames": ["HDFS"]
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20231205115604A412C01E25FABxxx",
        "Action": "ListComponents",
        "Version": "2023-08-15",
        "Service": "emr",
        "Region": "cn-beijing",
        "Error": null,
        "Deprecated": false
    },
    "Result": {
        "Items": [
            {
                "ClusterId": "emr-xxx",
                "ApplicationName": "HDFS",
                "ComponentName": "NAMENODE",
                "Replica": 0,
                "ComponentState": "STARTED",
                "CreateTime": null,
                "StartTime": null
            },
            {
                "ClusterId": "emr-xxx",
                "ApplicationName": "HDFS",
                "ComponentName": "JOURNALNODE",
                "Replica": 0,
                "ComponentState": "STARTED",
                "CreateTime": null,
                "StartTime": null
            },
            {
                "ClusterId": "emr-xxx",
                "ApplicationName": "HDFS",
                "ComponentName": "DATANODE",
                "Replica": 0,
                "ComponentState": "STARTED",
                "CreateTime": null,
                "StartTime": null
            },
            {
                "ClusterId": "emr-xxx",
                "ApplicationName": "HDFS",
                "ComponentName": "ROUTER",
                "Replica": 0,
                "ComponentState": "STARTED",
                "CreateTime": null,
                "StartTime": null
            },
            {
                "ClusterId": "emr-xxx",
                "ApplicationName": "HDFS",
                "ComponentName": "ZKFC",
                "Replica": 0,
                "ComponentState": "STARTED",
                "CreateTime": null,
                "StartTime": null
            },
            {
                "ClusterId": "emr-xxx",
                "ApplicationName": "HDFS",
                "ComponentName": "HdfsFoundation",
                "Replica": 0,
                "ComponentState": "INSTALLED",
                "CreateTime": null,
                "StartTime": null
            }
        ],
        "TotalCount": 6,
        "MaxResults": 10,
        "NextToken": null
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HttpCode
错误码
错误信息
说明
400
InvalidRequest
Access Denied {clusterId}

对该集群没有权限

400
InvalidClusterId
cluster id {clusterId} not found

集群不存在