1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. backupdisasterrecovery
  5. BackupPlan
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.backupdisasterrecovery.BackupPlan

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    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: "bv-bp-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="bv-bp-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("bv-bp-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 = "bv-bp-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("bv-bp-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: bv-bp-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:

    BackupPlanId string
    The ID of the backup plan
    BackupRules List<BackupPlanBackupRule>
    The backup rules for this BackupPlan. There must be at least one BackupRule message. 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 BackupPlan will 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
    BackupPlanId string
    The ID of the backup plan
    BackupRules []BackupPlanBackupRuleArgs
    The backup rules for this BackupPlan. There must be at least one BackupRule message. 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 BackupPlan will 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
    backupPlanId String
    The ID of the backup plan
    backupRules List<BackupPlanBackupRule>
    The backup rules for this BackupPlan. There must be at least one BackupRule message. 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 BackupPlan will 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
    backupPlanId string
    The ID of the backup plan
    backupRules BackupPlanBackupRule[]
    The backup rules for this BackupPlan. There must be at least one BackupRule message. 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 BackupPlan will 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_id str
    The ID of the backup plan
    backup_rules Sequence[BackupPlanBackupRuleArgs]
    The backup rules for this BackupPlan. There must be at least one BackupRule message. 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 BackupPlan will 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
    backupPlanId String
    The ID of the backup plan
    backupRules List<Property Map>
    The backup rules for this BackupPlan. There must be at least one BackupRule message. 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 BackupPlan will 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:

    BackupVaultServiceAccount string
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    CreateTime string
    When the BackupPlan was 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 BackupPlan was last updated.
    BackupVaultServiceAccount string
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    CreateTime string
    When the BackupPlan was 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 BackupPlan was last updated.
    backupVaultServiceAccount String
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    createTime String
    When the BackupPlan was 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 BackupPlan was last updated.
    backupVaultServiceAccount string
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    createTime string
    When the BackupPlan was 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 BackupPlan was last updated.
    backup_vault_service_account str
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    create_time str
    When the BackupPlan was 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 BackupPlan was last updated.
    backupVaultServiceAccount String
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    createTime String
    When the BackupPlan was 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 BackupPlan was 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) -> 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)
    Resource lookup is not supported in YAML
    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:
    BackupPlanId string
    The ID of the backup plan
    BackupRules List<BackupPlanBackupRule>
    The backup rules for this BackupPlan. There must be at least one BackupRule message. Structure is documented below.
    BackupVault string
    Backup vault where the backups gets stored using this Backup plan.
    BackupVaultServiceAccount string
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    CreateTime string
    When the BackupPlan was 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 BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
    UpdateTime string
    When the BackupPlan was last updated.
    BackupPlanId string
    The ID of the backup plan
    BackupRules []BackupPlanBackupRuleArgs
    The backup rules for this BackupPlan. There must be at least one BackupRule message. Structure is documented below.
    BackupVault string
    Backup vault where the backups gets stored using this Backup plan.
    BackupVaultServiceAccount string
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    CreateTime string
    When the BackupPlan was 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 BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
    UpdateTime string
    When the BackupPlan was last updated.
    backupPlanId String
    The ID of the backup plan
    backupRules List<BackupPlanBackupRule>
    The backup rules for this BackupPlan. There must be at least one BackupRule message. Structure is documented below.
    backupVault String
    Backup vault where the backups gets stored using this Backup plan.
    backupVaultServiceAccount String
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    createTime String
    When the BackupPlan was 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 BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
    updateTime String
    When the BackupPlan was last updated.
    backupPlanId string
    The ID of the backup plan
    backupRules BackupPlanBackupRule[]
    The backup rules for this BackupPlan. There must be at least one BackupRule message. Structure is documented below.
    backupVault string
    Backup vault where the backups gets stored using this Backup plan.
    backupVaultServiceAccount string
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    createTime string
    When the BackupPlan was 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 BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
    updateTime string
    When the BackupPlan was last updated.
    backup_plan_id str
    The ID of the backup plan
    backup_rules Sequence[BackupPlanBackupRuleArgs]
    The backup rules for this BackupPlan. There must be at least one BackupRule message. Structure is documented below.
    backup_vault str
    Backup vault where the backups gets stored using this Backup plan.
    backup_vault_service_account str
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    create_time str
    When the BackupPlan was 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 BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
    update_time str
    When the BackupPlan was last updated.
    backupPlanId String
    The ID of the backup plan
    backupRules List<Property Map>
    The backup rules for this BackupPlan. There must be at least one BackupRule message. Structure is documented below.
    backupVault String
    Backup vault where the backups gets stored using this Backup plan.
    backupVaultServiceAccount String
    The Google Cloud Platform Service Account to be used by the BackupVault for taking backups.
    createTime String
    When the BackupPlan was 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 BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".
    updateTime String
    When the BackupPlan was last updated.

    Supporting Types

    BackupPlanBackupRule, BackupPlanBackupRuleArgs

    BackupRetentionDays int
    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. The rule_id is unique per BackupPlan.
    StandardSchedule BackupPlanBackupRuleStandardSchedule
    StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
    BackupRetentionDays int
    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. The rule_id is unique per BackupPlan.
    StandardSchedule BackupPlanBackupRuleStandardSchedule
    StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
    backupRetentionDays Integer
    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. The rule_id is unique per BackupPlan.
    standardSchedule BackupPlanBackupRuleStandardSchedule
    StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
    backupRetentionDays number
    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. The rule_id is unique per BackupPlan.
    standardSchedule BackupPlanBackupRuleStandardSchedule
    StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
    backup_retention_days int
    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. The rule_id is unique per BackupPlan.
    standard_schedule BackupPlanBackupRuleStandardSchedule
    StandardSchedule defines a schedule that runs within the confines of a defined window of days. Structure is documented below.
    backupRetentionDays Number
    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. The rule_id is unique per BackupPlan.
    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 BackupPlanBackupRuleStandardScheduleBackupWindow
    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_RUN if they do not start by the end of the window. Structure is documented below.
    DaysOfMonths List<int>
    Specifies days of months like 1, 5, or 14 on which jobs will run.
    DaysOfWeeks List<string>
    Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and 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, HOURLY and 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.
    WeekDayOfMonth BackupPlanBackupRuleStandardScheduleWeekDayOfMonth
    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 BackupPlanBackupRuleStandardScheduleBackupWindow
    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_RUN if they do not start by the end of the window. Structure is documented below.
    DaysOfMonths []int
    Specifies days of months like 1, 5, or 14 on which jobs will run.
    DaysOfWeeks []string
    Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and 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, HOURLY and 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.
    WeekDayOfMonth BackupPlanBackupRuleStandardScheduleWeekDayOfMonth
    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 BackupPlanBackupRuleStandardScheduleBackupWindow
    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_RUN if they do not start by the end of the window. Structure is documented below.
    daysOfMonths List<Integer>
    Specifies days of months like 1, 5, or 14 on which jobs will run.
    daysOfWeeks List<String>
    Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and 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, HOURLY and 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.
    weekDayOfMonth BackupPlanBackupRuleStandardScheduleWeekDayOfMonth
    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 BackupPlanBackupRuleStandardScheduleBackupWindow
    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_RUN if they do not start by the end of the window. Structure is documented below.
    daysOfMonths number[]
    Specifies days of months like 1, 5, or 14 on which jobs will run.
    daysOfWeeks string[]
    Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and 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, HOURLY and 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.
    weekDayOfMonth BackupPlanBackupRuleStandardScheduleWeekDayOfMonth
    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 BackupPlanBackupRuleStandardScheduleBackupWindow
    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_RUN if they do not start by the end of the window. Structure is documented below.
    days_of_months Sequence[int]
    Specifies days of months like 1, 5, or 14 on which jobs will run.
    days_of_weeks Sequence[str]
    Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and 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, HOURLY and 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_of_month BackupPlanBackupRuleStandardScheduleWeekDayOfMonth
    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_RUN if they do not start by the end of the window. Structure is documented below.
    daysOfMonths List<Number>
    Specifies days of months like 1, 5, or 14 on which jobs will run.
    daysOfWeeks List<String>
    Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and 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, HOURLY and 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.
    weekDayOfMonth Property Map
    Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. Structure is documented below.

    BackupPlanBackupRuleStandardScheduleBackupWindow, BackupPlanBackupRuleStandardScheduleBackupWindowArgs

    StartHourOfDay int
    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.
    EndHourOfDay int
    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


    StartHourOfDay int
    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.
    EndHourOfDay int
    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


    startHourOfDay Integer
    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.
    endHourOfDay Integer
    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


    startHourOfDay number
    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.
    endHourOfDay number
    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_of_day int
    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_of_day int
    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


    startHourOfDay Number
    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.
    endHourOfDay Number
    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

    DayOfWeek string
    Specifies the day of the week. Possible values are: DAY_OF_WEEK_UNSPECIFIED, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    WeekOfMonth string
    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.
    DayOfWeek string
    Specifies the day of the week. Possible values are: DAY_OF_WEEK_UNSPECIFIED, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    WeekOfMonth string
    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.
    dayOfWeek String
    Specifies the day of the week. Possible values are: DAY_OF_WEEK_UNSPECIFIED, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    weekOfMonth String
    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.
    dayOfWeek string
    Specifies the day of the week. Possible values are: DAY_OF_WEEK_UNSPECIFIED, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    weekOfMonth string
    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_week str
    Specifies the day of the week. Possible values are: DAY_OF_WEEK_UNSPECIFIED, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    week_of_month str
    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.
    dayOfWeek String
    Specifies the day of the week. Possible values are: DAY_OF_WEEK_UNSPECIFIED, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    weekOfMonth String
    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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi