DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
# danubedata.getVpsSnapshots
Lists all VPS snapshots in your account.
Find Snapshot by Name
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@pulumi/danubedata";
const all = danubedata.getVpsSnapshots({});
const preUpgrade = all.then(all => .filter(s => s.name == "pre-upgrade-backup").map(s => (s))[0]);
export const preUpgradeSnapshotId = preUpgrade.id;
import pulumi
import pulumi_danubedata as danubedata
all = danubedata.get_vps_snapshots()
pre_upgrade = [s for s in all.snapshots if s.name == "pre-upgrade-backup"][0]
pulumi.export("preUpgradeSnapshotId", pre_upgrade.id)
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := danubedata.GetVpsSnapshots(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
preUpgrade := "TODO: For expression"[0]
ctx.Export("preUpgradeSnapshotId", preUpgrade.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = Pulumi.DanubeData;
return await Deployment.RunAsync(() =>
{
var all = DanubeData.GetVpsSnapshots.Invoke();
var preUpgrade = .Where(s => s.Name == "pre-upgrade-backup").Select(s =>
{
return s;
}).ToList()[0];
return new Dictionary<string, object?>
{
["preUpgradeSnapshotId"] = preUpgrade.Id,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.DanubedataFunctions;
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 all = DanubedataFunctions.getVpsSnapshots();
final var preUpgrade = "TODO: ForExpression"[0];
ctx.export("preUpgradeSnapshotId", preUpgrade.id());
}
}
Example coming soon!
Filter Snapshots by VPS Instance
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@pulumi/danubedata";
const all = danubedata.getVpsSnapshots({});
const config = new pulumi.Config();
const vpsId = config.get("vpsId") || "vps-abc123";
const vpsSnapshots = all.then(all => .filter(s => s.vpsInstanceId == vpsId).map(s => (s)));
export const vpsSnapshotCount = vpsSnapshots.length;
import pulumi
import pulumi_danubedata as danubedata
all = danubedata.get_vps_snapshots()
config = pulumi.Config()
vps_id = config.get("vpsId")
if vps_id is None:
vps_id = "vps-abc123"
vps_snapshots = [s for s in all.snapshots if s.vps_instance_id == vps_id]
pulumi.export("vpsSnapshotCount", len(vps_snapshots))
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := danubedata.GetVpsSnapshots(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
cfg := config.New(ctx, "")
vpsId := "vps-abc123"
if param := cfg.Get("vpsId"); param != "" {
vpsId = param
}
vpsSnapshots := "TODO: For expression"
ctx.Export("vpsSnapshotCount", pulumi.Int(len(vpsSnapshots)))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = Pulumi.DanubeData;
return await Deployment.RunAsync(() =>
{
var all = DanubeData.GetVpsSnapshots.Invoke();
var config = new Config();
var vpsId = config.Get("vpsId") ?? "vps-abc123";
var vpsSnapshots = .Where(s => s.VpsInstanceId == vpsId).Select(s =>
{
return s;
}).ToList();
return new Dictionary<string, object?>
{
["vpsSnapshotCount"] = vpsSnapshots.Length,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.DanubedataFunctions;
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 config = ctx.config();
final var all = DanubedataFunctions.getVpsSnapshots();
final var vpsId = config.get("vpsId").orElse("vps-abc123");
final var vpsSnapshots = "TODO: ForExpression";
ctx.export("vpsSnapshotCount", vpsSnapshots.length());
}
}
Example coming soon!
Filter Ready Snapshots
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@pulumi/danubedata";
const all = danubedata.getVpsSnapshots({});
const readySnapshots = all.then(all => .filter(s => s.status == "ready").map(s => (s)));
export const readyCount = readySnapshots.length;
import pulumi
import pulumi_danubedata as danubedata
all = danubedata.get_vps_snapshots()
ready_snapshots = [s for s in all.snapshots if s.status == "ready"]
pulumi.export("readyCount", len(ready_snapshots))
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := danubedata.GetVpsSnapshots(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
readySnapshots := "TODO: For expression"
ctx.Export("readyCount", pulumi.Int(len(readySnapshots)))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = Pulumi.DanubeData;
return await Deployment.RunAsync(() =>
{
var all = DanubeData.GetVpsSnapshots.Invoke();
var readySnapshots = .Where(s => s.Status == "ready").Select(s =>
{
return s;
}).ToList();
return new Dictionary<string, object?>
{
["readyCount"] = readySnapshots.Length,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.DanubedataFunctions;
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 all = DanubedataFunctions.getVpsSnapshots();
final var readySnapshots = "TODO: ForExpression";
ctx.export("readyCount", readySnapshots.length());
}
}
Example coming soon!
Using getVpsSnapshots
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVpsSnapshots(opts?: InvokeOptions): Promise<GetVpsSnapshotsResult>
function getVpsSnapshotsOutput(opts?: InvokeOptions): Output<GetVpsSnapshotsResult>def get_vps_snapshots(opts: Optional[InvokeOptions] = None) -> GetVpsSnapshotsResult
def get_vps_snapshots_output(opts: Optional[InvokeOptions] = None) -> Output[GetVpsSnapshotsResult]func GetVpsSnapshots(ctx *Context, opts ...InvokeOption) (*GetVpsSnapshotsResult, error)
func GetVpsSnapshotsOutput(ctx *Context, opts ...InvokeOption) GetVpsSnapshotsResultOutput> Note: This function is named GetVpsSnapshots in the Go SDK.
public static class GetVpsSnapshots
{
public static Task<GetVpsSnapshotsResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetVpsSnapshotsResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetVpsSnapshotsResult> getVpsSnapshots(InvokeOptions options)
public static Output<GetVpsSnapshotsResult> getVpsSnapshots(InvokeOptions options)
fn::invoke:
function: danubedata:index/getVpsSnapshots:getVpsSnapshots
arguments:
# arguments dictionarygetVpsSnapshots Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshots
List<Danube
Data. Danube Data. Outputs. Get Vps Snapshots Snapshot> - List of VPS snapshots. Each snapshot contains:
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshots
[]Get
Vps Snapshots Snapshot - List of VPS snapshots. Each snapshot contains:
- id String
- The provider-assigned unique ID for this managed resource.
- snapshots
List<Get
Vps Snapshots Snapshot> - List of VPS snapshots. Each snapshot contains:
- id string
- The provider-assigned unique ID for this managed resource.
- snapshots
Get
Vps Snapshots Snapshot[] - List of VPS snapshots. Each snapshot contains:
- id str
- The provider-assigned unique ID for this managed resource.
- snapshots
Sequence[Get
Vps Snapshots Snapshot] - List of VPS snapshots. Each snapshot contains:
- id String
- The provider-assigned unique ID for this managed resource.
- snapshots List<Property Map>
- List of VPS snapshots. Each snapshot contains:
Supporting Types
GetVpsSnapshotsSnapshot
- Created
At string - Timestamp when the snapshot was created.
- Description string
- Description of the snapshot.
- Id string
- Unique identifier for the snapshot.
- Name string
- Name of the snapshot.
- Size
Gb double - Size of the snapshot in GB.
- Status string
- Current status (creating, ready, error).
- Vps
Instance stringId - ID of the VPS instance this snapshot belongs to.
- Created
At string - Timestamp when the snapshot was created.
- Description string
- Description of the snapshot.
- Id string
- Unique identifier for the snapshot.
- Name string
- Name of the snapshot.
- Size
Gb float64 - Size of the snapshot in GB.
- Status string
- Current status (creating, ready, error).
- Vps
Instance stringId - ID of the VPS instance this snapshot belongs to.
- created
At String - Timestamp when the snapshot was created.
- description String
- Description of the snapshot.
- id String
- Unique identifier for the snapshot.
- name String
- Name of the snapshot.
- size
Gb Double - Size of the snapshot in GB.
- status String
- Current status (creating, ready, error).
- vps
Instance StringId - ID of the VPS instance this snapshot belongs to.
- created
At string - Timestamp when the snapshot was created.
- description string
- Description of the snapshot.
- id string
- Unique identifier for the snapshot.
- name string
- Name of the snapshot.
- size
Gb number - Size of the snapshot in GB.
- status string
- Current status (creating, ready, error).
- vps
Instance stringId - ID of the VPS instance this snapshot belongs to.
- created_
at str - Timestamp when the snapshot was created.
- description str
- Description of the snapshot.
- id str
- Unique identifier for the snapshot.
- name str
- Name of the snapshot.
- size_
gb float - Size of the snapshot in GB.
- status str
- Current status (creating, ready, error).
- vps_
instance_ strid - ID of the VPS instance this snapshot belongs to.
- created
At String - Timestamp when the snapshot was created.
- description String
- Description of the snapshot.
- id String
- Unique identifier for the snapshot.
- name String
- Name of the snapshot.
- size
Gb Number - Size of the snapshot in GB.
- status String
- Current status (creating, ready, error).
- vps
Instance StringId - ID of the VPS instance this snapshot belongs to.
Package Details
- Repository
- danubedata AdrianSilaghi/pulumi-danubedata
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
danubedataTerraform Provider.
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
