Skip to content

Latest commit

 

History

History
674 lines (395 loc) · 46.3 KB

redis.md

File metadata and controls

674 lines (395 loc) · 46.3 KB

Documentation for scw redis

This API allows you to manage your Managed Databases for Redis™.

Access Control List (ACL) management commands

Network Access Control Lists (ACLs) allow you to manage network inbound traffic by setting up ACL rules.

Add ACL rules for a cluster

Add an additional ACL rule to a Redis™ Database Instance (Redis™ cluster).

Usage:

scw redis acl add [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance you want to add ACL rules to Required
acl-rules.{index}.ip-cidr IPv4 network address of the rule
acl-rules.{index}.description Description of the rule
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Delete an ACL rule for a cluster

Delete an ACL rule of a Redis™ Database Instance (Redis™ cluster). You must specify the acl_id of the rule you want to delete in your request.

Usage:

scw redis acl delete [arg=value ...]

Arguments:

Name Description Argument Specifications
acl-id UUID of the ACL rule you want to delete Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Get an ACL rule

Retrieve information about an ACL rule of a Redis™ Database Instance (Redis™ cluster). You must specify the acl_id of the rule in your request.

Usage:

scw redis acl get <acl-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
acl-id UUID of the ACL rule you want to get Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Set ACL rules for a cluster

Replace all the ACL rules of a Redis™ Database Instance (Redis™ cluster).

Usage:

scw redis acl set [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance where the ACL rules have to be set Required
acl-rules.{index}.ip-cidr IPv4 network address of the rule
acl-rules.{index}.description Description of the rule
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Update an ACL rule for a Redis™ Database Instance (network rule)

Update an ACL rule (IP/description) for a Redis™ Database Instance (Redis™ cluster). This command simulates an update by fetching, deleting, and re-adding the rule.

Usage:

scw redis acl update <acl-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Redis cluster Required
acl-id UUID of the ACL rule to update Required
ip-cidr New IPv4 network address of the rule (optional, defaults to current)
description New description of the rule (optional, defaults to current)
zone Zone to target. If none is passed will use default zone from the config (fr-par-1 fr-par-2

Cluster management commands

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.

Connect to a Redis cluster using locally installed redis-cli

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.

Usage:

scw redis cluster connect <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
private-network Connect by the private network endpoint attached. Default: false
cluster-id UUID of the cluster Required
cli-redis Command line tool to use, default to redis-cli
cli-args Additional arguments to pass to redis-cli
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Examples:

Connect to a Redis cluster

scw redis cluster connect 11111111-1111-1111-1111-111111111111

Connect to a Redis cluster via private network

scw redis cluster connect 11111111-1111-1111-1111-111111111111 private-network=true

Create a Redis™ Database Instance

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.

Usage:

scw redis cluster create [arg=value ...]

Arguments:

Name Description Argument Specifications
project-id Project ID to use. If none is passed the default project ID will be used
name Name of the Database Instance Default: <generated>
version Redis™ engine version of the Database Instance Required
Default: latest
tags.{index} Tags to apply to the Database Instance
node-type Type of node to use for the Database Instance Required
user-name Name of the user created upon Database Instance creation Required
password Password of the user Required
cluster-size Number of nodes in the Redis™ cluster
acl-rules.{index}.ip-cidr IPv4 network address of the rule
acl-rules.{index}.description Description of the rule
endpoints.{index}.private-network.enable-ipam Will configure your Private Network endpoint with Scaleway IPAM service if true Default: false
endpoints.{index}.private-network.id UUID of the Private Network to connect to the Database Instance
endpoints.{index}.private-network.service-ips.{index} Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
endpoints.{index}.private-network.ipam-config Automated configuration of your Private Network endpoint with Scaleway IPAM service.
endpoints.{index}.public-network Public network specification details
tls-enabled Defines whether or not TLS is enabled
cluster-settings.{index}.value Value of the setting
cluster-settings.{index}.name Name of the setting
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Delete a Redis™ Database Instance

Delete a Redis™ Database Instance (Redis™ cluster), specified by the region and cluster_id parameters. Deleting a Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost.

Usage:

scw redis cluster delete <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance to delete Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Get a Redis™ Database Instance

Retrieve information about a Redis™ Database Instance (Redis™ cluster). Specify the cluster_id and region in your request to get information such as id, status, version, tls_enabled, cluster_settings, upgradable_versions and endpoints about your cluster in the response.

Usage:

scw redis cluster get <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the cluster Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Get the TLS certificate of a cluster

Retrieve information about the TLS certificate of a Redis™ Database Instance (Redis™ cluster). Details like name and content are returned in the response.

Usage:

scw redis cluster get-certificate <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the cluster Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

List Redis™ Database Instances

List all Redis™ Database Instances (Redis™ cluster) in the specified zone. By default, the Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as tags, name, organization_id and version.

Usage:

scw redis cluster list [arg=value ...]

Arguments:

Name Description Argument Specifications
tags.{index} Filter by Database Instance tags
name Filter by Database Instance names
order-by Criteria to use when ordering the list One of: created_at_asc, created_at_desc, name_asc, name_desc
project-id Filter by Project ID
version Filter by Redis™ engine version
organization-id Filter by Organization ID
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2, all

Get metrics of a Redis™ Database Instance

Retrieve the metrics of a Redis™ Database Instance (Redis™ cluster). You can define the period from which to retrieve metrics by specifying the start_date and end_date.

Usage:

scw redis cluster metrics <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the cluster Required
start-at Start date
end-at End date
metric-name Name of the metric to gather
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Scale up a Redis™ Database Instance

Upgrade your Redis™ Database Instance, either by upgrading to a bigger node type (vertical scaling) or by adding more nodes to your Database Instance to increase your number of endpoints and distribute cache (horizontal scaling, available for clusters only). Note that scaling horizontally your Redis™ Database Instance will not renew its TLS certificate. In order to refresh the TLS certificate, you must use the Renew TLS certificate endpoint.

Usage:

scw redis cluster migrate <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
version Redis™ engine version of the Database Instance
node-type Type of node to use for the Database Instance
cluster-size Number of nodes for the Database Instance
cluster-id UUID of the Database Instance to update Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Renew the TLS certificate of a cluster

Renew a TLS certificate for a Redis™ Database Instance (Redis™ cluster). Renewing a certificate means that you will not be able to connect to your Database Instance using the previous certificate. You will also need to download and update the new certificate for all database clients.

Usage:

scw redis cluster renew-certificate <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the cluster Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Update a Redis™ Database Instance

Update the parameters of a Redis™ Database Instance (Redis™ cluster), including name, tags, user_name and password.

Usage:

scw redis cluster update <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
name Name of the Database Instance
tags.{index} Database Instance tags
user-name Name of the Database Instance user
password Password of the Database Instance user
cluster-id UUID of the Database Instance to update Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Wait for a Redis cluster to reach a stable state

Wait for a Redis cluster to reach a stable state. This is similar to using --wait flag.

Usage:

scw redis cluster wait <cluster-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id ID of the cluster you want to wait for Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2
timeout Timeout of the wait Default: 15m0s

Examples:

Wait for a Redis cluster to reach a stable state

scw redis cluster wait

Endpoints management commands

Manage endpoint access to your Redis™ Database Instance through Public or Private Networks.

Add endpoints for a cluster

Add a new endpoint for a Redis™ Database Instance (Redis™ cluster). You can add private_network or public_network specifications to the body of the request.

Usage:

scw redis endpoint add [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance you want to add endpoints to Required
endpoints.{index}.private-network.id UUID of the Private Network to connect to the Database Instance
endpoints.{index}.private-network.service-ips.{index} Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
endpoints.{index}.private-network.ipam-config Automated configuration of your Private Network endpoint with Scaleway IPAM service.
endpoints.{index}.public-network Public network specification details
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Delete an endpoint for a cluster

Delete the endpoint of a Redis™ Database Instance (Redis™ cluster). You must specify the region and endpoint_id parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint.

Usage:

scw redis endpoint delete [arg=value ...]

Arguments:

Name Description Argument Specifications
endpoint-id UUID of the endpoint you want to delete Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Get an endpoint

Retrieve information about a Redis™ Database Instance (Redis™ cluster) endpoint. Full details about the endpoint, like ips, port, private_network and public_network specifications are returned in the response.

Usage:

scw redis endpoint get <endpoint-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
endpoint-id UUID of the endpoint you want to get Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Set endpoints for a cluster

Update an endpoint for a Redis™ Database Instance (Redis™ cluster). You must specify the cluster_id and the endpoints parameters in your request.

Usage:

scw redis endpoint set [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance where the endpoints have to be set Required
endpoints.{index}.private-network.id UUID of the Private Network to connect to the Database Instance
endpoints.{index}.private-network.service-ips.{index} Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
endpoints.{index}.private-network.ipam-config Automated configuration of your Private Network endpoint with Scaleway IPAM service.
endpoints.{index}.public-network Public network specification details
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Update an endpoint

Update information about a Redis™ Database Instance (Redis™ cluster) endpoint. Full details about the endpoint, like ips, port, private_network and public_network specifications are returned in the response.

Usage:

scw redis endpoint update <endpoint-id ...> [arg=value ...]

Arguments:

Name Description Argument Specifications
endpoint-id UUID of the endpoint you want to get Required
private-network.id UUID of the Private Network to connect to the Database Instance
private-network.service-ips.{index} Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
private-network.ipam-config Automated configuration of your Private Network endpoint with Scaleway IPAM service.
public-network Public network details
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Node Types management commands

Nodes are the compute units that make up your Redis™ Database Instance. Different node types are available with varying amounts of RAM and vCPU.

List available node types

List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

Usage:

scw redis node-type list [arg=value ...]

Arguments:

Name Description Argument Specifications
include-disabled-types Defines whether or not to include disabled types
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2, all

Settings management commands

Advanced settings allow you to tune the behavior of your Redis™ database engine to better fit your needs. Available settings depend on the version of the Redis™ engine. Note that some settings can only be defined upon the Redis™ engine initialization. These are called init settings. You can find a full list of the settings available in the response body of the list available Redis™ versions endpoint.

Each advanced setting entry has a default value that users can override. The deletion of a setting entry will restore the setting to default value. Some of the defaults values can be different from the engine's defaults, as we optimize them to the Scaleway platform.

Add advanced settings

Add an advanced setting to a Redis™ Database Instance (Redis™ cluster). You must set the name and the value of each setting.

Usage:

scw redis setting add [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance you want to add settings to Required
settings.{index}.value Value of the setting
settings.{index}.name Name of the setting
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Delete advanced setting

Delete an advanced setting in a Redis™ Database Instance (Redis™ cluster). You must specify the names of the settings you want to delete in the request body.

Usage:

scw redis setting delete [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance where the settings must be set Required
setting-name Setting name to delete Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Set advanced settings

Update an advanced setting for a Redis™ Database Instance (Redis™ cluster). Settings added upon database engine initialization can only be defined once, and cannot, therefore, be updated.

Usage:

scw redis setting set [arg=value ...]

Arguments:

Name Description Argument Specifications
cluster-id UUID of the Database Instance where the settings must be set Required
settings.{index}.value Value of the setting
settings.{index}.name Name of the setting
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Redis™ version management commands

The Redis™ database engine versions available at Scaleway for your clusters.

List available Redis™ versions

List the Redis™ database engine versions available. You can define additional parameters for your query, such as include_disabled, include_beta, include_deprecated and version.

Usage:

scw redis version list [arg=value ...]

Arguments:

Name Description Argument Specifications
include-disabled Defines whether or not to include disabled Redis™ engine versions
include-beta Defines whether or not to include beta Redis™ engine versions
include-deprecated Defines whether or not to include deprecated Redis™ engine versions
version List Redis™ engine versions that match a given name pattern
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2, all

List available settings from a Redis™ version

List available settings from a Redis™ version.

Usage:

scw redis version list-settings [arg=value ...]

Arguments:

Name Description Argument Specifications
version Redis™ engine version Required
zone Zone to target. If none is passed will use default zone from the config Default: fr-par-1
One of: fr-par-1, fr-par-2, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2

Examples:

List settings for Redis™ 8.6.6

scw redis version list-settings version=8.6.6