获取参数列表
更新时间:2023-09-06
请求说明
- 查询Redis实例的配置参数和运行参数。
请求结构
GET /v1/instance/{instanceId}/parameter HTTP/1.1
Host: redis.{region}.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
instanceId | String | 是 | URL参数 | 待查询的实例ID |
返回头域
除公共头部,无其它特殊头部。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
parameters | List<parameter> | 参数列表 |
parameter参数信息
参数名称 | 类型 | 描述 |
---|---|---|
default | String | 参数默认值 |
forceRestart | int | 是否需要重启生效:1(重启生效,当前需要提交工单重启)0(无需重启,提交后即生效) |
name | String | 参数名称 |
value | String | 参数当前值 |
请求示例
GET /v1/instance/scs-bj-ykfiztgpxjny/parameter HTTP/1.1
HOST: redis.bj.baidubce.com
Content-Type: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
HTTP/1.1 200 OK
x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
Content-Type: application/json
{
"parameters": [
{
"name": "appendonly",
"default": "yes",
"value": "no",
"forceRestart": "0"
},
{
"name": "maxmemory-policy",
"default": "volatile-ttl",
"value": "volatile-ttl",
"forceRestart": "0"
},
{
"name": "hash-max-ziplist-entries",
"default": "512",
"value": "512",
"forceRestart": "0"
},
{
"name": "hash-max-ziplist-value",
"default": "64",
"value": "64",
"forceRestart": "0"
},
{
"name": "set-max-intset-entries",
"default": "512",
"value": "512",
"forceRestart": "0"
},
{
"name": "zset-max-ziplist-entries",
"default": "128",
"value": "128",
"forceRestart": "0"
},
{
"name": "zset-max-ziplist-value",
"default": "64",
"value": "64",
"forceRestart": "0"
},
{
"name": "timeout",
"default": "0",
"value": "0",
"forceRestart": "0"
},
{
"name": "hz",
"default": "10",
"value": "10",
"forceRestart": "0"
},
{
"name": "disable_commands",
"default": "flushall,flushdb",
"value": "flushall,flushdb",
"forceRestart": "1"
},
{
"name": "notify-keyspace-events",
"default": "",
"value": "",
"forceRestart": "0"
}
]
}