1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. ResourcePolicy
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

gcp.compute.ResourcePolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

    A policy that can be attached to a resource to specify or schedule actions on that resource.

    To get more information about ResourcePolicy, see:

    Example Usage

    Resource Policy Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Gcp.Compute.ResourcePolicy("foo", new()
        {
            Region = "us-central1",
            SnapshotSchedulePolicy = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyArgs
            {
                Schedule = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs
                {
                    DailySchedule = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs
                    {
                        DaysInCycle = 1,
                        StartTime = "04:00",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "foo", &compute.ResourcePolicyArgs{
    			Region: pulumi.String("us-central1"),
    			SnapshotSchedulePolicy: &compute.ResourcePolicySnapshotSchedulePolicyArgs{
    				Schedule: &compute.ResourcePolicySnapshotSchedulePolicyScheduleArgs{
    					DailySchedule: &compute.ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs{
    						DaysInCycle: pulumi.Int(1),
    						StartTime:   pulumi.String("04:00"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs;
    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 foo = new ResourcePolicy("foo", ResourcePolicyArgs.builder()        
                .region("us-central1")
                .snapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicyArgs.builder()
                    .schedule(ResourcePolicySnapshotSchedulePolicyScheduleArgs.builder()
                        .dailySchedule(ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs.builder()
                            .daysInCycle(1)
                            .startTime("04:00")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    foo = gcp.compute.ResourcePolicy("foo",
        region="us-central1",
        snapshot_schedule_policy=gcp.compute.ResourcePolicySnapshotSchedulePolicyArgs(
            schedule=gcp.compute.ResourcePolicySnapshotSchedulePolicyScheduleArgs(
                daily_schedule=gcp.compute.ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs(
                    days_in_cycle=1,
                    start_time="04:00",
                ),
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const foo = new gcp.compute.ResourcePolicy("foo", {
        region: "us-central1",
        snapshotSchedulePolicy: {
            schedule: {
                dailySchedule: {
                    daysInCycle: 1,
                    startTime: "04:00",
                },
            },
        },
    });
    
    resources:
      foo:
        type: gcp:compute:ResourcePolicy
        properties:
          region: us-central1
          snapshotSchedulePolicy:
            schedule:
              dailySchedule:
                daysInCycle: 1
                startTime: 04:00
    

    Resource Policy Full

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var bar = new Gcp.Compute.ResourcePolicy("bar", new()
        {
            Region = "us-central1",
            SnapshotSchedulePolicy = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyArgs
            {
                RetentionPolicy = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs
                {
                    MaxRetentionDays = 10,
                    OnSourceDiskDelete = "KEEP_AUTO_SNAPSHOTS",
                },
                Schedule = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs
                {
                    HourlySchedule = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs
                    {
                        HoursInCycle = 20,
                        StartTime = "23:00",
                    },
                },
                SnapshotProperties = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs
                {
                    GuestFlush = true,
                    Labels = 
                    {
                        { "myLabel", "value" },
                    },
                    StorageLocations = "us",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "bar", &compute.ResourcePolicyArgs{
    			Region: pulumi.String("us-central1"),
    			SnapshotSchedulePolicy: &compute.ResourcePolicySnapshotSchedulePolicyArgs{
    				RetentionPolicy: &compute.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs{
    					MaxRetentionDays:   pulumi.Int(10),
    					OnSourceDiskDelete: pulumi.String("KEEP_AUTO_SNAPSHOTS"),
    				},
    				Schedule: &compute.ResourcePolicySnapshotSchedulePolicyScheduleArgs{
    					HourlySchedule: &compute.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs{
    						HoursInCycle: pulumi.Int(20),
    						StartTime:    pulumi.String("23:00"),
    					},
    				},
    				SnapshotProperties: &compute.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs{
    					GuestFlush: pulumi.Bool(true),
    					Labels: pulumi.StringMap{
    						"myLabel": pulumi.String("value"),
    					},
    					StorageLocations: pulumi.String("us"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs;
    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 bar = new ResourcePolicy("bar", ResourcePolicyArgs.builder()        
                .region("us-central1")
                .snapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicyArgs.builder()
                    .retentionPolicy(ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.builder()
                        .maxRetentionDays(10)
                        .onSourceDiskDelete("KEEP_AUTO_SNAPSHOTS")
                        .build())
                    .schedule(ResourcePolicySnapshotSchedulePolicyScheduleArgs.builder()
                        .hourlySchedule(ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs.builder()
                            .hoursInCycle(20)
                            .startTime("23:00")
                            .build())
                        .build())
                    .snapshotProperties(ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs.builder()
                        .guestFlush(true)
                        .labels(Map.of("myLabel", "value"))
                        .storageLocations("us")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    bar = gcp.compute.ResourcePolicy("bar",
        region="us-central1",
        snapshot_schedule_policy=gcp.compute.ResourcePolicySnapshotSchedulePolicyArgs(
            retention_policy=gcp.compute.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs(
                max_retention_days=10,
                on_source_disk_delete="KEEP_AUTO_SNAPSHOTS",
            ),
            schedule=gcp.compute.ResourcePolicySnapshotSchedulePolicyScheduleArgs(
                hourly_schedule=gcp.compute.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs(
                    hours_in_cycle=20,
                    start_time="23:00",
                ),
            ),
            snapshot_properties=gcp.compute.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs(
                guest_flush=True,
                labels={
                    "myLabel": "value",
                },
                storage_locations="us",
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const bar = new gcp.compute.ResourcePolicy("bar", {
        region: "us-central1",
        snapshotSchedulePolicy: {
            retentionPolicy: {
                maxRetentionDays: 10,
                onSourceDiskDelete: "KEEP_AUTO_SNAPSHOTS",
            },
            schedule: {
                hourlySchedule: {
                    hoursInCycle: 20,
                    startTime: "23:00",
                },
            },
            snapshotProperties: {
                guestFlush: true,
                labels: {
                    myLabel: "value",
                },
                storageLocations: "us",
            },
        },
    });
    
    resources:
      bar:
        type: gcp:compute:ResourcePolicy
        properties:
          region: us-central1
          snapshotSchedulePolicy:
            retentionPolicy:
              maxRetentionDays: 10
              onSourceDiskDelete: KEEP_AUTO_SNAPSHOTS
            schedule:
              hourlySchedule:
                hoursInCycle: 20
                startTime: 23:00
            snapshotProperties:
              guestFlush: true
              labels:
                myLabel: value
              storageLocations: us
    

    Resource Policy Placement Policy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var baz = new Gcp.Compute.ResourcePolicy("baz", new()
        {
            GroupPlacementPolicy = new Gcp.Compute.Inputs.ResourcePolicyGroupPlacementPolicyArgs
            {
                Collocation = "COLLOCATED",
                VmCount = 2,
            },
            Region = "us-central1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "baz", &compute.ResourcePolicyArgs{
    			GroupPlacementPolicy: &compute.ResourcePolicyGroupPlacementPolicyArgs{
    				Collocation: pulumi.String("COLLOCATED"),
    				VmCount:     pulumi.Int(2),
    			},
    			Region: pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicyGroupPlacementPolicyArgs;
    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 baz = new ResourcePolicy("baz", ResourcePolicyArgs.builder()        
                .groupPlacementPolicy(ResourcePolicyGroupPlacementPolicyArgs.builder()
                    .collocation("COLLOCATED")
                    .vmCount(2)
                    .build())
                .region("us-central1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    baz = gcp.compute.ResourcePolicy("baz",
        group_placement_policy=gcp.compute.ResourcePolicyGroupPlacementPolicyArgs(
            collocation="COLLOCATED",
            vm_count=2,
        ),
        region="us-central1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const baz = new gcp.compute.ResourcePolicy("baz", {
        groupPlacementPolicy: {
            collocation: "COLLOCATED",
            vmCount: 2,
        },
        region: "us-central1",
    });
    
    resources:
      baz:
        type: gcp:compute:ResourcePolicy
        properties:
          groupPlacementPolicy:
            collocation: COLLOCATED
            vmCount: 2
          region: us-central1
    

    Resource Policy Placement Policy Max Distance

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var baz = new Gcp.Compute.ResourcePolicy("baz", new()
        {
            Region = "us-central1",
            GroupPlacementPolicy = new Gcp.Compute.Inputs.ResourcePolicyGroupPlacementPolicyArgs
            {
                VmCount = 2,
                Collocation = "COLLOCATED",
                MaxDistance = 2,
            },
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "baz", &compute.ResourcePolicyArgs{
    			Region: pulumi.String("us-central1"),
    			GroupPlacementPolicy: &compute.ResourcePolicyGroupPlacementPolicyArgs{
    				VmCount:     pulumi.Int(2),
    				Collocation: pulumi.String("COLLOCATED"),
    				MaxDistance: pulumi.Int(2),
    			},
    		}, pulumi.Provider(google_beta))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicyGroupPlacementPolicyArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 baz = new ResourcePolicy("baz", ResourcePolicyArgs.builder()        
                .region("us-central1")
                .groupPlacementPolicy(ResourcePolicyGroupPlacementPolicyArgs.builder()
                    .vmCount(2)
                    .collocation("COLLOCATED")
                    .maxDistance(2)
                    .build())
                .build(), CustomResourceOptions.builder()
                    .provider(google_beta)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    baz = gcp.compute.ResourcePolicy("baz",
        region="us-central1",
        group_placement_policy=gcp.compute.ResourcePolicyGroupPlacementPolicyArgs(
            vm_count=2,
            collocation="COLLOCATED",
            max_distance=2,
        ),
        opts=pulumi.ResourceOptions(provider=google_beta))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const baz = new gcp.compute.ResourcePolicy("baz", {
        region: "us-central1",
        groupPlacementPolicy: {
            vmCount: 2,
            collocation: "COLLOCATED",
            maxDistance: 2,
        },
    }, {
        provider: google_beta,
    });
    
    resources:
      baz:
        type: gcp:compute:ResourcePolicy
        properties:
          region: us-central1
          groupPlacementPolicy:
            vmCount: 2
            collocation: COLLOCATED
            maxDistance: 2
        options:
          provider: ${["google-beta"]}
    

    Resource Policy Instance Schedule Policy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var hourly = new Gcp.Compute.ResourcePolicy("hourly", new()
        {
            Description = "Start and stop instances",
            InstanceSchedulePolicy = new Gcp.Compute.Inputs.ResourcePolicyInstanceSchedulePolicyArgs
            {
                TimeZone = "US/Central",
                VmStartSchedule = new Gcp.Compute.Inputs.ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs
                {
                    Schedule = "0 * * * *",
                },
                VmStopSchedule = new Gcp.Compute.Inputs.ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs
                {
                    Schedule = "15 * * * *",
                },
            },
            Region = "us-central1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "hourly", &compute.ResourcePolicyArgs{
    			Description: pulumi.String("Start and stop instances"),
    			InstanceSchedulePolicy: &compute.ResourcePolicyInstanceSchedulePolicyArgs{
    				TimeZone: pulumi.String("US/Central"),
    				VmStartSchedule: &compute.ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs{
    					Schedule: pulumi.String("0 * * * *"),
    				},
    				VmStopSchedule: &compute.ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs{
    					Schedule: pulumi.String("15 * * * *"),
    				},
    			},
    			Region: pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicyInstanceSchedulePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs;
    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 hourly = new ResourcePolicy("hourly", ResourcePolicyArgs.builder()        
                .description("Start and stop instances")
                .instanceSchedulePolicy(ResourcePolicyInstanceSchedulePolicyArgs.builder()
                    .timeZone("US/Central")
                    .vmStartSchedule(ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs.builder()
                        .schedule("0 * * * *")
                        .build())
                    .vmStopSchedule(ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs.builder()
                        .schedule("15 * * * *")
                        .build())
                    .build())
                .region("us-central1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    hourly = gcp.compute.ResourcePolicy("hourly",
        description="Start and stop instances",
        instance_schedule_policy=gcp.compute.ResourcePolicyInstanceSchedulePolicyArgs(
            time_zone="US/Central",
            vm_start_schedule=gcp.compute.ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs(
                schedule="0 * * * *",
            ),
            vm_stop_schedule=gcp.compute.ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs(
                schedule="15 * * * *",
            ),
        ),
        region="us-central1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const hourly = new gcp.compute.ResourcePolicy("hourly", {
        description: "Start and stop instances",
        instanceSchedulePolicy: {
            timeZone: "US/Central",
            vmStartSchedule: {
                schedule: "0 * * * *",
            },
            vmStopSchedule: {
                schedule: "15 * * * *",
            },
        },
        region: "us-central1",
    });
    
    resources:
      hourly:
        type: gcp:compute:ResourcePolicy
        properties:
          description: Start and stop instances
          instanceSchedulePolicy:
            timeZone: US/Central
            vmStartSchedule:
              schedule: 0 * * * *
            vmStopSchedule:
              schedule: 15 * * * *
          region: us-central1
    

    Resource Policy Snapshot Schedule Chain Name

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var hourly = new Gcp.Compute.ResourcePolicy("hourly", new()
        {
            Description = "chain name snapshot",
            Region = "us-central1",
            SnapshotSchedulePolicy = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyArgs
            {
                RetentionPolicy = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs
                {
                    MaxRetentionDays = 14,
                    OnSourceDiskDelete = "KEEP_AUTO_SNAPSHOTS",
                },
                Schedule = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs
                {
                    HourlySchedule = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs
                    {
                        HoursInCycle = 20,
                        StartTime = "23:00",
                    },
                },
                SnapshotProperties = new Gcp.Compute.Inputs.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs
                {
                    ChainName = "test-schedule-chain-name",
                    GuestFlush = true,
                    Labels = 
                    {
                        { "myLabel", "value" },
                    },
                    StorageLocations = "us",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "hourly", &compute.ResourcePolicyArgs{
    			Description: pulumi.String("chain name snapshot"),
    			Region:      pulumi.String("us-central1"),
    			SnapshotSchedulePolicy: &compute.ResourcePolicySnapshotSchedulePolicyArgs{
    				RetentionPolicy: &compute.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs{
    					MaxRetentionDays:   pulumi.Int(14),
    					OnSourceDiskDelete: pulumi.String("KEEP_AUTO_SNAPSHOTS"),
    				},
    				Schedule: &compute.ResourcePolicySnapshotSchedulePolicyScheduleArgs{
    					HourlySchedule: &compute.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs{
    						HoursInCycle: pulumi.Int(20),
    						StartTime:    pulumi.String("23:00"),
    					},
    				},
    				SnapshotProperties: &compute.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs{
    					ChainName:  pulumi.String("test-schedule-chain-name"),
    					GuestFlush: pulumi.Bool(true),
    					Labels: pulumi.StringMap{
    						"myLabel": pulumi.String("value"),
    					},
    					StorageLocations: pulumi.String("us"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs;
    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 hourly = new ResourcePolicy("hourly", ResourcePolicyArgs.builder()        
                .description("chain name snapshot")
                .region("us-central1")
                .snapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicyArgs.builder()
                    .retentionPolicy(ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.builder()
                        .maxRetentionDays(14)
                        .onSourceDiskDelete("KEEP_AUTO_SNAPSHOTS")
                        .build())
                    .schedule(ResourcePolicySnapshotSchedulePolicyScheduleArgs.builder()
                        .hourlySchedule(ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs.builder()
                            .hoursInCycle(20)
                            .startTime("23:00")
                            .build())
                        .build())
                    .snapshotProperties(ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs.builder()
                        .chainName("test-schedule-chain-name")
                        .guestFlush(true)
                        .labels(Map.of("myLabel", "value"))
                        .storageLocations("us")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    hourly = gcp.compute.ResourcePolicy("hourly",
        description="chain name snapshot",
        region="us-central1",
        snapshot_schedule_policy=gcp.compute.ResourcePolicySnapshotSchedulePolicyArgs(
            retention_policy=gcp.compute.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs(
                max_retention_days=14,
                on_source_disk_delete="KEEP_AUTO_SNAPSHOTS",
            ),
            schedule=gcp.compute.ResourcePolicySnapshotSchedulePolicyScheduleArgs(
                hourly_schedule=gcp.compute.ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs(
                    hours_in_cycle=20,
                    start_time="23:00",
                ),
            ),
            snapshot_properties=gcp.compute.ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs(
                chain_name="test-schedule-chain-name",
                guest_flush=True,
                labels={
                    "myLabel": "value",
                },
                storage_locations="us",
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const hourly = new gcp.compute.ResourcePolicy("hourly", {
        description: "chain name snapshot",
        region: "us-central1",
        snapshotSchedulePolicy: {
            retentionPolicy: {
                maxRetentionDays: 14,
                onSourceDiskDelete: "KEEP_AUTO_SNAPSHOTS",
            },
            schedule: {
                hourlySchedule: {
                    hoursInCycle: 20,
                    startTime: "23:00",
                },
            },
            snapshotProperties: {
                chainName: "test-schedule-chain-name",
                guestFlush: true,
                labels: {
                    myLabel: "value",
                },
                storageLocations: "us",
            },
        },
    });
    
    resources:
      hourly:
        type: gcp:compute:ResourcePolicy
        properties:
          description: chain name snapshot
          region: us-central1
          snapshotSchedulePolicy:
            retentionPolicy:
              maxRetentionDays: 14
              onSourceDiskDelete: KEEP_AUTO_SNAPSHOTS
            schedule:
              hourlySchedule:
                hoursInCycle: 20
                startTime: 23:00
            snapshotProperties:
              chainName: test-schedule-chain-name
              guestFlush: true
              labels:
                myLabel: value
              storageLocations: us
    

    Resource Policy Consistency Group

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var cgroup = new Gcp.Compute.ResourcePolicy("cgroup", new()
        {
            DiskConsistencyGroupPolicy = new Gcp.Compute.Inputs.ResourcePolicyDiskConsistencyGroupPolicyArgs
            {
                Enabled = true,
            },
            Region = "europe-west1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewResourcePolicy(ctx, "cgroup", &compute.ResourcePolicyArgs{
    			DiskConsistencyGroupPolicy: &compute.ResourcePolicyDiskConsistencyGroupPolicyArgs{
    				Enabled: pulumi.Bool(true),
    			},
    			Region: pulumi.String("europe-west1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicyDiskConsistencyGroupPolicyArgs;
    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 cgroup = new ResourcePolicy("cgroup", ResourcePolicyArgs.builder()        
                .diskConsistencyGroupPolicy(ResourcePolicyDiskConsistencyGroupPolicyArgs.builder()
                    .enabled(true)
                    .build())
                .region("europe-west1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    cgroup = gcp.compute.ResourcePolicy("cgroup",
        disk_consistency_group_policy=gcp.compute.ResourcePolicyDiskConsistencyGroupPolicyArgs(
            enabled=True,
        ),
        region="europe-west1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const cgroup = new gcp.compute.ResourcePolicy("cgroup", {
        diskConsistencyGroupPolicy: {
            enabled: true,
        },
        region: "europe-west1",
    });
    
    resources:
      cgroup:
        type: gcp:compute:ResourcePolicy
        properties:
          diskConsistencyGroupPolicy:
            enabled: true
          region: europe-west1
    

    Create ResourcePolicy Resource

    new ResourcePolicy(name: string, args?: ResourcePolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ResourcePolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       disk_consistency_group_policy: Optional[ResourcePolicyDiskConsistencyGroupPolicyArgs] = None,
                       group_placement_policy: Optional[ResourcePolicyGroupPlacementPolicyArgs] = None,
                       instance_schedule_policy: Optional[ResourcePolicyInstanceSchedulePolicyArgs] = None,
                       name: Optional[str] = None,
                       project: Optional[str] = None,
                       region: Optional[str] = None,
                       snapshot_schedule_policy: Optional[ResourcePolicySnapshotSchedulePolicyArgs] = None)
    @overload
    def ResourcePolicy(resource_name: str,
                       args: Optional[ResourcePolicyArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    func NewResourcePolicy(ctx *Context, name string, args *ResourcePolicyArgs, opts ...ResourceOption) (*ResourcePolicy, error)
    public ResourcePolicy(string name, ResourcePolicyArgs? args = null, CustomResourceOptions? opts = null)
    public ResourcePolicy(String name, ResourcePolicyArgs args)
    public ResourcePolicy(String name, ResourcePolicyArgs args, CustomResourceOptions options)
    
    type: gcp:compute:ResourcePolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ResourcePolicyArgs
    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 ResourcePolicyArgs
    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 ResourcePolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourcePolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourcePolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ResourcePolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ResourcePolicy resource accepts the following input properties:

    Description string

    An optional description of this resource. Provide this property when you create the resource.

    DiskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicy

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    GroupPlacementPolicy ResourcePolicyGroupPlacementPolicy

    Resource policy for instances used for placement configuration. Structure is documented below.

    InstanceSchedulePolicy ResourcePolicyInstanceSchedulePolicy

    Resource policy for scheduling instance operations. Structure is documented below.

    Name string

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Region string

    Region where resource policy resides.

    SnapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicy

    Policy for creating snapshots of persistent disks. Structure is documented below.

    Description string

    An optional description of this resource. Provide this property when you create the resource.

    DiskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicyArgs

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    GroupPlacementPolicy ResourcePolicyGroupPlacementPolicyArgs

    Resource policy for instances used for placement configuration. Structure is documented below.

    InstanceSchedulePolicy ResourcePolicyInstanceSchedulePolicyArgs

    Resource policy for scheduling instance operations. Structure is documented below.

    Name string

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Region string

    Region where resource policy resides.

    SnapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicyArgs

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description String

    An optional description of this resource. Provide this property when you create the resource.

    diskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicy

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    groupPlacementPolicy ResourcePolicyGroupPlacementPolicy

    Resource policy for instances used for placement configuration. Structure is documented below.

    instanceSchedulePolicy ResourcePolicyInstanceSchedulePolicy

    Resource policy for scheduling instance operations. Structure is documented below.

    name String

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region String

    Region where resource policy resides.

    snapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicy

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description string

    An optional description of this resource. Provide this property when you create the resource.

    diskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicy

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    groupPlacementPolicy ResourcePolicyGroupPlacementPolicy

    Resource policy for instances used for placement configuration. Structure is documented below.

    instanceSchedulePolicy ResourcePolicyInstanceSchedulePolicy

    Resource policy for scheduling instance operations. Structure is documented below.

    name string

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region string

    Region where resource policy resides.

    snapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicy

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description str

    An optional description of this resource. Provide this property when you create the resource.

    disk_consistency_group_policy ResourcePolicyDiskConsistencyGroupPolicyArgs

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    group_placement_policy ResourcePolicyGroupPlacementPolicyArgs

    Resource policy for instances used for placement configuration. Structure is documented below.

    instance_schedule_policy ResourcePolicyInstanceSchedulePolicyArgs

    Resource policy for scheduling instance operations. Structure is documented below.

    name str

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region str

    Region where resource policy resides.

    snapshot_schedule_policy ResourcePolicySnapshotSchedulePolicyArgs

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description String

    An optional description of this resource. Provide this property when you create the resource.

    diskConsistencyGroupPolicy Property Map

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    groupPlacementPolicy Property Map

    Resource policy for instances used for placement configuration. Structure is documented below.

    instanceSchedulePolicy Property Map

    Resource policy for scheduling instance operations. Structure is documented below.

    name String

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region String

    Region where resource policy resides.

    snapshotSchedulePolicy Property Map

    Policy for creating snapshots of persistent disks. Structure is documented below.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    id string

    The provider-assigned unique ID for this managed resource.

    selfLink string

    The URI of the created resource.

    id str

    The provider-assigned unique ID for this managed resource.

    self_link str

    The URI of the created resource.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    Look up Existing ResourcePolicy Resource

    Get an existing ResourcePolicy 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?: ResourcePolicyState, opts?: CustomResourceOptions): ResourcePolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            disk_consistency_group_policy: Optional[ResourcePolicyDiskConsistencyGroupPolicyArgs] = None,
            group_placement_policy: Optional[ResourcePolicyGroupPlacementPolicyArgs] = None,
            instance_schedule_policy: Optional[ResourcePolicyInstanceSchedulePolicyArgs] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            region: Optional[str] = None,
            self_link: Optional[str] = None,
            snapshot_schedule_policy: Optional[ResourcePolicySnapshotSchedulePolicyArgs] = None) -> ResourcePolicy
    func GetResourcePolicy(ctx *Context, name string, id IDInput, state *ResourcePolicyState, opts ...ResourceOption) (*ResourcePolicy, error)
    public static ResourcePolicy Get(string name, Input<string> id, ResourcePolicyState? state, CustomResourceOptions? opts = null)
    public static ResourcePolicy get(String name, Output<String> id, ResourcePolicyState 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:
    Description string

    An optional description of this resource. Provide this property when you create the resource.

    DiskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicy

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    GroupPlacementPolicy ResourcePolicyGroupPlacementPolicy

    Resource policy for instances used for placement configuration. Structure is documented below.

    InstanceSchedulePolicy ResourcePolicyInstanceSchedulePolicy

    Resource policy for scheduling instance operations. Structure is documented below.

    Name string

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Region string

    Region where resource policy resides.

    SelfLink string

    The URI of the created resource.

    SnapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicy

    Policy for creating snapshots of persistent disks. Structure is documented below.

    Description string

    An optional description of this resource. Provide this property when you create the resource.

    DiskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicyArgs

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    GroupPlacementPolicy ResourcePolicyGroupPlacementPolicyArgs

    Resource policy for instances used for placement configuration. Structure is documented below.

    InstanceSchedulePolicy ResourcePolicyInstanceSchedulePolicyArgs

    Resource policy for scheduling instance operations. Structure is documented below.

    Name string

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Region string

    Region where resource policy resides.

    SelfLink string

    The URI of the created resource.

    SnapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicyArgs

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description String

    An optional description of this resource. Provide this property when you create the resource.

    diskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicy

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    groupPlacementPolicy ResourcePolicyGroupPlacementPolicy

    Resource policy for instances used for placement configuration. Structure is documented below.

    instanceSchedulePolicy ResourcePolicyInstanceSchedulePolicy

    Resource policy for scheduling instance operations. Structure is documented below.

    name String

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region String

    Region where resource policy resides.

    selfLink String

    The URI of the created resource.

    snapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicy

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description string

    An optional description of this resource. Provide this property when you create the resource.

    diskConsistencyGroupPolicy ResourcePolicyDiskConsistencyGroupPolicy

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    groupPlacementPolicy ResourcePolicyGroupPlacementPolicy

    Resource policy for instances used for placement configuration. Structure is documented below.

    instanceSchedulePolicy ResourcePolicyInstanceSchedulePolicy

    Resource policy for scheduling instance operations. Structure is documented below.

    name string

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region string

    Region where resource policy resides.

    selfLink string

    The URI of the created resource.

    snapshotSchedulePolicy ResourcePolicySnapshotSchedulePolicy

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description str

    An optional description of this resource. Provide this property when you create the resource.

    disk_consistency_group_policy ResourcePolicyDiskConsistencyGroupPolicyArgs

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    group_placement_policy ResourcePolicyGroupPlacementPolicyArgs

    Resource policy for instances used for placement configuration. Structure is documented below.

    instance_schedule_policy ResourcePolicyInstanceSchedulePolicyArgs

    Resource policy for scheduling instance operations. Structure is documented below.

    name str

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region str

    Region where resource policy resides.

    self_link str

    The URI of the created resource.

    snapshot_schedule_policy ResourcePolicySnapshotSchedulePolicyArgs

    Policy for creating snapshots of persistent disks. Structure is documented below.

    description String

    An optional description of this resource. Provide this property when you create the resource.

    diskConsistencyGroupPolicy Property Map

    Replication consistency group for asynchronous disk replication. Structure is documented below.

    groupPlacementPolicy Property Map

    Resource policy for instances used for placement configuration. Structure is documented below.

    instanceSchedulePolicy Property Map

    Resource policy for scheduling instance operations. Structure is documented below.

    name String

    The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.


    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region String

    Region where resource policy resides.

    selfLink String

    The URI of the created resource.

    snapshotSchedulePolicy Property Map

    Policy for creating snapshots of persistent disks. Structure is documented below.

    Supporting Types

    ResourcePolicyDiskConsistencyGroupPolicy, ResourcePolicyDiskConsistencyGroupPolicyArgs

    Enabled bool

    Enable disk consistency on the resource policy.

    Enabled bool

    Enable disk consistency on the resource policy.

    enabled Boolean

    Enable disk consistency on the resource policy.

    enabled boolean

    Enable disk consistency on the resource policy.

    enabled bool

    Enable disk consistency on the resource policy.

    enabled Boolean

    Enable disk consistency on the resource policy.

    ResourcePolicyGroupPlacementPolicy, ResourcePolicyGroupPlacementPolicyArgs

    AvailabilityDomainCount int

    The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network

    Collocation string

    Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify COLLOCATED to enable collocation. Can only be specified with vm_count. If compute instances are created with a COLLOCATED policy, then exactly vm_count instances must be created at the same time with the resource policy attached. Possible values are: COLLOCATED.

    MaxDistance int
    VmCount int

    Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

    AvailabilityDomainCount int

    The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network

    Collocation string

    Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify COLLOCATED to enable collocation. Can only be specified with vm_count. If compute instances are created with a COLLOCATED policy, then exactly vm_count instances must be created at the same time with the resource policy attached. Possible values are: COLLOCATED.

    MaxDistance int
    VmCount int

    Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

    availabilityDomainCount Integer

    The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network

    collocation String

    Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify COLLOCATED to enable collocation. Can only be specified with vm_count. If compute instances are created with a COLLOCATED policy, then exactly vm_count instances must be created at the same time with the resource policy attached. Possible values are: COLLOCATED.

    maxDistance Integer
    vmCount Integer

    Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

    availabilityDomainCount number

    The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network

    collocation string

    Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify COLLOCATED to enable collocation. Can only be specified with vm_count. If compute instances are created with a COLLOCATED policy, then exactly vm_count instances must be created at the same time with the resource policy attached. Possible values are: COLLOCATED.

    maxDistance number
    vmCount number

    Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

    availability_domain_count int

    The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network

    collocation str

    Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify COLLOCATED to enable collocation. Can only be specified with vm_count. If compute instances are created with a COLLOCATED policy, then exactly vm_count instances must be created at the same time with the resource policy attached. Possible values are: COLLOCATED.

    max_distance int
    vm_count int

    Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

    availabilityDomainCount Number

    The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network

    collocation String

    Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify COLLOCATED to enable collocation. Can only be specified with vm_count. If compute instances are created with a COLLOCATED policy, then exactly vm_count instances must be created at the same time with the resource policy attached. Possible values are: COLLOCATED.

    maxDistance Number
    vmCount Number

    Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

    ResourcePolicyInstanceSchedulePolicy, ResourcePolicyInstanceSchedulePolicyArgs

    TimeZone string

    Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.

    ExpirationTime string

    The expiration time of the schedule. The timestamp is an RFC3339 string.

    StartTime string

    The start time of the schedule. The timestamp is an RFC3339 string.

    VmStartSchedule ResourcePolicyInstanceSchedulePolicyVmStartSchedule

    Specifies the schedule for starting instances. Structure is documented below.

    VmStopSchedule ResourcePolicyInstanceSchedulePolicyVmStopSchedule

    Specifies the schedule for stopping instances. Structure is documented below.

    TimeZone string

    Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.

    ExpirationTime string

    The expiration time of the schedule. The timestamp is an RFC3339 string.

    StartTime string

    The start time of the schedule. The timestamp is an RFC3339 string.

    VmStartSchedule ResourcePolicyInstanceSchedulePolicyVmStartSchedule

    Specifies the schedule for starting instances. Structure is documented below.

    VmStopSchedule ResourcePolicyInstanceSchedulePolicyVmStopSchedule

    Specifies the schedule for stopping instances. Structure is documented below.

    timeZone String

    Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.

    expirationTime String

    The expiration time of the schedule. The timestamp is an RFC3339 string.

    startTime String

    The start time of the schedule. The timestamp is an RFC3339 string.

    vmStartSchedule ResourcePolicyInstanceSchedulePolicyVmStartSchedule

    Specifies the schedule for starting instances. Structure is documented below.

    vmStopSchedule ResourcePolicyInstanceSchedulePolicyVmStopSchedule

    Specifies the schedule for stopping instances. Structure is documented below.

    timeZone string

    Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.

    expirationTime string

    The expiration time of the schedule. The timestamp is an RFC3339 string.

    startTime string

    The start time of the schedule. The timestamp is an RFC3339 string.

    vmStartSchedule ResourcePolicyInstanceSchedulePolicyVmStartSchedule

    Specifies the schedule for starting instances. Structure is documented below.

    vmStopSchedule ResourcePolicyInstanceSchedulePolicyVmStopSchedule

    Specifies the schedule for stopping instances. Structure is documented below.

    time_zone str

    Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.

    expiration_time str

    The expiration time of the schedule. The timestamp is an RFC3339 string.

    start_time str

    The start time of the schedule. The timestamp is an RFC3339 string.

    vm_start_schedule ResourcePolicyInstanceSchedulePolicyVmStartSchedule

    Specifies the schedule for starting instances. Structure is documented below.

    vm_stop_schedule ResourcePolicyInstanceSchedulePolicyVmStopSchedule

    Specifies the schedule for stopping instances. Structure is documented below.

    timeZone String

    Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.

    expirationTime String

    The expiration time of the schedule. The timestamp is an RFC3339 string.

    startTime String

    The start time of the schedule. The timestamp is an RFC3339 string.

    vmStartSchedule Property Map

    Specifies the schedule for starting instances. Structure is documented below.

    vmStopSchedule Property Map

    Specifies the schedule for stopping instances. Structure is documented below.

    ResourcePolicyInstanceSchedulePolicyVmStartSchedule, ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs

    Schedule string

    Specifies the frequency for the operation, using the unix-cron format.

    Schedule string

    Specifies the frequency for the operation, using the unix-cron format.

    schedule String

    Specifies the frequency for the operation, using the unix-cron format.

    schedule string

    Specifies the frequency for the operation, using the unix-cron format.

    schedule str

    Specifies the frequency for the operation, using the unix-cron format.

    schedule String

    Specifies the frequency for the operation, using the unix-cron format.

    ResourcePolicyInstanceSchedulePolicyVmStopSchedule, ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs

    Schedule string

    Specifies the frequency for the operation, using the unix-cron format.

    Schedule string

    Specifies the frequency for the operation, using the unix-cron format.

    schedule String

    Specifies the frequency for the operation, using the unix-cron format.

    schedule string

    Specifies the frequency for the operation, using the unix-cron format.

    schedule str

    Specifies the frequency for the operation, using the unix-cron format.

    schedule String

    Specifies the frequency for the operation, using the unix-cron format.

    ResourcePolicySnapshotSchedulePolicy, ResourcePolicySnapshotSchedulePolicyArgs

    Schedule ResourcePolicySnapshotSchedulePolicySchedule

    Contains one of an hourlySchedule, dailySchedule, or weeklySchedule. Structure is documented below.

    RetentionPolicy ResourcePolicySnapshotSchedulePolicyRetentionPolicy

    Retention policy applied to snapshots created by this resource policy. Structure is documented below.

    SnapshotProperties ResourcePolicySnapshotSchedulePolicySnapshotProperties

    Properties with which the snapshots are created, such as labels. Structure is documented below.

    Schedule ResourcePolicySnapshotSchedulePolicySchedule

    Contains one of an hourlySchedule, dailySchedule, or weeklySchedule. Structure is documented below.

    RetentionPolicy ResourcePolicySnapshotSchedulePolicyRetentionPolicy

    Retention policy applied to snapshots created by this resource policy. Structure is documented below.

    SnapshotProperties ResourcePolicySnapshotSchedulePolicySnapshotProperties

    Properties with which the snapshots are created, such as labels. Structure is documented below.

    schedule ResourcePolicySnapshotSchedulePolicySchedule

    Contains one of an hourlySchedule, dailySchedule, or weeklySchedule. Structure is documented below.

    retentionPolicy ResourcePolicySnapshotSchedulePolicyRetentionPolicy

    Retention policy applied to snapshots created by this resource policy. Structure is documented below.

    snapshotProperties ResourcePolicySnapshotSchedulePolicySnapshotProperties

    Properties with which the snapshots are created, such as labels. Structure is documented below.

    schedule ResourcePolicySnapshotSchedulePolicySchedule

    Contains one of an hourlySchedule, dailySchedule, or weeklySchedule. Structure is documented below.

    retentionPolicy ResourcePolicySnapshotSchedulePolicyRetentionPolicy

    Retention policy applied to snapshots created by this resource policy. Structure is documented below.

    snapshotProperties ResourcePolicySnapshotSchedulePolicySnapshotProperties

    Properties with which the snapshots are created, such as labels. Structure is documented below.

    schedule ResourcePolicySnapshotSchedulePolicySchedule

    Contains one of an hourlySchedule, dailySchedule, or weeklySchedule. Structure is documented below.

    retention_policy ResourcePolicySnapshotSchedulePolicyRetentionPolicy

    Retention policy applied to snapshots created by this resource policy. Structure is documented below.

    snapshot_properties ResourcePolicySnapshotSchedulePolicySnapshotProperties

    Properties with which the snapshots are created, such as labels. Structure is documented below.

    schedule Property Map

    Contains one of an hourlySchedule, dailySchedule, or weeklySchedule. Structure is documented below.

    retentionPolicy Property Map

    Retention policy applied to snapshots created by this resource policy. Structure is documented below.

    snapshotProperties Property Map

    Properties with which the snapshots are created, such as labels. Structure is documented below.

    ResourcePolicySnapshotSchedulePolicyRetentionPolicy, ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs

    MaxRetentionDays int

    Maximum age of the snapshot that is allowed to be kept.

    OnSourceDiskDelete string

    Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are: KEEP_AUTO_SNAPSHOTS, APPLY_RETENTION_POLICY.

    MaxRetentionDays int

    Maximum age of the snapshot that is allowed to be kept.

    OnSourceDiskDelete string

    Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are: KEEP_AUTO_SNAPSHOTS, APPLY_RETENTION_POLICY.

    maxRetentionDays Integer

    Maximum age of the snapshot that is allowed to be kept.

    onSourceDiskDelete String

    Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are: KEEP_AUTO_SNAPSHOTS, APPLY_RETENTION_POLICY.

    maxRetentionDays number

    Maximum age of the snapshot that is allowed to be kept.

    onSourceDiskDelete string

    Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are: KEEP_AUTO_SNAPSHOTS, APPLY_RETENTION_POLICY.

    max_retention_days int

    Maximum age of the snapshot that is allowed to be kept.

    on_source_disk_delete str

    Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are: KEEP_AUTO_SNAPSHOTS, APPLY_RETENTION_POLICY.

    maxRetentionDays Number

    Maximum age of the snapshot that is allowed to be kept.

    onSourceDiskDelete String

    Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are: KEEP_AUTO_SNAPSHOTS, APPLY_RETENTION_POLICY.

    ResourcePolicySnapshotSchedulePolicySchedule, ResourcePolicySnapshotSchedulePolicyScheduleArgs

    DailySchedule ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule

    The policy will execute every nth day at the specified time. Structure is documented below.

    HourlySchedule ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule

    The policy will execute every nth hour starting at the specified time. Structure is documented below.

    WeeklySchedule ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule

    Allows specifying a snapshot time for each day of the week. Structure is documented below.

    DailySchedule ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule

    The policy will execute every nth day at the specified time. Structure is documented below.

    HourlySchedule ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule

    The policy will execute every nth hour starting at the specified time. Structure is documented below.

    WeeklySchedule ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule

    Allows specifying a snapshot time for each day of the week. Structure is documented below.

    dailySchedule ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule

    The policy will execute every nth day at the specified time. Structure is documented below.

    hourlySchedule ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule

    The policy will execute every nth hour starting at the specified time. Structure is documented below.

    weeklySchedule ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule

    Allows specifying a snapshot time for each day of the week. Structure is documented below.

    dailySchedule ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule

    The policy will execute every nth day at the specified time. Structure is documented below.

    hourlySchedule ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule

    The policy will execute every nth hour starting at the specified time. Structure is documented below.

    weeklySchedule ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule

    Allows specifying a snapshot time for each day of the week. Structure is documented below.

    daily_schedule ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule

    The policy will execute every nth day at the specified time. Structure is documented below.

    hourly_schedule ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule

    The policy will execute every nth hour starting at the specified time. Structure is documented below.

    weekly_schedule ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule

    Allows specifying a snapshot time for each day of the week. Structure is documented below.

    dailySchedule Property Map

    The policy will execute every nth day at the specified time. Structure is documented below.

    hourlySchedule Property Map

    The policy will execute every nth hour starting at the specified time. Structure is documented below.

    weeklySchedule Property Map

    Allows specifying a snapshot time for each day of the week. Structure is documented below.

    ResourcePolicySnapshotSchedulePolicyScheduleDailySchedule, ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs

    DaysInCycle int

    Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.

    StartTime string

    This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.

    DaysInCycle int

    Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.

    StartTime string

    This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.

    daysInCycle Integer

    Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.

    startTime String

    This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.

    daysInCycle number

    Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.

    startTime string

    This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.

    days_in_cycle int

    Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.

    start_time str

    This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.

    daysInCycle Number

    Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. Days in cycle for snapshot schedule policy must be 1.

    startTime String

    This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.

    ResourcePolicySnapshotSchedulePolicyScheduleHourlySchedule, ResourcePolicySnapshotSchedulePolicyScheduleHourlyScheduleArgs

    HoursInCycle int

    The number of hours between snapshots.

    StartTime string

    Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00

    HoursInCycle int

    The number of hours between snapshots.

    StartTime string

    Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00

    hoursInCycle Integer

    The number of hours between snapshots.

    startTime String

    Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00

    hoursInCycle number

    The number of hours between snapshots.

    startTime string

    Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00

    hours_in_cycle int

    The number of hours between snapshots.

    start_time str

    Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00

    hoursInCycle Number

    The number of hours between snapshots.

    startTime String

    Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00

    ResourcePolicySnapshotSchedulePolicyScheduleWeeklySchedule, ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleArgs

    DayOfWeeks List<ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeek>

    May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.

    DayOfWeeks []ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeek

    May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.

    dayOfWeeks List<ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeek>

    May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.

    dayOfWeeks ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeek[]

    May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.

    day_of_weeks Sequence[ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeek]

    May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.

    dayOfWeeks List<Property Map>

    May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.

    ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeek, ResourcePolicySnapshotSchedulePolicyScheduleWeeklyScheduleDayOfWeekArgs

    Day string

    The day of the week to create the snapshot. e.g. MONDAY Possible values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

    StartTime string

    Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.

    Day string

    The day of the week to create the snapshot. e.g. MONDAY Possible values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

    StartTime string

    Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.

    day String

    The day of the week to create the snapshot. e.g. MONDAY Possible values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

    startTime String

    Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.

    day string

    The day of the week to create the snapshot. e.g. MONDAY Possible values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

    startTime string

    Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.

    day str

    The day of the week to create the snapshot. e.g. MONDAY Possible values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

    start_time str

    Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.

    day String

    The day of the week to create the snapshot. e.g. MONDAY Possible values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.

    startTime String

    Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.

    ResourcePolicySnapshotSchedulePolicySnapshotProperties, ResourcePolicySnapshotSchedulePolicySnapshotPropertiesArgs

    ChainName string

    Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035.

    GuestFlush bool

    Whether to perform a 'guest aware' snapshot.

    Labels Dictionary<string, string>

    A set of key-value pairs.

    StorageLocations string

    Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)

    ChainName string

    Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035.

    GuestFlush bool

    Whether to perform a 'guest aware' snapshot.

    Labels map[string]string

    A set of key-value pairs.

    StorageLocations string

    Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)

    chainName String

    Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035.

    guestFlush Boolean

    Whether to perform a 'guest aware' snapshot.

    labels Map<String,String>

    A set of key-value pairs.

    storageLocations String

    Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)

    chainName string

    Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035.

    guestFlush boolean

    Whether to perform a 'guest aware' snapshot.

    labels {[key: string]: string}

    A set of key-value pairs.

    storageLocations string

    Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)

    chain_name str

    Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035.

    guest_flush bool

    Whether to perform a 'guest aware' snapshot.

    labels Mapping[str, str]

    A set of key-value pairs.

    storage_locations str

    Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)

    chainName String

    Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035.

    guestFlush Boolean

    Whether to perform a 'guest aware' snapshot.

    labels Map<String>

    A set of key-value pairs.

    storageLocations String

    Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)

    Import

    ResourcePolicy can be imported using any of these accepted formats* projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}} * {{project}}/{{region}}/{{name}} * {{region}}/{{name}} * {{name}} In Terraform v1.5.0 and later, use an import block to import ResourcePolicy using one of the formats above. For exampletf import {

    id = “projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}}”

    to = google_compute_resource_policy.default }

     $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), ResourcePolicy can be imported using one of the formats above. For example
    
     $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}}
    
     $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default {{project}}/{{region}}/{{name}}
    
     $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default {{region}}/{{name}}
    
     $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default {{name}}
    

    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 v7.2.2 published on Monday, Jan 1, 0001 by Pulumi