
# 获取组件配置列表 - ListComponentConfigurations
#### 功能介绍
获取组件配置列表。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/CAE/doc?api=ListComponentConfigurations)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-cae/cae_06_0016.html)。
- 如果使用身份策略授权，当前API调用无需身份策略权限。
#### URI
GET /v1/{project_id}/cae/applications/{application_id}/components/{component_id}/configurations
表1路径参数 
| 参数             | 是否必选 | 参数类型   | 描述                                                                                |
|:---|:---|:---|:---|
| project_id     | 是    | String | 项目ID，获取项目ID请参见[获取项目ID](https://support.huaweicloud.com/api-cae/cae_06_0021.html)。 |
| application_id | 是    | String | 应用ID。                                                                             |
| component_id   | 是    | String | 组件ID。                                                                             |
表2Query参数 
| 参数          | 是否必选 | 参数类型   | 描述                                                                                                   |
|:---|:---|:---|:---|
| displayMode | 否    | String | **参数解释：** 显示模式。 **约束限制：** 当前只支持"latestEffective"，即只显示最后一次已生效配置。 **默认取值：** 此字段为非必选项，不传递时，会显示全部历史配置信息。 |
#### 请求参数
表3请求Header参数 
| 参数                      | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                             |
|:---|:---|:---|:---|
| X-Auth-Token            | 是    | String | 用户Token。 - 获取Token，请参考《[统一身份认证服务API参考](https://support.huaweicloud.com/api-iam/iam_30_0001.html)》的"获取用户Token"章节。 - 请求响应成功后在响应消息头中包含的"X-Subject-Token"的值即为Token值。                                                               |
| X-Enterprise-Project-ID | 否    | String | 企业项目ID。 - 创建环境时，环境会绑定企业项目ID。 - 最大长度36字节，带"-"连字符的UUID格式，或者是字符串"0"。 - 该字段不传（或传为字符串"0"）时，则查询默认企业项目下的资源。 说明： 关于企业项目ID的获取及企业项目特性的详细信息，请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。 |
| X-Environment-ID        | 是    | String | 环境ID。 - 获取环境ID，通过[获取环境列表](https://support.huaweicloud.com/api-cae/ListEnvironments.html)来获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息，其中id字段即是环境ID。                                                                            |
   
#### 响应参数
**状态码：200**
表4响应Body参数 
| 参数          | 参数类型                                                                                   | 描述                                        |
|:---|:---|:---|
| api_version | String                                                                                 | API版本，固定值"v1"，该值不可修改。                     |
| kind        | String                                                                                 | API类型，固定值"ComponentConfiguration"，该值不可修改。 |
| items       | Array of [Configuration] objects | 组件配置列表。                                   |
   
 表5Configuration 
| 参数           | 参数类型                                                                                                                             | 描述                                                                                                                                                                                                                                |
|:---|:---|:---|
| data         | [ListComponentConfigurationsResponseData] object | 组件配置数据。                                                                                                                                                                                                                           |
| operated_at  | String                                                                                                                           | 操作时间。                                                                                                                                                                                                                             |
| operation_id | String                                                                                                                           | 操作ID。                                                                                                                                                                                                                             |
| type         | String                                                                                                                           | **参数解释：** 组件配置类型。 **约束限制：** 不涉及。 **取值范围：** - rds：云数据库RDS - cse：微服务引擎CSE - env：环境变量 - access：访问方式 - scaling：伸缩策略 - volume：云存储配置 - healthCheck：健康检查 - lifecycle：生命周期管理 - apm2：性能管理 - log：日志采集 - customMetric：自定义监控指标 **默认取值：** 不涉及。 |
| is_activated | Boolean                                                                                                                          | 配置是否生效过。                                                                                                                                                                                                                          |
| is_using     | Boolean                                                                                                                          | 配置是否正在使用。                                                                                                                                                                                                                         |
   
 表6ListComponentConfigurationsResponseData 
| 参数       | 参数类型                                                                                                         | 描述          |
|:---|:---|:---|
| spec     | [ConfigurationResponseDataSpec] object | 组件配置数据规格详情。 |
| metadata | [ConfigurationDataMetadata] object         | 组件配置元数据。    |
   
 表7ConfigurationResponseDataSpec 
| 参数                      | 参数类型                                                                                                                           | 描述                                                                                                                                                          |
|:---|:---|:---|
| 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\>                                                                                                           | 手动添加环境变量配置。 常用环境变量如下： - TZ: 时区设置，东八区可设置为Asia/Shanghai。 - LANG: 语言字符集设置，中文UTF8可设置为zh_CN.UTF-8。                                                               |
| 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                | [ScaleConfigurationDataAdvanced] object                 | 伸缩策略高级配置。 Configuration.type为"scaling"时，返回此参数。                                                                                                              |
| triggers                | Array of [ScaleConfigurationDataTrigger] objects         | 伸缩策略配置触发器列表。 Configuration.type为"scaling"时，返回此参数。                                                                                                           |
| volumes                 | Array of [VolumeConfigurationDataVolume] objects         | 云存储配置列表。 Configuration.type为"volume"时，返回此参数。                                                                                                                |
| livenessProbe           | [HealthCheckConfigurationLivenessProbe] object   | 组件健康检查配置的存活探针配置。 Configuration.type为"healthCheck"时，返回此参数。                                                                                                   |
| startupProbe            | [HealthCheckConfigurationStartupProbe] object     | 组件健康检查配置的启动探针配置。 Configuration.type为"healthCheck"时，返回此参数。                                                                                                   |
| readinessProbe          | [HealthCheckConfigurationReadinessProbe] object | 组件健康检查配置的就绪探针配置。 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"时，返回此参数。 **取值范围：** - apm2：对接apm2 agent - opentelemetry：对接opentelemetry agent **默认取值：** 不涉及。 |
| 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                                                                                                                         | 探针镜像更新策略，已废弃，迁移到监控系统。 - Always，重启自动升级：每次都尝试重新下载镜像。 - IfNotPresent，手动升级: 如果本地有该镜像，则继续使用本地镜像，不下载镜像。 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"时，返回此参数。                                                                                                    |
   
 表8env_references 
| 参数         | 参数类型                                                                   | 描述     |
|:---|:---|:---|
| env_name   | String                                                                 | 环境变量名  |
| value_from | [value_from] object | 变量来源信息 |
   
 表9value_from 
| 参数             | 参数类型   | 描述                                            |
|:---|:---|:---|
| name           | String | 来源资源名称                                        |
| reference_type | String | **参数解释：** 来源类型。 **取值范围：** - dewSecret：dew密钥凭据 |
   
 表10AccessConfigurationDataItems 
| 参数                | 参数类型                                                                                                       | 描述                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|
| operator          | String                                                                                                     | 配置模式。 - 如果operator值为空，则表示使用全量覆盖模式进行配置，否则表示使用增删改模式进行配置。 - 当使用增删改模式时，operator取值支持"add","copy","modify","delete"，分别表示新增，复制指定uid的元素修改后新增，修改指定uid的元素，删除指定uid的元素。 - 当operator取值为"copy","modify","delete"时，uid的值必须为非空，且存在于最后一次生效的配置中。 - 当operator取值为"copy","modify"时，与operator同级别的字段中除uid外的所有字段如不写，置空或者为空列表，则表示保留在最后一次生效配置中指定uid的元素的同一字段的值。且此时此级列表以及其父级和子级列表的所有元素的operator值必须同时全为空或者非空。 |
| uid               | String                                                                                                     | 访问方式的uid。                                                                                                                                                                                                                                                                                                                                                                        |
| metadata          | [AccessConfigurationMetadata] object   | 访问方式配置元数据。                                                                                                                                                                                                                                                                                                                                                                       |
| type              | String                                                                                                     | **参数解释：** 访问方式类型。 **取值范围：** - ClusterIP：集群内部IP访问方式 - LoadBalancer：负载均衡访问方式 - Ingress：路由访问方式 **默认取值：** 不涉及。                                                                                                                                                                                                                                                                       |
| 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。                                                                                                                                                                                                                                                                                                                                                             |
   
 表11AccessConfigurationMetadata 
| 参数          | 参数类型                 | 描述                                                                                                                                       |
|:---|:---|:---|
| annotations | Map\<String,String\> | 附加参数。 举例：负载均衡分配策略使用加权轮询算法，不启用健康检查。配置如下： - "kubernetes.io/elb.health-check-flag": "off" - "kubernetes.io/elb.lb-algorithm": "ROUND_ROBIN" |
   
 表12AccessControl 
| 参数    | 参数类型             | 描述                                                     |
|:---|:---|:---|
| black | Array of strings | 黑名单数组。 - 每行一个IP地址或网段，以回车结束。 - 每个IP地址组最多可添加300个IP地址或网段。 |
| white | Array of strings | 白名单数组。 - 每行一个IP地址或网段，以回车结束。 - 每个IP地址组最多可添加300个IP地址或网段。 |
   
 表13AccessConfigurationPort 
| 参数                  | 参数类型                                                                                                               | 描述                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|
| operator            | String                                                                                                             | 配置模式。 - 如果operator值为空，则表示使用全量覆盖模式进行配置，否则表示使用增删改模式进行配置。 - 当使用增删改模式时，operator取值支持"add","copy","modify","delete"，分别表示新增，复制指定uid的元素修改后新增，修改指定uid的元素，删除指定uid的元素。 - 当operator取值为"copy","modify","delete"时，uid的值必须为非空，且存在于最后一次生效的配置中。 - 当operator取值为"copy","modify"时，与operator同级别的字段中除uid外的所有字段如不写，置空或者为空列表，则表示保留在最后一次生效配置中指定uid的元素的同一字段的值。且此时此级列表以及其父级和子级列表的所有元素的operator值必须同时全为空或者非空。 |
| 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。                                                                                                                                                                                                                                                                                                                                                                     |
   
 表14AccessConfigurationHttpPath 
| 参数             | 参数类型   | 描述                          |
|:---|:---|:---|
| hostname       | String | 域名/不填，不填时表示使用IP。            |
| path           | String | URL路径。                      |
| url_match_mode | String | URL路径匹配模式，支持前缀匹配、正则匹配、精准匹配。 |
   
 表15ScaleConfigurationDataAdvanced 
| 参数                              | 参数类型    | 描述        |
|:---|:---|:---|
| scaledown_stabilization_seconds | Integer | 缩容冷却时间窗。  |
| scaledown_rate                  | Integer | 缩容步长。     |
| scaleup_stabilization_seconds   | Integer | 扩容冷却时间窗。  |
| scaleup_rate                    | Integer | 扩容步长。     |
| disable_scaledown               | Boolean | 是否禁用自动缩容。 |
   
 表16ScaleConfigurationDataTrigger 
| 参数       | 参数类型                                                                                   | 描述                                                                                        |
|:---|:---|:---|
| type     | String                                                                                 | **参数解释：** 指标类型。 **取值范围：** - cpu：cpu指标 - memory：内存指标 - cron：定时指标 - prometheus：prometheus指标 |
| metadata | [ScalingTriggerMeta] object | trigger元数据。                                                                               |
   
 表17ScalingTriggerMeta 
| 参数          | 参数类型                                                                                                 | 描述                                                                                                                                                                                                |
|:---|:---|:---|
| type        | String                                                                                               | 数据类型，当前只支持利用率，默认值为Utilization。 ScaleConfigurationDataTrigger.type为"cpu、memory"时，配置此参数。                                                                                                            |
| value       | String                                                                                               | 触发指标的阈值。 ScaleConfigurationDataTrigger.type为"cpu、memory"时，配置此参数。                                                                                                                                  |
| period_type | String                                                                                               | **参数解释：** 生效周期。 ScaleConfigurationDataTrigger.type为"cron"时，配置此参数。 **取值范围：** - day：按每天为周期进行配置弹性伸缩策略，例如每天定时7AM - week：按周为周期进行配置弹性伸缩策略，例如每周三定时7AM - month：按月为周期进行配置弹性伸缩策略，例如每月1号定时7AM **默认取值：** 不涉及。 |
| schedulers  | Array of [CronTriggerScheduler] objects | 每个周期内触发的时间点和实例数。 ScaleConfigurationDataTrigger.type为"cron"时，配置此参数。                                                                                                                                |
   
 表18CronTriggerScheduler 
| 参数             | 参数类型    | 描述                  |
|:---|:---|:---|
| cron           | String  | 触发时间点，以五位cron表达式表示。 |
| target_replica | Integer | 要求达到的实例数。           |
   
 表19VolumeConfigurationDataVolume 
| 参数                | 参数类型                                                                                                                 | 描述                                                                                                                     |
|:---|:---|:---|
| volume_id         | String                                                                                                               | 云存储ID。                                                                                                                 |
| resource_name     | String                                                                                                               | 云存储名称。                                                                                                                 |
| resource_type     | String                                                                                                               | **参数解释：** 云存储类型。 **取值范围：** - obs：obs存储桶、并行文件系统，填该值。 - sfs：通用文件系统、高性能弹性文件服务，填该值。                                        |
| resource_sub_type | String                                                                                                               | **参数解释：** 云存储子类型。 **取值范围：** - object_bucket：obs存储桶 - parallel_file_system：并行文件系统 - sfs3.0：通用文件系统 - sfs_turbo：高性能弹性文件服务 |
| umask             | String                                                                                                               | 设置目录或文件缺省权限，默认值0027，sfs3.0类型的云存储不支持配置此参数。                                                                              |
| mount_info        | Array of [VolumeConfigurationMountInfo] objects | 云存储配置挂载信息。                                                                                                             |
   
 表20VolumeConfigurationMountInfo 
| 参数          | 参数类型   | 描述      |
|:---|:---|:---|
| path        | String | 容器挂载路径。 |
| sub_path    | String | 子路径。    |
| access_mode | String | 读写权限。   |
   
 表21HealthCheckConfigurationLivenessProbe 
| 参数                  | 参数类型                                                                                                                 | 描述                 |
|:---|:---|:---|
| periodSeconds       | Integer                                                                                                              | 检测周期，单位为s。         |
| initialDelaySeconds | Integer                                                                                                              | 延迟时间，单位为s。         |
| timeoutSeconds      | Integer                                                                                                              | 超时时间，单位为s。         |
| successThreshold    | Integer                                                                                                              | 成功阈值。              |
| failureThreshold    | Integer                                                                                                              | 最大失败次数。            |
| httpGet             | [HealthCheckConfigurationHttpGet] object     | 健康检查配置中HTTP请求检查信息。 |
| tcpSocket           | [HealthCheckConfigurationTcpSocket] object | 健康检查配置中TCP端口检查信息。  |
| exec                | [HealthCheckConfigurationExec] object           | 健康检查配置中执行命令检查。     |
   
 表22HealthCheckConfigurationStartupProbe 
| 参数                  | 参数类型                                                                                                                 | 描述                 |
|:---|:---|:---|
| periodSeconds       | Integer                                                                                                              | 检测周期，单位为s。         |
| initialDelaySeconds | Integer                                                                                                              | 延迟时间，单位为s。         |
| timeoutSeconds      | Integer                                                                                                              | 超时时间，单位为s。         |
| successThreshold    | Integer                                                                                                              | 成功阈值。              |
| failureThreshold    | Integer                                                                                                              | 最大失败次数。            |
| httpGet             | [HealthCheckConfigurationHttpGet] object     | 健康检查配置中HTTP请求检查信息。 |
| tcpSocket           | [HealthCheckConfigurationTcpSocket] object | 健康检查配置中TCP端口检查信息。  |
| exec                | [HealthCheckConfigurationExec] object           | 健康检查配置中执行命令检查。     |
   
 表23HealthCheckConfigurationReadinessProbe 
| 参数                  | 参数类型                                                                                                                 | 描述                 |
|:---|:---|:---|
| periodSeconds       | Integer                                                                                                              | 检测周期，单位为s。         |
| initialDelaySeconds | Integer                                                                                                              | 延迟时间，单位为s。         |
| timeoutSeconds      | Integer                                                                                                              | 超时时间，单位为s。         |
| successThreshold    | Integer                                                                                                              | 成功阈值。              |
| failureThreshold    | Integer                                                                                                              | 最大失败次数。            |
| httpGet             | [HealthCheckConfigurationHttpGet] object     | 健康检查配置中HTTP请求检查信息。 |
| tcpSocket           | [HealthCheckConfigurationTcpSocket] object | 健康检查配置中TCP端口检查信息。  |
| exec                | [HealthCheckConfigurationExec] object           | 健康检查配置中执行命令检查。     |
   
 表24HealthCheckConfigurationHttpGet 
| 参数     | 参数类型    | 描述     |
|:---|:---|:---|
| path   | String  | URL路径。 |
| port   | Integer | 端口。    |
| scheme | String  | 协议。    |
   
 表25HealthCheckConfigurationTcpSocket 
| 参数   | 参数类型    | 描述  |
|:---|:---|:---|
| port | Integer | 端口。 |
   
 表26HealthCheckConfigurationExec 
| 参数      | 参数类型             | 描述       |
|:---|:---|:---|
| command | Array of strings | shell语句。 |
   
 表27postStart 
| 参数   | 参数类型                                                                                                   | 描述    |
|:---|:---|:---|
| exec | [LifeCycleConfigurationExec] object | 执行命令。 |
   
 表28preStop 
| 参数   | 参数类型                                                                                                   | 描述    |
|:---|:---|:---|
| exec | [LifeCycleConfigurationExec] object | 执行命令。 |
   
 表29LifeCycleConfigurationExec 
| 参数      | 参数类型             | 描述       |
|:---|:---|:---|
| command | Array of strings | shell语句。 |
   
 表30CloudStorageLogPathInfo 
| 参数                | 参数类型   | 描述         |
|:---|:---|:---|
| dir_path          | String | 容器挂载路径。    |
| file_name_pattern | String | 日志文件名匹配模式。 |
   
 表31ConfigurationDataMetadata 
| 参数          | 参数类型                 | 描述                                                                                                                                       |
|:---|:---|:---|
| annotations | Map\<String,String\> | 附加参数。 举例：负载均衡分配策略使用加权轮询算法，不启用健康检查。配置如下： - "kubernetes.io/elb.health-check-flag": "off" - "kubernetes.io/elb.lb-algorithm": "ROUND_ROBIN" |
   
#### 请求示例
获取组件配置列表。
```
GET https://{endpoint}/v1/{project_id}/cae/applications/{application_id}/components/{component_id}/configurations
```
#### 响应示例
**状态码：200**
请求成功。
```
{
  "api_version" : "v1",
  "kind" : "ComponentConfiguration",
  "items" : [ {
    "type" : "env",
    "data" : {
      "spec" : {
        "envs" : {
          "TZ" : "Asia/Shanghai"
        },
        "env_references" : [ {
          "env_name" : "test",
          "value_from" : {
            "name" : "test",
            "reference_type" : "dewSecret"
          }
        } ]
      }
    },
    "operation_id" : "68e82e30-190d-40b2-9680-98a66ccb2f8f",
    "operated_at" : "2023-02-16T06:35:46.23126Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "volume",
    "data" : {
      "spec" : {
        "volumes" : [ {
          "volume_id" : "bef119d0-c7d1-4b58-9794-8b74faf80a59",
          "resource_name" : "test-nacos",
          "resource_type" : "",
          "resource_sub_type" : "object_bucket",
          "mount_info" : [ {
            "path" : "/tmp",
            "access_mode" : "ReadWriteMany",
            "create_time" : "2023-02-16T03:22:59.599Z"
          } ]
        }, {
          "volume_id" : "a061934d-52e3-4b36-aea7-6c51879f84c9",
          "resource_name" : "test",
          "resource_type" : "",
          "resource_sub_type" : "parallel_file_system",
          "mount_info" : [ {
            "path" : "/temp",
            "access_mode" : "ReadWriteMany",
            "create_time" : "2023-02-16T03:25:08.841Z"
          } ]
        } ]
      }
    },
    "operation_id" : "68e82e30-190d-40b2-9680-98a66ccb2f8f",
    "operated_at" : "2023-02-16T06:35:46.23126Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "rds",
    "data" : {
      "spec" : {
        "rds_id" : "a5fdee4cf88c4277a68688a014f444bdin01",
        "rds_port" : "",
        "rds_address" : "100.xx.xx.xxx",
        "rds_db_name" : "cae",
        "rds_password" : "xxx",
        "rds_username" : "cae"
      }
    },
    "operation_id" : "b4ce410c-3ac3-40ae-9f11-0c8b98c2df19",
    "operated_at" : "2023-02-16T02:14:03.416282Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "scaling",
    "data" : {
      "spec" : {
        "scale_strategy" : "mix",
        "max_replica_count" : 2,
        "min_replica_count" : 1,
        "advanced" : {
          "scaledown_stabilization_seconds" : 300,
          "scaledown_rate" : 99,
          "scaleup_stabilization_seconds" : 0,
          "scaleup_rate" : 4,
          "disable_scaledown" : false
        },
        "triggers" : [ {
          "metadata" : {
            "period_type" : "day",
            "schedulers" : [ {
              "cron" : "00 01 * * *",
              "target_replica" : 2
            }, {
              "cron" : "00 02 * * *",
              "target_replica" : 1
            } ]
          },
          "type" : "cron"
        }, {
          "metadata" : {
            "type" : "Utilization",
            "value" : "10"
          },
          "type" : "cpu"
        }, {
          "metadata" : {
            "type" : "Utilization",
            "value" : "20"
          },
          "type" : "memory"
        } ]
      }
    },
    "operation_id" : "02c81e5a-251b-4921-878e-a8f78efbadd1",
    "operated_at" : "2023-02-16T07:03:07.711734Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "access",
    "data" : {
      "metadata" : {
        "annotations" : {
          "deployBackend" : "k8s",
          "kubernetes.io/elb.health-check-flag" : "off",
          "kubernetes.io/elb.lb-algorithm" : "ROUND_ROBIN"
        }
      },
      "spec" : {
        "ip" : "100.xx.xx.xxx",
        "items" : [ {
          "type" : "ClusterIP",
          "domain_names" : [ "test-test-config" ],
          "ports" : [ {
            "ip" : "",
            "name" : "loadBalancer-5x095cix5deo",
            "target_port" : 80,
            "port" : 8080,
            "protocol" : "TCP"
          } ]
        }, {
          "type" : "LoadBalancer",
          "access_control" : {
            "type" : "white",
            "ip_list" : [ "1.1.1.1" ]
          },
          "elb_id" : "f5de88cc-64be-4f70-ac17-db745eb12345",
          "ports" : [ {
            "ip" : "",
            "name" : "loadBalancer-0yzp5ud3w2pa",
            "target_port" : 80,
            "port" : 8080,
            "protocol" : "TCP"
          } ]
        } ]
      },
      "ref" : {
        "id" : "f5de88cc-64be-4f70-ac17-db745eb76e67"
      }
    },
    "operation_id" : "68e82e30-190d-40b2-9680-98a66ccb2f8f",
    "operated_at" : "2023-02-16T06:35:46.23126Z",
    "is_activated" : true,
    "is_using" : true
  }, {
    "type" : "lifecycle",
    "data" : {
      "api_version" : "v1",
      "kind" : "lifecycle",
      "spec" : {
        "postStart" : {
          "exec" : {
            "command" : [ "/bin/sh", "-c", "echo service start" ]
          }
        },
        "preStop" : {
          "exec" : {
            "command" : [ "/bin/sh", "-c", "echo service end" ]
          }
        }
      }
    },
    "operation_id" : "69bcf986-6f83-4f43-9ca1-595684ba0748",
    "operated_at" : "2023-02-16T07:05:05.610439Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "cse",
    "data" : {
      "spec" : {
        "cse_id" : "25779525-1aac-44be-abda-f9164f1b41b8",
        "config_center_addr" : "https://192.168.1.xxx:30103,https://192.168.1.xxx:30103",
        "service_center_addr" : "https://192.168.1.xxx:30100,https://192.168.1.xxx:30100"
      }
    },
    "operation_id" : "945305ee-8be5-4826-9215-45a0b545ed13",
    "operated_at" : "2023-02-16T07:10:38.937075Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "healthCheck",
    "data" : {
      "spec" : {
        "livenessProbe" : {
          "httpGet" : {
            "path" : "",
            "port" : 80,
            "scheme" : "HTTP"
          },
          "initialDelaySeconds" : 0,
          "timeoutSeconds" : 1,
          "periodSeconds" : 10,
          "successThreshold" : 1,
          "failureThreshold" : 3
        },
        "readinessProbe" : {
          "httpGet" : {
            "path" : "",
            "port" : 80,
            "scheme" : "HTTP"
          },
          "initialDelaySeconds" : 0,
          "timeoutSeconds" : 1,
          "periodSeconds" : 10,
          "successThreshold" : 1,
          "failureThreshold" : 3
        },
        "startupProbe" : {
          "httpGet" : {
            "path" : "",
            "port" : 80,
            "scheme" : "HTTP",
            "httpHeaders" : [ {
              "name" : "x-auth-token",
              "value" : "xxx"
            } ]
          },
          "initialDelaySeconds" : 0,
          "timeoutSeconds" : 1,
          "periodSeconds" : 10,
          "successThreshold" : 1,
          "failureThreshold" : 3
        }
      }
    },
    "operation_id" : "2361fba9-ee7e-405d-8b05-afc945a43e65",
    "operated_at" : "2023-02-16T07:07:23.193231Z",
    "is_activated" : true,
    "is_using" : false
  }, {
    "type" : "customMetric",
    "data" : {
      "metadata" : {
        "annotations" : {
          "deployBackend" : "k8s"
        },
        "created_at" : "0001-01-01T00:00:00Z",
        "updated_at" : "0001-01-01T00:00:00Z"
      },
      "spec" : {
        "port" : 2112,
        "path" : "/metrics",
        "metrics" : [ "myapp_processed_ops_total" ]
      },
      "ref" : {
        "id" : "17b7f411-5a34-4319-abfc-34f6cf774a44"
      }
    },
    "operation_id" : "a79a7c8d-6d5e-41ec-892b-973d11f5e835",
    "operated_at" : "2023-08-30T11:21:22.222476Z",
    "is_activated" : false,
    "is_using" : false
  } ]
}
```
#### 状态码
| 状态码 | 描述    |
|:---|:---|
| 200 | 请求成功。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-cae/ErrorCode.html)。
