withDataVolume
Method
interface RedisResource { // ... omitted for brevity withDataVolume( name?: string, isReadOnly?: boolean): RedisResource;}Signature
method
withDataVolume builderAdds a named volume for the data folder to a Redis container resource and enables Redis persistence.
withDataVolume( name?: string, isReadOnly?: boolean): RedisResourceParameters
namestringoptionalThe name of the volume. Defaults to an auto-generated name based on the application and resource names.isReadOnly booleanoptional= FalseA flag that indicates if this is a read-only volume. Setting this to `true` will disable Redis persistence. Defaults to `false`.Returns
RedisResource Applies to
This method applies to the following types: