查询的历史版本对比信息详情 - ListConfigHistory
功能介绍
查询的历史版本对比信息详情。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
GET /v1/{project_id}/cae/applications/{application_id}/components/{component_id}/configuration-history
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| application_id | 是 | String | 应用ID。 |
| component_id | 是 | String | 组件ID。 |
| project_id | 是 | String | 项目ID,获取项目ID请参见获取项目ID。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| operation_id | 是 | String | 填入想要回退的snapshot版本的configuration_operation_id |
| last_operation_id | 否 | String | 当前版本的configuration_operation_id,若不填,则获取的before_configurations就是每种配置类型上一次的配置信息 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。
|
| X-Enterprise-Project-ID | 否 | String | 企业项目ID。
说明: 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理服务用户指南》。 |
| X-Environment-ID | 是 | String | 环境ID。
|
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| before_configurations | Array of Configuration objects | 变更前配置 |
| after_configurations | Array of Configuration objects | 变更后配置 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| data | 组件配置数据。 | |
| operated_at | String | 操作时间。 |
| operation_id | String | 操作ID。 |
| type | String | 参数解释: 组件配置类型。 约束限制: 不涉及。 取值范围:
默认取值: 不涉及。 |
| is_activated | Boolean | 配置是否生效过。 |
| is_using | Boolean | 配置是否正在使用。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| spec | 组件配置数据规格详情。 | |
| metadata | ConfigurationDataMetadata object | 组件配置元数据。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| rds_id | String | RDS数据库实例ID。 Configuration.type为"rds"时,返回此参数。 |
| rds_db_name | String | RDS数据库名称。 Configuration.type为"rds"时,返回此参数。 |
| rds_address | String | RDS数据库地址。 Configuration.type为"rds"时,返回此参数。 |
| rds_username | String | RDS数据库用户名称。 Configuration.type为"rds"时,返回此参数。 |
| rds_password | String | RDS数据库密码。 Configuration.type为"rds"时,返回此参数。 |
| rds_port | String | RDS数据库端口。 Configuration.type为"rds"时,返回此参数。 |
| config_center_addr | String | CSE配置中心地址。 Configuration.type为"cse"时,返回此参数。 |
| service_center_addr | String | CSE服务注册发现地址。 Configuration.type为"cse"时,返回此参数。 |
| cse_id | String | CSE引擎ID。 Configuration.type为"cse"时,返回此参数。 |
| envs | Map<String,String> | 手动添加环境变量配置。 常用环境变量如下:
|
| env_references | env_references object | 凭据导入环境变量 |
| ip | String | 弹性公网IP,响应体参数,未配置域名时返回此参数。 |
| items | Array of AccessConfigurationDataItems objects | 访问方式配置列表。 Configuration.type为"access"时,返回此参数。 |
| scale_strategy | String | 伸缩策略配置策略类型。 Configuration.type为"scaling"时,返回此参数。 |
| max_replica_count | Integer | 伸缩策略配置最大伸缩个数。 Configuration.type为"scaling"时,返回此参数。 |
| min_replica_count | Integer | 伸缩策略配置最小伸缩个数。 Configuration.type为"scaling"时,返回此参数。 |
| advanced | 伸缩策略高级配置。 Configuration.type为"scaling"时,返回此参数。 | |
| triggers | Array of ScaleConfigurationDataTrigger objects | 伸缩策略配置触发器列表。 Configuration.type为"scaling"时,返回此参数。 |
| volumes | Array of VolumeConfigurationDataVolume objects | 云存储配置列表。 Configuration.type为"volume"时,返回此参数。 |
| livenessProbe | 组件健康检查配置的存活探针配置。 Configuration.type为"healthCheck"时,返回此参数。 | |
| startupProbe | 组件健康检查配置的启动探针配置。 Configuration.type为"healthCheck"时,返回此参数。 | |
| readinessProbe | 组件健康检查配置的就绪探针配置。 Configuration.type为"healthCheck"时,返回此参数。 | |
| postStart | postStart object | 生命周期管理组件配置启动后处理。 Configuration.type为"lifecycle"时,返回此参数。 |
| preStop | preStop object | 生命周期管理组件配置停止前处理。 Configuration.type为"lifecycle"时,返回此参数。 |
| log_paths | Array of strings | 自定义本地磁盘日志路径数组。 Configuration.type为"log"时,返回此参数。 |
| cloud_storage_log_paths | Array of CloudStorageLogPathInfo objects | 自定义云存储日志路径数组。 Configuration.type为"log"时,返回此参数。 |
| instrumentation | String | 探针注入方式。 Configuration.type为"apm2"时,返回此参数。 |
| apm_application | String | apm2应用。 Configuration.type为"apm2"时,返回此参数。 |
| type | String | 参数解释: 监控系统类别,包括apm2和opentelemetry。 Configuration.type为"apm2"时,返回此参数。 取值范围:
默认取值: 不涉及。 |
| app_name | String | apm2组件。 Configuration.type为"apm2"时,返回此参数。 |
| instance_name | String | apm2实例。 Configuration.type为"apm2"时,返回此参数。 |
| env_name | String | apm2环境。 Configuration.type为"apm2"时,返回此参数。 |
| image_pull_policy | String | 探针镜像更新策略,已废弃,迁移到监控系统。
Configuration.type为"apm2"时,返回此参数。 |
| version | String | 增强型探针/opentelemetry探针版本,已废弃,迁移到监控系统。 Configuration.type为"apm2"时,返回此参数。 |
| access_key | String | apm2访问密钥Key,已废弃,迁移到监控系统。 Configuration.type为"apm2"时,返回此参数。 |
| access_value | String | apm2访问密钥value,已废弃,迁移到监控系统。 Configuration.type为"apm2"时,返回此参数。 |
| business | String | apm2应用,同apm_application,已废弃。 Configuration.type为"apm2"时,返回此参数。 |
| path | String | 自定义监控指标配置采集路径。 Configuration.type为"customMetric"时,返回此参数。 |
| port | Integer | 自定义监控指标配置采集端口。 Configuration.type为"customMetric"时,返回此参数。 |
| metrics | Array of strings | 自定义监控指标配置指标名称。 Configuration.type为"customMetric"时,返回此参数。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| name | String | 来源资源名称 |
| reference_type | String | 参数解释: 来源类型。 取值范围:
|
| 参数 | 参数类型 | 描述 |
|---|---|---|
| operator | String | 配置模式。
|
| uid | String | 访问方式的uid。 |
| metadata | AccessConfigurationMetadata object | 访问方式配置元数据。 |
| type | String | 参数解释: 访问方式类型。 取值范围:
默认取值: 不涉及。 |
| sub_type | String | 访问方式子类型。 |
| ingress_config_id | String | 访问关联域名后缀ID,多个域名后缀逗号隔开。 |
| domain_names | Array of strings | 内网访问方式域名。 |
| access_control | AccessControl object | 访问控制配置,允许配置黑名单、白名单。 |
| ports | Array of AccessConfigurationPort objects | 访问方式配置端口、协议、证书、URL路径等信息列表。 |
| elb_id | String | 用户选择的elb的ID。 |
| public_ip | String | 响应体参数,用户选择的elb的公网ip。 |
| private_ip | String | 响应体参数,用户选择的elb的私网ip。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| annotations | Map<String,String> | 附加参数。 举例:负载均衡分配策略使用加权轮询算法,不启用健康检查。配置如下:
|
| 参数 | 参数类型 | 描述 |
|---|---|---|
| black | Array of strings | 黑名单数组。
|
| white | Array of strings | 白名单数组。
|
| 参数 | 参数类型 | 描述 |
|---|---|---|
| operator | String | 配置模式。
|
| uid | String | 端口配置的uid。 |
| target_port | Integer | 监听端口。 |
| port | Integer | 访问端口。 |
| protocol | String | 协议,负载均衡支持TCP,负载均衡与路由配置支持HTTP、HTTPS。 |
| default_certificate | String | 默认证书,访问方式配置为转发策略且协议为HTTPS时配置,未配置域名证书对时使用默认证书。 |
| certificate | String | 证书。 |
| policy | String | 安全策略。 |
| paths | Array of AccessConfigurationHttpPath objects | 匹配路径和域名信息。 |
| elb_id | String | 用户选择的elb的ID。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| hostname | String | 域名/不填,不填时表示使用IP。 |
| path | String | URL路径。 |
| url_match_mode | String | URL路径匹配模式,支持前缀匹配、正则匹配、精准匹配。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| scaledown_stabilization_seconds | Integer | 缩容冷却时间窗。 |
| scaledown_rate | Integer | 缩容步长。 |
| scaleup_stabilization_seconds | Integer | 扩容冷却时间窗。 |
| scaleup_rate | Integer | 扩容步长。 |
| disable_scaledown | Boolean | 是否禁用自动缩容。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| type | String | 参数解释: 指标类型。 取值范围:
|
| metadata | ScalingTriggerMeta object | trigger元数据。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| type | String | 数据类型,当前只支持利用率,默认值为Utilization。 ScaleConfigurationDataTrigger.type为"cpu、memory"时,配置此参数。 |
| value | String | 触发指标的阈值。 ScaleConfigurationDataTrigger.type为"cpu、memory"时,配置此参数。 |
| period_type | String | 参数解释: 生效周期。 ScaleConfigurationDataTrigger.type为"cron"时,配置此参数。 取值范围:
默认取值: 不涉及。 |
| schedulers | Array of CronTriggerScheduler objects | 每个周期内触发的时间点和实例数。 ScaleConfigurationDataTrigger.type为"cron"时,配置此参数。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| cron | String | 触发时间点,以五位cron表达式表示。 |
| target_replica | Integer | 要求达到的实例数。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| volume_id | String | 云存储ID。 |
| resource_name | String | 云存储名称。 |
| resource_type | String | 参数解释: 云存储类型。 取值范围:
|
| resource_sub_type | String | 参数解释: 云存储子类型。 取值范围:
|
| umask | String | 设置目录或文件缺省权限,默认值0027,sfs3.0类型的云存储不支持配置此参数。 |
| mount_info | Array of VolumeConfigurationMountInfo objects | 云存储配置挂载信息。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| path | String | 容器挂载路径。 |
| sub_path | String | 子路径。 |
| access_mode | String | 读写权限。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| periodSeconds | Integer | 检测周期,单位为s。 |
| initialDelaySeconds | Integer | 延迟时间,单位为s。 |
| timeoutSeconds | Integer | 超时时间,单位为s。 |
| successThreshold | Integer | 成功阈值。 |
| failureThreshold | Integer | 最大失败次数。 |
| httpGet | 健康检查配置中HTTP请求检查信息。 | |
| tcpSocket | 健康检查配置中TCP端口检查信息。 | |
| exec | HealthCheckConfigurationExec object | 健康检查配置中执行命令检查。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| periodSeconds | Integer | 检测周期,单位为s。 |
| initialDelaySeconds | Integer | 延迟时间,单位为s。 |
| timeoutSeconds | Integer | 超时时间,单位为s。 |
| successThreshold | Integer | 成功阈值。 |
| failureThreshold | Integer | 最大失败次数。 |
| httpGet | 健康检查配置中HTTP请求检查信息。 | |
| tcpSocket | 健康检查配置中TCP端口检查信息。 | |
| exec | HealthCheckConfigurationExec object | 健康检查配置中执行命令检查。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| periodSeconds | Integer | 检测周期,单位为s。 |
| initialDelaySeconds | Integer | 延迟时间,单位为s。 |
| timeoutSeconds | Integer | 超时时间,单位为s。 |
| successThreshold | Integer | 成功阈值。 |
| failureThreshold | Integer | 最大失败次数。 |
| httpGet | 健康检查配置中HTTP请求检查信息。 | |
| tcpSocket | 健康检查配置中TCP端口检查信息。 | |
| exec | HealthCheckConfigurationExec object | 健康检查配置中执行命令检查。 |
请求示例
/v1/196e2e151e7946ff870a911a6204dc3e/cae/applications/b990e0f2-1f06-432b-8bee-5e8590404d5f/components/3b77ac1d-ba70-4839-9ff3-d6a62bb3e098/configuration-history?operation_id=0&last_operation_id=e466eb27-2f69-445c-893b-834dcdbf7665
响应示例
状态码:200
请求成功。
{
"before_configurations" : [ {
"type" : "env",
"data" : {
"spec" : {
"envs" : {
"env1" : "1"
}
}
},
"operation_id" : "e466eb27-2f69-445c-893b-834dcdbf7665",
"operated_at" : "2025-09-15T08:16:13.277378Z",
"is_activated" : false,
"is_using" : false
} ],
"after_configurations" : [ ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 请求成功。 |
错误码
请参见错误码。