List
Retrieves the list of Redis clusters that belong to the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListClustersRequest =
cloudApi.dataproc.cluster_service.ListClustersRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ClusterServiceClient);
const result = await client.list(
ListClustersRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.cluster_service_pb2_grpc import ClusterServiceStub
from yandex.cloud.dataproc.v1.cluster_service_pb2 import ListClustersRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ClusterServiceStub)
response = service.List(
ListClustersRequest(
folder_id="folderId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListClustersRequest
folderId
: string
ID of the folder to list Redis clusters in. To get the folder ID, use a yandex.cloud.resourcemanager.v1.FolderService.List request.
pageSize
: int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListClustersResponse.next_page_token that can be used to get the next page of results in subsequent list requests.
pageToken
: string
Page token. To get the next page of results, set page_token to the ListClustersResponse.next_page_token returned by the previous list request.
filter
: string
A filter expression that filters clusters listed in the response. The expression must specify:
- The field name. Currently you can only use filtering with the Cluster.name field.
- An
=
operator. - The value in double quotes (
"
). Must be 3-63 characters long and match the regular expression[a-z]([-a-z0-9]{,61}[a-z0-9])?
.
ListClustersResponse
clusters
: Cluster
List of Redis clusters.
nextPageToken
: string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListClustersRequest.page_size, use the next_page_token as the value for the ListClustersRequest.page_token parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.
Cluster
Description of a Redis cluster. For more information, see the Managed Service for Redis documentation.
Environment
ENVIRONMENT_UNSPECIFIED
PRODUCTION
Stable environment with a conservative update policy: only hotfixes are applied during regular maintenance.
PRESTABLE
Environment with more aggressive update policy: new versions are rolled out irrespective of backward compatibility.
Health
HEALTH_UNKNOWN
Cluster is in unknown state (we have no data)
ALIVE
Cluster is alive and well (all hosts are alive)
DEAD
Cluster is inoperable (it cannot perform any of its essential functions)
DEGRADED
Cluster is partially alive (it can perform some of its essential functions)
Status
STATUS_UNKNOWN
Cluster status is unknown
CREATING
Cluster is being created
RUNNING
Cluster is running
ERROR
Cluster failed
UPDATING
Cluster is being updated.
STOPPING
Cluster is stopping.
STOPPED
Cluster stopped.
STARTING
Cluster is starting.
PersistenceMode
ON
cluster persistence mode on
OFF
cluster persistence mode off
id
: string
ID of the Redis cluster. This ID is assigned by MDB at creation time.
folderId
: string
ID of the folder that the Redis cluster belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name
: string
Name of the Redis cluster. The name is unique within the folder. 3-63 characters long.
description
: string
Description of the Redis cluster. 0-256 characters long.
labels
: string
Custom labels for the Redis cluster as key:value
pairs.
Maximum 64 per cluster.
environment
: Environment
Deployment environment of the Redis cluster.
monitoring
: Monitoring
Description of monitoring systems relevant to the Redis cluster.
config
: ClusterConfig
Configuration of the Redis cluster.
networkId
: string
health
: Health
Aggregated cluster health.
status
: Status
Cluster status.
sharded
: bool
Redis cluster mode on/off.
maintenanceWindow
: MaintenanceWindow
Maintenance window for the cluster.
plannedOperation
: MaintenanceOperation
Planned maintenance operation to be started for the cluster within the nearest maintenance_window.
securityGroupIds
: string
User security groups
tlsEnabled
: bool
TLS port and functionality on\off
deletionProtection
: bool
Deletion Protection inhibits deletion of the cluster
persistenceMode
: PersistenceMode
Persistence mode
announceHostnames
: bool
Enable FQDN instead of ip
Monitoring
name
: string
Name of the monitoring system.
description
: string
Description of the monitoring system.
link
: string
Link to the monitoring system charts for the Redis cluster.
ClusterConfig
version
: string
Version of Redis server software.
One of redisConfig
Configuration for Redis servers in the cluster.
redisConfig_5_0
: config.RedisConfigSet5_0Configuration of a Redis 5.0 server.
redisConfig_6_0
: config.RedisConfigSet6_0Configuration of a Redis 6.0 server.
redisConfig_6_2
: config.RedisConfigSet6_2Configuration of a Redis 6.2 server.
redisConfig_7_0
: config.RedisConfigSet7_0Configuration of a Redis 7.0 server.
resources
: Resources
Resources allocated to Redis hosts.
backupWindowStart
: google.type.TimeOfDay
Time to start the daily backup, in the UTC timezone.
access
: Access
Access policy to DB
redis
: config.RedisConfigSet
Unified configuration of a Redis cluster.
diskSizeAutoscaling
: DiskSizeAutoscaling
Disk size autoscaling settings
MaintenanceWindow
A maintenance window settings.
One of policy
The maintenance policy in effect.
anytime
: AnytimeMaintenanceWindowMaintenance operation can be scheduled anytime.
weeklyMaintenanceWindow
: WeeklyMaintenanceWindowMaintenance operation can be scheduled on a weekly basis.
MaintenanceOperation
A planned maintenance operation.
info
: string
Information about this maintenance operation.
delayedUntil
: google.protobuf.Timestamp
Time until which this maintenance operation is delayed.
RedisConfigSet5_0
effectiveConfig
: RedisConfig5_0
Effective settings for a Redis 5.0 cluster (a combination of settings defined in user_config and default_config).
userConfig
: RedisConfig5_0
User-defined settings for a Redis 5.0 cluster.
defaultConfig
: RedisConfig5_0
Default configuration for a Redis 5.0 cluster.
RedisConfigSet6_0
effectiveConfig
: RedisConfig6_0
Effective settings for a Redis 6.0 cluster (a combination of settings defined in user_config and default_config).
userConfig
: RedisConfig6_0
User-defined settings for a Redis 6.0 cluster.
defaultConfig
: RedisConfig6_0
Default configuration for a Redis 6.0 cluster.
RedisConfigSet6_2
effectiveConfig
: RedisConfig6_2
Effective settings for a Redis 6.2 cluster (a combination of settings defined in user_config and default_config).
userConfig
: RedisConfig6_2
User-defined settings for a Redis 6.2 cluster.
defaultConfig
: RedisConfig6_2
Default configuration for a Redis 6.2 cluster.
RedisConfigSet7_0
effectiveConfig
: RedisConfig7_0
Effective settings for a Redis 7.0 cluster (a combination of settings defined in user_config and default_config).
userConfig
: RedisConfig7_0
User-defined settings for a Redis 7.0 cluster.
defaultConfig
: RedisConfig7_0
Default configuration for a Redis 7.0 cluster.
Resources
resourcePresetId
: string
ID of the preset for computational resources available to a host (CPU, memory etc.). All available presets are listed in the documentation.
diskSize
: int64
Volume of the storage available to a host, in bytes.
diskTypeId
: string
Type of the storage environment for the host. Possible values:
- network-ssd - network SSD drive,
- local-ssd - local SSD storage.
Access
dataLens
: bool
Allow access for DataLens
webSql
: bool
Allow access for Web SQL.
RedisConfigSet
effectiveConfig
: RedisConfig
Effective settings for a Redis cluster (a combination of settings defined in user_config and default_config).
userConfig
: RedisConfig
User-defined settings for a Redis cluster.
defaultConfig
: RedisConfig
Default configuration for a Redis cluster.
DiskSizeAutoscaling
plannedUsageThreshold
: google.protobuf.Int64Value
Amount of used storage for automatic disk scaling in the maintenance window, 0 means disabled, in percent.
emergencyUsageThreshold
: google.protobuf.Int64Value
Amount of used storage for immediately automatic disk scaling, 0 means disabled, in percent.
diskSizeLimit
: google.protobuf.Int64Value
Limit on how large the storage for database instances can automatically grow, in bytes.
AnytimeMaintenanceWindow
WeeklyMaintenanceWindow
Weelky maintenance window settings.
WeekDay
WEEK_DAY_UNSPECIFIED
MON
TUE
WED
THU
FRI
SAT
SUN
day
: WeekDay
Day of the week (in DDD
format).
hour
: int64
Hour of the day in UTC (in HH
format).
RedisConfig5_0
Fields and structure of RedisConfig
reflects Redis configuration file
parameters.
MaxmemoryPolicy
MAXMEMORY_POLICY_UNSPECIFIED
VOLATILE_LRU
Try to remove less recently used (LRU) keys with
expire set
.ALLKEYS_LRU
Remove less recently used (LRU) keys.
VOLATILE_LFU
Try to remove least frequently used (LFU) keys with
expire set
.ALLKEYS_LFU
Remove least frequently used (LFU) keys.
VOLATILE_RANDOM
Try to remove keys with
expire set
randomly.ALLKEYS_RANDOM
Remove keys randomly.
VOLATILE_TTL
Try to remove less recently used (LRU) keys with
expire set
and shorter TTL first.NOEVICTION
Return errors when memory limit was reached and commands could require more memory to be used.
ClientOutputBufferLimit
hardLimit
: google.protobuf.Int64Value
Total limit in bytes.
softLimit
: google.protobuf.Int64Value
Limit in bytes during certain time period.
softSeconds
: google.protobuf.Int64Value
Seconds for soft limit.
maxmemoryPolicy
: MaxmemoryPolicy
Redis key eviction policy for a dataset that reaches maximum memory, available to the host. Redis maxmemory setting depends on Managed Service for Redis host class.
All policies are described in detail in Redis documentation.
timeout
: google.protobuf.Int64Value
Time that Redis keeps the connection open while the client is idle. If no new command is sent during that time, the connection is closed.
password
: string
Authentication password.
databases
: google.protobuf.Int64Value
Number of database buckets on a single redis-server process.
slowlogLogSlowerThan
: google.protobuf.Int64Value
Threshold for logging slow requests to server in microseconds (log only slower than it).
slowlogMaxLen
: google.protobuf.Int64Value
Max slow requests number to log.
notifyKeyspaceEvents
: string
String setting for pub\sub functionality.
clientOutputBufferLimitPubsub
: ClientOutputBufferLimit
Redis connection output buffers limits for pubsub operations.
clientOutputBufferLimitNormal
: ClientOutputBufferLimit
Redis connection output buffers limits for clients.
RedisConfig6_0
Fields and structure of RedisConfig
reflects Redis configuration file
parameters.
MaxmemoryPolicy
MAXMEMORY_POLICY_UNSPECIFIED
VOLATILE_LRU
Try to remove less recently used (LRU) keys with
expire set
.ALLKEYS_LRU
Remove less recently used (LRU) keys.
VOLATILE_LFU
Try to remove least frequently used (LFU) keys with
expire set
.ALLKEYS_LFU
Remove least frequently used (LFU) keys.
VOLATILE_RANDOM
Try to remove keys with
expire set
randomly.ALLKEYS_RANDOM
Remove keys randomly.
VOLATILE_TTL
Try to remove less recently used (LRU) keys with
expire set
and shorter TTL first.NOEVICTION
Return errors when memory limit was reached and commands could require more memory to be used.
ClientOutputBufferLimit
hardLimit
: google.protobuf.Int64Value
Total limit in bytes.
softLimit
: google.protobuf.Int64Value
Limit in bytes during certain time period.
softSeconds
: google.protobuf.Int64Value
Seconds for soft limit.
maxmemoryPolicy
: MaxmemoryPolicy
Redis key eviction policy for a dataset that reaches maximum memory, available to the host. Redis maxmemory setting depends on Managed Service for Redis host class.
All policies are described in detail in Redis documentation.
timeout
: google.protobuf.Int64Value
Time that Redis keeps the connection open while the client is idle. If no new command is sent during that time, the connection is closed.
password
: string
Authentication password.
databases
: google.protobuf.Int64Value
Number of database buckets on a single redis-server process.
slowlogLogSlowerThan
: google.protobuf.Int64Value
Threshold for logging slow requests to server in microseconds (log only slower than it).
slowlogMaxLen
: google.protobuf.Int64Value
Max slow requests number to log.
notifyKeyspaceEvents
: string
String setting for pub\sub functionality.
clientOutputBufferLimitPubsub
: ClientOutputBufferLimit
Redis connection output buffers limits for pubsub operations.
clientOutputBufferLimitNormal
: ClientOutputBufferLimit
Redis connection output buffers limits for clients.
RedisConfig6_2
Fields and structure of RedisConfig
reflects Redis configuration file
parameters.
MaxmemoryPolicy
MAXMEMORY_POLICY_UNSPECIFIED
VOLATILE_LRU
Try to remove less recently used (LRU) keys with
expire set
.ALLKEYS_LRU
Remove less recently used (LRU) keys.
VOLATILE_LFU
Try to remove least frequently used (LFU) keys with
expire set
.ALLKEYS_LFU
Remove least frequently used (LFU) keys.
VOLATILE_RANDOM
Try to remove keys with
expire set
randomly.ALLKEYS_RANDOM
Remove keys randomly.
VOLATILE_TTL
Try to remove less recently used (LRU) keys with
expire set
and shorter TTL first.NOEVICTION
Return errors when memory limit was reached and commands could require more memory to be used.
ClientOutputBufferLimit
hardLimit
: google.protobuf.Int64Value
Total limit in bytes.
softLimit
: google.protobuf.Int64Value
Limit in bytes during certain time period.
softSeconds
: google.protobuf.Int64Value
Seconds for soft limit.
maxmemoryPolicy
: MaxmemoryPolicy
Redis key eviction policy for a dataset that reaches maximum memory, available to the host. Redis maxmemory setting depends on Managed Service for Redis host class.
All policies are described in detail in Redis documentation.
timeout
: google.protobuf.Int64Value
Time that Redis keeps the connection open while the client is idle. If no new command is sent during that time, the connection is closed.
password
: string
Authentication password.
databases
: google.protobuf.Int64Value
Number of database buckets on a single redis-server process.
slowlogLogSlowerThan
: google.protobuf.Int64Value
Threshold for logging slow requests to server in microseconds (log only slower than it).
slowlogMaxLen
: google.protobuf.Int64Value
Max slow requests number to log.
notifyKeyspaceEvents
: string
String setting for pub\sub functionality.
clientOutputBufferLimitPubsub
: ClientOutputBufferLimit
Redis connection output buffers limits for pubsub operations.
clientOutputBufferLimitNormal
: ClientOutputBufferLimit
Redis connection output buffers limits for clients.
maxmemoryPercent
: google.protobuf.Int64Value
Redis maxmemory percent
RedisConfig7_0
Fields and structure of RedisConfig
reflects Redis configuration file
parameters.
MaxmemoryPolicy
MAXMEMORY_POLICY_UNSPECIFIED
VOLATILE_LRU
Try to remove less recently used (LRU) keys with
expire set
.ALLKEYS_LRU
Remove less recently used (LRU) keys.
VOLATILE_LFU
Try to remove least frequently used (LFU) keys with
expire set
.ALLKEYS_LFU
Remove least frequently used (LFU) keys.
VOLATILE_RANDOM
Try to remove keys with
expire set
randomly.ALLKEYS_RANDOM
Remove keys randomly.
VOLATILE_TTL
Try to remove less recently used (LRU) keys with
expire set
and shorter TTL first.NOEVICTION
Return errors when memory limit was reached and commands could require more memory to be used.
ClientOutputBufferLimit
hardLimit
: google.protobuf.Int64Value
Total limit in bytes.
softLimit
: google.protobuf.Int64Value
Limit in bytes during certain time period.
softSeconds
: google.protobuf.Int64Value
Seconds for soft limit.
maxmemoryPolicy
: MaxmemoryPolicy
Redis key eviction policy for a dataset that reaches maximum memory, available to the host. Redis maxmemory setting depends on Managed Service for Redis host class.
All policies are described in detail in Redis documentation.
timeout
: google.protobuf.Int64Value
Time that Redis keeps the connection open while the client is idle. If no new command is sent during that time, the connection is closed.
password
: string
Authentication password.
databases
: google.protobuf.Int64Value
Number of database buckets on a single redis-server process.
slowlogLogSlowerThan
: google.protobuf.Int64Value
Threshold for logging slow requests to server in microseconds (log only slower than it).
slowlogMaxLen
: google.protobuf.Int64Value
Max slow requests number to log.
notifyKeyspaceEvents
: string
String setting for pub\sub functionality.
clientOutputBufferLimitPubsub
: ClientOutputBufferLimit
Redis connection output buffers limits for pubsub operations.
clientOutputBufferLimitNormal
: ClientOutputBufferLimit
Redis connection output buffers limits for clients.
maxmemoryPercent
: google.protobuf.Int64Value
Redis maxmemory percent
RedisConfig
Fields and structure of RedisConfig
reflects Redis configuration file
parameters.
MaxmemoryPolicy
MAXMEMORY_POLICY_UNSPECIFIED
VOLATILE_LRU
Try to remove less recently used (LRU) keys with
expire set
.ALLKEYS_LRU
Remove less recently used (LRU) keys.
VOLATILE_LFU
Try to remove least frequently used (LFU) keys with
expire set
.ALLKEYS_LFU
Remove least frequently used (LFU) keys.
VOLATILE_RANDOM
Try to remove keys with
expire set
randomly.ALLKEYS_RANDOM
Remove keys randomly.
VOLATILE_TTL
Try to remove less recently used (LRU) keys with
expire set
and shorter TTL first.NOEVICTION
Return errors when memory limit was reached and commands could require more memory to be used.
ClientOutputBufferLimit
hardLimit
: google.protobuf.Int64Value
Total limit in bytes.
softLimit
: google.protobuf.Int64Value
Limit in bytes during certain time period.
softSeconds
: google.protobuf.Int64Value
Seconds for soft limit.
maxmemoryPolicy
: MaxmemoryPolicy
Redis key eviction policy for a dataset that reaches maximum memory, available to the host. Redis maxmemory setting depends on Managed Service for Redis host class.
All policies are described in detail in Redis documentation.
timeout
: google.protobuf.Int64Value
Time that Redis keeps the connection open while the client is idle. If no new command is sent during that time, the connection is closed.
password
: string
Authentication password.
databases
: google.protobuf.Int64Value
Number of database buckets on a single redis-server process.
slowlogLogSlowerThan
: google.protobuf.Int64Value
Threshold for logging slow requests to server in microseconds (log only slower than it).
slowlogMaxLen
: google.protobuf.Int64Value
Max slow requests number to log.
notifyKeyspaceEvents
: string
String setting for pub\sub functionality.
clientOutputBufferLimitPubsub
: ClientOutputBufferLimit
Redis connection output buffers limits for pubsub operations.
clientOutputBufferLimitNormal
: ClientOutputBufferLimit
Redis connection output buffers limits for clients.
maxmemoryPercent
: google.protobuf.Int64Value
Redis maxmemory percent
luaTimeLimit
: google.protobuf.Int64Value
Maximum time in milliseconds for Lua scripts, 0 - disabled mechanism
replBacklogSizePercent
: google.protobuf.Int64Value
Replication backlog size as a percentage of flavor maxmemory
clusterRequireFullCoverage
: google.protobuf.BoolValue
Controls whether all hash slots must be covered by nodes
clusterAllowReadsWhenDown
: google.protobuf.BoolValue
Allows read operations when cluster is down
clusterAllowPubsubshardWhenDown
: google.protobuf.BoolValue
Permits Pub/Sub shard operations when cluster is down
lfuDecayTime
: google.protobuf.Int64Value
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)
lfuLogFactor
: google.protobuf.Int64Value
Determines how the frequency counter represents key hits.
turnBeforeSwitchover
: google.protobuf.BoolValue
Allows to turn before switchover in RDSync
allowDataLoss
: google.protobuf.BoolValue
Allows some data to be lost in favor of faster switchover/restart
ClientOutputBufferLimit
hardLimit
: google.protobuf.Int64Value
Total limit in bytes.
softLimit
: google.protobuf.Int64Value
Limit in bytes during certain time period.
softSeconds
: google.protobuf.Int64Value
Seconds for soft limit.