
# 获取参数模板列表（v3）
#### 功能介绍
获取参数模板列表，包括所有数据库的默认参数模板和用户创建的参数模板。
- 调用接口前，您需要了解API [认证鉴权](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_011.html)。
- 调用接口前，您需要提前获取到[地区和终端节点](https://developer.huaweicloud.com/endpoint)。
 
#### 调试
您可以在[API Explorer](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=GaussDBforopenGauss&api=ListConfigurations)中调试该接口。
#### URI
GET /v3/{project_id}/configurations
表1参数说明 
| 参数         | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| project_id | 是    | String  | **参数解释：** 租户在某一Region下的项目ID。 获取方法请参见[获取项目ID](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_196.html)。 **约束限制：** 不涉及。 **取值范围：** 只能由英文字母、数字组成，且长度为32个字符。 **默认取值**： 不涉及。 |
| offset     | 否    | Integer | **参数解释：** 索引位置。例如：该参数指定为0，limit指定为10，则只展示第1-10条数据。 **约束限制：** 不涉及。 **取值范围：** \[0, 2\^31-1\] **默认取值**： 默认为0（偏移0条数据，表示从第一条数据开始查询）。                                                                                                                                                                                                                                                                                                                                   |
| limit      | 否    | Integer | **参数解释：** 查询记录数。例如该参数设定为10，则查询结果最多只显示10条记录。 **约束限制：** 不涉及。 **取值范围：** \[1, 100\] **默认取值**： 默认为100。                                                                                                                                                                                                                                                                                                                                        |
   
#### 请求参数
无。
#### 响应参数
表2响应参数 
| 参数             | 参数类型             | 描述                                                                                                                                                                                            |
|:---|:---|:---|
| configurations | Array of objects | **参数解释：** 参数模板信息，具体参数请参考[表3]。                                                     |
| count          | Integer          | **参数解释：** 总记录数。 **取值范围：** \[0, 2\^31-1\]，取决于实际查询大小。 |
   
 表3configurations字段数据结构说明 
| 参数                | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| id                | String  | **参数解释：** 参数模板ID。参数模板的唯一标识。 **取值范围：** 只能由英文字母、数字组成，且长度为36个字符。                                                                                                                                                                                                                                                    |
| name              | String  | **参数解释：** 参数模板名称。 **取值范围：** 参数模板名称在1到64个字符之间，区分大小写，可包含字母、数字、英文中划线、下划线或句点，不能包含其他特殊字符。                                                                                                                                                                                                                              |
| description       | String  | **参数解释：** 参数模板描述。 **取值范围：** 描述不能超过256个字符，且不能包含回车和 ! \< " = ' \> \&这些特殊字符。                                                                                                                                                                                                                                            |
| datastore_version | String  | **参数解释：** 引擎版本。 **取值范围：** 不涉及。                                                                                                                                                                                                                                                                                   |
| datastore_name    | String  | **参数解释：** 引擎名称。 **取值范围：** GaussDB。                                                                                                                                                                                                                                                                                   |
| ha_mode           | String  | **参数解释：** 实例类型。 **取值范围：** 取值为 "Enterprise"，对应于分布式实例（企业版）。取值为"centralization_standard"，对应于集中式版实例。区分大小写。                                                                                                                                                                                                          |
| created           | String  | **参数解释：** 创建时间，格式为"yyyy-MM-dd HH:mm:ss"。例如：2024-07-03 14:18:55。 **取值范围：** 不涉及。                                                                                                                                                                                                                                  |
| updated           | String  | **参数解释：** 更新时间，格式为"yyyy-MM-dd HH:mm:ss"。例如：2024-07-03 14:18:55。 **取值范围：** 不涉及。                                                                                                                                                                                                                                      |
| user_defined      | Boolean | **参数解释：** 是否是用户自定义参数模板。 **取值范围：** - false，表示为系统默认参数模板。  - true，表示为用户自定义参数模板。   |
   
#### 请求示例
```
https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/v3/054b61972980d4552f0bc00ac8d3f5cd/configurations?offset=1&limit=3
```
#### 响应示例
**参数模板列表：**
```
{
    "count": 3,
    "configurations": [
        {
            "id": "b000d7c91f1749da87315700793a11d4pr14",
            "name": "Default-Enterprise-Edition-GaussDB-1.0-INDEP",
            "description": "Default parameter template for Enterprise Edition GaussDB 1.0-Independent",
            "created": "2022-03-23 07:20:11",
            "updated": "2022-03-23 07:20:11",
            "datastore_version": "1.0",
            "datastore_name": "GaussDB",
            "ha_mode": "enterprise",
            "user_defined": false
        },
        {
            "id": "8d99f260ea1b4493a1b349e7abce5c09pr14",
            "name": "Default-Enterprise-Edition-GaussDB-1.1-INDEP",
            "description": "Default parameter template for Enterprise Edition GaussDB 1.1-Independent",
            "created": "2022-03-23 07:20:11",
            "updated": "2022-03-23 07:20:11",
            "datastore_version": "1.1",
            "datastore_name": "GaussDB",
            "ha_mode": "enterprise",
            "user_defined": false
        },
        {
            "id": "0f44b65521a8414d8b8811df810d94ccpr14",
            "name": "Default-Enterprise-Edition-GaussDB-1.2-INDEP",
            "description": "Default parameter template for Enterprise Edition GaussDB 1.2-Independent",
            "created": "2022-03-23 07:20:11",
            "updated": "2022-03-23 07:20:11",
            "datastore_version": "1.2",
            "datastore_name": "GaussDB",
            "ha_mode": "enterprise",
            "user_defined": false
        }
]
}
```
#### 状态码
- 正常 200
  
- 异常 请参见[状态码](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_194.html)。
  
 
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_195.html)。
