Queries the parameters and default values of an ApsaraDB for Redis instance that runs a specific major version in a specific architecture.
After you call this operation to query the parameters and default values of an instance, you can call the ModifyInstanceConfig operation to reconfigure the parameters of the instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeParameterTemplates |
The operation that you want to perform. Set the value to DescribeParameterTemplates. |
CharacterType | String | Yes | logic |
The architecture of the instance. For more information, see Overview. Valid values:
|
Engine | String | Yes | Redis |
The database engine that is run on the instance. Set the value to Redis. |
EngineVersion | String | Yes | 5.0 |
The major version that is run on the instance. Valid values: 2.8, 4.0, and 5.0. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. |
ResourceGroupId | String | No | rg-acfmyiu4ekp**** |
The ID of the resource group to which the instance belongs. You can call the ListResourceGroups operation to query the IDs of resource groups. Note You can also query the ID of a resource group in the Resource Management console.
For more information, see View the basic information of a resource group.
|
InstanceId | String | No | r-bp1zxszhcgatnx**** |
The ID of the instance. You can call the DescribeInstances operation to query the IDs of instances. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Engine | String | redis |
The database engine that is run on the instance. The value Redis is returned for this parameter. |
EngineVersion | String | 5.0 |
The major version that is run on the instance. |
ParameterCount | String | 24 |
The number of parameters that are supported by the instance. |
Parameters | Array of TemplateRecord |
An array that consists of the details about the parameters returned. |
|
TemplateRecord | |||
CheckingCode | String | [yes|no] |
The valid values of the parameter. |
ForceModify | Boolean | true |
Indicates whether the parameter can be reconfigured. Valid values:
|
ForceRestart | Boolean | false |
Indicates whether a restart of the instance is required after the parameter is reconfigured. Valid values:
|
ParameterDescription | String | Enable AOF persistence. |
The description of the parameter. |
ParameterName | String | appendonly |
The name of the parameter. For more information about the parameters and the parameter settings, see Parameters. |
ParameterValue | String | yes |
The default value of the parameter. |
RequestId | String | 9DA28D8E-514D-4F12-ADED-70A9C818**** |
The ID of the request. |
Examples
Sample requests
https://r-kvstore.aliyuncs.com/?Action=DescribeParameterTemplates
&CharacterType=logic
&Engine=Redis
&EngineVersion=5.0
&<Common request parameters>
Sample success responses
XML
format
<DescribeParameterTemplatesResponse>
<ParameterCount>24</ParameterCount>
<EngineVersion>5.0</EngineVersion>
<Parameters>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>no</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>#no_loose_check-whitelist-always</ParameterName>
<ParameterDescription>check whitelist always</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>.*</CheckingCode>
<ParameterValue></ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>#no_loose_disabled-commands</ParameterName>
<ParameterDescription>You can disable some dangerous commands, for example "keys,flushdb,flushall", the commands must be in [flushall,flushdb,keys,hgetall,eval,evalsha,script].</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>no</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>#no_loose_sentinel-enabled</ParameterName>
<ParameterDescription>Be compatible with sentinel mode.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>yes</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>appendonly</ParameterName>
<ParameterDescription>Enable AOF persistence.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>\d+\s+\d+\s+\d+</CheckingCode>
<ParameterValue>33554432 8388608 60</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>client-output-buffer-limit pubsub</ParameterName>
<ParameterDescription>Specify the amount of memory that a client can publish to and subscribe from a write buffer. Unit: MB.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>yes</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>dynamic-hz</ParameterName>
<ParameterDescription>Specify whether to enable dynamic frequency control for background tasks.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>512</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>hash-max-ziplist-entries</ParameterName>
<ParameterDescription>If hash fields are less than this value and hash value sizes are less than hash-max-ziplist-value, the ziplist will be used.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>64</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>hash-max-ziplist-value</ParameterName>
<ParameterDescription>If hash value sizes are than less this value and hash fields are less than hash-max-ziplist-entries, the ziplist will be used.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[1-500]</CheckingCode>
<ParameterValue>10</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>hz</ParameterName>
<ParameterDescription>Specify the frequency at which ApsaraDB for Redis runs background tasks, such as the tasks that are used to delete expired keys. Valid values: 1 to 500. Default value: 10.A larger value indicates higher CPU utilization and lower latency. We recommend that you specify a value that is less than or equal to 100.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>no</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>lazyfree-lazy-eviction</ParameterName>
<ParameterDescription>lazyfree switch on eviction.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>yes</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>lazyfree-lazy-expire</ParameterName>
<ParameterDescription>lazyfree switch on expire.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[yes|no]</CheckingCode>
<ParameterValue>yes</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>lazyfree-lazy-server-del</ParameterName>
<ParameterDescription>lazyfree switch on server implicit deletion.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-65535]</CheckingCode>
<ParameterValue>0</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>list-compress-depth</ParameterName>
<ParameterDescription>The number of entries on the list that are not compressed at both ends.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[-5-99999999]</CheckingCode>
<ParameterValue>-2</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>list-max-ziplist-size</ParameterName>
<ParameterDescription>Threadhold of ziplist size on quicklist.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[volatile-lru|allkeys-lru|volatile-random|allkeys-random|volatile-ttl|volatile-lfu|allkeys-lfu|noeviction]</CheckingCode>
<ParameterValue>volatile-lru</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>maxmemory-policy</ParameterName>
<ParameterDescription>To config how Redis will select what to remove when maxmemory is reached. There are eight behaviors that can be chose : volatile-lru,allkeys-lru,volatile-lfu,allkeys-lfu,volatile-random,allkeys-random,volatile-ttl,noeviction</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>.*</CheckingCode>
<ParameterValue></ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>notify-keyspace-events</ParameterName>
<ParameterDescription>keyspace-event notification feature.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>512</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>set-max-intset-entries</ParameterName>
<ParameterDescription>Sets have a special encoding in just one case: when a set is composed of just strings that happen to be integers in radix 10 in the range of 64 bit signed integers. The following configuration setting sets the limit in the size of the set in order to use this special memory saving encoding.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[10000-10000000]</CheckingCode>
<ParameterValue>20000</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>slowlog-log-slower-than</ParameterName>
<ParameterDescription>The time is expressed in microseconds, so 1000000 is equivalent to one second. The default setting for this is 20000 (20ms) and the lower bound of this setting is 10000 (10ms). </ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[100-10000]</CheckingCode>
<ParameterValue>1024</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>slowlog-max-len</ParameterName>
<ParameterDescription>The max slowlog count.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>4096</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>stream-node-max-bytes</ParameterName>
<ParameterDescription>Specify the maximum amount of memory that each macro node in a stream can consume. Valid values: 0 to 999999999999999. Default value: 4096. Unit: bytes. The value 0 indicates that the amount of consumed memory is unlimited.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>100</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>stream-node-max-entries</ParameterName>
<ParameterDescription>Set the maximum number of entries stored on each macro node in a stream. Valid values: 0 to 999999999999999. Default value: 100. The value 0 indicates that the number of entries on each node is unlimited.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-100000]</CheckingCode>
<ParameterValue>0</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>timeout</ParameterName>
<ParameterDescription>Close the connection after a client is idle for N seconds (0 to disable)</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>128</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>zset-max-ziplist-entries</ParameterName>
<ParameterDescription>Similarly to hashes and lists, sorted sets are also specially encoded in order to save a lot of space.</ParameterDescription>
</TemplateRecord>
<TemplateRecord>
<ForceModify>1</ForceModify>
<CheckingCode>[0-999999999999999]</CheckingCode>
<ParameterValue>64</ParameterValue>
<ForceRestart>false</ForceRestart>
<ParameterName>zset-max-ziplist-value</ParameterName>
<ParameterDescription>Similarly to hashes and lists, sorted sets are also specially encoded in order to save a lot of space.</ParameterDescription>
</TemplateRecord>
</Parameters>
<RequestId>9DA28D8E-514D-4F12-ADED-70A9C818F0A0</RequestId>
<Engine>redis</Engine>
</DescribeParameterTemplatesResponse>
JSON
format
{
"ParameterCount": "24",
"EngineVersion": "5.0",
"Parameters": {
"TemplateRecord": [
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "no",
"ForceRestart": false,
"ParameterName": "#no_loose_check-whitelist-always",
"ParameterDescription": "check whitelist always"
},
{
"ForceModify": 1,
"CheckingCode": ".*",
"ParameterValue": "",
"ForceRestart": false,
"ParameterName": "#no_loose_disabled-commands",
"ParameterDescription": "You can disable some dangerous commands, for example \"keys,flushdb,flushall\", the commands must be in [flushall,flushdb,keys,hgetall,eval,evalsha,script]."
},
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "no",
"ForceRestart": false,
"ParameterName": "#no_loose_sentinel-enabled",
"ParameterDescription": "Be compatible with sentinel mode."
},
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "yes",
"ForceRestart": false,
"ParameterName": "appendonly",
"ParameterDescription": "Enable AOF persistence."
},
{
"ForceModify": 1,
"CheckingCode": "\\d+\\s+\\d+\\s+\\d+",
"ParameterValue": "33554432 8388608 60",
"ForceRestart": false,
"ParameterName": "client-output-buffer-limit pubsub",
"ParameterDescription": "Specify the amount of memory that a client can publish to and subscribe from a write buffer. Unit: MB."
},
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "yes",
"ForceRestart": false,
"ParameterName": "dynamic-hz",
"ParameterDescription": "Specify whether to enable dynamic frequency control for background tasks."
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "512",
"ForceRestart": false,
"ParameterName": "hash-max-ziplist-entries",
"ParameterDescription": "If hash fields are less than this value and hash value sizes are less than hash-max-ziplist-value, the ziplist will be used."
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "64",
"ForceRestart": false,
"ParameterName": "hash-max-ziplist-value",
"ParameterDescription": "If hash value sizes are than less this value and hash fields are less than hash-max-ziplist-entries, the ziplist will be used."
},
{
"ForceModify": 1,
"CheckingCode": "[1-500]",
"ParameterValue": "10",
"ForceRestart": false,
"ParameterName": "hz",
"ParameterDescription": "Specify the frequency at which ApsaraDB for Redis runs background tasks, such as the tasks that are used to delete expired keys. Valid values: 1 to 500. Default value: 10.A larger value indicates higher CPU utilization and lower latency. We recommend that you specify a value that is less than or equal to 100."
},
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "no",
"ForceRestart": false,
"ParameterName": "lazyfree-lazy-eviction",
"ParameterDescription": "lazyfree switch on eviction."
},
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "yes",
"ForceRestart": false,
"ParameterName": "lazyfree-lazy-expire",
"ParameterDescription": "lazyfree switch on expire."
},
{
"ForceModify": 1,
"CheckingCode": "[yes|no]",
"ParameterValue": "yes",
"ForceRestart": false,
"ParameterName": "lazyfree-lazy-server-del",
"ParameterDescription": "lazyfree switch on server implicit deletion."
},
{
"ForceModify": 1,
"CheckingCode": "[0-65535]",
"ParameterValue": "0",
"ForceRestart": false,
"ParameterName": "list-compress-depth",
"ParameterDescription": "The number of entries on the list that are not compressed at both ends."
},
{
"ForceModify": 1,
"CheckingCode": "[-5-99999999]",
"ParameterValue": "-2",
"ForceRestart": false,
"ParameterName": "list-max-ziplist-size",
"ParameterDescription": "Threadhold of ziplist size on quicklist."
},
{
"ForceModify": 1,
"CheckingCode": "[volatile-lru|allkeys-lru|volatile-random|allkeys-random|volatile-ttl|volatile-lfu|allkeys-lfu|noeviction]",
"ParameterValue": "volatile-lru",
"ForceRestart": false,
"ParameterName": "maxmemory-policy",
"ParameterDescription": "To config how Redis will select what to remove when maxmemory is reached. There are eight behaviors that can be chose : volatile-lru,allkeys-lru,volatile-lfu,allkeys-lfu,volatile-random,allkeys-random,volatile-ttl,noeviction"
},
{
"ForceModify": 1,
"CheckingCode": ".*",
"ParameterValue": "",
"ForceRestart": false,
"ParameterName": "notify-keyspace-events",
"ParameterDescription": "keyspace-event notification feature."
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "512",
"ForceRestart": false,
"ParameterName": "set-max-intset-entries",
"ParameterDescription": "Sets have a special encoding in just one case: when a set is composed of just strings that happen to be integers in radix 10 in the range of 64 bit signed integers. The following configuration setting sets the limit in the size of the set in order to use this special memory saving encoding."
},
{
"ForceModify": 1,
"CheckingCode": "[10000-10000000]",
"ParameterValue": "20000",
"ForceRestart": false,
"ParameterName": "slowlog-log-slower-than",
"ParameterDescription": "The time is expressed in microseconds, so 1000000 is equivalent to one second. The default setting for this is 20000 (20ms) and the lower bound of this setting is 10000 (10ms). "
},
{
"ForceModify": 1,
"CheckingCode": "[100-10000]",
"ParameterValue": "1024",
"ForceRestart": false,
"ParameterName": "slowlog-max-len",
"ParameterDescription": "The max slowlog count."
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "4096",
"ForceRestart": false,
"ParameterName": "stream-node-max-bytes",
"ParameterDescription": "Specify the maximum amount of memory that each macro node in a stream can consume. Valid values: 0 to 999999999999999. Default value: 4096. Unit: bytes. The value 0 indicates that the amount of consumed memory is unlimited."
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "100",
"ForceRestart": false,
"ParameterName": "stream-node-max-entries",
"ParameterDescription": "Set the maximum number of entries stored on each macro node in a stream. Valid values: 0 to 999999999999999. Default value: 100. The value 0 indicates that the number of entries on each node is unlimited."
},
{
"ForceModify": 1,
"CheckingCode": "[0-100000]",
"ParameterValue": "0",
"ForceRestart": false,
"ParameterName": "timeout",
"ParameterDescription": "Close the connection after a client is idle for N seconds (0 to disable)"
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "128",
"ForceRestart": false,
"ParameterName": "zset-max-ziplist-entries",
"ParameterDescription": "Similarly to hashes and lists, sorted sets are also specially encoded in order to save a lot of space."
},
{
"ForceModify": 1,
"CheckingCode": "[0-999999999999999]",
"ParameterValue": "64",
"ForceRestart": false,
"ParameterName": "zset-max-ziplist-value",
"ParameterDescription": "Similarly to hashes and lists, sorted sets are also specially encoded in order to save a lot of space."
}
]
},
"RequestId": "9DA28D8E-514D-4F12-ADED-70A9C818F0A0",
"Engine": "redis"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameters.Format | Specified parameters is not valid. | The error message returned because the specified parameters are invalid. |
For a list of error codes, visit the API Error Center.