RedisBuilderExtensions.AddRedis Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a Redis container to the application model.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RedisResource> AddRedis (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, int? port = default);
static member AddRedis : Aspire.Hosting.IDistributedApplicationBuilder * string * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.RedisResource>
<Extension()>
Public Function AddRedis (builder As IDistributedApplicationBuilder, name As String, Optional port As Nullable(Of Integer) = Nothing) As IResourceBuilder(Of RedisResource)
Parameters
- name
- String
The name of the resource. This name will be used as the connection string name when referenced in a dependency.
Returns
A reference to the IResourceBuilder<T>.
Remarks
The default image is "redis" and the tag is "7.2.4".
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for