Class VolumeSnapshot
Provides a DigitalOcean Volume Snapshot which can be used to create a snapshot from an existing volume.
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,
Description = "an example volume",
});
var foobarVolumeSnapshot = new DigitalOcean.VolumeSnapshot("foobarVolumeSnapshot", new DigitalOcean.VolumeSnapshotArgs
{
VolumeId = foobarVolume.Id,
});
}
}
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class VolumeSnapshot : CustomResource
Constructors
View SourceVolumeSnapshot(String, VolumeSnapshotArgs, CustomResourceOptions)
Create a VolumeSnapshot resource with the given unique name, arguments, and options.
Declaration
public VolumeSnapshot(string name, VolumeSnapshotArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VolumeSnapshotArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreatedAt
The date and time the volume snapshot was created.
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MinDiskSize
The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
Declaration
public Output<int> MinDiskSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
A name for the volume snapshot.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Regions
A list of DigitalOcean region "slugs" indicating where the volume snapshot is available.
Declaration
public Output<ImmutableArray<string>> Regions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Size
The billable size of the volume snapshot in gigabytes.
Declaration
public Output<double> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Double> |
Tags
A list of the tags to be applied to this volume snapshot.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
VolumeId
The ID of the volume from which the volume snapshot originated.
Declaration
public Output<string> VolumeId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, VolumeSnapshotState, CustomResourceOptions)
Get an existing VolumeSnapshot resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static VolumeSnapshot Get(string name, Input<string> id, VolumeSnapshotState 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. |
| VolumeSnapshotState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| VolumeSnapshot |