gcp.backupdisasterrecovery.BackupPlan
Explore with Pulumi AI
A backup plan defines when and how to back up a resource, including the backup’s schedule, retention, and location.
To get more information about BackupPlan, see:
- API documentation
- How-to Guides
Example Usage
Backup Dr Backup Plan Simple
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myBackupVault = new gcp.backupdisasterrecovery.BackupVault("my_backup_vault", {
    location: "us-central1",
    backupVaultId: "backup-vault-simple-test",
    backupMinimumEnforcedRetentionDuration: "100000s",
});
const my_backup_plan_1 = new gcp.backupdisasterrecovery.BackupPlan("my-backup-plan-1", {
    location: "us-central1",
    backupPlanId: "backup-plan-simple-test",
    resourceType: "compute.googleapis.com/Instance",
    backupVault: myBackupVault.id,
    backupRules: [{
        ruleId: "rule-1",
        backupRetentionDays: 5,
        standardSchedule: {
            recurrenceType: "HOURLY",
            hourlyFrequency: 6,
            timeZone: "UTC",
            backupWindow: {
                startHourOfDay: 0,
                endHourOfDay: 24,
            },
        },
    }],
});
import pulumi
import pulumi_gcp as gcp
my_backup_vault = gcp.backupdisasterrecovery.BackupVault("my_backup_vault",
    location="us-central1",
    backup_vault_id="backup-vault-simple-test",
    backup_minimum_enforced_retention_duration="100000s")
