GetDropletSnapshot
Droplet snapshots are saved instances of a Droplet. Use this data source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other resources.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var web_snapshot = Output.Create(DigitalOcean.GetDropletSnapshot.InvokeAsync(new DigitalOcean.GetDropletSnapshotArgs
{
MostRecent = true,
NameRegex = "^web",
Region = "nyc3",
}));
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
web_snapshot = digitalocean.get_droplet_snapshot(most_recent=True,
name_regex="^web",
region="nyc3")import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const web_snapshot = pulumi.output(digitalocean.getDropletSnapshot({
mostRecent: true,
nameRegex: "^web",
region: "nyc3",
}, { async: true }));Using GetDropletSnapshot
function getDropletSnapshot(args: GetDropletSnapshotArgs, opts?: InvokeOptions): Promise<GetDropletSnapshotResult>function get_droplet_snapshot(most_recent=None, name=None, name_regex=None, region=None, opts=None)func LookupDropletSnapshot(ctx *Context, args *LookupDropletSnapshotArgs, opts ...InvokeOption) (*LookupDropletSnapshotResult, error)Note: This function is named
LookupDropletSnapshotin the Go SDK.
public static class GetDropletSnapshot {
public static Task<GetDropletSnapshotResult> InvokeAsync(GetDropletSnapshotArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Most
Recent bool If more than one result is returned, use the most recent Droplet snapshot.
- Name string
The name of the Droplet snapshot.
- Name
Regex string A regex string to apply to the Droplet 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 Droplet snapshots available in the region will be returned.
- Most
Recent bool If more than one result is returned, use the most recent Droplet snapshot.
- Name string
The name of the Droplet snapshot.
- Name
Regex string A regex string to apply to the Droplet 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 Droplet snapshots available in the region will be returned.
- most
Recent boolean If more than one result is returned, use the most recent Droplet snapshot.
- name string
The name of the Droplet snapshot.
- name
Regex string A regex string to apply to the Droplet 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 Droplet snapshots available in the region will be returned.
- most_
recent bool If more than one result is returned, use the most recent Droplet snapshot.
- name str
The name of the Droplet snapshot.
- name_
regex str A regex string to apply to the Droplet 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 Droplet snapshots available in the region will be returned.
GetDropletSnapshot Result
The following output properties are available:
- Created
At string The date and time the Droplet snapshot was created.
- Droplet
Id string The ID of the Droplet from which the Droplet snapshot originated.
- Id string
The provider-assigned unique ID for this managed resource.
- Min
Disk intSize The minimum size in gigabytes required for a Droplet to be created based on this Droplet snapshot.
- Regions List<string>
A list of DigitalOcean region “slugs” indicating where the Droplet snapshot is available.
- Size double
The billable size of the Droplet snapshot in gigabytes.
- Most
Recent bool - Name string
- Name
Regex string - Region string
- Created
At string The date and time the Droplet snapshot was created.
- Droplet
Id string The ID of the Droplet from which the Droplet snapshot originated.
- Id string
The provider-assigned unique ID for this managed resource.
- Min
Disk intSize The minimum size in gigabytes required for a Droplet to be created based on this Droplet snapshot.
- Regions []string
A list of DigitalOcean region “slugs” indicating where the Droplet snapshot is available.
- Size float64
The billable size of the Droplet snapshot in gigabytes.
- Most
Recent bool - Name string
- Name
Regex string - Region string
- created
At string The date and time the Droplet snapshot was created.
- droplet
Id string The ID of the Droplet from which the Droplet snapshot originated.
- id string
The provider-assigned unique ID for this managed resource.
- min
Disk numberSize The minimum size in gigabytes required for a Droplet to be created based on this Droplet snapshot.
- regions string[]
A list of DigitalOcean region “slugs” indicating where the Droplet snapshot is available.
- size number
The billable size of the Droplet snapshot in gigabytes.
- most
Recent boolean - name string
- name
Regex string - region string
- created_
at str The date and time the Droplet snapshot was created.
- droplet_
id str The ID of the Droplet from which the Droplet snapshot originated.
- id str
The provider-assigned unique ID for this managed resource.
- min_
disk_ floatsize The minimum size in gigabytes required for a Droplet to be created based on this Droplet snapshot.
- regions List[str]
A list of DigitalOcean region “slugs” indicating where the Droplet snapshot is available.
- size float
The billable size of the Droplet snapshot in gigabytes.
- 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.