KeycloakResourceBuilderExtensions.WithDataVolume 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 named volume for the data folder to a Keycloak container resource.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource> WithDataVolume (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource> builder, string? name = default);
static member WithDataVolume : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource> * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource>
<Extension()>
Public Function WithDataVolume (builder As IResourceBuilder(Of KeycloakResource), Optional name As String = Nothing) As IResourceBuilder(Of KeycloakResource)
Parameters
- builder
- IResourceBuilder<KeycloakResource>
The resource builder.
- name
- String
The name of the volume. Defaults to an auto-generated name based on the application and resource names.
Returns
The IResourceBuilder<T>.
Examples
Use a data volume
var keycloak = builder.AddKeycloak("keycloak")
.WithDataVolume();
Remarks
The volume is mounted at /opt/keycloak/data in the container.