1. 接口描述
接口请求域名: redis.tencentcloudapi.com 。
本接口(DescribeInstanceParams)用于查询实例参数列表。
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeInstanceParams。 |
Version | 是 | String | 公共参数,本接口取值:2018-04-12。 |
Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
InstanceId | 是 | String | 指定实例 ID。例如:crs-xjhsdj****。请登录Redis控制台在实例列表复制实例 ID。 示例值:crs-5a4py64p |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
TotalCount | Integer | 参数列表总数量。 示例值:10 |
InstanceEnumParam | Array of InstanceEnumParam | 实例枚举类型参数。 |
InstanceIntegerParam | Array of InstanceIntegerParam | 实例整型参数。 |
InstanceTextParam | Array of InstanceTextParam | 实例字符型参数。 |
InstanceMultiParam | Array of InstanceMultiParam | 实例多选项型参数。 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 查询实例参数列表
查询指定实例的参数信息
输入示例
https://redis.tencentcloudapi.com/?Action=DescribeInstanceParams
&InstanceId=crs-5a4p****
&<公共请求参数>
输出示例
{
"Response": {
"InstanceEnumParam": [
{
"CurrentValue": "yes",
"DefaultValue": "yes",
"EnumValue": [
"yes",
"no"
],
"NeedRestart": "false",
"ParamName": "lazyfree-lazy-eviction",
"Status": 2,
"Tips": "lazyfree switch on eviction",
"ValueType": "enum"
},
{
"CurrentValue": "yes",
"DefaultValue": "yes",
"EnumValue": [
"yes",
"no"
],
"NeedRestart": "false",
"ParamName": "lazyfree-lazy-expire",
"Status": 2,
"Tips": "lazyfree switch on expire",
"ValueType": "enum"
},
{
"CurrentValue": "yes",
"DefaultValue": "yes",
"EnumValue": [
"yes",
"no"
],
"NeedRestart": "false",
"ParamName": "lazyfree-lazy-server-del",
"Status": 2,
"Tips": "lazyfree switch on server implicit deletion",
"ValueType": "enum"
},
{
"CurrentValue": "noeviction",
"DefaultValue": "noeviction",
"EnumValue": [
"volatile-lru",
"volatile-lfu",
"allkeys-lru",
"allkeys-lfu",
"volatile-random",
"allkeys-random",
"volatile-ttl",
"noeviction"
],
"NeedRestart": "false",
"ParamName": "maxmemory-policy",
"Status": 2,
"Tips": "How Redis will select what to remove when maxmemory is reached",
"ValueType": "enum"
},
{
"CurrentValue": "yes",
"DefaultValue": "yes",
"EnumValue": [
"yes",
"no"
],
"NeedRestart": "false",
"ParamName": "replica-lazy-flush",
"Status": 2,
"Tips": "lazyfree switch on full resynchronization",
"ValueType": "enum"
},
{
"CurrentValue": "no",
"DefaultValue": "no",
"EnumValue": [
"yes",
"no"
],
"NeedRestart": "false",
"ParamName": "sentineauth",
"Status": 2,
"Tips": "Executing a sentinel order eliminates the password",
"ValueType": "enum"
}
],
"InstanceIntegerParam": [
{
"CurrentValue": "15000",
"DefaultValue": "15000",
"Max": "120000",
"Min": "15000",
"NeedRestart": "false",
"ParamName": "cluster-node-timeout",
"Status": 2,
"Tips": "Cluster node timeout is the amount of milliseconds a node must be unreachable for it to be considered in failure state",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "512",
"DefaultValue": "512",
"Max": "10000",
"Min": "1",
"NeedRestart": "false",
"ParamName": "hash-max-ziplist-entries",
"Status": 2,
"Tips": "Hashes are encoded using a memory efficient data structure when they have a small number of entries",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "64",
"DefaultValue": "64",
"Max": "10000",
"Min": "1",
"NeedRestart": "false",
"ParamName": "hash-max-ziplist-value",
"Status": 2,
"Tips": "Hashes are encoded using a memory efficient data structure when the biggest entry does not exceed a given threshold",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "10",
"DefaultValue": "10",
"Max": "500",
"Min": "1",
"NeedRestart": "false",
"ParamName": "hz",
"Status": 2,
"Tips": "The frequency at which Redis background tasks are performed. A higher value results in higher CPU consumption but smaller latency. We recommend that you do not specify a value larger than 100.",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "500",
"DefaultValue": "500",
"Max": "1000",
"Min": "10",
"NeedRestart": "false",
"ParamName": "proxy-slowlog-log-slower-than",
"Status": 2,
"Tips": "the commands over this time will in proxy",
"Unit": "ms",
"ValueType": "integer"
},
{
"CurrentValue": "512",
"DefaultValue": "512",
"Max": "10000",
"Min": "1",
"NeedRestart": "false",
"ParamName": "set-max-intset-entries",
"Status": 2,
"Tips": "When a set is composed of just strings that happen to be integers in radix 10 in the range of 64 bit signed integers.",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "10",
"DefaultValue": "10",
"Max": "1000",
"Min": "1",
"NeedRestart": "false",
"ParamName": "slowlog-log-slower-than",
"Status": 2,
"Tips": "Over this time the command is recorded in us.a negative number disables the slow log,a value of zero forces the logging of every command",
"Unit": "ms",
"ValueType": "integer"
},
{
"CurrentValue": "31536000",
"DefaultValue": "31536000",
"Max": "2147483647",
"Min": "60",
"NeedRestart": "false",
"ParamName": "timeout",
"Status": 2,
"Tips": "Close the connection after a client is idle for N seconds",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "128",
"DefaultValue": "128",
"Max": "10000",
"Min": "1",
"NeedRestart": "false",
"ParamName": "zset-max-ziplist-entries",
"Status": 2,
"Tips": "Sorted sets are encoded using a memory efficient data structure when they have a small number of entries.",
"Unit": "",
"ValueType": "integer"
},
{
"CurrentValue": "64",
"DefaultValue": "64",
"Max": "10000",
"Min": "1",
"NeedRestart": "false",
"ParamName": "zset-max-ziplist-value",
"Status": 2,
"Tips": "Sorted sets are encoded using a memory efficient data structure when the biggest entry does not exceed a given threshold.",
"Unit": "",
"ValueType": "integer"
}
],
"InstanceMultiParam": [
{
"CurrentValue": "\"\"",
"DefaultValue": "\"\"",
"EnumValue": [
"flushall",
"flushdb",
"keys",
"hgetall",
"eval",
"evalsha",
"script",
"scan",
"psetex",
"set",
"hmset",
"hset",
"lpush",
"rpush",
"sadd",
"zadd",
"del",
"mget",
"mset",
"bitop",
"exists",
"msetnx",
"blpop",
"brpop",
"rpoplpush",
"brpoplpush",
"smove",
"sunion",
"sinter",
"sdiff",
"sunionstore",
"sinterstore",
"sdiffstore",
"zunionstore",
"zinterstore",
"pfmerge",
"pfcount"
],
"NeedRestart": "false",
"ParamName": "disable-command-list",
"Status": 2,
"Tips": "commands in such config will not be allowed to run in this instance,you can config multi commands like this 'flushdb,keys'",
"ValueType": "multi"
}
],
"InstanceTextParam": [
{
"CurrentValue": "\"\"",
"DefaultValue": "\"\"",
"NeedRestart": "false",
"ParamName": "notify-keyspace-events",
"Status": 2,
"TextValue": [
"K",
"E",
"g",
"$",
"l",
"s",
"h",
"z",
"x",
"e",
"A"
],
"Tips": "Changes in key space notification to registered clients",
"ValueType": "text"
}
],
"RequestId": "a4abf600-2813-4c5b-a3f8-fc4268efd151",
"TotalCount": 18
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
FailedOperation.SystemError | 内部系统错误,和业务无关。 |
FailedOperation.UnSupportError | 实例不支持该接口。 |
InternalError.DbOperationFailed | 统一的 DB 操作错误,可以是 update insert select..。 |
InternalError.InternalError | 内部错误。 |
InvalidParameter | 参数错误。 |
InvalidParameter.PermissionDenied | 接口没有cam权限。 |
ResourceNotFound.InstanceNotExists | 根据 serialId 没有找到对应 redis。 |
ResourceUnavailable.InstanceStatusError | 实例状态异常,不能执行对应操作。 |
UnauthorizedOperation | 未授权操作。 |
UnauthorizedOperation.NoCAMAuthed | 无cam 权限。 |
UnauthorizedOperation.UserNotInWhiteList | 用户不在白名单中。 |
UnsupportedOperation.ClusterInstanceAccessedDeny | redis 集群版不允许接入安全组。 |