1. Packages
  2. UpCloud
  3. API Docs
  4. StorageBackup
UpCloud v0.3.0 published on Tuesday, May 13, 2025 by UpCloudLtd

upcloud.StorageBackup

Explore with Pulumi AI

upcloud logo
UpCloud v0.3.0 published on Tuesday, May 13, 2025 by UpCloudLtd

    Manages an on-demand storage backup.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as upcloud from "@upcloud/pulumi-upcloud";
    
    const backup1 = new upcloud.StorageBackup("backup_1", {
        title: "backup",
        sourceStorage: "01185ec5-1b0b-4cbc-a968-eb920ac7572d",
    });
    
    import pulumi
    import pulumi_upcloud as upcloud
    
    backup1 = upcloud.StorageBackup("backup_1",
        title="backup",
        source_storage="01185ec5-1b0b-4cbc-a968-eb920ac7572d")
    
    package main
    
    import (
    	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := upcloud.NewStorageBackup(ctx, "backup_1", &upcloud.StorageBackupArgs{
    			Title:         pulumi.String("backup"),
    			SourceStorage: pulumi.String("01185ec5-1b0b-4cbc-a968-eb920ac7572d"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using UpCloud = UpCloud.Pulumi.UpCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var backup1 = new UpCloud.StorageBackup("backup_1", new()
        {
            Title = "backup",
            SourceStorage = "01185ec5-1b0b-4cbc-a968-eb920ac7572d",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.upcloud.StorageBackup;
    import com.pulumi.upcloud.StorageBackupArgs;
    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 backup1 = new StorageBackup("backup1", StorageBackupArgs.builder()
                .title("backup")
                .sourceStorage("01185ec5-1b0b-4cbc-a968-eb920ac7572d")
                .build());
    
        }
    }
    
    resources:
      backup1:
        type: upcloud:StorageBackup
        name: backup_1
        properties:
          title: backup
          sourceStorage: 01185ec5-1b0b-4cbc-a968-eb920ac7572d
    

    Create StorageBackup Resource

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

    Constructor syntax

    new StorageBackup(name: string, args: StorageBackupArgs, opts?: CustomResourceOptions);
    @overload
    def StorageBackup(resource_name: str,
                      args: StorageBackupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageBackup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      source_storage: Optional[str] = None,
                      title: Optional[str] = None,
                      labels: Optional[Mapping[str, str]] = None)
    func NewStorageBackup(ctx *Context, name string, args StorageBackupArgs, opts ...ResourceOption) (*StorageBackup, error)
    public StorageBackup(string name, StorageBackupArgs args, CustomResourceOptions? opts = null)
    public StorageBackup(String name, StorageBackupArgs args)
    public StorageBackup(String name, StorageBackupArgs args, CustomResourceOptions options)
    
    type: upcloud:StorageBackup
    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 StorageBackupArgs
    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 StorageBackupArgs
    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 StorageBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StorageBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StorageBackupArgs
    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 storageBackupResource = new UpCloud.StorageBackup("storageBackupResource", new()
    {
        SourceStorage = "string",
        Title = "string",
        Labels = 
        {
            { "string", "string" },
        },
    });
    
    example, err := upcloud.NewStorageBackup(ctx, "storageBackupResource", &upcloud.StorageBackupArgs{
    	SourceStorage: pulumi.String("string"),
    	Title:         pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var storageBackupResource = new StorageBackup("storageBackupResource", StorageBackupArgs.builder()
        .sourceStorage("string")
        .title("string")
        .labels(Map.of("string", "string"))
        .build());
    
    storage_backup_resource = upcloud.StorageBackup("storageBackupResource",
        source_storage="string",
        title="string",
        labels={
            "string": "string",
        })
    
    const storageBackupResource = new upcloud.StorageBackup("storageBackupResource", {
        sourceStorage: "string",
        title: "string",
        labels: {
            string: "string",
        },
    });
    
    type: upcloud:StorageBackup
    properties:
        labels:
            string: string
        sourceStorage: string
        title: string
    

    StorageBackup 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 StorageBackup resource accepts the following input properties:

    SourceStorage string
    The UUID of the storage to back up.
    Title string
    Title of the backup.
    Labels Dictionary<string, string>
    User defined key-value pairs to classify the storage.
    SourceStorage string
    The UUID of the storage to back up.
    Title string
    Title of the backup.
    Labels map[string]string
    User defined key-value pairs to classify the storage.
    sourceStorage String
    The UUID of the storage to back up.
    title String
    Title of the backup.
    labels Map<String,String>
    User defined key-value pairs to classify the storage.
    sourceStorage string
    The UUID of the storage to back up.
    title string
    Title of the backup.
    labels {[key: string]: string}
    User defined key-value pairs to classify the storage.
    source_storage str
    The UUID of the storage to back up.
    title str
    Title of the backup.
    labels Mapping[str, str]
    User defined key-value pairs to classify the storage.
    sourceStorage String
    The UUID of the storage to back up.
    title String
    Title of the backup.
    labels Map<String>
    User defined key-value pairs to classify the storage.

    Outputs

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

    CreatedAt string
    Timestamp of the backup creation.
    Encrypt bool
    Sets if the storage is encrypted at rest.
    Id string
    The provider-assigned unique ID for this managed resource.
    Size int
    The size of the storage in gigabytes.
    SystemLabels Dictionary<string, string>
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    Tier string
    The tier of the storage.
    Type string
    The type of the storage.
    Zone string
    The zone the storage is in, e.g. de-fra1.
    CreatedAt string
    Timestamp of the backup creation.
    Encrypt bool
    Sets if the storage is encrypted at rest.
    Id string
    The provider-assigned unique ID for this managed resource.
    Size int
    The size of the storage in gigabytes.
    SystemLabels map[string]string
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    Tier string
    The tier of the storage.
    Type string
    The type of the storage.
    Zone string
    The zone the storage is in, e.g. de-fra1.
    createdAt String
    Timestamp of the backup creation.
    encrypt Boolean
    Sets if the storage is encrypted at rest.
    id String
    The provider-assigned unique ID for this managed resource.
    size Integer
    The size of the storage in gigabytes.
    systemLabels Map<String,String>
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier String
    The tier of the storage.
    type String
    The type of the storage.
    zone String
    The zone the storage is in, e.g. de-fra1.
    createdAt string
    Timestamp of the backup creation.
    encrypt boolean
    Sets if the storage is encrypted at rest.
    id string
    The provider-assigned unique ID for this managed resource.
    size number
    The size of the storage in gigabytes.
    systemLabels {[key: string]: string}
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier string
    The tier of the storage.
    type string
    The type of the storage.
    zone string
    The zone the storage is in, e.g. de-fra1.
    created_at str
    Timestamp of the backup creation.
    encrypt bool
    Sets if the storage is encrypted at rest.
    id str
    The provider-assigned unique ID for this managed resource.
    size int
    The size of the storage in gigabytes.
    system_labels Mapping[str, str]
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier str
    The tier of the storage.
    type str
    The type of the storage.
    zone str
    The zone the storage is in, e.g. de-fra1.
    createdAt String
    Timestamp of the backup creation.
    encrypt Boolean
    Sets if the storage is encrypted at rest.
    id String
    The provider-assigned unique ID for this managed resource.
    size Number
    The size of the storage in gigabytes.
    systemLabels Map<String>
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier String
    The tier of the storage.
    type String
    The type of the storage.
    zone String
    The zone the storage is in, e.g. de-fra1.

    Look up Existing StorageBackup Resource

    Get an existing StorageBackup 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?: StorageBackupState, opts?: CustomResourceOptions): StorageBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            encrypt: Optional[bool] = None,
            labels: Optional[Mapping[str, str]] = None,
            size: Optional[int] = None,
            source_storage: Optional[str] = None,
            system_labels: Optional[Mapping[str, str]] = None,
            tier: Optional[str] = None,
            title: Optional[str] = None,
            type: Optional[str] = None,
            zone: Optional[str] = None) -> StorageBackup
    func GetStorageBackup(ctx *Context, name string, id IDInput, state *StorageBackupState, opts ...ResourceOption) (*StorageBackup, error)
    public static StorageBackup Get(string name, Input<string> id, StorageBackupState? state, CustomResourceOptions? opts = null)
    public static StorageBackup get(String name, Output<String> id, StorageBackupState state, CustomResourceOptions options)
    resources:  _:    type: upcloud:StorageBackup    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
    Timestamp of the backup creation.
    Encrypt bool
    Sets if the storage is encrypted at rest.
    Labels Dictionary<string, string>
    User defined key-value pairs to classify the storage.
    Size int
    The size of the storage in gigabytes.
    SourceStorage string
    The UUID of the storage to back up.
    SystemLabels Dictionary<string, string>
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    Tier string
    The tier of the storage.
    Title string
    Title of the backup.
    Type string
    The type of the storage.
    Zone string
    The zone the storage is in, e.g. de-fra1.
    CreatedAt string
    Timestamp of the backup creation.
    Encrypt bool
    Sets if the storage is encrypted at rest.
    Labels map[string]string
    User defined key-value pairs to classify the storage.
    Size int
    The size of the storage in gigabytes.
    SourceStorage string
    The UUID of the storage to back up.
    SystemLabels map[string]string
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    Tier string
    The tier of the storage.
    Title string
    Title of the backup.
    Type string
    The type of the storage.
    Zone string
    The zone the storage is in, e.g. de-fra1.
    createdAt String
    Timestamp of the backup creation.
    encrypt Boolean
    Sets if the storage is encrypted at rest.
    labels Map<String,String>
    User defined key-value pairs to classify the storage.
    size Integer
    The size of the storage in gigabytes.
    sourceStorage String
    The UUID of the storage to back up.
    systemLabels Map<String,String>
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier String
    The tier of the storage.
    title String
    Title of the backup.
    type String
    The type of the storage.
    zone String
    The zone the storage is in, e.g. de-fra1.
    createdAt string
    Timestamp of the backup creation.
    encrypt boolean
    Sets if the storage is encrypted at rest.
    labels {[key: string]: string}
    User defined key-value pairs to classify the storage.
    size number
    The size of the storage in gigabytes.
    sourceStorage string
    The UUID of the storage to back up.
    systemLabels {[key: string]: string}
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier string
    The tier of the storage.
    title string
    Title of the backup.
    type string
    The type of the storage.
    zone string
    The zone the storage is in, e.g. de-fra1.
    created_at str
    Timestamp of the backup creation.
    encrypt bool
    Sets if the storage is encrypted at rest.
    labels Mapping[str, str]
    User defined key-value pairs to classify the storage.
    size int
    The size of the storage in gigabytes.
    source_storage str
    The UUID of the storage to back up.
    system_labels Mapping[str, str]
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier str
    The tier of the storage.
    title str
    Title of the backup.
    type str
    The type of the storage.
    zone str
    The zone the storage is in, e.g. de-fra1.
    createdAt String
    Timestamp of the backup creation.
    encrypt Boolean
    Sets if the storage is encrypted at rest.
    labels Map<String>
    User defined key-value pairs to classify the storage.
    size Number
    The size of the storage in gigabytes.
    sourceStorage String
    The UUID of the storage to back up.
    systemLabels Map<String>
    System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore and can not be modified by the user.
    tier String
    The tier of the storage.
    title String
    Title of the backup.
    type String
    The type of the storage.
    zone String
    The zone the storage is in, e.g. de-fra1.

    Package Details

    Repository
    upcloud UpCloudLtd/pulumi-upcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the upcloud Terraform Provider.
    upcloud logo
    UpCloud v0.3.0 published on Tuesday, May 13, 2025 by UpCloudLtd