Show / Hide Table of Contents

Class Volume

Provides a DigitalOcean Block Storage volume which can be attached to a Droplet in order to provide expanded storage.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var foobarVolume = new DigitalOcean.Volume("foobarVolume", new DigitalOcean.VolumeArgs
    {
        Region = "nyc1",
        Size = 100,
        InitialFilesystemType = "ext4",
        Description = "an example volume",
    });
    var foobarDroplet = new DigitalOcean.Droplet("foobarDroplet", new DigitalOcean.DropletArgs
    {
        Size = "s-1vcpu-1gb",
        Image = "ubuntu-18-04-x64",
        Region = "nyc1",
    });
    var foobarVolumeAttachment = new DigitalOcean.VolumeAttachment("foobarVolumeAttachment", new DigitalOcean.VolumeAttachmentArgs
    {
        DropletId = foobarDroplet.Id,
        VolumeId = foobarVolume.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Volume
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
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.DigitalOcean
Assembly: Pulumi.DigitalOcean.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, 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

Description

A free-form text field up to a limit of 1024 bytes to describe a block storage volume.

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

DropletIds

A list of associated droplet ids.

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

FilesystemLabel

Filesystem label for the block storage volume.

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

FilesystemType

Filesystem type (xfs or ext4) for the block storage volume.

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

InitialFilesystemLabel

Initial filesystem label for the block storage volume.

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

InitialFilesystemType

Initial filesystem type (xfs or ext4) for the block storage volume.

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

Name

A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters.

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

Region

The region that the block storage volume will be created in.

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

Size

The size of the block storage volume in GiB. If updated, can only be expanded.

Declaration
public Output<int> Size { get; }
Property Value
Type Description
Output<System.Int32>
View Source

SnapshotId

The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot

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

Tags

A list of the tags to be applied to this Volume.

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

Urn

The uniform resource name for the volume.

Declaration
public Output<string> Urn { 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.