get Droplet Snapshot
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
Get the Droplet snapshot:
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DigitaloceanFunctions;
import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
.mostRecent(true)
.nameRegex("^web")
.region("nyc3")
.build());
}
}
Return
A collection of values returned by getDropletSnapshot.
Parameters
A collection of arguments for invoking getDropletSnapshot.
Return
A collection of values returned by getDropletSnapshot.
See also
Parameters
If more than one result is returned, use the most recent Droplet snapshot.
NOTE: If more or less than a single match is returned by the search, the update will fail. Ensure that your search is specific enough to return a single Droplet snapshot ID only, or use
most_recent
to choose the most recent one.
The name of the Droplet snapshot.
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.
A "slug" representing a DigitalOcean region (e.g. nyc1
). If set, only Droplet snapshots available in the region will be returned.
Return
A collection of values returned by getDropletSnapshot.
See also
Parameters
Builder for com.pulumi.digitalocean.kotlin.inputs.GetDropletSnapshotPlainArgs.