godo.Databases.UpdateValkeyConfig()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Databases.UpdateValkeyConfig(ctx context.Context, databaseID string, config *godo.ValkeyConfig) (*godo.Response, error)

Description

UpdateValkeyConfig updates the config for a Valkey database cluster.

This method sends a PATCH request to /v2/databases/{}/config.

Parameters

databaseID string required
config *godo.ValkeyConfig required

Fields of godo.ValkeyConfig

ValkeyConfig holds advanced configurations for Valkey database clusters.

ValkeyMaxmemoryPolicy *string

Omitted from JSON when empty. JSON key: valkey_maxmemory_policy

ValkeyIOThreads *int

Omitted from JSON when empty. JSON key: valkey_io_threads

ValkeyLFULogFactor *int

Omitted from JSON when empty. JSON key: valkey_lfu_log_factor

ValkeyLFUDecayTime *int

Omitted from JSON when empty. JSON key: valkey_lfu_decay_time

ValkeySSL *bool

Omitted from JSON when empty. JSON key: valkey_ssl

ValkeyTimeout *int

Omitted from JSON when empty. JSON key: valkey_timeout

ValkeyNotifyKeyspaceEvents *string

Omitted from JSON when empty. JSON key: valkey_notify_keyspace_events

ValkeyPersistence *string

Omitted from JSON when empty. JSON key: valkey_persistence

ValkeyACLChannelsDefault *string

Omitted from JSON when empty. JSON key: valkey_acl_channels_default

FrequentSnapshots *bool

Omitted from JSON when empty. JSON key: frequent_snapshots

ValkeyActiveExpireEffort *int

Omitted from JSON when empty. JSON key: valkey_active_expire_effort

ValkeyPubSubClientOutputBufferLimit *int

Omitted from JSON when empty. JSON key: valkey_pubsub_client_output_buffer_limit

ValkeyNumberOfDatabases *int

Omitted from JSON when empty. JSON key: valkey_number_of_databases

Returns

*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.Response

Response is a DigitalOcean response. This wraps the standard http.Response returned from DigitalOcean.

Response *http.Response
Links *godo.Links

Links that were returned with the response. These are parsed from
request body and not the header.

Meta *godo.Meta

Meta describes generic information about the response.

Monitor string

Monitoring URI

Rate godo.Rate

Request Sample

Show Request Sample
package main

import (
	"context"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	_, err := client.Databases.UpdateValkeyConfig(ctx, "<your-database-id>", &godo.ValkeyConfig{})
	if err != nil {
		log.Fatal(err)
	}
}

More Information

See PATCH /v2/databases/{}/config in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.