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

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,
});
Copy
import pulumi
import pulumi_vkcs as vkcs

plan_datasource = vkcs.get_backup_plan(name=vkcs_backup_plan["backup_plan"]["name"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  planDatasource:
    fn::invoke:
      function: vkcs:getBackupPlan
      arguments:
        name: ${vkcs_backup_plan.backup_plan.name}
Copy

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>
Copy
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]
Copy
func LookupBackupPlan(ctx *Context, args *LookupBackupPlanArgs, opts ...InvokeOption) (*LookupBackupPlanResult, error)
func LookupBackupPlanOutput(ctx *Context, args *LookupBackupPlanOutputArgs, opts ...InvokeOption) LookupBackupPlanResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetBackupPlanResult> getBackupPlan(GetBackupPlanArgs args, InvokeOptions options)
public static Output<GetBackupPlanResult> getBackupPlan(GetBackupPlanArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vkcs:index/getBackupPlan:getBackupPlan
  arguments:
    # arguments dictionary
Copy

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 This property is required. double
number → Maximum number of backups
MaxFullBackup This property is required. float64
number → Maximum number of backups
maxFullBackup This property is required. Double
number → Maximum number of backups
maxFullBackup This property is required. number
number → Maximum number of backups
max_full_backup This property is required. float
number → Maximum number of backups
maxFullBackup This property is required. Number
number → Maximum number of backups

GetBackupPlanGfsRetention

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

GetBackupPlanSchedule

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