1. Packages
  2. Vkcs Provider
  3. API Docs
  4. getBackupPlan
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.getBackupPlan

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Use this data source to get backup plan info

    New since v0.4.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const planDatasource = vkcs.getBackupPlan({
        name: vkcs_backup_plan.backup_plan.name,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    plan_datasource = vkcs.get_backup_plan(name=vkcs_backup_plan["backup_plan"]["name"])
    
    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.LookupBackupPlan(ctx, &vkcs.LookupBackupPlanArgs{
    			Name: pulumi.StringRef(vkcs_backup_plan.Backup_plan.Name),
    		}, nil)
    		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 planDatasource = Vkcs.GetBackupPlan.Invoke(new()
        {
            Name = vkcs_backup_plan.Backup_plan.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.VkcsFunctions;
    import com.pulumi.vkcs.inputs.GetBackupPlanArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var planDatasource = VkcsFunctions.getBackupPlan(GetBackupPlanArgs.builder()
                .name(vkcs_backup_plan.backup_plan().name())
                .build());
    
        }
    }
    
    variables:
      planDatasource:
        fn::invoke:
          function: vkcs:getBackupPlan
          arguments:
            name: ${vkcs_backup_plan.backup_plan.name}
    

    Using getBackupPlan

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getBackupPlan(args: GetBackupPlanArgs, opts?: InvokeOptions): Promise<GetBackupPlanResult>
    function getBackupPlanOutput(args: GetBackupPlanOutputArgs, opts?: InvokeOptions): Output<GetBackupPlanResult>
    def get_backup_plan(instance_id: Optional[str] = None,
                        name: Optional[str] = None,
                        region: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetBackupPlanResult
    def get_backup_plan_output(instance_id: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        region: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetBackupPlanResult]
    func LookupBackupPlan(ctx *Context, args *LookupBackupPlanArgs, opts ...InvokeOption) (*LookupBackupPlanResult, error)
    func LookupBackupPlanOutput(ctx *Context, args *LookupBackupPlanOutputArgs, opts ...InvokeOption) LookupBackupPlanResultOutput

    > Note: This function is named LookupBackupPlan in the Go SDK.

    public static class GetBackupPlan 
    {
        public static Task<GetBackupPlanResult> InvokeAsync(GetBackupPlanArgs args, InvokeOptions? opts = null)
        public static Output<GetBackupPlanResult> Invoke(GetBackupPlanInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBackupPlanResult> getBackupPlan(GetBackupPlanArgs args, InvokeOptions options)
    public static Output<GetBackupPlanResult> getBackupPlan(GetBackupPlanArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getBackupPlan:getBackupPlan
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    optional string → ID of the instance that should be included in backup plan
    Name string
    optional string → Name of the backup plan
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    InstanceId string
    optional string → ID of the instance that should be included in backup plan
    Name string
    optional string → Name of the backup plan
    Region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    instanceId String
    optional string → ID of the instance that should be included in backup plan
    name String
    optional string → Name of the backup plan
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    instanceId string
    optional string → ID of the instance that should be included in backup plan
    name string
    optional string → Name of the backup plan
    region string
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    instance_id str
    optional string → ID of the instance that should be included in backup plan
    name str
    optional string → Name of the backup plan
    region str
    optional string → The region to fetch availability zones from, defaults to the provider's region.
    instanceId String
    optional string → ID of the instance that should be included in backup plan
    name String
    optional string → Name of the backup plan
    region String
    optional string → The region to fetch availability zones from, defaults to the provider's region.

    getBackupPlan Result

    The following output properties are available:

    FullRetention GetBackupPlanFullRetention
    → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    GfsRetention GetBackupPlanGfsRetention
    → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    Id string
    string → ID of the resource
    IncrementalBackup bool
    boolean → Whether incremental backups should be stored
    InstanceIds List<string>
    string → List of ids of backed up instances
    ProviderId string
    string → ID of backup provider
    Region string
    Schedule GetBackupPlanSchedule
    InstanceId string
    Name string
    FullRetention GetBackupPlanFullRetention
    → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    GfsRetention GetBackupPlanGfsRetention
    → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    Id string
    string → ID of the resource
    IncrementalBackup bool
    boolean → Whether incremental backups should be stored
    InstanceIds []string
    string → List of ids of backed up instances
    ProviderId string
    string → ID of backup provider
    Region string
    Schedule GetBackupPlanSchedule
    InstanceId string
    Name string
    fullRetention GetBackupPlanFullRetention
    → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    gfsRetention GetBackupPlanGfsRetention
    → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    id String
    string → ID of the resource
    incrementalBackup Boolean
    boolean → Whether incremental backups should be stored
    instanceIds List<String>
    string → List of ids of backed up instances
    providerId String
    string → ID of backup provider
    region String
    schedule GetBackupPlanSchedule
    instanceId String
    name String
    fullRetention GetBackupPlanFullRetention
    → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    gfsRetention GetBackupPlanGfsRetention
    → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    id string
    string → ID of the resource
    incrementalBackup boolean
    boolean → Whether incremental backups should be stored
    instanceIds string[]
    string → List of ids of backed up instances
    providerId string
    string → ID of backup provider
    region string
    schedule GetBackupPlanSchedule
    instanceId string
    name string
    full_retention GetBackupPlanFullRetention
    → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    gfs_retention GetBackupPlanGfsRetention
    → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    id str
    string → ID of the resource
    incremental_backup bool
    boolean → Whether incremental backups should be stored
    instance_ids Sequence[str]
    string → List of ids of backed up instances
    provider_id str
    string → ID of backup provider
    region str
    schedule GetBackupPlanSchedule
    instance_id str
    name str
    fullRetention Property Map
    → Parameters for full retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    gfsRetention Property Map
    → Parameters for gfs retention policy. Specifies number of full backups stored. Incremental backups (if enabled) are not counted as full
    id String
    string → ID of the resource
    incrementalBackup Boolean
    boolean → Whether incremental backups should be stored
    instanceIds List<String>
    string → List of ids of backed up instances
    providerId String
    string → ID of backup provider
    region String
    schedule Property Map
    instanceId String
    name String

    Supporting Types

    GetBackupPlanFullRetention

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

    GetBackupPlanGfsRetention

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

    GetBackupPlanSchedule

    Dates List<string>
    string → List of days when to perform backups. If incremental_backups is enabled, this field contains day of full backup
    EveryHours double
    number → Hour period of backups
    Time string
    string → Time of backup in format hh:mm, using UTC timezone
    Dates []string
    string → List of days when to perform backups. If incremental_backups is enabled, this field contains day of full backup
    EveryHours float64
    number → Hour period of backups
    Time string
    string → Time of backup in format hh:mm, using UTC timezone
    dates List<String>
    string → List of days when to perform backups. If incremental_backups is enabled, this field contains day of full backup
    everyHours Double
    number → Hour period of backups
    time String
    string → Time of backup in format hh:mm, using UTC timezone
    dates string[]
    string → List of days when to perform backups. If incremental_backups is enabled, this field contains day of full backup
    everyHours number
    number → Hour period of backups
    time string
    string → Time of backup in format hh:mm, using UTC timezone
    dates Sequence[str]
    string → List of days when to perform backups. If incremental_backups is enabled, this field contains day of full backup
    every_hours float
    number → Hour period of backups
    time str
    string → Time of backup in format hh:mm, using UTC timezone
    dates List<String>
    string → List of days when to perform backups. If incremental_backups is enabled, this field contains day of full backup
    everyHours Number
    number → Hour period of backups
    time String
    string → Time of backup in format hh:mm, using UTC timezone

    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.9.3 published on Tuesday, Apr 15, 2025 by vk-cs