Managed Service for Redis API, REST: Cluster.Restore
- HTTP request
- Body parameters
- ConfigSpec
- RedisConfig5_0
- ClientOutputBufferLimit
- RedisConfig6_0
- ClientOutputBufferLimit
- RedisConfig6_2
- ClientOutputBufferLimit
- RedisConfig7_0
- ClientOutputBufferLimit
- Resources
- TimeOfDay
- Access
- RedisConfig
- ClientOutputBufferLimit
- DiskSizeAutoscaling
- ValkeyModules
- ValkeySearch
- ValkeyJson
- ValkeyBloom
- HostSpec
- MaintenanceWindow
- WeeklyMaintenanceWindow
- UserSpec
- Permissions
- Response
- Status
Creates a new Redis cluster using the specified backup.
HTTP request
POST https://mdb.api.yandexcloud.kz/managed-redis/v1/clusters:restore
Body parameters
{
"backupId": "string",
"name": "string",
"description": "string",
"labels": "object",
"environment": "string",
"configSpec": {
"version": "string",
// Includes only one of the fields `redisConfig_5_0`, `redisConfig_6_0`, `redisConfig_6_2`, `redisConfig_7_0`
"redisConfig_5_0": {
"maxmemoryPolicy": "string",
"timeout": "string",
"password": "string",
"databases": "string",
"slowlogLogSlowerThan": "string",
"slowlogMaxLen": "string",
"notifyKeyspaceEvents": "string",
"clientOutputBufferLimitPubsub": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"clientOutputBufferLimitNormal": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
}
},
"redisConfig_6_0": {
"maxmemoryPolicy": "string",
"timeout": "string",
"password": "string",
"databases": "string",
"slowlogLogSlowerThan": "string",
"slowlogMaxLen": "string",
"notifyKeyspaceEvents": "string",
"clientOutputBufferLimitPubsub": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"clientOutputBufferLimitNormal": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
}
},
"redisConfig_6_2": {
"maxmemoryPolicy": "string",
"timeout": "string",
"password": "string",
"databases": "string",
"slowlogLogSlowerThan": "string",
"slowlogMaxLen": "string",
"notifyKeyspaceEvents": "string",
"clientOutputBufferLimitPubsub": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"clientOutputBufferLimitNormal": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"maxmemoryPercent": "string"
},
"redisConfig_7_0": {
"maxmemoryPolicy": "string",
"timeout": "string",
"password": "string",
"databases": "string",
"slowlogLogSlowerThan": "string",
"slowlogMaxLen": "string",
"notifyKeyspaceEvents": "string",
"clientOutputBufferLimitPubsub": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"clientOutputBufferLimitNormal": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"maxmemoryPercent": "string"
},
// end of the list of possible fields
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
},
"backupWindowStart": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"access": {
"dataLens": "boolean",
"webSql": "boolean"
},
"redis": {
"maxmemoryPolicy": "string",
"timeout": "string",
"password": "string",
"databases": "string",
"slowlogLogSlowerThan": "string",
"slowlogMaxLen": "string",
"notifyKeyspaceEvents": "string",
"clientOutputBufferLimitPubsub": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"clientOutputBufferLimitNormal": {
"hardLimit": "string",
"softLimit": "string",
"softSeconds": "string"
},
"maxmemoryPercent": "string",
"luaTimeLimit": "string",
"replBacklogSizePercent": "string",
"clusterRequireFullCoverage": "boolean",
"clusterAllowReadsWhenDown": "boolean",
"clusterAllowPubsubshardWhenDown": "boolean",
"lfuDecayTime": "string",
"lfuLogFactor": "string",
"turnBeforeSwitchover": "boolean",
"allowDataLoss": "boolean",
"useLuajit": "boolean",
"ioThreadsAllowed": "boolean",
"zsetMaxListpackEntries": "string",
"aofMaxSizePercent": "string",
"activedefrag": "boolean",
"auditLog": "boolean"
},
"diskSizeAutoscaling": {
"plannedUsageThreshold": "string",
"emergencyUsageThreshold": "string",
"diskSizeLimit": "string"
},
"backupRetainPeriodDays": "string",
"modules": {
"valkeySearch": {
"enabled": "boolean",
"readerThreads": "string",
"writerThreads": "string",
"version": "string"
},
"valkeyJson": {
"enabled": "boolean",
"version": "string"
},
"valkeyBloom": {
"enabled": "boolean",
"version": "string"
}
}
},
"hostSpecs": [
{
"zoneId": "string",
"subnetId": "string",
"shardName": "string",
"replicaPriority": "string",
"assignPublicIp": "boolean"
}
],
"networkId": "string",
"folderId": "string",
"securityGroupIds": [
"string"
],
"tlsEnabled": "boolean",
"persistenceMode": "string",
"deletionProtection": "boolean",
"announceHostnames": "boolean",
"maintenanceWindow": {
// Includes only one of the fields `anytime`, `weeklyMaintenanceWindow`
"anytime": "object",
"weeklyMaintenanceWindow": {
"day": "string",
"hour": "string"
}
// end of the list of possible fields
},
"authSentinel": "boolean",
"sharded": "boolean",
"diskEncryptionKeyId": "string",
"userSpecs": [
{
"name": "string",
"passwords": [
"string"
],
"permissions": {
"patterns": "string",
"pubSubChannels": "string",
"categories": "string",
"commands": "string",
"sanitizePayload": "string",
"databases": "string"
},
"enabled": "boolean"
}
]
}
|
Field |
Description |
|
backupId |
string Required field. ID of the backup to create a cluster from. |
|
name |
string Required field. Name of the new Redis cluster. The name must be unique within the folder. The maximum string length in characters is 63. Value must match the regular expression |
|
description |
string Description of the new Redis cluster. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Custom labels for the Redis cluster as The maximum string length in characters for each value is 63. The maximum string length in characters for each key is 63. Each key must match the regular expression |
|
environment |
enum (Environment) Required field. Deployment environment of the new Redis cluster.
|
|
configSpec |
Required field. Configuration for the Redis cluster to be created. |
|
hostSpecs[] |
Configurations for Redis hosts that should be created for |
|
networkId |
string ID of the network to create the Redis cluster in. The maximum string length in characters is 150. |
|
folderId |
string ID of the folder to create the Redis cluster in. The maximum string length in characters is 50. |
|
securityGroupIds[] |
string User security groups |
|
tlsEnabled |
boolean TLS port and functionality on\off |
|
persistenceMode |
enum (PersistenceMode) Persistence mode
|
|
deletionProtection |
boolean Deletion Protection inhibits deletion of the cluster |
|
announceHostnames |
boolean Enable FQDN instead of ip |
|
maintenanceWindow |
Window of maintenance operations. |
|
authSentinel |
boolean Allows to use ACL users to auth in sentinel |
|
sharded |
boolean Redis cluster mode on/off. |
|
diskEncryptionKeyId |
string ID of the key to encrypt cluster disks. |
|
userSpecs[] |
Descriptions of users to be created in the Redis cluster. The minimum number of elements is 0. |
ConfigSpec
|
Field |
Description |
|
version |
string Version of Redis used in the cluster. |
|
redisConfig_5_0 |
Configuration of a Redis 5.0 server. Includes only one of the fields Configuration of a Redis cluster. |
|
redisConfig_6_0 |
Configuration of a Redis 6.0 server. Includes only one of the fields Configuration of a Redis cluster. |
|
redisConfig_6_2 |
Configuration of a Redis 6.2 server. Includes only one of the fields Configuration of a Redis cluster. |
|
redisConfig_7_0 |
Configuration of a Redis 7.0 server. Includes only one of the fields Configuration of a Redis cluster. |
|
resources |
Resources allocated to Redis hosts. |
|
backupWindowStart |
Time to start the daily backup, in the UTC timezone. |
|
access |
Access policy to DB |
|
redis |
Unified configuration of a Redis cluster |
|
diskSizeAutoscaling |
Disk size autoscaling settings |
|
backupRetainPeriodDays |
string (int64) Retain period of automatically created backup in days Acceptable values are 7 to 60, inclusive. |
|
modules |
Valkey modules settings |
RedisConfig5_0
Fields and structure of RedisConfig reflects Redis configuration file
parameters.
|
Field |
Description |
|
maxmemoryPolicy |
enum (MaxmemoryPolicy) Redis key eviction policy for a dataset that reaches maximum memory,
|
|
timeout |
string (int64) Time that Redis keeps the connection open while the client is idle. Value must be greater than 0. |
|
password |
string Authentication password. The string length in characters must be 8-128. Value must match the regular expression |
|
databases |
string (int64) Number of database buckets on a single redis-server process. Value must be greater than 0. |
|
slowlogLogSlowerThan |
string (int64) Threshold for logging slow requests to server in microseconds (log only slower than it). The minimum value is 0. |
|
slowlogMaxLen |
string (int64) Max slow requests number to log. The minimum value is 0. |
|
notifyKeyspaceEvents |
string String setting for pub\sub functionality. Value must match the regular expression |
|
clientOutputBufferLimitPubsub |
Redis connection output buffers limits for pubsub operations. |
|
clientOutputBufferLimitNormal |
Redis connection output buffers limits for clients. |
ClientOutputBufferLimit
|
Field |
Description |
|
hardLimit |
string (int64) Total limit in bytes. The minimum value is 0. |
|
softLimit |
string (int64) Limit in bytes during certain time period. The minimum value is 0. |
|
softSeconds |
string (int64) Seconds for soft limit. The minimum value is 0. |
RedisConfig6_0
Fields and structure of RedisConfig reflects Redis configuration file
parameters.
|
Field |
Description |
|
maxmemoryPolicy |
enum (MaxmemoryPolicy) Redis key eviction policy for a dataset that reaches maximum memory,
|
|
timeout |
string (int64) Time that Redis keeps the connection open while the client is idle. Value must be greater than 0. |
|
password |
string Authentication password. The string length in characters must be 8-128. Value must match the regular expression |
|
databases |
string (int64) Number of database buckets on a single redis-server process. Value must be greater than 0. |
|
slowlogLogSlowerThan |
string (int64) Threshold for logging slow requests to server in microseconds (log only slower than it). The minimum value is 0. |
|
slowlogMaxLen |
string (int64) Max slow requests number to log. The minimum value is 0. |
|
notifyKeyspaceEvents |
string String setting for pub\sub functionality. Value must match the regular expression |
|
clientOutputBufferLimitPubsub |
Redis connection output buffers limits for pubsub operations. |
|
clientOutputBufferLimitNormal |
Redis connection output buffers limits for clients. |
ClientOutputBufferLimit
|
Field |
Description |
|
hardLimit |
string (int64) Total limit in bytes. The minimum value is 0. |
|
softLimit |
string (int64) Limit in bytes during certain time period. The minimum value is 0. |
|
softSeconds |
string (int64) Seconds for soft limit. The minimum value is 0. |
RedisConfig6_2
Fields and structure of RedisConfig reflects Redis configuration file
parameters.
|
Field |
Description |
|
maxmemoryPolicy |
enum (MaxmemoryPolicy) Redis key eviction policy for a dataset that reaches maximum memory,
|
|
timeout |
string (int64) Time that Redis keeps the connection open while the client is idle. The minimum value is 0. |
|
password |
string Authentication password. The string length in characters must be 8-128. Value must match the regular expression |
|
databases |
string (int64) Number of database buckets on a single redis-server process. Value must be greater than 0. |
|
slowlogLogSlowerThan |
string (int64) Threshold for logging slow requests to server in microseconds (log only slower than it). The minimum value is 0. |
|
slowlogMaxLen |
string (int64) Max slow requests number to log. The minimum value is 0. |
|
notifyKeyspaceEvents |
string String setting for pub\sub functionality. Value must match the regular expression |
|
clientOutputBufferLimitPubsub |
Redis connection output buffers limits for pubsub operations. |
|
clientOutputBufferLimitNormal |
Redis connection output buffers limits for clients. |
|
maxmemoryPercent |
string (int64) Redis maxmemory percent Acceptable values are 1 to 75, inclusive. |
ClientOutputBufferLimit
|
Field |
Description |
|
hardLimit |
string (int64) Total limit in bytes. The minimum value is 0. |
|
softLimit |
string (int64) Limit in bytes during certain time period. The minimum value is 0. |
|
softSeconds |
string (int64) Seconds for soft limit. The minimum value is 0. |
RedisConfig7_0
Fields and structure of RedisConfig reflects Redis configuration file
parameters.
|
Field |
Description |
|
maxmemoryPolicy |
enum (MaxmemoryPolicy) Redis key eviction policy for a dataset that reaches maximum memory,
|
|
timeout |
string (int64) Time that Redis keeps the connection open while the client is idle. The minimum value is 0. |
|
password |
string Authentication password. The string length in characters must be 8-128. Value must match the regular expression |
|
databases |
string (int64) Number of database buckets on a single redis-server process. Value must be greater than 0. |
|
slowlogLogSlowerThan |
string (int64) Threshold for logging slow requests to server in microseconds (log only slower than it). The minimum value is 0. |
|
slowlogMaxLen |
string (int64) Max slow requests number to log. The minimum value is 0. |
|
notifyKeyspaceEvents |
string String setting for pub\sub functionality. Value must match the regular expression |
|
clientOutputBufferLimitPubsub |
Redis connection output buffers limits for pubsub operations. |
|
clientOutputBufferLimitNormal |
Redis connection output buffers limits for clients. |
|
maxmemoryPercent |
string (int64) Redis maxmemory percent Acceptable values are 1 to 75, inclusive. |
ClientOutputBufferLimit
|
Field |
Description |
|
hardLimit |
string (int64) Total limit in bytes. The minimum value is 0. |
|
softLimit |
string (int64) Limit in bytes during certain time period. The minimum value is 0. |
|
softSeconds |
string (int64) Seconds for soft limit. The minimum value is 0. |
Resources
|
Field |
Description |
|
resourcePresetId |
string Required field. ID of the preset for computational resources available to a host (CPU, memory etc.). |
|
diskSize |
string (int64) Volume of the storage available to a host, in bytes. |
|
diskTypeId |
string Type of the storage environment for the host.
|
TimeOfDay
Represents a time of day. The date and time zone are either not significant
or are specified elsewhere. An API may choose to allow leap seconds. Related
types are google.type.Date
|
Field |
Description |
|
hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
|
minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
|
seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may |
|
nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
Access
|
Field |
Description |
|
dataLens |
boolean Allow access for DataLens |
|
webSql |
boolean Allow access for Web SQL. |
RedisConfig
Fields and structure of RedisConfig reflects Redis configuration file
parameters.
|
Field |
Description |
|
maxmemoryPolicy |
enum (MaxmemoryPolicy) Redis key eviction policy for a dataset that reaches maximum memory,
|
|
timeout |
string (int64) Time that Redis keeps the connection open while the client is idle. The minimum value is 0. |
|
password |
string Authentication password. |
|
databases |
string (int64) Number of database buckets on a single redis-server process. Acceptable values are 1 to 1024, inclusive. |
|
slowlogLogSlowerThan |
string (int64) Threshold for logging slow requests to server in microseconds (log only slower than it). The minimum value is 10. |
|
slowlogMaxLen |
string (int64) Max slow requests number to log. The minimum value is 0. |
|
notifyKeyspaceEvents |
string String setting for pub\sub functionality. |
|
clientOutputBufferLimitPubsub |
Redis connection output buffers limits for pubsub operations. |
|
clientOutputBufferLimitNormal |
Redis connection output buffers limits for clients. |
|
maxmemoryPercent |
string (int64) Redis maxmemory percent Acceptable values are 1 to 75, inclusive. |
|
luaTimeLimit |
string (int64) Maximum time in milliseconds for Lua scripts, 0 - disabled mechanism Acceptable values are 0 to 5000, inclusive. |
|
replBacklogSizePercent |
string (int64) Replication backlog size as a percentage of flavor maxmemory Acceptable values are 1 to 75, inclusive. |
|
clusterRequireFullCoverage |
boolean Controls whether all hash slots must be covered by nodes |
|
clusterAllowReadsWhenDown |
boolean Allows read operations when cluster is down |
|
clusterAllowPubsubshardWhenDown |
boolean Permits Pub/Sub shard operations when cluster is down |
|
lfuDecayTime |
string (int64) The time, in minutes, that must elapse in order for the key counter to be divided by two (or decremented if it has a value less <= 10) Acceptable values are 0 to 100000, inclusive. |
|
lfuLogFactor |
string (int64) Determines how the frequency counter represents key hits. Acceptable values are 0 to 1000, inclusive. |
|
turnBeforeSwitchover |
boolean Allows to turn before switchover in RDSync |
|
allowDataLoss |
boolean Allows some data to be lost in favor of faster switchover/restart |
|
useLuajit |
boolean Use JIT for lua scripts and functions |
|
ioThreadsAllowed |
boolean Allow redis to use io-threads |
|
zsetMaxListpackEntries |
string (int64) Controls max number of entries in zset before conversion from memory-efficient listpack to CPU-efficient hash table and skiplist Acceptable values are 32 to 2048, inclusive. |
|
aofMaxSizePercent |
string (int64) AOF maximum size as a percentage of disk available Acceptable values are 1 to 99, inclusive. |
|
activedefrag |
boolean Enable active (online) memory defragmentation |
|
auditLog |
boolean Enable/disable audit logs for Valkey |
ClientOutputBufferLimit
|
Field |
Description |
|
hardLimit |
string (int64) Total limit in bytes. The minimum value is 0. |
|
softLimit |
string (int64) Limit in bytes during certain time period. The minimum value is 0. |
|
softSeconds |
string (int64) Seconds for soft limit. The minimum value is 0. |
DiskSizeAutoscaling
|
Field |
Description |
|
plannedUsageThreshold |
string (int64) Amount of used storage for automatic disk scaling in the maintenance window, 0 means disabled, in percent. Acceptable values are 0 to 100, inclusive. |
|
emergencyUsageThreshold |
string (int64) Amount of used storage for immediately automatic disk scaling, 0 means disabled, in percent. Acceptable values are 0 to 100, inclusive. |
|
diskSizeLimit |
string (int64) Limit on how large the storage for database instances can automatically grow, in bytes. |
ValkeyModules
|
Field |
Description |
|
valkeySearch |
valkey-search module settings |
|
valkeyJson |
valkey-json module settings |
|
valkeyBloom |
valkey-bloom module settings |
ValkeySearch
|
Field |
Description |
|
enabled |
boolean Enable valkey-search module |
|
readerThreads |
string (int64) Controls the amount of threads executing queries The minimum value is 0. |
|
writerThreads |
string (int64) Controls the amount of threads processing index mutations The minimum value is 0. |
|
version |
string Module version |
ValkeyJson
|
Field |
Description |
|
enabled |
boolean Enable valkey-json module |
|
version |
string Module version |
ValkeyBloom
|
Field |
Description |
|
enabled |
boolean Enable valkey-bloom module |
|
version |
string Module version |
HostSpec
|
Field |
Description |
|
zoneId |
string ID of the availability zone where the host resides. The maximum string length in characters is 50. |
|
subnetId |
string ID of the subnet that the host should belong to. This subnet should be a part The maximum string length in characters is 50. |
|
shardName |
string ID of the Redis shard the host belongs to. The maximum string length in characters is 63. Value must match the regular expression |
|
replicaPriority |
string (int64) A replica with a low priority number is considered better for promotion. |
|
assignPublicIp |
boolean Whether the host should get a public IP address on creation.
|
MaintenanceWindow
A maintenance window settings.
|
Field |
Description |
|
anytime |
object Maintenance operation can be scheduled anytime. Includes only one of the fields The maintenance policy in effect. |
|
weeklyMaintenanceWindow |
Maintenance operation can be scheduled on a weekly basis. Includes only one of the fields The maintenance policy in effect. |
WeeklyMaintenanceWindow
Weelky maintenance window settings.
|
Field |
Description |
|
day |
enum (WeekDay) Day of the week (in
|
|
hour |
string (int64) Hour of the day in UTC (in Acceptable values are 1 to 24, inclusive. |
UserSpec
|
Field |
Description |
|
name |
string Required field. Name of the Redis user. The maximum string length in characters is 32. Value must match the regular expression |
|
passwords[] |
string Password of the Redis user. The maximum number of elements is 1. |
|
permissions |
Set of permissions to grant to the user. |
|
enabled |
boolean Is Redis user enabled |
Permissions
|
Field |
Description |
|
patterns |
string Keys patterns user has permission to. |
|
pubSubChannels |
string Channel patterns user has permissions to. |
|
categories |
string Command categories user has permissions to. |
|
commands |
string Commands user can execute. |
|
sanitizePayload |
string SanitizePayload parameter. |
|
databases |
string Databases parameter. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |