Show / Hide Table of Contents

Class Volume

Creates and destroys a volume in Docker. This can be used alongside docker_container to prepare volumes that can be shared across containers.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
public MyStack()
{
    // Creates a docker volume "shared_volume".
    var sharedVolume = new Docker.Volume("sharedVolume", new Docker.VolumeArgs
    {
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Volume
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Docker
Assembly: Pulumi.Docker.dll
Syntax
public class Volume : CustomResource

Constructors

View Source

Volume(String, VolumeArgs, CustomResourceOptions)

Create a Volume resource with the given unique name, arguments, and options.

Declaration
public Volume(string name, VolumeArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

VolumeArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Driver

Driver type for the volume (defaults to local).

Declaration
public Output<string> Driver { get; }
Property Value
Type Description
Output<System.String>
View Source

DriverOpts

Options specific to the driver.

Declaration
public Output<ImmutableDictionary<string, object>> DriverOpts { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Labels

User-defined key/value metadata.

Declaration
public Output<ImmutableArray<VolumeLabel>> Labels { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<VolumeLabel>>
View Source

Mountpoint

Declaration
public Output<string> Mountpoint { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the Docker volume (generated if not provided).

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, VolumeState, CustomResourceOptions)

Get an existing Volume resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Volume Get(string name, Input<string> id, VolumeState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

VolumeState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Volume
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.