
# 获取指定实例的参数（v3.1）
#### 功能介绍
获取指定实例的参数模板。
- 调用接口前，您需要了解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=ShowInstanceParamGroup)中调试该接口。
#### URI
GET /v3.1/{project_id}/instances/{instance_id}/configurations
表1参数说明 
| 参数          | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:---|:---|:---|:---|
| project_id  | 是    | String | **参数解释：** 租户在某一Region下的项目ID。 获取方法请参见[获取项目ID](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_196.html)。 **约束限制：** 不涉及。 **取值范围：** 只能由英文字母、数字组成，且长度为32个字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| instance_id | 是    | String | **参数解释：** 实例ID，此参数是用户创建实例的唯一标识。请参考[查询数据库实例列表 - QueryingDBInstances](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_328.html)接口获取实例ID。 **约束限制：** 不涉及。 **取值范围：** 只能由英文字母、数字组成，且长度为36个字符。 **默认取值** **：** 不涉及。 |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户Token。 通过调用IAM服务[获取用户Token](https://support.huaweicloud.com/api-iam/iam_30_0001.html)接口获取。 请求响应成功后在响应消息头中包含的"X-Subject-Token"的值即为Token值。                                                                                                                                                                                                                                                                                                                     |
| X-Language   | 否    | String | 语言。 缺省值：**en-us** 枚举值： - **zh-cn**  - **en-us**   |
   
#### 响应参数
表3参数说明 
| 参数                       | 参数类型             | 描述                                                                                                 |
|:---|:---|:---|
| datastore_version        | String           | 引擎版本。                                                                                              |
| datastore_name           | String           | 引擎名称。                                                                                              |
| created                  | String           | 创建时间，格式为"yyyy-MM-dd HH:mm:ss"。                                                                     |
| updated                  | String           | 更新时间，格式为"yyyy-MM-ddHH:mm:ss"。                                                                      |
| configuration_parameters | Array of objects | 参数对象，用户基于默认参数模板自定义的参数配置，具体请参考[表4]。 |
   
 表4configuration_parameters字段数据结构说明 
| 参数               | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|
| name             | String  | 参数名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| value            | String  | 参数值。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| restart_required | Boolean | 修改该参数是否需要重启实例。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| readonly         | Boolean | **参数解释：** 该参数的value值是否为只读，只读时无法直接修改。 **取值范围：** - true：该参数的value值只读，不允许用户直接修改。  - false：允许修改。   说明： 当readonly的值为true时，若您需要修改参数的value值，可以在管理控制台右上角，选择"[新建工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/createIndex)"，提交修改参数值的申请。                                                                                      |
| value_range      | String  | 参数取值范围。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| type             | String  | 参数类型，取值为"string"、"integer"、"boolean"、"list"或"float"之一。 枚举值： - string：字符串。  - integer：整型。  - boolean：布尔值。  - list：集合。  - float：浮点型。   |
| description      | String  | 参数描述。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
   
#### 请求示例
获取指定实例的参数。
```
GET https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/v3.1/054b61972980d4552f0bc00ac8d3f5cd/instances/dsfae23fsfdsae3435in14/configurations
```
#### 响应示例
获取指定实例的参数成功。
```
{
    "created": "2022-04-11 10:46:59",
    "updated": "2022-04-11 10:46:59",
    "datastore_version": "2.0",
    "datastore_name": "GaussDB",
    "configuration_parameters": [
        {
            "name": "audit_system_object",
            "value": "12295",
            "type": "integer",
            "description": "Determines whether to audit the CREATE, DROP, and ALTER operations on GaussDB Kernel database objects. GaussDB Kernel database objects include databases, users, schemas, and tables. You can change the parameter value to audit only the operations on required database objects. During a forcible primary/standby failover, set audit_system_object to the maximum value and audit all DDL objects. If the parameter value is incorrectly changed, DDL audit logs will be lost. Contact customer service personnel to change it.",
            "readonly": true,            
            "restart_required": false,
            "value_range": "0-2097151"
        }
    ]
}
```
#### 状态码
- 正常 200
  
- 异常 请参见[状态码](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_194.html)。
  
 
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-gaussdb/gaussdb_api_195.html)。
