1. Packages
  2. Vkcs Provider
  3. API Docs
  4. BackupPlan
vkcs 0.14.0 published on Tuesday, Dec 30, 2025 by vk-cs
vkcs logo
vkcs 0.14.0 published on Tuesday, Dec 30, 2025 by vk-cs

    Manages a backup plan resource.

    New since v0.4.0.

    Example Usage

    Incremental backup for compute instance

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const backupPlan = new vkcs.BackupPlan("backup_plan", {
        name: "backup-plan-tf-example",
        providerName: "cloud_servers",
        incrementalBackup: true,
        schedule: {
            dates: ["Mo"],
            time: "04:00+03",
        },
        fullRetention: {
            maxFullBackup: 25,
        },
        instanceIds: [basic.id],
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    backup_plan = vkcs.BackupPlan("backup_plan",
        name="backup-plan-tf-example",
        provider_name="cloud_servers",
        incremental_backup=True,
        schedule={
            "dates": ["Mo"],
            "time": "04:00+03",
        },
        full_retention={
            "max_full_backup": 25,
        },
        instance_ids=[basic["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewBackupPlan(ctx, "backup_plan", &vkcs.BackupPlanArgs{
    			Name:              pulumi.String("backup-plan-tf-example"),
    			ProviderName:      pulumi.String("cloud_servers"),
    			IncrementalBackup: pulumi.Bool(true),
    			Schedule: &vkcs.BackupPlanScheduleArgs{
    				Dates: pulumi.StringArray{
    					pulumi.String("Mo"),
    				},
    				Time: pulumi.String("04:00+03"),
    			},
    			FullRetention: &vkcs.BackupPlanFullRetentionArgs{
    				MaxFullBackup: pulumi.Float64(25),
    			},
    			InstanceIds: pulumi.StringArray{
    				basic.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var backupPlan = new Vkcs.BackupPlan("backup_plan", new()
        {
            Name = "backup-plan-tf-example",
            ProviderName = "cloud_servers",
            IncrementalBackup = true,
            Schedule = new Vkcs.Inputs.BackupPlanScheduleArgs
            {
                Dates = new[]
                {
                    "Mo",
                },
                Time = "04:00+03",
            },
            FullRetention = new Vkcs.Inputs.BackupPlanFullRetentionArgs
            {
                MaxFullBackup = 25,
            },
            InstanceIds = new[]
            {
                basic.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.BackupPlan;
    import com.pulumi.vkcs.BackupPlanArgs;
    import com.pulumi.vkcs.inputs.BackupPlanScheduleArgs;
    import com.pulumi.vkcs.inputs.BackupPlanFullRetentionArgs;
    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 backupPlan = new BackupPlan("backupPlan", BackupPlanArgs.builder()
                .name("backup-plan-tf-example")
                .providerName("cloud_servers")
                .incrementalBackup(true)
                .schedule(BackupPlanScheduleArgs.builder()
                    .dates("Mo")
                    .time("04:00+03")
                    .build())
                .fullRetention(BackupPlanFullRetentionArgs.builder()
                    .maxFullBackup(25.0)
                    .build())
                .instanceIds(basic.id())
                .build());
    
        }
    }
    
    resources:
      backupPlan:
        type: vkcs:BackupPlan
        name: backup_plan
        properties:
          name: backup-plan-tf-example
          providerName: cloud_servers
          incrementalBackup: true # Create full backup every Monday at 04:00 MSK
          #   # Incremental backups are created each other day at the same time
          schedule:
            dates:
              - Mo
            time: 04:00+03
          fullRetention:
            maxFullBackup: 25
          instanceIds:
            - ${basic.id}
    

    Full backup with GFS retention policy for compute instance

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const backupPlan = new vkcs.BackupPlan("backup_plan", {
        name: "backup-plan-tf-example",
        providerName: "cloud_servers",
        incrementalBackup: false,
        schedule: {
            dates: [
                "Mo",
                "We",
                "Fr",
            ],
            time: "23:00",
        },
        gfsRetention: {
            gfsWeekly: 4,
            gfsMonthly: 11,
            gfsYearly: 2,
        },
        instanceIds: [basic.id],
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    backup_plan = vkcs.BackupPlan("backup_plan",
        name="backup-plan-tf-example",
        provider_name="cloud_servers",
        incremental_backup=False,
        schedule={
            "dates": [
                "Mo",
                "We",
                "Fr",
            ],
            "time": "23:00",
        },
        gfs_retention={
            "gfs_weekly": 4,
            "gfs_monthly": 11,
            "gfs_yearly": 2,
        },
        instance_ids=[basic["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewBackupPlan(ctx, "backup_plan", &vkcs.BackupPlanArgs{
    			Name:              pulumi.String("backup-plan-tf-example"),
    			ProviderName:      pulumi.String("cloud_servers"),
    			IncrementalBackup: pulumi.Bool(false),
    			Schedule: &vkcs.BackupPlanScheduleArgs{
    				Dates: pulumi.StringArray{
    					pulumi.String("Mo"),
    					pulumi.String("We"),
    					pulumi.String("Fr"),
    				},
    				Time: pulumi.String("23:00"),
    			},
    			GfsRetention: &vkcs.BackupPlanGfsRetentionArgs{
    				GfsWeekly:  pulumi.Float64(4),
    				GfsMonthly: pulumi.Float64(11),
    				GfsYearly:  pulumi.Float64(2),
    			},
    			InstanceIds: pulumi.StringArray{
    				basic.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var backupPlan = new Vkcs.BackupPlan("backup_plan", new()
        {
            Name = "backup-plan-tf-example",
            ProviderName = "cloud_servers",
            IncrementalBackup = false,
            Schedule = new Vkcs.Inputs.BackupPlanScheduleArgs
            {
                Dates = new[]
                {
                    "Mo",
                    "We",
                    "Fr",
                },
                Time = "23:00",
            },
            GfsRetention = new Vkcs.Inputs.BackupPlanGfsRetentionArgs
            {
                GfsWeekly = 4,
                GfsMonthly = 11,
                GfsYearly = 2,
            },
            InstanceIds = new[]
            {
                basic.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.BackupPlan;
    import com.pulumi.vkcs.BackupPlanArgs;
    import com.pulumi.vkcs.inputs.BackupPlanScheduleArgs;
    import com.pulumi.vkcs.inputs.BackupPlanGfsRetentionArgs;
    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 backupPlan = new BackupPlan("backupPlan", BackupPlanArgs.builder()
                .name("backup-plan-tf-example")
                .providerName("cloud_servers")
                .incrementalBackup(false)
                .schedule(BackupPlanScheduleArgs.builder()
                    .dates(                
                        "Mo",
                        "We",
                        "Fr")
                    .time("23:00")
                    .build())
                .gfsRetention(BackupPlanGfsRetentionArgs.builder()
                    .gfsWeekly(4.0)
                    .gfsMonthly(11.0)
                    .gfsYearly(2.0)
                    .build())
                .instanceIds(basic.id())
                .build());
    
        }
    }
    
    resources:
      backupPlan:
        type: vkcs:BackupPlan
        name: backup_plan
        properties:
          name: backup-plan-tf-example
          providerName: cloud_servers
          incrementalBackup: false # Backup the instance three times in week at 23:00 (02:00 MSK next day)
          schedule:
            dates:
              - Mo
              - We
              - Fr
            time: 23:00
          gfsRetention:
            gfsWeekly: 4
            gfsMonthly: 11
            gfsYearly: 2
          instanceIds:
            - ${basic.id}
    

    Backup for db instance

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const backupPlan = new vkcs.BackupPlan("backup_plan", {
        name: "backup-plan-tf-example",
        providerName: "dbaas",
        incrementalBackup: false,
        schedule: {
            everyHours: 12,
        },
        fullRetention: {
            maxFullBackup: 25,
        },
        instanceIds: [mysql.id],
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    backup_plan = vkcs.BackupPlan("backup_plan",
        name="backup-plan-tf-example",
        provider_name="dbaas",
        incremental_backup=False,
        schedule={
            "every_hours": 12,
        },
        full_retention={
            "max_full_backup": 25,
        },
        instance_ids=[mysql["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewBackupPlan(ctx, "backup_plan", &vkcs.BackupPlanArgs{
    			Name:              pulumi.String("backup-plan-tf-example"),
    			ProviderName:      pulumi.String("dbaas"),
    			IncrementalBackup: pulumi.Bool(false),
    			Schedule: &vkcs.BackupPlanScheduleArgs{
    				EveryHours: pulumi.Float64(12),
    			},
    			FullRetention: &vkcs.BackupPlanFullRetentionArgs{
    				MaxFullBackup: pulumi.Float64(25),
    			},
    			InstanceIds: pulumi.StringArray{
    				mysql.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var backupPlan = new Vkcs.BackupPlan("backup_plan", new()
        {
            Name = "backup-plan-tf-example",
            ProviderName = "dbaas",
            IncrementalBackup = false,
            Schedule = new Vkcs.Inputs.BackupPlanScheduleArgs
            {
                EveryHours = 12,
            },
            FullRetention = new Vkcs.Inputs.BackupPlanFullRetentionArgs
            {
                MaxFullBackup = 25,
            },
            InstanceIds = new[]
            {
                mysql.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.BackupPlan;
    import com.pulumi.vkcs.BackupPlanArgs;
    import com.pulumi.vkcs.inputs.BackupPlanScheduleArgs;
    import com.pulumi.vkcs.inputs.BackupPlanFullRetentionArgs;
    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 backupPlan = new BackupPlan("backupPlan", BackupPlanArgs.builder()
                .name("backup-plan-tf-example")
                .providerName("dbaas")
                .incrementalBackup(false)
                .schedule(BackupPlanScheduleArgs.builder()
                    .everyHours(12.0)
                    .build())
                .fullRetention(BackupPlanFullRetentionArgs.builder()
                    .maxFullBackup(25.0)
                    .build())
                .instanceIds(mysql.id())
                .build());
    
        }
    }
    
    resources:
      backupPlan:
        type: vkcs:BackupPlan
        name: backup_plan
        properties:
          name: backup-plan-tf-example
          providerName: dbaas
          incrementalBackup: false # Backup database data every 12 hours since the next hour after the plan creation
          schedule:
            everyHours: 12
          fullRetention:
            maxFullBackup: 25
          instanceIds:
            - ${mysql.id}
    

    Create BackupPlan Resource

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

    Constructor syntax

    new BackupPlan(name: string, args: BackupPlanArgs, opts?: CustomResourceOptions);
    @overload
    def BackupPlan(resource_name: str,
                   args: BackupPlanArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupPlan(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   incremental_backup: Optional[bool] = None,
                   schedule: Optional[BackupPlanScheduleArgs] = None,
                   backup_targets: Optional[Sequence[BackupPlanBackupTargetArgs]] = None,
                   full_retention: Optional[BackupPlanFullRetentionArgs] = None,
                   gfs_retention: Optional[BackupPlanGfsRetentionArgs] = None,
                   instance_ids: Optional[Sequence[str]] = None,
                   name: Optional[str] = None,
                   provider_id: Optional[str] = None,
                   provider_name: Optional[str] = None,
                   region: Optional[str] = None)
    func NewBackupPlan(ctx *Context, name string, args BackupPlanArgs, opts ...ResourceOption) (*BackupPlan, error)
    public BackupPlan(string name, BackupPlanArgs args, CustomResourceOptions? opts = null)
    public BackupPlan(String name, BackupPlanArgs args)
    public BackupPlan(String name, BackupPlanArgs args, CustomResourceOptions options)
    
    type: vkcs:BackupPlan
    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 BackupPlanArgs
    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 BackupPlanArgs
    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 BackupPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupPlanArgs
    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 backupPlanResource = new Vkcs.BackupPlan("backupPlanResource", new()
    {
        IncrementalBackup = false,
        Schedule = new Vkcs.Inputs.BackupPlanScheduleArgs
        {
            Dates = new[]
            {
                "string",
            },
            EveryHours = 0,
            Time = "string",
        },
        BackupTargets = new[]
        {
            new Vkcs.Inputs.BackupPlanBackupTargetArgs
            {
                InstanceId = "string",
                VolumeIds = new[]
                {
                    "string",
                },
            },
        },
        FullRetention = new Vkcs.Inputs.BackupPlanFullRetentionArgs
        {
            MaxFullBackup = 0,
        },
        GfsRetention = new Vkcs.Inputs.BackupPlanGfsRetentionArgs
        {
            GfsWeekly = 0,
            GfsMonthly = 0,
            GfsYearly = 0,
        },
        InstanceIds = new[]
        {
            "string",
        },
        Name = "string",
        ProviderId = "string",
        ProviderName = "string",
        Region = "string",
    });
    
    example, err := vkcs.NewBackupPlan(ctx, "backupPlanResource", &vkcs.BackupPlanArgs{
    	IncrementalBackup: pulumi.Bool(false),
    	Schedule: &vkcs.BackupPlanScheduleArgs{
    		Dates: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		EveryHours: pulumi.Float64(0),
    		Time:       pulumi.String("string"),
    	},
    	BackupTargets: vkcs.BackupPlanBackupTargetArray{
    		&vkcs.BackupPlanBackupTargetArgs{
    			InstanceId: pulumi.String("string"),
    			VolumeIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	FullRetention: &vkcs.BackupPlanFullRetentionArgs{
    		MaxFullBackup: pulumi.Float64(0),
    	},
    	GfsRetention: &vkcs.BackupPlanGfsRetentionArgs{
    		GfsWeekly:  pulumi.Float64(0),
    		GfsMonthly: pulumi.Float64(0),
    		GfsYearly:  pulumi.Float64(0),
    	},
    	InstanceIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:         pulumi.String("string"),
    	ProviderId:   pulumi.String("string"),
    	ProviderName: pulumi.String("string"),
    	Region:       pulumi.String("string"),
    })
    
    var backupPlanResource = new BackupPlan("backupPlanResource", BackupPlanArgs.builder()
        .incrementalBackup(false)
        .schedule(BackupPlanScheduleArgs.builder()
            .dates("string")
            .everyHours(0.0)
            .time("string")
            .build())
        .backupTargets(BackupPlanBackupTargetArgs.builder()
            .instanceId("string")
            .volumeIds("string")
            .build())
        .fullRetention(BackupPlanFullRetentionArgs.builder()
            .maxFullBackup(0.0)
            .build())
        .gfsRetention(BackupPlanGfsRetentionArgs.builder()
            .gfsWeekly(0.0)
            .gfsMonthly(0.0)
            .gfsYearly(0.0)
            .build())
        .instanceIds("string")
        .name("string")
        .providerId("string")
        .providerName("string")
        .region("string")
        .build());
    
    backup_plan_resource = vkcs.BackupPlan("backupPlanResource",
        incremental_backup=False,
        schedule={
            "dates": ["string"],
            "every_hours": 0,
            "time": "string",
        },
        backup_targets=[{
            "instance_id": "string",
            "volume_ids": ["string"],
        }],
        full_retention={
            "max_full_backup": 0,
        },
        gfs_retention={
            "gfs_weekly": 0,
            "gfs_monthly": 0,
            "gfs_yearly": 0,
        },
        instance_ids=["string"],
        name="string",
        provider_id="string",
        provider_name="string",
        region="string")
    
    const backupPlanResource = new vkcs.BackupPlan("backupPlanResource", {
        incrementalBackup: false,
        schedule: {
            dates: ["string"],
            everyHours: 0,
            time: "string",
        },
        backupTargets: [{
            instanceId: "string",
            volumeIds: ["string"],
        }],
        fullRetention: {
            maxFullBackup: 0,
        },
        gfsRetention: {
            gfsWeekly: 0,
            gfsMonthly: 0,
            gfsYearly: 0,
        },
        instanceIds: ["string"],
        name: "string",
        providerId: "string",
        providerName: "string",
        region: "string",
    });
    
    type: vkcs:BackupPlan
    properties:
        backupTargets:
            - instanceId: string
              volumeIds:
                - string
        fullRetention:
            maxFullBackup: 0
        gfsRetention:
            gfsMonthly: 0
            gfsWeekly: 0
            gfsYearly: 0
        incrementalBackup: false
        instanceIds:
            - string
        name: string
        providerId: string
        providerName: string
        region: string
        schedule:
            dates:
                - string
            everyHours: 0
            time: string
    

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

    IncrementalBackup bool
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    Schedule BackupPlanSchedule
    required
    BackupTargets List<BackupPlanBackupTarget>
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    FullRetention BackupPlanFullRetention
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    GfsRetention BackupPlanGfsRetention
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    InstanceIds List<string>
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    Name string
    required string → Name of the backup plan
    ProviderId string
    optional string → ID of backup provider
    ProviderName string
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    IncrementalBackup bool
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    Schedule BackupPlanScheduleArgs
    required
    BackupTargets []BackupPlanBackupTargetArgs
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    FullRetention BackupPlanFullRetentionArgs
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    GfsRetention BackupPlanGfsRetentionArgs
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    InstanceIds []string
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    Name string
    required string → Name of the backup plan
    ProviderId string
    optional string → ID of backup provider
    ProviderName string
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    incrementalBackup Boolean
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    schedule BackupPlanSchedule
    required
    backupTargets List<BackupPlanBackupTarget>
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    fullRetention BackupPlanFullRetention
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfsRetention BackupPlanGfsRetention
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    instanceIds List<String>
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name String
    required string → Name of the backup plan
    providerId String
    optional string → ID of backup provider
    providerName String
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    incrementalBackup boolean
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    schedule BackupPlanSchedule
    required
    backupTargets BackupPlanBackupTarget[]
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    fullRetention BackupPlanFullRetention
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfsRetention BackupPlanGfsRetention
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    instanceIds string[]
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name string
    required string → Name of the backup plan
    providerId string
    optional string → ID of backup provider
    providerName string
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region string
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    incremental_backup bool
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    schedule BackupPlanScheduleArgs
    required
    backup_targets Sequence[BackupPlanBackupTargetArgs]
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    full_retention BackupPlanFullRetentionArgs
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfs_retention BackupPlanGfsRetentionArgs
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    instance_ids Sequence[str]
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name str
    required string → Name of the backup plan
    provider_id str
    optional string → ID of backup provider
    provider_name str
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region str
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    incrementalBackup Boolean
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    schedule Property Map
    required
    backupTargets List<Property Map>
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    fullRetention Property Map
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfsRetention Property Map
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    instanceIds List<String>
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name String
    required string → Name of the backup plan
    providerId String
    optional string → ID of backup provider
    providerName String
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BackupPlan Resource

    Get an existing BackupPlan 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?: BackupPlanState, opts?: CustomResourceOptions): BackupPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_targets: Optional[Sequence[BackupPlanBackupTargetArgs]] = None,
            full_retention: Optional[BackupPlanFullRetentionArgs] = None,
            gfs_retention: Optional[BackupPlanGfsRetentionArgs] = None,
            incremental_backup: Optional[bool] = None,
            instance_ids: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            provider_id: Optional[str] = None,
            provider_name: Optional[str] = None,
            region: Optional[str] = None,
            schedule: Optional[BackupPlanScheduleArgs] = None) -> BackupPlan
    func GetBackupPlan(ctx *Context, name string, id IDInput, state *BackupPlanState, opts ...ResourceOption) (*BackupPlan, error)
    public static BackupPlan Get(string name, Input<string> id, BackupPlanState? state, CustomResourceOptions? opts = null)
    public static BackupPlan get(String name, Output<String> id, BackupPlanState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:BackupPlan    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:
    BackupTargets List<BackupPlanBackupTarget>
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    FullRetention BackupPlanFullRetention
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    GfsRetention BackupPlanGfsRetention
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    IncrementalBackup bool
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    InstanceIds List<string>
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    Name string
    required string → Name of the backup plan
    ProviderId string
    optional string → ID of backup provider
    ProviderName string
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    Schedule BackupPlanSchedule
    required
    BackupTargets []BackupPlanBackupTargetArgs
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    FullRetention BackupPlanFullRetentionArgs
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    GfsRetention BackupPlanGfsRetentionArgs
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    IncrementalBackup bool
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    InstanceIds []string
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    Name string
    required string → Name of the backup plan
    ProviderId string
    optional string → ID of backup provider
    ProviderName string
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    Schedule BackupPlanScheduleArgs
    required
    backupTargets List<BackupPlanBackupTarget>
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    fullRetention BackupPlanFullRetention
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfsRetention BackupPlanGfsRetention
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    incrementalBackup Boolean
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    instanceIds List<String>
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name String
    required string → Name of the backup plan
    providerId String
    optional string → ID of backup provider
    providerName String
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    schedule BackupPlanSchedule
    required
    backupTargets BackupPlanBackupTarget[]
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    fullRetention BackupPlanFullRetention
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfsRetention BackupPlanGfsRetention
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    incrementalBackup boolean
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    instanceIds string[]
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name string
    required string → Name of the backup plan
    providerId string
    optional string → ID of backup provider
    providerName string
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region string
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    schedule BackupPlanSchedule
    required
    backup_targets Sequence[BackupPlanBackupTargetArgs]
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    full_retention BackupPlanFullRetentionArgs
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfs_retention BackupPlanGfsRetentionArgs
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    incremental_backup bool
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    instance_ids Sequence[str]
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name str
    required string → Name of the backup plan
    provider_id str
    optional string → ID of backup provider
    provider_name str
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region str
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    schedule BackupPlanScheduleArgs
    required
    backupTargets List<Property Map>
    set → Set of backup targets specifying instance_id and volume_ids for each instance. Either backup_targets or instance_ids must be specified, but not both.New since v0.13.1.
    fullRetention Property Map
    optional → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with gfs_retention
    gfsRetention Property Map
    optional → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full. Incompatible with full_retention
    incrementalBackup Boolean
    required boolean → Whether incremental backups strategy should be used. If enabled, the schedule.date field must specify one day, on which full backup will be created. On other days, incremental backups will be created. Note: This option may be enabled for only for 'cloud_servers' provider.
    instanceIds List<String>
    optional set of string → Set of ids of instances to make backup for. Either backup_targets or instance_ids must be specified, but not both.
    name String
    required string → Name of the backup plan
    providerId String
    optional string → ID of backup provider
    providerName String
    optional string → Name of backup provider, must be one of: cloud_servers, dbaas
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region. Changing this creates a new plan.
    schedule Property Map
    required

    Supporting Types

    BackupPlanBackupTarget, BackupPlanBackupTargetArgs

    InstanceId string
    required string → ID of the instance for which specific volumes are backed up.
    VolumeIds List<string>
    optional set of string → Set of volume IDs to back up for the instance. If no list is specified, backups will be created for all disks.
    InstanceId string
    required string → ID of the instance for which specific volumes are backed up.
    VolumeIds []string
    optional set of string → Set of volume IDs to back up for the instance. If no list is specified, backups will be created for all disks.
    instanceId String
    required string → ID of the instance for which specific volumes are backed up.
    volumeIds List<String>
    optional set of string → Set of volume IDs to back up for the instance. If no list is specified, backups will be created for all disks.
    instanceId string
    required string → ID of the instance for which specific volumes are backed up.
    volumeIds string[]
    optional set of string → Set of volume IDs to back up for the instance. If no list is specified, backups will be created for all disks.
    instance_id str
    required string → ID of the instance for which specific volumes are backed up.
    volume_ids Sequence[str]
    optional set of string → Set of volume IDs to back up for the instance. If no list is specified, backups will be created for all disks.
    instanceId String
    required string → ID of the instance for which specific volumes are backed up.
    volumeIds List<String>
    optional set of string → Set of volume IDs to back up for the instance. If no list is specified, backups will be created for all disks.

    BackupPlanFullRetention, BackupPlanFullRetentionArgs

    MaxFullBackup double
    required number → Maximum number of backups
    MaxFullBackup float64
    required number → Maximum number of backups
    maxFullBackup Double
    required number → Maximum number of backups
    maxFullBackup number
    required number → Maximum number of backups
    max_full_backup float
    required number → Maximum number of backups
    maxFullBackup Number
    required number → Maximum number of backups

    BackupPlanGfsRetention, BackupPlanGfsRetentionArgs

    GfsWeekly double
    required number → Number of weeks to store backups
    GfsMonthly double
    optional number → Number of months to store backups
    GfsYearly double
    optional number → Number of years to store backups
    GfsWeekly float64
    required number → Number of weeks to store backups
    GfsMonthly float64
    optional number → Number of months to store backups
    GfsYearly float64
    optional number → Number of years to store backups
    gfsWeekly Double
    required number → Number of weeks to store backups
    gfsMonthly Double
    optional number → Number of months to store backups
    gfsYearly Double
    optional number → Number of years to store backups
    gfsWeekly number
    required number → Number of weeks to store backups
    gfsMonthly number
    optional number → Number of months to store backups
    gfsYearly number
    optional number → Number of years to store backups
    gfs_weekly float
    required number → Number of weeks to store backups
    gfs_monthly float
    optional number → Number of months to store backups
    gfs_yearly float
    optional number → Number of years to store backups
    gfsWeekly Number
    required number → Number of weeks to store backups
    gfsMonthly Number
    optional number → Number of months to store backups
    gfsYearly Number
    optional number → Number of years to store backups

    BackupPlanSchedule, BackupPlanScheduleArgs

    Dates List<string>
    optional string → List of days when to perform backups. If incremental_backups is enabled, only one day should be specified
    EveryHours double
    optional number → Hour interval of backups, must be one of: 3, 12, 24. This field is incompatible with date/time fields
    Time string
    optional string → Time of backup in format hh:mm (for UTC timezone) or hh:mm+tz (for other timezones, e.g. 10:00+03 for MSK, 10:00-04 for ET)
    Dates []string
    optional string → List of days when to perform backups. If incremental_backups is enabled, only one day should be specified
    EveryHours float64
    optional number → Hour interval of backups, must be one of: 3, 12, 24. This field is incompatible with date/time fields
    Time string
    optional string → Time of backup in format hh:mm (for UTC timezone) or hh:mm+tz (for other timezones, e.g. 10:00+03 for MSK, 10:00-04 for ET)
    dates List<String>
    optional string → List of days when to perform backups. If incremental_backups is enabled, only one day should be specified
    everyHours Double
    optional number → Hour interval of backups, must be one of: 3, 12, 24. This field is incompatible with date/time fields
    time String
    optional string → Time of backup in format hh:mm (for UTC timezone) or hh:mm+tz (for other timezones, e.g. 10:00+03 for MSK, 10:00-04 for ET)
    dates string[]
    optional string → List of days when to perform backups. If incremental_backups is enabled, only one day should be specified
    everyHours number
    optional number → Hour interval of backups, must be one of: 3, 12, 24. This field is incompatible with date/time fields
    time string
    optional string → Time of backup in format hh:mm (for UTC timezone) or hh:mm+tz (for other timezones, e.g. 10:00+03 for MSK, 10:00-04 for ET)
    dates Sequence[str]
    optional string → List of days when to perform backups. If incremental_backups is enabled, only one day should be specified
    every_hours float
    optional number → Hour interval of backups, must be one of: 3, 12, 24. This field is incompatible with date/time fields
    time str
    optional string → Time of backup in format hh:mm (for UTC timezone) or hh:mm+tz (for other timezones, e.g. 10:00+03 for MSK, 10:00-04 for ET)
    dates List<String>
    optional string → List of days when to perform backups. If incremental_backups is enabled, only one day should be specified
    everyHours Number
    optional number → Hour interval of backups, must be one of: 3, 12, 24. This field is incompatible with date/time fields
    time String
    optional string → Time of backup in format hh:mm (for UTC timezone) or hh:mm+tz (for other timezones, e.g. 10:00+03 for MSK, 10:00-04 for ET)

    Import

    Backup plan can be imported using the name, e.g.

    $ pulumi import vkcs:index/backupPlan:BackupPlan mybackupplan 5dfe75cb-a00f-4bc8-9551-bd38f64747e7
    

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

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.14.0 published on Tuesday, Dec 30, 2025 by vk-cs
      Meet Neo: Your AI Platform Teammate