1. Packages
  2. Ionoscloud
  3. API Docs
  4. compute
  5. BackupUnit
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.compute.BackupUnit

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    Manages a Backup Unit on IonosCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    import * as random from "@pulumi/random";
    
    const backupUnitPassword = new random.index.Password("backup_unit_password", {
        length: 16,
        special: true,
        overrideSpecial: "!#$%&*()-_=+[]{}:?",
    });
    const example = new ionoscloud.compute.BackupUnit("example", {
        name: "Backup Unit Example",
        password: backupUnitPassword.result,
        email: "example@example-domain.com",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    import pulumi_random as random
    
    backup_unit_password = random.index.Password("backup_unit_password",
        length=16,
        special=True,
        override_special=!#$%&*()-_=+[]{}:?)
    example = ionoscloud.compute.BackupUnit("example",
        name="Backup Unit Example",
        password=backup_unit_password["result"],
        email="example@example-domain.com")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi-random/sdk/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		backupUnitPassword, err := random.NewPassword(ctx, "backup_unit_password", &random.PasswordArgs{
    			Length:          16,
    			Special:         true,
    			OverrideSpecial: "!#$%&*()-_=+[]{}:?",
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewBackupUnit(ctx, "example", &compute.BackupUnitArgs{
    			Name:     pulumi.String("Backup Unit Example"),
    			Password: backupUnitPassword.Result,
    			Email:    pulumi.String("example@example-domain.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var backupUnitPassword = new Random.Index.Password("backup_unit_password", new()
        {
            Length = 16,
            Special = true,
            OverrideSpecial = "!#$%&*()-_=+[]{}:?",
        });
    
        var example = new Ionoscloud.Compute.BackupUnit("example", new()
        {
            Name = "Backup Unit Example",
            Password = backupUnitPassword.Result,
            Email = "example@example-domain.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.password;
    import com.pulumi.random.PasswordArgs;
    import com.pulumi.ionoscloud.compute.BackupUnit;
    import com.pulumi.ionoscloud.compute.BackupUnitArgs;
    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 backupUnitPassword = new Password("backupUnitPassword", PasswordArgs.builder()
                .length(16)
                .special(true)
                .overrideSpecial("!#$%&*()-_=+[]{}:?")
                .build());
    
            var example = new BackupUnit("example", BackupUnitArgs.builder()
                .name("Backup Unit Example")
                .password(backupUnitPassword.result())
                .email("example@example-domain.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:compute:BackupUnit
        properties:
          name: Backup Unit Example
          password: ${backupUnitPassword.result}
          email: example@example-domain.com
      backupUnitPassword:
        type: random:password
        name: backup_unit_password
        properties:
          length: 16
          special: true
          overrideSpecial: '!#$%&*()-_=+[]{}:?'
    

    Create BackupUnit Resource

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

    Constructor syntax

    new BackupUnit(name: string, args: BackupUnitArgs, opts?: CustomResourceOptions);
    @overload
    def BackupUnit(resource_name: str,
                   args: BackupUnitArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupUnit(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   email: Optional[str] = None,
                   password: Optional[str] = None,
                   name: Optional[str] = None)
    func NewBackupUnit(ctx *Context, name string, args BackupUnitArgs, opts ...ResourceOption) (*BackupUnit, error)
    public BackupUnit(string name, BackupUnitArgs args, CustomResourceOptions? opts = null)
    public BackupUnit(String name, BackupUnitArgs args)
    public BackupUnit(String name, BackupUnitArgs args, CustomResourceOptions options)
    
    type: ionoscloud:compute:BackupUnit
    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 BackupUnitArgs
    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 BackupUnitArgs
    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 BackupUnitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupUnitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupUnitArgs
    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 backupUnitResource = new Ionoscloud.Compute.BackupUnit("backupUnitResource", new()
    {
        Email = "string",
        Password = "string",
        Name = "string",
    });
    
    example, err := compute.NewBackupUnit(ctx, "backupUnitResource", &compute.BackupUnitArgs{
    	Email:    pulumi.String("string"),
    	Password: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    })
    
    var backupUnitResource = new BackupUnit("backupUnitResource", BackupUnitArgs.builder()
        .email("string")
        .password("string")
        .name("string")
        .build());
    
    backup_unit_resource = ionoscloud.compute.BackupUnit("backupUnitResource",
        email="string",
        password="string",
        name="string")
    
    const backupUnitResource = new ionoscloud.compute.BackupUnit("backupUnitResource", {
        email: "string",
        password: "string",
        name: "string",
    });
    
    type: ionoscloud:compute:BackupUnit
    properties:
        email: string
        name: string
        password: string
    

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

    Email string
    [string] The email address assigned to the backup unit
    Password string
    [string] The desired password for the Backup Unit
    Name string
    [string] The name of the Backup Unit. This argument is immutable.
    Email string
    [string] The email address assigned to the backup unit
    Password string
    [string] The desired password for the Backup Unit
    Name string
    [string] The name of the Backup Unit. This argument is immutable.
    email String
    [string] The email address assigned to the backup unit
    password String
    [string] The desired password for the Backup Unit
    name String
    [string] The name of the Backup Unit. This argument is immutable.
    email string
    [string] The email address assigned to the backup unit
    password string
    [string] The desired password for the Backup Unit
    name string
    [string] The name of the Backup Unit. This argument is immutable.
    email str
    [string] The email address assigned to the backup unit
    password str
    [string] The desired password for the Backup Unit
    name str
    [string] The name of the Backup Unit. This argument is immutable.
    email String
    [string] The email address assigned to the backup unit
    password String
    [string] The desired password for the Backup Unit
    name String
    [string] The name of the Backup Unit. This argument is immutable.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Login string
    The login associated with the backup unit. Derived from the contract number
    Id string
    The provider-assigned unique ID for this managed resource.
    Login string
    The login associated with the backup unit. Derived from the contract number
    id String
    The provider-assigned unique ID for this managed resource.
    login String
    The login associated with the backup unit. Derived from the contract number
    id string
    The provider-assigned unique ID for this managed resource.
    login string
    The login associated with the backup unit. Derived from the contract number
    id str
    The provider-assigned unique ID for this managed resource.
    login str
    The login associated with the backup unit. Derived from the contract number
    id String
    The provider-assigned unique ID for this managed resource.
    login String
    The login associated with the backup unit. Derived from the contract number

    Look up Existing BackupUnit Resource

    Get an existing BackupUnit 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?: BackupUnitState, opts?: CustomResourceOptions): BackupUnit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            email: Optional[str] = None,
            login: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None) -> BackupUnit
    func GetBackupUnit(ctx *Context, name string, id IDInput, state *BackupUnitState, opts ...ResourceOption) (*BackupUnit, error)
    public static BackupUnit Get(string name, Input<string> id, BackupUnitState? state, CustomResourceOptions? opts = null)
    public static BackupUnit get(String name, Output<String> id, BackupUnitState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:compute:BackupUnit    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:
    Email string
    [string] The email address assigned to the backup unit
    Login string
    The login associated with the backup unit. Derived from the contract number
    Name string
    [string] The name of the Backup Unit. This argument is immutable.
    Password string
    [string] The desired password for the Backup Unit
    Email string
    [string] The email address assigned to the backup unit
    Login string
    The login associated with the backup unit. Derived from the contract number
    Name string
    [string] The name of the Backup Unit. This argument is immutable.
    Password string
    [string] The desired password for the Backup Unit
    email String
    [string] The email address assigned to the backup unit
    login String
    The login associated with the backup unit. Derived from the contract number
    name String
    [string] The name of the Backup Unit. This argument is immutable.
    password String
    [string] The desired password for the Backup Unit
    email string
    [string] The email address assigned to the backup unit
    login string
    The login associated with the backup unit. Derived from the contract number
    name string
    [string] The name of the Backup Unit. This argument is immutable.
    password string
    [string] The desired password for the Backup Unit
    email str
    [string] The email address assigned to the backup unit
    login str
    The login associated with the backup unit. Derived from the contract number
    name str
    [string] The name of the Backup Unit. This argument is immutable.
    password str
    [string] The desired password for the Backup Unit
    email String
    [string] The email address assigned to the backup unit
    login String
    The login associated with the backup unit. Derived from the contract number
    name String
    [string] The name of the Backup Unit. This argument is immutable.
    password String
    [string] The desired password for the Backup Unit

    Import

    ant Notes

    • Please note that at the moment, Backup Units cannot be renamed
    • Please note that the password attribute is write-only, and it cannot be retrieved from the API when importing a ionoscloud_backup_unit. The only way to keep track of it is to specify it on the resource to be imported, thus, making it a required attribute.

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

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud