addRedis

Method
📦 Aspire.Hosting.Redis v17.0.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addRedis(
name: string,
port?: number,
password?: ParameterResource): RedisResource;
}

Signature

methodaddRedisbuilder
Adds a Redis container to the application model.
addRedis(
name: string,
port?: number,
password?: ParameterResource): RedisResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
portnumberoptionalThe host port to bind the underlying container to.
passwordParameterResourceoptionalThe parameter used to provide the password for the Redis resource. If `null` a random password will be generated.
RedisResource

Applies to

This method applies to the following types: