Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddValkey

Method
📦 Aspire.Hosting.Valkey v17.0.0
func (DistributedApplicationBuilder) AddValkey(
name string,
options ...*AddValkeyOptions,
) ValkeyResource

Signature

methodAddValkeybuilder
Adds a Valkey container to the application model.
AddValkey(
name string,
options ...*AddValkeyOptions,
) ValkeyResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddValkeyOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddValkeyOptions argument.

Port*float64The host port to bind the underlying container to.
Password*ParameterResourceThe parameter used to provide the password for the Valkey resource. If null a random password will be generated.
ValkeyResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder