1. 接口描述
接口请求域名: tsf.api3.fincloud.tencent.com。
创建文件配置项
默认接口请求频率限制:20次/秒。
接口更新时间:2024-09-14 11:55:39。
接口既验签名又鉴权。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。
| 参数名称 | 必选 | 允许NULL | 类型 | 描述 |
|---|---|---|---|---|
| Action | 是 | 否 | String | 公共参数,本接口取值:CreateFileConfig |
| Version | 是 | 否 | String | 公共参数,本接口取值:2018-03-26 |
| Region | 是 | 否 | String | 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表 |
| ConfigName | 是 | 否 | String | 配置项名称 示例值: |
| ConfigVersion | 是 | 否 | String | 配置项版本 示例值: |
| ConfigVersionDesc | 否 | 否 | String | 配置项版本描述 示例值: |
| ConfigFileName | 是 | 否 | String | 配置项文件名 示例值: |
| ConfigFileValue | 是 | 否 | String | 配置项文件内容(原始内容编码需要 utf-8 格式,如果 ConfigFileCode 为 gbk,后台会进行转换) 示例值: |
| ConfigFileCode | 否 | 否 | String | 配置项文件编码,utf-8 或 gbk。注:如果选择 gbk,需要新版本 tsf-consul-template (公有云虚拟机需要使用 1.32 tsf-agent,容器需要从文档中获取最新的 tsf-consul-template-docker.tar.gz)的支持 示例值: |
| ApplicationId | 是 | 否 | String | 配置项关联应用ID 示例值: |
| ConfigFilePath | 是 | 否 | String | 发布路径 示例值: |
| ConfigPostCmd | 否 | 否 | String | 后置命令 示例值: |
| EncodeWithBase64 | 否 | 否 | Bool | Base64编码的配置项 示例值: |
| ProgramIdList | 否 | 否 | Array of String | 无 示例值: |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Result | Bool | true:创建成功;false:创建失败 示例值: |
| RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。
| 错误码 | 描述 |
|---|---|
| InvalidParameterValue.ConfigExists | 配置项已存在。 |
| FailedOperation.ConfigCreateFailed | 配置项创建失败。 |
| InvalidParameterValue.ApplicationNotExists | 无法获取应用。 |
| InvalidParameterValue.FileConfigExists | 文件配置项已存在。 |
| InvalidParameterValue.FileConfigFileNameInvalid | 文件配置项文件名称不合规。 |
| InvalidParameterValue.FileConfigFilePathInvalid | 文件配置项文件路径不合规。 |
| InvalidParameterValue.FileConfigNameInvalid | 文件配置项名称不合规。 |
| InvalidParameterValue.ResourcePermissionDenied | 无权限操作资源%s。 |
| InvalidParameterValue.FileConfigVersionDescInvalid | 文件配置项版本描述不合规。 |
| MissingParameter.FileConfigFileValueRequired | 文件配置项文件内容未填写。 |
| InvalidParameterValue.FileConfigExistsPath | 配置文件路径重复。 |
| InvalidParameterValue.FileConfigExistsPathOther | 其他用户已发布此配置文件路径。 |