组件列表
调用 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 | 集群不存在 |