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,
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
foobar_volume = digitalocean.Volume("foobarVolume",
region="nyc1",
size=100,
description="an example volume")
foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobarVolumeSnapshot", volume_id=foobar_volume.id)import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const foobarVolume = new digitalocean.Volume("foobarVolume", {
region: "nyc1",
size: 100,
description: "an example volume",
});
const foobarVolumeSnapshot = new digitalocean.VolumeSnapshot("foobarVolumeSnapshot", {volumeId: foobarVolume.id});Create a VolumeSnapshot Resource
new VolumeSnapshot(name: string, args: VolumeSnapshotArgs, opts?: CustomResourceOptions);def VolumeSnapshot(resource_name, opts=None, name=None, tags=None, volume_id=None, __props__=None);func NewVolumeSnapshot(ctx *Context, name string, args VolumeSnapshotArgs, opts ...ResourceOption) (*VolumeSnapshot, error)public VolumeSnapshot(string name, VolumeSnapshotArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args VolumeSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VolumeSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VolumeSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
VolumeSnapshot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The VolumeSnapshot resource accepts the following input properties:
- Volume
Id string The ID of the volume from which the volume snapshot originated.
- Name string
A name for the volume snapshot.
- List<string>
A list of the tags to be applied to this volume snapshot.
Outputs
All input properties are implicitly available as output properties. Additionally, the VolumeSnapshot resource produces the following output properties:
- Created
At string The date and time the volume snapshot was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Disk intSize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- Regions List<string>
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- Size double
The billable size of the volume snapshot in gigabytes.
- Created
At string The date and time the volume snapshot was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Disk intSize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- Regions []string
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- Size float64
The billable size of the volume snapshot in gigabytes.
- created
At string The date and time the volume snapshot was created.
- id string
- The provider-assigned unique ID for this managed resource.
- min
Disk numberSize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- regions Region[]
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- size number
The billable size of the volume snapshot in gigabytes.
- created_
at str The date and time the volume snapshot was created.
- id str
- The provider-assigned unique ID for this managed resource.
- min_
disk_ floatsize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- regions List[Region]
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- size float
The billable size of the volume snapshot in gigabytes.
Look up an Existing VolumeSnapshot Resource
Get an existing VolumeSnapshot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VolumeSnapshotState, opts?: CustomResourceOptions): VolumeSnapshotstatic get(resource_name, id, opts=None, created_at=None, min_disk_size=None, name=None, regions=None, size=None, tags=None, volume_id=None, __props__=None);func GetVolumeSnapshot(ctx *Context, name string, id IDInput, state *VolumeSnapshotState, opts ...ResourceOption) (*VolumeSnapshot, error)public static VolumeSnapshot Get(string name, Input<string> id, VolumeSnapshotState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Created
At string The date and time the volume snapshot was created.
- Min
Disk intSize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- Name string
A name for the volume snapshot.
- Regions List<string>
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- Size double
The billable size of the volume snapshot in gigabytes.
- List<string>
A list of the tags to be applied to this volume snapshot.
- Volume
Id string The ID of the volume from which the volume snapshot originated.
- Created
At string The date and time the volume snapshot was created.
- Min
Disk intSize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- Name string
A name for the volume snapshot.
- Regions []string
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- Size float64
The billable size of the volume snapshot in gigabytes.
- []string
A list of the tags to be applied to this volume snapshot.
- Volume
Id string The ID of the volume from which the volume snapshot originated.
- created
At string The date and time the volume snapshot was created.
- min
Disk numberSize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- name string
A name for the volume snapshot.
- regions Region[]
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- size number
The billable size of the volume snapshot in gigabytes.
- string[]
A list of the tags to be applied to this volume snapshot.
- volume
Id string The ID of the volume from which the volume snapshot originated.
- created_
at str The date and time the volume snapshot was created.
- min_
disk_ floatsize The minimum size in gigabytes required for a volume to be created based on this volume snapshot.
- name str
A name for the volume snapshot.
- regions List[Region]
A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.
- size float
The billable size of the volume snapshot in gigabytes.
- List[str]
A list of the tags to be applied to this volume snapshot.
- volume_
id str The ID of the volume from which the volume snapshot originated.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.