1. Packages
  2. DanubeData
  3. API Docs
  4. VpsSnapshot
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
danubedata logo
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi

    # danubedata.VpsSnapshot

    Manages a VPS snapshot for backup and recovery.

    Example Usage

    Basic Snapshot

    import * as pulumi from "@pulumi/pulumi";
    import * as danubedata from "@danubedata/pulumi";
    
    const server = new danubedata.Vps("server", {
        image: "ubuntu-22.04",
        datacenter: "fsn1",
        authMethod: "ssh_key",
        sshKeyId: danubedata_ssh_key.main.id,
    });
    const backup = new danubedata.VpsSnapshot("backup", {vpsInstanceId: server.id});
    
    import pulumi
    import pulumi_danubedata as danubedata
    
    server = danubedata.Vps("server",
        image="ubuntu-22.04",
        datacenter="fsn1",
        auth_method="ssh_key",
        ssh_key_id=danubedata_ssh_key["main"]["id"])
    backup = danubedata.VpsSnapshot("backup", vps_instance_id=server.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 {
    		server, err := danubedata.NewVps(ctx, "server", &danubedata.VpsArgs{
    			Image:      pulumi.String("ubuntu-22.04"),
    			Datacenter: pulumi.String("fsn1"),
    			AuthMethod: pulumi.String("ssh_key"),
    			SshKeyId:   pulumi.Any(danubedata_ssh_key.Main.Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = danubedata.NewVpsSnapshot(ctx, "backup", &danubedata.VpsSnapshotArgs{
    			VpsInstanceId: server.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DanubeData = DanubeData.DanubeData;
    
    return await Deployment.RunAsync(() => 
    {
        var server = new DanubeData.Vps("server", new()
        {
            Image = "ubuntu-22.04",
            Datacenter = "fsn1",
            AuthMethod = "ssh_key",
            SshKeyId = danubedata_ssh_key.Main.Id,
        });
    
        var backup = new DanubeData.VpsSnapshot("backup", new()
        {
            VpsInstanceId = server.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.danubedata.Vps;
    import com.pulumi.danubedata.VpsArgs;
    import com.pulumi.danubedata.VpsSnapshot;
    import com.pulumi.danubedata.VpsSnapshotArgs;
    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) {
            var server = new Vps("server", VpsArgs.builder()
                .image("ubuntu-22.04")
                .datacenter("fsn1")
                .authMethod("ssh_key")
                .sshKeyId(danubedata_ssh_key.main().id())
                .build());
    
            var backup = new VpsSnapshot("backup", VpsSnapshotArgs.builder()
                .vpsInstanceId(server.id())
                .build());
    
        }
    }
    
    resources:
      server:
        type: danubedata:Vps
        properties:
          image: ubuntu-22.04
          datacenter: fsn1
          authMethod: ssh_key
          sshKeyId: ${danubedata_ssh_key.main.id}
      backup:
        type: danubedata:VpsSnapshot
        properties:
          vpsInstanceId: ${server.id}
    

    Snapshot with Description

    import * as pulumi from "@pulumi/pulumi";
    import * as danubedata from "@danubedata/pulumi";
    
    const release = new danubedata.VpsSnapshot("release", {
        description: "Snapshot before v1.0 release deployment",
        vpsInstanceId: danubedata_vps.server.id,
    });
    
    import pulumi
    import pulumi_danubedata as danubedata
    
    release = danubedata.VpsSnapshot("release",
        description="Snapshot before v1.0 release deployment",
        vps_instance_id=danubedata_vps["server"]["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 {
    		_, err := danubedata.NewVpsSnapshot(ctx, "release", &danubedata.VpsSnapshotArgs{
    			Description:   pulumi.String("Snapshot before v1.0 release deployment"),
    			VpsInstanceId: pulumi.Any(danubedata_vps.Server.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DanubeData = DanubeData.DanubeData;
    
    return await Deployment.RunAsync(() => 
    {
        var release = new DanubeData.VpsSnapshot("release", new()
        {
            Description = "Snapshot before v1.0 release deployment",
            VpsInstanceId = danubedata_vps.Server.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.danubedata.VpsSnapshot;
    import com.pulumi.danubedata.VpsSnapshotArgs;
    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) {
            var release = new VpsSnapshot("release", VpsSnapshotArgs.builder()
                .description("Snapshot before v1.0 release deployment")
                .vpsInstanceId(danubedata_vps.server().id())
                .build());
    
        }
    }
    
    resources:
      release:
        type: danubedata:VpsSnapshot
        properties:
          description: Snapshot before v1.0 release deployment
          vpsInstanceId: ${danubedata_vps.server.id}
    

    Create VpsSnapshot Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpsSnapshot(name: string, args: VpsSnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def VpsSnapshot(resource_name: str,
                    args: VpsSnapshotArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpsSnapshot(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    vps_instance_id: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None,
                    timeouts: Optional[VpsSnapshotTimeoutsArgs] = None)
    func NewVpsSnapshot(ctx *Context, name string, args VpsSnapshotArgs, opts ...ResourceOption) (*VpsSnapshot, error)
    public VpsSnapshot(string name, VpsSnapshotArgs args, CustomResourceOptions? opts = null)
    public VpsSnapshot(String name, VpsSnapshotArgs args)
    public VpsSnapshot(String name, VpsSnapshotArgs args, CustomResourceOptions options)
    
    type: danubedata:VpsSnapshot
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpsSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VpsSnapshotArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VpsSnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpsSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpsSnapshotArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpsSnapshotResource = new DanubeData.VpsSnapshot("vpsSnapshotResource", new()
    {
        VpsInstanceId = "string",
        Description = "string",
        Name = "string",
        Timeouts = new DanubeData.Inputs.VpsSnapshotTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := danubedata.NewVpsSnapshot(ctx, "vpsSnapshotResource", &danubedata.VpsSnapshotArgs{
    	VpsInstanceId: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	Timeouts: &danubedata.VpsSnapshotTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var vpsSnapshotResource = new VpsSnapshot("vpsSnapshotResource", VpsSnapshotArgs.builder()
        .vpsInstanceId("string")
        .description("string")
        .name("string")
        .timeouts(VpsSnapshotTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    vps_snapshot_resource = danubedata.VpsSnapshot("vpsSnapshotResource",
        vps_instance_id="string",
        description="string",
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const vpsSnapshotResource = new danubedata.VpsSnapshot("vpsSnapshotResource", {
        vpsInstanceId: "string",
        description: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: danubedata:VpsSnapshot
    properties:
        description: string
        name: string
        timeouts:
            create: string
            delete: string
        vpsInstanceId: string
    

    VpsSnapshot Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VpsSnapshot resource accepts the following input properties:

    VpsInstanceId string
    ID of the VPS instance to snapshot.
    Description string
    Description of the snapshot.
    Name string
    Name of the snapshot.
    Timeouts DanubeData.DanubeData.Inputs.VpsSnapshotTimeouts
    VpsInstanceId string
    ID of the VPS instance to snapshot.
    Description string
    Description of the snapshot.
    Name string
    Name of the snapshot.
    Timeouts VpsSnapshotTimeoutsArgs
    vpsInstanceId String
    ID of the VPS instance to snapshot.
    description String
    Description of the snapshot.
    name String
    Name of the snapshot.
    timeouts VpsSnapshotTimeouts
    vpsInstanceId string
    ID of the VPS instance to snapshot.
    description string
    Description of the snapshot.
    name string
    Name of the snapshot.
    timeouts VpsSnapshotTimeouts
    vps_instance_id str
    ID of the VPS instance to snapshot.
    description str
    Description of the snapshot.
    name str
    Name of the snapshot.
    timeouts VpsSnapshotTimeoutsArgs
    vpsInstanceId String
    ID of the VPS instance to snapshot.
    description String
    Description of the snapshot.
    name String
    Name of the snapshot.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpsSnapshot resource produces the following output properties:

    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    SizeGb double
    Size of the snapshot in GB.
    Status string
    Current status (creating, ready, error).
    UpdatedAt string
    Timestamp when the snapshot was last updated.
    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    SizeGb float64
    Size of the snapshot in GB.
    Status string
    Current status (creating, ready, error).
    UpdatedAt string
    Timestamp when the snapshot was last updated.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    sizeGb Double
    Size of the snapshot in GB.
    status String
    Current status (creating, ready, error).
    updatedAt String
    Timestamp when the snapshot was last updated.
    createdAt string
    Creation timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    sizeGb number
    Size of the snapshot in GB.
    status string
    Current status (creating, ready, error).
    updatedAt string
    Timestamp when the snapshot was last updated.
    created_at str
    Creation timestamp.
    id str
    The provider-assigned unique ID for this managed resource.
    size_gb float
    Size of the snapshot in GB.
    status str
    Current status (creating, ready, error).
    updated_at str
    Timestamp when the snapshot was last updated.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    sizeGb Number
    Size of the snapshot in GB.
    status String
    Current status (creating, ready, error).
    updatedAt String
    Timestamp when the snapshot was last updated.

    Look up Existing VpsSnapshot Resource

    Get an existing VpsSnapshot 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?: VpsSnapshotState, opts?: CustomResourceOptions): VpsSnapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            size_gb: Optional[float] = None,
            status: Optional[str] = None,
            timeouts: Optional[VpsSnapshotTimeoutsArgs] = None,
            updated_at: Optional[str] = None,
            vps_instance_id: Optional[str] = None) -> VpsSnapshot
    func GetVpsSnapshot(ctx *Context, name string, id IDInput, state *VpsSnapshotState, opts ...ResourceOption) (*VpsSnapshot, error)
    public static VpsSnapshot Get(string name, Input<string> id, VpsSnapshotState? state, CustomResourceOptions? opts = null)
    public static VpsSnapshot get(String name, Output<String> id, VpsSnapshotState state, CustomResourceOptions options)
    resources:  _:    type: danubedata:VpsSnapshot    get:      id: ${id}
    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.
    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:
    CreatedAt string
    Creation timestamp.
    Description string
    Description of the snapshot.
    Name string
    Name of the snapshot.
    SizeGb double
    Size of the snapshot in GB.
    Status string
    Current status (creating, ready, error).
    Timeouts DanubeData.DanubeData.Inputs.VpsSnapshotTimeouts
    UpdatedAt string
    Timestamp when the snapshot was last updated.
    VpsInstanceId string
    ID of the VPS instance to snapshot.
    CreatedAt string
    Creation timestamp.
    Description string
    Description of the snapshot.
    Name string
    Name of the snapshot.
    SizeGb float64
    Size of the snapshot in GB.
    Status string
    Current status (creating, ready, error).
    Timeouts VpsSnapshotTimeoutsArgs
    UpdatedAt string
    Timestamp when the snapshot was last updated.
    VpsInstanceId string
    ID of the VPS instance to snapshot.
    createdAt String
    Creation timestamp.
    description String
    Description of the snapshot.
    name String
    Name of the snapshot.
    sizeGb Double
    Size of the snapshot in GB.
    status String
    Current status (creating, ready, error).
    timeouts VpsSnapshotTimeouts
    updatedAt String
    Timestamp when the snapshot was last updated.
    vpsInstanceId String
    ID of the VPS instance to snapshot.
    createdAt string
    Creation timestamp.
    description string
    Description of the snapshot.
    name string
    Name of the snapshot.
    sizeGb number
    Size of the snapshot in GB.
    status string
    Current status (creating, ready, error).
    timeouts VpsSnapshotTimeouts
    updatedAt string
    Timestamp when the snapshot was last updated.
    vpsInstanceId string
    ID of the VPS instance to snapshot.
    created_at str
    Creation timestamp.
    description str
    Description of the snapshot.
    name str
    Name of the snapshot.
    size_gb float
    Size of the snapshot in GB.
    status str
    Current status (creating, ready, error).
    timeouts VpsSnapshotTimeoutsArgs
    updated_at str
    Timestamp when the snapshot was last updated.
    vps_instance_id str
    ID of the VPS instance to snapshot.
    createdAt String
    Creation timestamp.
    description String
    Description of the snapshot.
    name String
    Name of the snapshot.
    sizeGb Number
    Size of the snapshot in GB.
    status String
    Current status (creating, ready, error).
    timeouts Property Map
    updatedAt String
    Timestamp when the snapshot was last updated.
    vpsInstanceId String
    ID of the VPS instance to snapshot.

    Supporting Types

    VpsSnapshotTimeouts, VpsSnapshotTimeoutsArgs

    Create string
    Time to wait for snapshot creation.
    Delete string
    Time to wait for snapshot deletion.
    Create string
    Time to wait for snapshot creation.
    Delete string
    Time to wait for snapshot deletion.
    create String
    Time to wait for snapshot creation.
    delete String
    Time to wait for snapshot deletion.
    create string
    Time to wait for snapshot creation.
    delete string
    Time to wait for snapshot deletion.
    create str
    Time to wait for snapshot creation.
    delete str
    Time to wait for snapshot deletion.
    create String
    Time to wait for snapshot creation.
    delete String
    Time to wait for snapshot deletion.

    Import

    VPS snapshots can be imported using their ID:

    bash

    $ pulumi import danubedata:index/vpsSnapshot:VpsSnapshot example snap-abc123
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    danubedata AdrianSilaghi/pulumi-danubedata
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the danubedata Terraform Provider.
    danubedata logo
    DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
      Meet Neo: Your AI Platform Teammate