参数模版详情
更新时间:2023-09-08
请求说明
查看当前账号有权限的参数模版详情,不区分地域。
请求结构
Plain Text
1GET /v2/template/{templateShowId} HTTP/1.1
2Host: redis.{region}.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
templateShowId | String | 是 | URL参数 | 待查询的参数模版ID |
返回头域
除公共头域外,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
templateId | Integer | 参数模板数字ID |
templateShowId | String | 参数模板ID |
templateName | String | 参数模板名称 |
parameterNum | Integer | 参数模板参数数量 |
clusterType | String | 集群类型 (master_slave、default、cluster) |
engine | String | 引擎类型 |
engineVersion | String | 引擎版本 |
templateType | Integer | 参数模板类型(1为自定义参数模板) |
needReboot | Integer | 是否需要重启(该参数模版是否有需要重启生效的参数),0:不需要,1:需要 |
comment | String | 备注 |
createTime | String | 创建时间 |
updateTime | String | 更新时间 |
parameters | List<Parameters> | 参数列表 |
Parameters参数信息
参数名称 | 类型 | 描述 |
---|---|---|
confName | String | 参数名称 |
confDefault | String | 参数默认值 |
confValue | String | 参数值 |
confType | Integer | 参数类型(1:单选类型 2.数字类型 3.多选类型 4.多选类型,单值) |
confRange | String | 参数范围: 当confType=1时,以逗号(,)为分割符所有选择项 当confType=2时,以逗号(,)为分割符,第一项为范围最小值,第二项为范围最大值 当confType=3,以逗号(,)为间隔符所有可选项 当confType=4时,以逗号(,)为间隔符所有可选项 |
confModule | Integer | 1:redis 2:proxy 3.redis+proxy 4.metaserver |
confDesc | String | 配置对用户展示含义(转码后的一串字符) |
needReboot | Integer | 该参数是否需要重启,0:不需要,1:需要 |
confRedisVersion | String | 参数对应的redis版本。例如:2.6、3.2、 4.0、 all |
confCacheVersion | Integer | 生效redis version(和VERSION_TYPE保持一致) |
confUserVisible | Integer | 用户是否可见(0 可见, 1 不可见) |
请求示例
Plain Text
1GET /v2/template/scs-tmpl-jlbohgyzkxgs HTTP/1.1
2HOST: redis.bj.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
4{
5 "templateId": 1126,
6 "templateShowId": "scs-tmpl-jlbohgyzkxgs",
7 "templateName": "lkjklkjn",
8 "parameterNum": 16,
9 "clusterType": "master_slave",
10 "engine": "redis",
11 "engineVersion": "6.0",
12 "templateType": 1,
13 "needReboot": 1,
14 "comment": "",
15 "createTime": "2023-06-12T09:06:05Z",
16 "updateTime": "2023-06-12T09:06:05Z",
17 "parameters": [
18 {
19 "confName": "appendonly",
20 "confDefault": "yes",
21 "confValue": "yes",
22 "confType": 1,
23 "confRange": "yes|no|partial",
24 "confModule": 1,
25 "confDesc": "是否启用 AOF 持久化",
26 "needReboot": 0,
27 "confRedisVersion": "all",
28 "confCacheVersion": 10001,
29 "confUserVisible": 0
30 }
31 ]
32}