获取集群配置文件信息
调用 GetApplicationConfigFile,获取一个E-MapReduce(EMR)集群的应用配置文件。
已拥有火山引擎账号并开通 EMR 权限。
请求方式:POST
请求地址:https://emr.cn-beijing.volcengineapi.com/?Version=2023-08-15&Action=GetApplicationConfigFile
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | GetApplicationConfigFile | 要执行的操作,取值:GetApplicationConfigFile。 |
Version | String | 是 | 2023-08-15 | API的版本,取值:2023-08-15。 |
ClusterId | String | 是 | emr-xxx | 集群id |
ApplicationName | String | 是 | HDFS | 应用名称 |
ConfigFileName | String | 是 | core-site.xml | 应用的配置文件名 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
ApplicationName | String | HDFS | 应用名称 |
FileName | String | core-site.xml | 配置文件名称 |
FilePath | String | /etc/emr/hadoop/conf | 配置文件路径 |
FileContent | String | \n\n | 配置文件内容 |
FileUser | String | hdfs | 配置文件的权限:user |
FileGroup | String | hadoop | 配置文件的权限:group |
SupportCustomConfigItem | Boolean | xxx | 配置文件是否允许设置自定义参数 |
Description | String | xxx | 配置文件的描述信息 |
{ "ClusterId":"emr-xxx", "ApplicationName": "HDFS", "ConfigFileName":"core-site.xml" }
{ "ResponseMetadata": { "RequestId": "20231204171503C7664BD9E36Axxx", "Action": "GetApplicationConfigFile", "Version": "2023-08-15", "Service": "emr", "Region": "cn-beijing", "Error": null, "Deprecated": false }, "Result": { "ApplicationName": "HDFS", "FileName": "core-site.xml", "FilePath": "/etc/emr/hadoop/conf", "FileMode": null, "FileContent": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>\n<configuration>...", "FileUser": "hdfs", "FileGroup": "hadoop", "SupportCustomConfigItem": null, "Description": null } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
400 | InvalidClusterId | 集群不存在 |
400 | IllegalOperationForCluster | 非法操作,该集群不支持该操作 |
400 | InvalidRequest | 对该集群没有权限 |
400 | IllegalConfigFileName | |
405 | UnSupportedGetConfigFile |