You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connect to a Redis cluster using locally installed redis-cli. The command will check if redis-cli is installed, download the certificate if TLS is enabled, and prompt for the password.
[private-network=false] Connect by the private network endpoint attached.
17
+
cluster-id UUID of the cluster
18
+
[cli-redis] Command line tool to use, default to redis-cli
19
+
[cli-args] Additional arguments to pass to redis-cli
20
+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
21
+
22
+
FLAGS:
23
+
-h, --help help for connect
24
+
25
+
GLOBAL FLAGS:
26
+
-c, --config string The path to the config file
27
+
-D, --debug Enable debug mode
28
+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
A Redis™ Database Instance, also known as a Redis™ cluster, consists of either one standalone node or a cluster composed of three to six nodes. The cluster uses partitioning to split the keyspace. Each partition is replicated and can be reassigned or elected as the primary when necessary. Standalone mode creates a standalone database provisioned on a single node.
154
155
155
156
157
+
### Connect to a Redis cluster using locally installed redis-cli
158
+
159
+
Connect to a Redis cluster using locally installed redis-cli. The command will check if redis-cli is installed, download the certificate if TLS is enabled, and prompt for the password.
| private-network | Default: `false`| Connect by the private network endpoint attached. |
173
+
| cluster-id | Required | UUID of the cluster |
174
+
| cli-redis || Command line tool to use, default to redis-cli |
175
+
| cli-args || Additional arguments to pass to redis-cli |
176
+
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2`| Zone to target. If none is passed will use default zone from the config |
Create a new Redis™ Database Instance (Redis™ cluster). You must set the `zone`, `project_id`, `version`, `node_type`, `user_name` and `password` parameters. Optionally you can define `acl_rules`, `endpoints`, `tls_enabled` and `cluster_settings`.
// We create a minimal client just to access the Zones() method
374
+
// which doesn't require authentication
375
+
client:=&scw.Client{}
376
+
api:=redis.NewAPI(client)
377
+
378
+
returnapi.Zones()
379
+
}
380
+
381
+
funcclusterConnectCommand() *core.Command {
382
+
return&core.Command{
383
+
Namespace: "redis",
384
+
Resource: "cluster",
385
+
Verb: "connect",
386
+
Short: "Connect to a Redis cluster using locally installed redis-cli",
387
+
Long: "Connect to a Redis cluster using locally installed redis-cli. The command will check if redis-cli is installed, download the certificate if TLS is enabled, and prompt for the password.",
388
+
ArgsType: reflect.TypeOf(clusterConnectArgs{}),
389
+
ArgSpecs: core.ArgSpecs{
390
+
{
391
+
Name: "private-network",
392
+
Short: `Connect by the private network endpoint attached.`,
393
+
Required: false,
394
+
Default: core.DefaultValueSetter("false"),
395
+
},
396
+
{
397
+
Name: "cluster-id",
398
+
Short: `UUID of the cluster`,
399
+
Required: true,
400
+
Positional: true,
401
+
},
402
+
{
403
+
Name: "cli-redis",
404
+
Short: "Command line tool to use, default to redis-cli",
405
+
},
406
+
{
407
+
Name: "cli-args",
408
+
Short: "Additional arguments to pass to redis-cli",
0 commit comments