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

GetApplicationConfigFile - 获取集群配置文件信息

最近更新时间2024.01.22 15:54:41

首次发布时间2024.01.22 15:54:41

获取集群配置文件信息

使用说明

调用 GetApplicationConfigFile,获取一个E-MapReduce(EMR)集群的应用配置文件。

注意事项

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

请求说明

请求方式:POST
请求地址:https://open.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
    }
}

错误码

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

HttpCode
错误码
错误信息
说明
400
InvalidClusterId
cluster id {clusterId} not found

集群不存在

400
IllegalOperationForCluster
The cluster id {clusterId} does not support the operation

非法操作,该集群不支持该操作

400
InvalidRequest
Access Denied {clusterId}

对该集群没有权限

405
UnSupportedGetConfigFile
UnSupported getConfigFile when releaseVersion {0} is lower than 3.5.x
400
IllegalConfigFileName
Illegal config fileName {0}, not exists