Service.AddVolume(Volume) 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 volume to the service's list of volumes. If the volumes collection is null, it initializes a new collection before adding the volume.
public Aspire.Hosting.Docker.Resources.ComposeNodes.Service AddVolume(Aspire.Hosting.Docker.Resources.ServiceNodes.Volume volume);
member this.AddVolume : Aspire.Hosting.Docker.Resources.ServiceNodes.Volume -> Aspire.Hosting.Docker.Resources.ComposeNodes.Service
Public Function AddVolume (volume As Volume) As Service
Parameters
- volume
- Volume
The volume to be added to the service.
Returns
The updated Service instance with the added volume.