my_backup_plan_1 = gcp.backupdisasterrecovery.BackupPlan("my-backup-plan-1",
    location="us-central1",
    backup_plan_id="backup-plan-simple-test",
    resource_type="compute.googleapis.com/Instance",
    backup_vault=my_backup_vault.id,
    backup_rules=[{
        "rule_id": "rule-1",
        "backup_retention_days": 5,
        "standard_schedule": {
            "recurrence_type": "HOURLY",
            "hourly_frequency": 6,
            "time_zone": "UTC",
            "backup_window": {
                "start_hour_of_day": 0,
                "end_hour_of_day": 24,
            },
        },
    }])
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myBackupVault, err := backupdisasterrecovery.NewBackupVault(ctx, "my_backup_vault", &backupdisasterrecovery.BackupVaultArgs{
			Location:                               pulumi.String("us-central1"),
			BackupVaultId:                          pulumi.String("backup-vault-simple-test"),
			BackupMinimumEnforcedRetentionDuration: pulumi.String("100000s"),
		})
		if err != nil {
			return err
		}
		_, err = backupdisasterrecovery.NewBackupPlan(ctx, "my-backup-plan-1", &backupdisasterrecovery.BackupPlanArgs{
			Location:     pulumi.String("us-central1"),
			BackupPlanId: pulumi.String("backup-plan-simple-test"),
			ResourceType: pulumi.String("compute.googleapis.com/Instance"),
			BackupVault:  myBackupVault.ID(),
			BackupRules: backupdisasterrecovery.BackupPlanBackupRuleArray{
				&backupdisasterrecovery.BackupPlanBackupRuleArgs{
					RuleId:              pulumi.String("rule-1"),
					BackupRetentionDays: pulumi.Int(5),
					StandardSchedule: &backupdisasterrecovery.BackupPlanBackupRuleStandardScheduleArgs{
						RecurrenceType:  pulumi.String("HOURLY"),
						HourlyFrequency: pulumi.Int(6),
						TimeZone:        pulumi.String("UTC"),
						BackupWindow: &backupdisasterrecovery.BackupPlanBackupRuleStandardScheduleBackupWindowArgs{
							StartHourOfDay: pulumi.Int(0),
							EndHourOfDay:   pulumi.Int(24),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var myBackupVault = new Gcp.BackupDisasterRecovery.BackupVault("my_backup_vault", new()
    {
        Location = "us-central1",
        BackupVaultId = "backup-vault-simple-test",
        BackupMinimumEnforcedRetentionDuration = "100000s",
    });
    var my_backup_plan_1 = new Gcp.BackupDisasterRecovery.BackupPlan("my-backup-plan-1", new()
    {
        Location = "us-central1",
        BackupPlanId = "backup-plan-simple-test",
        ResourceType = "compute.googleapis.com/Instance",
        BackupVault = myBackupVault.Id,
        BackupRules = new[]
        {
            new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleArgs
            {
                RuleId = "rule-1",
                BackupRetentionDays = 5,
                StandardSchedule = new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleStandardScheduleArgs
                {
                    RecurrenceType = "HOURLY",
                    HourlyFrequency = 6,
                    TimeZone = "UTC",
                    BackupWindow = new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleStandardScheduleBackupWindowArgs
                    {
                        StartHourOfDay = 0,
                        EndHourOfDay = 24,
                    },
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.backupdisasterrecovery.BackupVault;
import com.pulumi.gcp.backupdisasterrecovery.BackupVaultArgs;
import com.pulumi.gcp.backupdisasterrecovery.BackupPlan;
import com.pulumi.gcp.backupdisasterrecovery.BackupPlanArgs;
import com.pulumi.gcp.backupdisasterrecovery.inputs.BackupPlanBackupRuleArgs;
import com.pulumi.gcp.backupdisasterrecovery.inputs.BackupPlanBackupRuleStandardScheduleArgs;
import com.pulumi.gcp.backupdisasterrecovery.inputs.BackupPlanBackupRuleStandardScheduleBackupWindowArgs;
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 myBackupVault = new BackupVault("myBackupVault", BackupVaultArgs.builder()
            .location("us-central1")
            .backupVaultId("backup-vault-simple-test")
            .backupMinimumEnforcedRetentionDuration("100000s")
            .build());
        var my_backup_plan_1 = new BackupPlan("my-backup-plan-1", BackupPlanArgs.builder()
            .location("us-central1")
            .backupPlanId("backup-plan-simple-test")
            .resourceType("compute.googleapis.com/Instance")
            .backupVault(myBackupVault.id())
            .backupRules(BackupPlanBackupRuleArgs.builder()
                .ruleId("rule-1")
                .backupRetentionDays(5)
                .standardSchedule(BackupPlanBackupRuleStandardScheduleArgs.builder()
                    .recurrenceType("HOURLY")
                    .hourlyFrequency(6)
                    .timeZone("UTC")
                    .backupWindow(BackupPlanBackupRuleStandardScheduleBackupWindowArgs.builder()
                        .startHourOfDay(0)
                        .endHourOfDay(24)
                        .build())
                    .build())
                .build())
            .build());
    }
}
resources:
  myBackupVault:
    type: gcp:backupdisasterrecovery:BackupVault
    name: my_backup_vault
    properties:
      location: us-central1
      backupVaultId: backup-vault-simple-test
      backupMinimumEnforcedRetentionDuration: 100000s
  my-backup-plan-1:
    type: gcp:backupdisasterrecovery:BackupPlan
    properties:
      location: us-central1
      backupPlanId: backup-plan-simple-test
      resourceType: compute.googleapis.com/Instance
      backupVault: ${myBackupVault.id}
      backupRules:
        - ruleId: rule-1
          backupRetentionDays: 5
          standardSchedule:
            recurrenceType: HOURLY
            hourlyFrequency: 6
            timeZone: UTC
            backupWindow:
              startHourOfDay: 0
              endHourOfDay: 24
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,
               backup_plan_id: Optional[str] = None,
               backup_rules: Optional[Sequence[BackupPlanBackupRuleArgs]] = None,
               backup_vault: Optional[str] = None,
               location: Optional[str] = None,
               resource_type: Optional[str] = None,
               description: Optional[str] = None,
               project: 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: gcp:backupdisasterrecovery: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 Gcp.BackupDisasterRecovery.BackupPlan("backupPlanResource", new()
{
    BackupPlanId = "string",
    BackupRules = new[]
    {
        new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleArgs
        {
            BackupRetentionDays = 0,
            RuleId = "string",
            StandardSchedule = new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleStandardScheduleArgs
            {
                RecurrenceType = "string",
                TimeZone = "string",
                BackupWindow = new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleStandardScheduleBackupWindowArgs
                {
                    StartHourOfDay = 0,
                    EndHourOfDay = 0,
                },
                DaysOfMonths = new[]
                {
                    0,
                },
                DaysOfWeeks = new[]
                {
                    "string",
                },
                HourlyFrequency = 0,
                Months = new[]
                {
                    "string",
                },
                WeekDayOfMonth = new Gcp.BackupDisasterRecovery.Inputs.BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgs
                {
                    DayOfWeek = "string",
                    WeekOfMonth = "string",
                },
            },
        },
    },
    BackupVault = "string",
    Location = "string",
    ResourceType = "string",
    Description = "string",
    Project = "string",
});
example, err := backupdisasterrecovery.NewBackupPlan(ctx, "backupPlanResource", &backupdisasterrecovery.BackupPlanArgs{
	BackupPlanId: pulumi.String("string"),
	BackupRules: backupdisasterrecovery.BackupPlanBackupRuleArray{
		&backupdisasterrecovery.BackupPlanBackupRuleArgs{
			BackupRetentionDays: pulumi.Int(0),
			RuleId:              pulumi.String("string"),
			StandardSchedule: &backupdisasterrecovery.BackupPlanBackupRuleStandardScheduleArgs{
				RecurrenceType: pulumi.String("string"),
				TimeZone:       pulumi.String("string"),
				BackupWindow: &backupdisasterrecovery.BackupPlanBackupRuleStandardScheduleBackupWindowArgs{
					StartHourOfDay: pulumi.Int(0),
					EndHourOfDay:   pulumi.Int(0),
				},
				DaysOfMonths: pulumi.IntArray{
					pulumi.Int(0),
				},
				DaysOfWeeks: pulumi.StringArray{
					pulumi.String("string"),
				},
				HourlyFrequency: pulumi.Int(0),
				Months: pulumi.StringArray{
					pulumi.String("string"),
				},
				WeekDayOfMonth: &backupdisasterrecovery.BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgs{
					DayOfWeek:   pulumi.String("string"),
					WeekOfMonth: pulumi.String("string"),
				},
			},
		},
	},
	BackupVault:  pulumi.String("string"),
	Location:     pulumi.String("string"),
	ResourceType: pulumi.String("string"),
	Description:  pulumi.String("string"),
	Project:      pulumi.String("string"),
})
var backupPlanResource = new BackupPlan("backupPlanResource", BackupPlanArgs.builder()
    .backupPlanId("string")
    .backupRules(BackupPlanBackupRuleArgs.builder()
        .backupRetentionDays(0)
        .ruleId("string")
        .standardSchedule(BackupPlanBackupRuleStandardScheduleArgs.builder()
            .recurrenceType("string")
            .timeZone("string")
            .backupWindow(BackupPlanBackupRuleStandardScheduleBackupWindowArgs.builder()
                .startHourOfDay(0)
                .endHourOfDay(0)
                .build())
            .daysOfMonths(0)
            .daysOfWeeks("string")
            .hourlyFrequency(0)
            .months("string")
            .weekDayOfMonth(BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgs.builder()
                .dayOfWeek("string")
                .weekOfMonth("string")
                .build())
            .build())
        .build())
    .backupVault("string")
    .location("string")
    .resourceType("string")
    .description("string")
    .project("string")
    .build());
backup_plan_resource = gcp.backupdisasterrecovery.BackupPlan("backupPlanResource",
    backup_plan_id="string",
    backup_rules=[{
        "backup_retention_days": 0,
        "rule_id": "string",
        "standard_schedule": {
            "recurrence_type": "string",
            "time_zone": "string",
            "backup_window": {
                "start_hour_of_day": 0,
                "end_hour_of_day": 0,
            },
            "days_of_months": [0],
            "days_of_weeks": ["string"],
            "hourly_frequency": 0,
            "months": ["string"],
            "week_day_of_month": {
                "day_of_week": "string",
                "week_of_month": "string",
            },
        },
    }],
    backup_vault="string",
    location="string",
    resource_type="string",
    description="string",
    project="string")
const backupPlanResource = new gcp.backupdisasterrecovery.BackupPlan("backupPlanResource", {
    backupPlanId: "string",
    backupRules: [{
        backupRetentionDays: 0,
        ruleId: "string",
        standardSchedule: {
            recurrenceType: "string",
            timeZone: "string",
            backupWindow: {
                startHourOfDay: 0,
                endHourOfDay: 0,
            },
            daysOfMonths: [0],
            daysOfWeeks: ["string"],
            hourlyFrequency: 0,
            months: ["string"],
            weekDayOfMonth: {
                dayOfWeek: "string",
                weekOfMonth: "string",
            },
        },
    }],
    backupVault: "string",
    location: "string",
    resourceType: "string",
    description: "string",
    project: "string",
});
type: gcp:backupdisasterrecovery:BackupPlan
properties:
    backupPlanId: string
    backupRules:
        - backupRetentionDays: 0
          ruleId: string
          standardSchedule:
            backupWindow:
                endHourOfDay: 0
                startHourOfDay: 0
            daysOfMonths:
                - 0
            daysOfWeeks:
                - string
            hourlyFrequency: 0
            months:
                - string
            recurrenceType: string
            timeZone: string
            weekDayOfMonth:
                dayOfWeek: string
                weekOfMonth: string
    backupVault: string
    description: string
    location: string
    project: string
    resourceType: 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:
- BackupPlan stringId 
- The ID of the backup plan
- BackupRules List<BackupPlan Backup Rule> 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- BackupVault string
- Backup vault where the backups gets stored using this Backup plan.
- Location string
- The location for the backup plan
- ResourceType string
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- Description string
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- Project string
- BackupPlan stringId 
- The ID of the backup plan
- BackupRules []BackupPlan Backup Rule Args 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- BackupVault string
- Backup vault where the backups gets stored using this Backup plan.
- Location string
- The location for the backup plan
- ResourceType string
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- Description string
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- Project string
- backupPlan StringId 
- The ID of the backup plan
- backupRules List<BackupPlan Backup Rule> 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backupVault String
- Backup vault where the backups gets stored using this Backup plan.
- location String
- The location for the backup plan
- resourceType String
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- description String
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- project String
- backupPlan stringId 
- The ID of the backup plan
- backupRules BackupPlan Backup Rule[] 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backupVault string
- Backup vault where the backups gets stored using this Backup plan.
- location string
- The location for the backup plan
- resourceType string
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- description string
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- project string
- backup_plan_ strid 
- The ID of the backup plan
- backup_rules Sequence[BackupPlan Backup Rule Args] 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backup_vault str
- Backup vault where the backups gets stored using this Backup plan.
- location str
- The location for the backup plan
- resource_type str
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- description str
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- project str
- backupPlan StringId 
- The ID of the backup plan
- backupRules List<Property Map>
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backupVault String
- Backup vault where the backups gets stored using this Backup plan.
- location String
- The location for the backup plan
- resourceType String
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- description String
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the BackupPlan resource produces the following output properties:
- BackupVault stringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- CreateTime string
- When the BackupPlanwas created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of backup plan resource created
- UpdateTime string
- When the BackupPlanwas last updated.
- BackupVault stringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- CreateTime string
- When the BackupPlanwas created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of backup plan resource created
- UpdateTime string
- When the BackupPlanwas last updated.
- backupVault StringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- createTime String
- When the BackupPlanwas created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of backup plan resource created
- updateTime String
- When the BackupPlanwas last updated.
- backupVault stringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- createTime string
- When the BackupPlanwas created.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of backup plan resource created
- updateTime string
- When the BackupPlanwas last updated.
- backup_vault_ strservice_ account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- create_time str
- When the BackupPlanwas created.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of backup plan resource created
- update_time str
- When the BackupPlanwas last updated.
- backupVault StringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- createTime String
- When the BackupPlanwas created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of backup plan resource created
- updateTime String
- When the BackupPlanwas last updated.
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_plan_id: Optional[str] = None,
        backup_rules: Optional[Sequence[BackupPlanBackupRuleArgs]] = None,
        backup_vault: Optional[str] = None,
        backup_vault_service_account: Optional[str] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        resource_type: Optional[str] = None,
        update_time: Optional[str] = None) -> BackupPlanfunc 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: gcp:backupdisasterrecovery: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.
- BackupPlan stringId 
- The ID of the backup plan
- BackupRules List<BackupPlan Backup Rule> 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- BackupVault string
- Backup vault where the backups gets stored using this Backup plan.
- BackupVault stringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- CreateTime string
- When the BackupPlanwas created.
- Description string
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- Location string
- The location for the backup plan
- Name string
- The name of backup plan resource created
- Project string
- ResourceType string
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- UpdateTime string
- When the BackupPlanwas last updated.
- BackupPlan stringId 
- The ID of the backup plan
- BackupRules []BackupPlan Backup Rule Args 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- BackupVault string
- Backup vault where the backups gets stored using this Backup plan.
- BackupVault stringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- CreateTime string
- When the BackupPlanwas created.
- Description string
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- Location string
- The location for the backup plan
- Name string
- The name of backup plan resource created
- Project string
- ResourceType string
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- UpdateTime string
- When the BackupPlanwas last updated.
- backupPlan StringId 
- The ID of the backup plan
- backupRules List<BackupPlan Backup Rule> 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backupVault String
- Backup vault where the backups gets stored using this Backup plan.
- backupVault StringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- createTime String
- When the BackupPlanwas created.
- description String
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- location String
- The location for the backup plan
- name String
- The name of backup plan resource created
- project String
- resourceType String
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- updateTime String
- When the BackupPlanwas last updated.
- backupPlan stringId 
- The ID of the backup plan
- backupRules BackupPlan Backup Rule[] 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backupVault string
- Backup vault where the backups gets stored using this Backup plan.
- backupVault stringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- createTime string
- When the BackupPlanwas created.
- description string
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- location string
- The location for the backup plan
- name string
- The name of backup plan resource created
- project string
- resourceType string
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- updateTime string
- When the BackupPlanwas last updated.
- backup_plan_ strid 
- The ID of the backup plan
- backup_rules Sequence[BackupPlan Backup Rule Args] 
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backup_vault str
- Backup vault where the backups gets stored using this Backup plan.
- backup_vault_ strservice_ account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- create_time str
- When the BackupPlanwas created.
- description str
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- location str
- The location for the backup plan
- name str
- The name of backup plan resource created
- project str
- resource_type str
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- update_time str
- When the BackupPlanwas last updated.
- backupPlan StringId 
- The ID of the backup plan
- backupRules List<Property Map>
- The backup rules for this BackupPlan. There must be at least oneBackupRulemessage. Structure is documented below.
- backupVault String
- Backup vault where the backups gets stored using this Backup plan.
- backupVault StringService Account 
- The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
- createTime String
- When the BackupPlanwas created.
- description String
- The description allows for additional details about 'BackupPlan' and its use cases to be provided.
- location String
- The location for the backup plan
- name String
- The name of backup plan resource created
- project String
- resourceType String
- The resource type to which the BackupPlanwill be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
- updateTime String
- When the BackupPlanwas last updated.
Supporting Types
BackupPlanBackupRule, BackupPlanBackupRuleArgs        
- BackupRetention intDays 
- Configures the duration for which backup data will be kept. The value should be greater than or equal to minimum enforced retention of the backup vault.
- RuleId string
- The unique ID of this BackupRule. Therule_idis unique perBackupPlan.
- StandardSchedule BackupPlan Backup Rule Standard Schedule 
- StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
- BackupRetention intDays 
- Configures the duration for which backup data will be kept. The value should be greater than or equal to minimum enforced retention of the backup vault.
- RuleId string
- The unique ID of this BackupRule. Therule_idis unique perBackupPlan.
- StandardSchedule BackupPlan Backup Rule Standard Schedule 
- StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
- backupRetention IntegerDays 
- Configures the duration for which backup data will be kept. The value should be greater than or equal to minimum enforced retention of the backup vault.
- ruleId String
- The unique ID of this BackupRule. Therule_idis unique perBackupPlan.
- standardSchedule BackupPlan Backup Rule Standard Schedule 
- StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
- backupRetention numberDays 
- Configures the duration for which backup data will be kept. The value should be greater than or equal to minimum enforced retention of the backup vault.
- ruleId string
- The unique ID of this BackupRule. Therule_idis unique perBackupPlan.
- standardSchedule BackupPlan Backup Rule Standard Schedule 
- StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
- backup_retention_ intdays 
- Configures the duration for which backup data will be kept. The value should be greater than or equal to minimum enforced retention of the backup vault.
- rule_id str
- The unique ID of this BackupRule. Therule_idis unique perBackupPlan.
- standard_schedule BackupPlan Backup Rule Standard Schedule 
- StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
- backupRetention NumberDays 
- Configures the duration for which backup data will be kept. The value should be greater than or equal to minimum enforced retention of the backup vault.
- ruleId String
- The unique ID of this BackupRule. Therule_idis unique perBackupPlan.
- standardSchedule Property Map
- StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
BackupPlanBackupRuleStandardSchedule, BackupPlanBackupRuleStandardScheduleArgs            
- RecurrenceType string
- RecurrenceType enumerates the applicable periodicity for the schedule.
Possible values are: HOURLY,DAILY,WEEKLY,MONTHLY,YEARLY.
- TimeZone string
- The time zone to be used when interpreting the schedule.
- BackupWindow BackupPlan Backup Rule Standard Schedule Backup Window 
- A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
NOT_RUNif they do not start by the end of the window. Structure is documented below.
- DaysOf List<int>Months 
- Specifies days of months like 1, 5, or 14 on which jobs will run.
- DaysOf List<string>Weeks 
- Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type,WEEKLYand is not applicable otherwise. Each value may be one of:DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY.
- HourlyFrequency int
- Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
This is required for recurrence_type,HOURLYand is not applicable otherwise.
- Months List<string>
- Specifies values of months
Each value may be one of: MONTH_UNSPECIFIED,JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER.
- WeekDay BackupOf Month Plan Backup Rule Standard Schedule Week Day Of Month 
- Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.
- RecurrenceType string
- RecurrenceType enumerates the applicable periodicity for the schedule.
Possible values are: HOURLY,DAILY,WEEKLY,MONTHLY,YEARLY.
- TimeZone string
- The time zone to be used when interpreting the schedule.
- BackupWindow BackupPlan Backup Rule Standard Schedule Backup Window 
- A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
NOT_RUNif they do not start by the end of the window. Structure is documented below.
- DaysOf []intMonths 
- Specifies days of months like 1, 5, or 14 on which jobs will run.
- DaysOf []stringWeeks 
- Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type,WEEKLYand is not applicable otherwise. Each value may be one of:DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY.
- HourlyFrequency int
- Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
This is required for recurrence_type,HOURLYand is not applicable otherwise.
- Months []string
- Specifies values of months
Each value may be one of: MONTH_UNSPECIFIED,JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER.
- WeekDay BackupOf Month Plan Backup Rule Standard Schedule Week Day Of Month 
- Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.
- recurrenceType String
- RecurrenceType enumerates the applicable periodicity for the schedule.
Possible values are: HOURLY,DAILY,WEEKLY,MONTHLY,YEARLY.
- timeZone String
- The time zone to be used when interpreting the schedule.
- backupWindow BackupPlan Backup Rule Standard Schedule Backup Window 
- A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
NOT_RUNif they do not start by the end of the window. Structure is documented below.
- daysOf List<Integer>Months 
- Specifies days of months like 1, 5, or 14 on which jobs will run.
- daysOf List<String>Weeks 
- Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type,WEEKLYand is not applicable otherwise. Each value may be one of:DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY.
- hourlyFrequency Integer
- Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
This is required for recurrence_type,HOURLYand is not applicable otherwise.
- months List<String>
- Specifies values of months
Each value may be one of: MONTH_UNSPECIFIED,JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER.
- weekDay BackupOf Month Plan Backup Rule Standard Schedule Week Day Of Month 
- Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.
- recurrenceType string
- RecurrenceType enumerates the applicable periodicity for the schedule.
Possible values are: HOURLY,DAILY,WEEKLY,MONTHLY,YEARLY.
- timeZone string
- The time zone to be used when interpreting the schedule.
- backupWindow BackupPlan Backup Rule Standard Schedule Backup Window 
- A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
NOT_RUNif they do not start by the end of the window. Structure is documented below.
- daysOf number[]Months 
- Specifies days of months like 1, 5, or 14 on which jobs will run.
- daysOf string[]Weeks 
- Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type,WEEKLYand is not applicable otherwise. Each value may be one of:DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY.
- hourlyFrequency number
- Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
This is required for recurrence_type,HOURLYand is not applicable otherwise.
- months string[]
- Specifies values of months
Each value may be one of: MONTH_UNSPECIFIED,JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER.
- weekDay BackupOf Month Plan Backup Rule Standard Schedule Week Day Of Month 
- Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.
- recurrence_type str
- RecurrenceType enumerates the applicable periodicity for the schedule.
Possible values are: HOURLY,DAILY,WEEKLY,MONTHLY,YEARLY.
- time_zone str
- The time zone to be used when interpreting the schedule.
- backup_window BackupPlan Backup Rule Standard Schedule Backup Window 
- A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
NOT_RUNif they do not start by the end of the window. Structure is documented below.
- days_of_ Sequence[int]months 
- Specifies days of months like 1, 5, or 14 on which jobs will run.
- days_of_ Sequence[str]weeks 
- Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type,WEEKLYand is not applicable otherwise. Each value may be one of:DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY.
- hourly_frequency int
- Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
This is required for recurrence_type,HOURLYand is not applicable otherwise.
- months Sequence[str]
- Specifies values of months
Each value may be one of: MONTH_UNSPECIFIED,JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER.
- week_day_ Backupof_ month Plan Backup Rule Standard Schedule Week Day Of Month 
- Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.
- recurrenceType String
- RecurrenceType enumerates the applicable periodicity for the schedule.
Possible values are: HOURLY,DAILY,WEEKLY,MONTHLY,YEARLY.
- timeZone String
- The time zone to be used when interpreting the schedule.
- backupWindow Property Map
- A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
NOT_RUNif they do not start by the end of the window. Structure is documented below.
- daysOf List<Number>Months 
- Specifies days of months like 1, 5, or 14 on which jobs will run.
- daysOf List<String>Weeks 
- Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type,WEEKLYand is not applicable otherwise. Each value may be one of:DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY.
- hourlyFrequency Number
- Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
This is required for recurrence_type,HOURLYand is not applicable otherwise.
- months List<String>
- Specifies values of months
Each value may be one of: MONTH_UNSPECIFIED,JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER.
- weekDay Property MapOf Month 
- Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.
BackupPlanBackupRuleStandardScheduleBackupWindow, BackupPlanBackupRuleStandardScheduleBackupWindowArgs                
- StartHour intOf Day 
- The hour of the day (0-23) when the window starts, for example, if the value of the start hour of the day is 6, that means the backup window starts at 6:00.
- EndHour intOf Day 
- The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
The end hour of the day should be greater than the start
- StartHour intOf Day 
- The hour of the day (0-23) when the window starts, for example, if the value of the start hour of the day is 6, that means the backup window starts at 6:00.
- EndHour intOf Day 
- The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
The end hour of the day should be greater than the start
- startHour IntegerOf Day 
- The hour of the day (0-23) when the window starts, for example, if the value of the start hour of the day is 6, that means the backup window starts at 6:00.
- endHour IntegerOf Day 
- The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
The end hour of the day should be greater than the start
- startHour numberOf Day 
- The hour of the day (0-23) when the window starts, for example, if the value of the start hour of the day is 6, that means the backup window starts at 6:00.
- endHour numberOf Day 
- The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
The end hour of the day should be greater than the start
- start_hour_ intof_ day 
- The hour of the day (0-23) when the window starts, for example, if the value of the start hour of the day is 6, that means the backup window starts at 6:00.
- end_hour_ intof_ day 
- The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
The end hour of the day should be greater than the start
- startHour NumberOf Day 
- The hour of the day (0-23) when the window starts, for example, if the value of the start hour of the day is 6, that means the backup window starts at 6:00.
- endHour NumberOf Day 
- The hour of the day (1-24) when the window ends, for example, if the value of end hour of the day is 10, that means the backup window end time is 10:00.
The end hour of the day should be greater than the start
BackupPlanBackupRuleStandardScheduleWeekDayOfMonth, BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgs                    
- DayOf stringWeek 
- Specifies the day of the week.
Possible values are: DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY.
- WeekOf stringMonth 
- WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.
Possible values are: WEEK_OF_MONTH_UNSPECIFIED,FIRST,SECOND,THIRD,FOURTH,LAST.
- DayOf stringWeek 
- Specifies the day of the week.
Possible values are: DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY.
- WeekOf stringMonth 
- WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.
Possible values are: WEEK_OF_MONTH_UNSPECIFIED,FIRST,SECOND,THIRD,FOURTH,LAST.
- dayOf StringWeek 
- Specifies the day of the week.
Possible values are: DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY.
- weekOf StringMonth 
- WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.
Possible values are: WEEK_OF_MONTH_UNSPECIFIED,FIRST,SECOND,THIRD,FOURTH,LAST.
- dayOf stringWeek 
- Specifies the day of the week.
Possible values are: DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY.
- weekOf stringMonth 
- WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.
Possible values are: WEEK_OF_MONTH_UNSPECIFIED,FIRST,SECOND,THIRD,FOURTH,LAST.
- day_of_ strweek 
- Specifies the day of the week.
Possible values are: DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY.
- week_of_ strmonth 
- WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.
Possible values are: WEEK_OF_MONTH_UNSPECIFIED,FIRST,SECOND,THIRD,FOURTH,LAST.
- dayOf StringWeek 
- Specifies the day of the week.
Possible values are: DAY_OF_WEEK_UNSPECIFIED,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY.
- weekOf StringMonth 
- WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.
Possible values are: WEEK_OF_MONTH_UNSPECIFIED,FIRST,SECOND,THIRD,FOURTH,LAST.
Import
BackupPlan can be imported using any of these accepted formats:
- projects/{{project}}/locations/{{location}}/backupPlans/{{backup_plan_id}}
- {{project}}/{{location}}/{{backup_plan_id}}
- {{location}}/{{backup_plan_id}}
When using the pulumi import command, BackupPlan can be imported using one of the formats above. For example:
$ pulumi import gcp:backupdisasterrecovery/backupPlan:BackupPlan default projects/{{project}}/locations/{{location}}/backupPlans/{{backup_plan_id}}
$ pulumi import gcp:backupdisasterrecovery/backupPlan:BackupPlan default {{project}}/{{location}}/{{backup_plan_id}}
$ pulumi import gcp:backupdisasterrecovery/backupPlan:BackupPlan default {{location}}/{{backup_plan_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.