GetVolumeSnapshot
Volume snapshots are saved instances of a block storage volume. Use this data source to retrieve the ID of a DigitalOcean volume snapshot for use in other resources.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var snapshot = Output.Create(DigitalOcean.GetVolumeSnapshot.InvokeAsync(new DigitalOcean.GetVolumeSnapshotArgs
{
MostRecent = true,
NameRegex = "^web",
Region = "nyc3",
}));
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
snapshot = digitalocean.get_volume_snapshot(most_recent=True,
name_regex="^web",
region="nyc3")import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const snapshot = pulumi.output(digitalocean.getVolumeSnapshot({
mostRecent: true,
nameRegex: "^web",
region: "nyc3",
}, { async: true }));Using GetVolumeSnapshot
function getVolumeSnapshot(args: GetVolumeSnapshotArgs, opts?: InvokeOptions): Promise<GetVolumeSnapshotResult>function get_volume_snapshot(most_recent=None, name=None, name_regex=None, region=None, opts=None)func LookupVolumeSnapshot(ctx *Context, args *LookupVolumeSnapshotArgs, opts ...InvokeOption) (*LookupVolumeSnapshotResult, error)Note: This function is named
LookupVolumeSnapshotin the Go SDK.
public static class GetVolumeSnapshot {
public static Task<GetVolumeSnapshotResult> InvokeAsync(GetVolumeSnapshotArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Most
Recent bool If more than one result is returned, use the most recent volume snapshot.
- Name string
The name of the volume snapshot.
- Name
Regex string A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
- Region string
A “slug” representing a DigitalOcean region (e.g.
nyc1). If set, only volume snapshots available in the region will be returned.
- Most
Recent bool If more than one result is returned, use the most recent volume snapshot.
- Name string
The name of the volume snapshot.
- Name
Regex string A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
- Region string
A “slug” representing a DigitalOcean region (e.g.
nyc1). If set, only volume snapshots available in the region will be returned.
- most
Recent boolean If more than one result is returned, use the most recent volume snapshot.
- name string
The name of the volume snapshot.
- name
Regex string A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
- region string
A “slug” representing a DigitalOcean region (e.g.
nyc1). If set, only volume snapshots available in the region will be returned.
- most_
recent bool If more than one result is returned, use the most recent volume snapshot.
- name str
The name of the volume snapshot.
- name_
regex str A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
- region str
A “slug” representing a DigitalOcean region (e.g.
nyc1). If set, only volume snapshots available in the region will be returned.
GetVolumeSnapshot Result
The following output properties are available:
- 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.
- List<string>
A list of the tags associated to the volume snapshot.
- Volume
Id string The ID of the volume from which the volume snapshot originated.
- Most
Recent bool - Name string
- Name
Regex string - Region string
- 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.
- []string
A list of the tags associated to the volume snapshot.
- Volume
Id string The ID of the volume from which the volume snapshot originated.
- Most
Recent bool - Name string
- Name
Regex string - Region string
- 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 string[]
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 associated to the volume snapshot.
- volume
Id string The ID of the volume from which the volume snapshot originated.
- most
Recent boolean - name string
- name
Regex string - region string
- 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[str]
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 associated to the volume snapshot.
- volume_
id str The ID of the volume from which the volume snapshot originated.
- most_
recent bool - name str
- name_
regex str - region str
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.