1. Packages
  2. Gcorelabs Provider
  3. API Docs
  4. Lifecyclepolicy
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

gcorelabs.Lifecyclepolicy

Explore with Pulumi AI

gcorelabs logo
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

    Represent lifecycle policy. Use to periodically take snapshots

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const lp = new gcore.index.Gcore_lifecyclepolicy("lp", {
        projectId: 1,
        regionId: 1,
        name: "test",
        status: "active",
        action: "volume_snapshot",
        volume: [{
            id: "fe93bfdd-4ce3-4041-b89b-4f10d0d49498",
        }],
        schedule: [{
            maxQuantity: 4,
            interval: [{
                weeks: 1,
                days: 2,
                hours: 3,
                minutes: 4,
            }],
            resourceNameTemplate: "reserve snap of the volume {volume_id}",
            retentionTime: [{
                weeks: 4,
                days: 3,
                hours: 2,
                minutes: 1,
            }],
        }],
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    lp = gcore.index.Gcore_lifecyclepolicy("lp",
        project_id=1,
        region_id=1,
        name=test,
        status=active,
        action=volume_snapshot,
        volume=[{
            id: fe93bfdd-4ce3-4041-b89b-4f10d0d49498,
        }],
        schedule=[{
            maxQuantity: 4,
            interval: [{
                weeks: 1,
                days: 2,
                hours: 3,
                minutes: 4,
            }],
            resourceNameTemplate: reserve snap of the volume {volume_id},
            retentionTime: [{
                weeks: 4,
                days: 3,
                hours: 2,
                minutes: 1,
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcore/sdk/go/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewGcore_lifecyclepolicy(ctx, "lp", &gcore.Gcore_lifecyclepolicyArgs{
    			ProjectId: 1,
    			RegionId:  1,
    			Name:      "test",
    			Status:    "active",
    			Action:    "volume_snapshot",
    			Volume: []map[string]interface{}{
    				map[string]interface{}{
    					"id": "fe93bfdd-4ce3-4041-b89b-4f10d0d49498",
    				},
    			},
    			Schedule: []map[string]interface{}{
    				map[string]interface{}{
    					"maxQuantity": 4,
    					"interval": []map[string]interface{}{
    						map[string]interface{}{
    							"weeks":   1,
    							"days":    2,
    							"hours":   3,
    							"minutes": 4,
    						},
    					},
    					"resourceNameTemplate": "reserve snap of the volume {volume_id}",
    					"retentionTime": []map[string]interface{}{
    						map[string]interface{}{
    							"weeks":   4,
    							"days":    3,
    							"hours":   2,
    							"minutes": 1,
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var lp = new Gcore.Index.Gcore_lifecyclepolicy("lp", new()
        {
            ProjectId = 1,
            RegionId = 1,
            Name = "test",
            Status = "active",
            Action = "volume_snapshot",
            Volume = new[]
            {
                
                {
                    { "id", "fe93bfdd-4ce3-4041-b89b-4f10d0d49498" },
                },
            },
            Schedule = new[]
            {
                
                {
                    { "maxQuantity", 4 },
                    { "interval", new[]
                    {
                        
                        {
                            { "weeks", 1 },
                            { "days", 2 },
                            { "hours", 3 },
                            { "minutes", 4 },
                        },
                    } },
                    { "resourceNameTemplate", "reserve snap of the volume {volume_id}" },
                    { "retentionTime", new[]
                    {
                        
                        {
                            { "weeks", 4 },
                            { "days", 3 },
                            { "hours", 2 },
                            { "minutes", 1 },
                        },
                    } },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.gcore_lifecyclepolicy;
    import com.pulumi.gcore.Gcore_lifecyclepolicyArgs;
    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 lp = new Gcore_lifecyclepolicy("lp", Gcore_lifecyclepolicyArgs.builder()
                .projectId(1)
                .regionId(1)
                .name("test")
                .status("active")
                .action("volume_snapshot")
                .volume(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .schedule(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
        }
    }
    
    resources:
      lp:
        type: gcore:gcore_lifecyclepolicy
        properties:
          projectId: 1
          regionId: 1
          name: test
          status: active
          action: volume_snapshot
          volume:
            - id: fe93bfdd-4ce3-4041-b89b-4f10d0d49498
          schedule:
            - maxQuantity: 4
              interval:
                - weeks: 1
                  days: 2
                  hours: 3
                  minutes: 4
              resourceNameTemplate: reserve snap of the volume {volume_id}
              retentionTime:
                - weeks: 4
                  days: 3
                  hours: 2
                  minutes: 1
    

    Create Lifecyclepolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Lifecyclepolicy(name: string, args?: LifecyclepolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Lifecyclepolicy(resource_name: str,
                        args: Optional[LifecyclepolicyArgs] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def Lifecyclepolicy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        action: Optional[str] = None,
                        lifecyclepolicy_id: Optional[str] = None,
                        name: Optional[str] = None,
                        project_id: Optional[float] = None,
                        project_name: Optional[str] = None,
                        region_id: Optional[float] = None,
                        region_name: Optional[str] = None,
                        schedules: Optional[Sequence[LifecyclepolicyScheduleArgs]] = None,
                        status: Optional[str] = None,
                        volumes: Optional[Sequence[LifecyclepolicyVolumeArgs]] = None)
    func NewLifecyclepolicy(ctx *Context, name string, args *LifecyclepolicyArgs, opts ...ResourceOption) (*Lifecyclepolicy, error)
    public Lifecyclepolicy(string name, LifecyclepolicyArgs? args = null, CustomResourceOptions? opts = null)
    public Lifecyclepolicy(String name, LifecyclepolicyArgs args)
    public Lifecyclepolicy(String name, LifecyclepolicyArgs args, CustomResourceOptions options)
    
    type: gcorelabs:Lifecyclepolicy
    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 LifecyclepolicyArgs
    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 LifecyclepolicyArgs
    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 LifecyclepolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LifecyclepolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LifecyclepolicyArgs
    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 lifecyclepolicyResource = new Gcorelabs.Lifecyclepolicy("lifecyclepolicyResource", new()
    {
        Action = "string",
        LifecyclepolicyId = "string",
        Name = "string",
        ProjectId = 0,
        ProjectName = "string",
        RegionId = 0,
        RegionName = "string",
        Schedules = new[]
        {
            new Gcorelabs.Inputs.LifecyclepolicyScheduleArgs
            {
                MaxQuantity = 0,
                Cron = new Gcorelabs.Inputs.LifecyclepolicyScheduleCronArgs
                {
                    Day = "string",
                    DayOfWeek = "string",
                    Hour = "string",
                    Minute = "string",
                    Month = "string",
                    Timezone = "string",
                    Week = "string",
                },
                Id = "string",
                Interval = new Gcorelabs.Inputs.LifecyclepolicyScheduleIntervalArgs
                {
                    Days = 0,
                    Hours = 0,
                    Minutes = 0,
                    Weeks = 0,
                },
                ResourceNameTemplate = "string",
                RetentionTime = new Gcorelabs.Inputs.LifecyclepolicyScheduleRetentionTimeArgs
                {
                    Days = 0,
                    Hours = 0,
                    Minutes = 0,
                    Weeks = 0,
                },
                Type = "string",
            },
        },
        Status = "string",
        Volumes = new[]
        {
            new Gcorelabs.Inputs.LifecyclepolicyVolumeArgs
            {
                Id = "string",
                Name = "string",
            },
        },
    });
    
    example, err := gcorelabs.NewLifecyclepolicy(ctx, "lifecyclepolicyResource", &gcorelabs.LifecyclepolicyArgs{
    	Action:            pulumi.String("string"),
    	LifecyclepolicyId: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	ProjectId:         pulumi.Float64(0),
    	ProjectName:       pulumi.String("string"),
    	RegionId:          pulumi.Float64(0),
    	RegionName:        pulumi.String("string"),
    	Schedules: gcorelabs.LifecyclepolicyScheduleArray{
    		&gcorelabs.LifecyclepolicyScheduleArgs{
    			MaxQuantity: pulumi.Float64(0),
    			Cron: &gcorelabs.LifecyclepolicyScheduleCronArgs{
    				Day:       pulumi.String("string"),
    				DayOfWeek: pulumi.String("string"),
    				Hour:      pulumi.String("string"),
    				Minute:    pulumi.String("string"),
    				Month:     pulumi.String("string"),
    				Timezone:  pulumi.String("string"),
    				Week:      pulumi.String("string"),
    			},
    			Id: pulumi.String("string"),
    			Interval: &gcorelabs.LifecyclepolicyScheduleIntervalArgs{
    				Days:    pulumi.Float64(0),
    				Hours:   pulumi.Float64(0),
    				Minutes: pulumi.Float64(0),
    				Weeks:   pulumi.Float64(0),
    			},
    			ResourceNameTemplate: pulumi.String("string"),
    			RetentionTime: &gcorelabs.LifecyclepolicyScheduleRetentionTimeArgs{
    				Days:    pulumi.Float64(0),
    				Hours:   pulumi.Float64(0),
    				Minutes: pulumi.Float64(0),
    				Weeks:   pulumi.Float64(0),
    			},
    			Type: pulumi.String("string"),
    		},
    	},
    	Status: pulumi.String("string"),
    	Volumes: gcorelabs.LifecyclepolicyVolumeArray{
    		&gcorelabs.LifecyclepolicyVolumeArgs{
    			Id:   pulumi.String("string"),
    			Name: pulumi.String("string"),
    		},
    	},
    })
    
    var lifecyclepolicyResource = new Lifecyclepolicy("lifecyclepolicyResource", LifecyclepolicyArgs.builder()
        .action("string")
        .lifecyclepolicyId("string")
        .name("string")
        .projectId(0)
        .projectName("string")
        .regionId(0)
        .regionName("string")
        .schedules(LifecyclepolicyScheduleArgs.builder()
            .maxQuantity(0)
            .cron(LifecyclepolicyScheduleCronArgs.builder()
                .day("string")
                .dayOfWeek("string")
                .hour("string")
                .minute("string")
                .month("string")
                .timezone("string")
                .week("string")
                .build())
            .id("string")
            .interval(LifecyclepolicyScheduleIntervalArgs.builder()
                .days(0)
                .hours(0)
                .minutes(0)
                .weeks(0)
                .build())
            .resourceNameTemplate("string")
            .retentionTime(LifecyclepolicyScheduleRetentionTimeArgs.builder()
                .days(0)
                .hours(0)
                .minutes(0)
                .weeks(0)
                .build())
            .type("string")
            .build())
        .status("string")
        .volumes(LifecyclepolicyVolumeArgs.builder()
            .id("string")
            .name("string")
            .build())
        .build());
    
    lifecyclepolicy_resource = gcorelabs.Lifecyclepolicy("lifecyclepolicyResource",
        action="string",
        lifecyclepolicy_id="string",
        name="string",
        project_id=0,
        project_name="string",
        region_id=0,
        region_name="string",
        schedules=[{
            "max_quantity": 0,
            "cron": {
                "day": "string",
                "day_of_week": "string",
                "hour": "string",
                "minute": "string",
                "month": "string",
                "timezone": "string",
                "week": "string",
            },
            "id": "string",
            "interval": {
                "days": 0,
                "hours": 0,
                "minutes": 0,
                "weeks": 0,
            },
            "resource_name_template": "string",
            "retention_time": {
                "days": 0,
                "hours": 0,
                "minutes": 0,
                "weeks": 0,
            },
            "type": "string",
        }],
        status="string",
        volumes=[{
            "id": "string",
            "name": "string",
        }])
    
    const lifecyclepolicyResource = new gcorelabs.Lifecyclepolicy("lifecyclepolicyResource", {
        action: "string",
        lifecyclepolicyId: "string",
        name: "string",
        projectId: 0,
        projectName: "string",
        regionId: 0,
        regionName: "string",
        schedules: [{
            maxQuantity: 0,
            cron: {
                day: "string",
                dayOfWeek: "string",
                hour: "string",
                minute: "string",
                month: "string",
                timezone: "string",
                week: "string",
            },
            id: "string",
            interval: {
                days: 0,
                hours: 0,
                minutes: 0,
                weeks: 0,
            },
            resourceNameTemplate: "string",
            retentionTime: {
                days: 0,
                hours: 0,
                minutes: 0,
                weeks: 0,
            },
            type: "string",
        }],
        status: "string",
        volumes: [{
            id: "string",
            name: "string",
        }],
    });
    
    type: gcorelabs:Lifecyclepolicy
    properties:
        action: string
        lifecyclepolicyId: string
        name: string
        projectId: 0
        projectName: string
        regionId: 0
        regionName: string
        schedules:
            - cron:
                day: string
                dayOfWeek: string
                hour: string
                minute: string
                month: string
                timezone: string
                week: string
              id: string
              interval:
                days: 0
                hours: 0
                minutes: 0
                weeks: 0
              maxQuantity: 0
              resourceNameTemplate: string
              retentionTime:
                days: 0
                hours: 0
                minutes: 0
                weeks: 0
              type: string
        status: string
        volumes:
            - id: string
              name: string
    

    Lifecyclepolicy 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 Lifecyclepolicy resource accepts the following input properties:

    Action string
    LifecyclepolicyId string
    The ID of this resource.
    Name string
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Schedules List<LifecyclepolicySchedule>
    Status string
    Volumes List<LifecyclepolicyVolume>
    List of managed volumes
    Action string
    LifecyclepolicyId string
    The ID of this resource.
    Name string
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    Schedules []LifecyclepolicyScheduleArgs
    Status string
    Volumes []LifecyclepolicyVolumeArgs
    List of managed volumes
    action String
    lifecyclepolicyId String
    The ID of this resource.
    name String
    projectId Double
    projectName String
    regionId Double
    regionName String
    schedules List<LifecyclepolicySchedule>
    status String
    volumes List<LifecyclepolicyVolume>
    List of managed volumes
    action string
    lifecyclepolicyId string
    The ID of this resource.
    name string
    projectId number
    projectName string
    regionId number
    regionName string
    schedules LifecyclepolicySchedule[]
    status string
    volumes LifecyclepolicyVolume[]
    List of managed volumes
    action String
    lifecyclepolicyId String
    The ID of this resource.
    name String
    projectId Number
    projectName String
    regionId Number
    regionName String
    schedules List<Property Map>
    status String
    volumes List<Property Map>
    List of managed volumes

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    UserId double
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId float64
    id String
    The provider-assigned unique ID for this managed resource.
    userId Double
    id string
    The provider-assigned unique ID for this managed resource.
    userId number
    id str
    The provider-assigned unique ID for this managed resource.
    user_id float
    id String
    The provider-assigned unique ID for this managed resource.
    userId Number

    Look up Existing Lifecyclepolicy Resource

    Get an existing Lifecyclepolicy 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?: LifecyclepolicyState, opts?: CustomResourceOptions): Lifecyclepolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            lifecyclepolicy_id: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[float] = None,
            project_name: Optional[str] = None,
            region_id: Optional[float] = None,
            region_name: Optional[str] = None,
            schedules: Optional[Sequence[LifecyclepolicyScheduleArgs]] = None,
            status: Optional[str] = None,
            user_id: Optional[float] = None,
            volumes: Optional[Sequence[LifecyclepolicyVolumeArgs]] = None) -> Lifecyclepolicy
    func GetLifecyclepolicy(ctx *Context, name string, id IDInput, state *LifecyclepolicyState, opts ...ResourceOption) (*Lifecyclepolicy, error)
    public static Lifecyclepolicy Get(string name, Input<string> id, LifecyclepolicyState? state, CustomResourceOptions? opts = null)
    public static Lifecyclepolicy get(String name, Output<String> id, LifecyclepolicyState state, CustomResourceOptions options)
    resources:  _:    type: gcorelabs:Lifecyclepolicy    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string
    LifecyclepolicyId string
    The ID of this resource.
    Name string
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Schedules List<LifecyclepolicySchedule>
    Status string
    UserId double
    Volumes List<LifecyclepolicyVolume>
    List of managed volumes
    Action string
    LifecyclepolicyId string
    The ID of this resource.
    Name string
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    Schedules []LifecyclepolicyScheduleArgs
    Status string
    UserId float64
    Volumes []LifecyclepolicyVolumeArgs
    List of managed volumes
    action String
    lifecyclepolicyId String
    The ID of this resource.
    name String
    projectId Double
    projectName String
    regionId Double
    regionName String
    schedules List<LifecyclepolicySchedule>
    status String
    userId Double
    volumes List<LifecyclepolicyVolume>
    List of managed volumes
    action string
    lifecyclepolicyId string
    The ID of this resource.
    name string
    projectId number
    projectName string
    regionId number
    regionName string
    schedules LifecyclepolicySchedule[]
    status string
    userId number
    volumes LifecyclepolicyVolume[]
    List of managed volumes
    action String
    lifecyclepolicyId String
    The ID of this resource.
    name String
    projectId Number
    projectName String
    regionId Number
    regionName String
    schedules List<Property Map>
    status String
    userId Number
    volumes List<Property Map>
    List of managed volumes

    Supporting Types

    LifecyclepolicySchedule, LifecyclepolicyScheduleArgs

    MaxQuantity double
    Maximum number of stored resources
    Cron LifecyclepolicyScheduleCron
    Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided
    Id string
    The ID of this resource.
    Interval LifecyclepolicyScheduleInterval
    Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided
    ResourceNameTemplate string
    Used to name snapshots. {volume_id} is substituted with volume.id on creation
    RetentionTime LifecyclepolicyScheduleRetentionTime
    If it is set, new resource will be deleted after time
    Type string
    MaxQuantity float64
    Maximum number of stored resources
    Cron LifecyclepolicyScheduleCron
    Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided
    Id string
    The ID of this resource.
    Interval LifecyclepolicyScheduleInterval
    Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided
    ResourceNameTemplate string
    Used to name snapshots. {volume_id} is substituted with volume.id on creation
    RetentionTime LifecyclepolicyScheduleRetentionTime
    If it is set, new resource will be deleted after time
    Type string
    maxQuantity Double
    Maximum number of stored resources
    cron LifecyclepolicyScheduleCron
    Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided
    id String
    The ID of this resource.
    interval LifecyclepolicyScheduleInterval
    Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided
    resourceNameTemplate String
    Used to name snapshots. {volume_id} is substituted with volume.id on creation
    retentionTime LifecyclepolicyScheduleRetentionTime
    If it is set, new resource will be deleted after time
    type String
    maxQuantity number
    Maximum number of stored resources
    cron LifecyclepolicyScheduleCron
    Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided
    id string
    The ID of this resource.
    interval LifecyclepolicyScheduleInterval
    Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided
    resourceNameTemplate string
    Used to name snapshots. {volume_id} is substituted with volume.id on creation
    retentionTime LifecyclepolicyScheduleRetentionTime
    If it is set, new resource will be deleted after time
    type string
    max_quantity float
    Maximum number of stored resources
    cron LifecyclepolicyScheduleCron
    Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided
    id str
    The ID of this resource.
    interval LifecyclepolicyScheduleInterval
    Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided
    resource_name_template str
    Used to name snapshots. {volume_id} is substituted with volume.id on creation
    retention_time LifecyclepolicyScheduleRetentionTime
    If it is set, new resource will be deleted after time
    type str
    maxQuantity Number
    Maximum number of stored resources
    cron Property Map
    Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided
    id String
    The ID of this resource.
    interval Property Map
    Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided
    resourceNameTemplate String
    Used to name snapshots. {volume_id} is substituted with volume.id on creation
    retentionTime Property Map
    If it is set, new resource will be deleted after time
    type String

    LifecyclepolicyScheduleCron, LifecyclepolicyScheduleCronArgs

    Day string
    Either single asterisk or comma-separated list of integers (1-31)
    DayOfWeek string
    Either single asterisk or comma-separated list of integers (0-6)
    Hour string
    Either single asterisk or comma-separated list of integers (0-23)
    Minute string
    Either single asterisk or comma-separated list of integers (0-59)
    Month string
    Either single asterisk or comma-separated list of integers (1-12)
    Timezone string
    Week string
    Either single asterisk or comma-separated list of integers (1-53)
    Day string
    Either single asterisk or comma-separated list of integers (1-31)
    DayOfWeek string
    Either single asterisk or comma-separated list of integers (0-6)
    Hour string
    Either single asterisk or comma-separated list of integers (0-23)
    Minute string
    Either single asterisk or comma-separated list of integers (0-59)
    Month string
    Either single asterisk or comma-separated list of integers (1-12)
    Timezone string
    Week string
    Either single asterisk or comma-separated list of integers (1-53)
    day String
    Either single asterisk or comma-separated list of integers (1-31)
    dayOfWeek String
    Either single asterisk or comma-separated list of integers (0-6)
    hour String
    Either single asterisk or comma-separated list of integers (0-23)
    minute String
    Either single asterisk or comma-separated list of integers (0-59)
    month String
    Either single asterisk or comma-separated list of integers (1-12)
    timezone String
    week String
    Either single asterisk or comma-separated list of integers (1-53)
    day string
    Either single asterisk or comma-separated list of integers (1-31)
    dayOfWeek string
    Either single asterisk or comma-separated list of integers (0-6)
    hour string
    Either single asterisk or comma-separated list of integers (0-23)
    minute string
    Either single asterisk or comma-separated list of integers (0-59)
    month string
    Either single asterisk or comma-separated list of integers (1-12)
    timezone string
    week string
    Either single asterisk or comma-separated list of integers (1-53)
    day str
    Either single asterisk or comma-separated list of integers (1-31)
    day_of_week str
    Either single asterisk or comma-separated list of integers (0-6)
    hour str
    Either single asterisk or comma-separated list of integers (0-23)
    minute str
    Either single asterisk or comma-separated list of integers (0-59)
    month str
    Either single asterisk or comma-separated list of integers (1-12)
    timezone str
    week str
    Either single asterisk or comma-separated list of integers (1-53)
    day String
    Either single asterisk or comma-separated list of integers (1-31)
    dayOfWeek String
    Either single asterisk or comma-separated list of integers (0-6)
    hour String
    Either single asterisk or comma-separated list of integers (0-23)
    minute String
    Either single asterisk or comma-separated list of integers (0-59)
    month String
    Either single asterisk or comma-separated list of integers (1-12)
    timezone String
    week String
    Either single asterisk or comma-separated list of integers (1-53)

    LifecyclepolicyScheduleInterval, LifecyclepolicyScheduleIntervalArgs

    Days double
    Number of days to wait between actions
    Hours double
    Number of hours to wait between actions
    Minutes double
    Number of minutes to wait between actions
    Weeks double
    Number of weeks to wait between actions
    Days float64
    Number of days to wait between actions
    Hours float64
    Number of hours to wait between actions
    Minutes float64
    Number of minutes to wait between actions
    Weeks float64
    Number of weeks to wait between actions
    days Double
    Number of days to wait between actions
    hours Double
    Number of hours to wait between actions
    minutes Double
    Number of minutes to wait between actions
    weeks Double
    Number of weeks to wait between actions
    days number
    Number of days to wait between actions
    hours number
    Number of hours to wait between actions
    minutes number
    Number of minutes to wait between actions
    weeks number
    Number of weeks to wait between actions
    days float
    Number of days to wait between actions
    hours float
    Number of hours to wait between actions
    minutes float
    Number of minutes to wait between actions
    weeks float
    Number of weeks to wait between actions
    days Number
    Number of days to wait between actions
    hours Number
    Number of hours to wait between actions
    minutes Number
    Number of minutes to wait between actions
    weeks Number
    Number of weeks to wait between actions

    LifecyclepolicyScheduleRetentionTime, LifecyclepolicyScheduleRetentionTimeArgs

    Days double
    Number of days to wait before deleting snapshot
    Hours double
    Number of hours to wait before deleting snapshot
    Minutes double
    Number of minutes to wait before deleting snapshot
    Weeks double
    Number of weeks to wait before deleting snapshot
    Days float64
    Number of days to wait before deleting snapshot
    Hours float64
    Number of hours to wait before deleting snapshot
    Minutes float64
    Number of minutes to wait before deleting snapshot
    Weeks float64
    Number of weeks to wait before deleting snapshot
    days Double
    Number of days to wait before deleting snapshot
    hours Double
    Number of hours to wait before deleting snapshot
    minutes Double
    Number of minutes to wait before deleting snapshot
    weeks Double
    Number of weeks to wait before deleting snapshot
    days number
    Number of days to wait before deleting snapshot
    hours number
    Number of hours to wait before deleting snapshot
    minutes number
    Number of minutes to wait before deleting snapshot
    weeks number
    Number of weeks to wait before deleting snapshot
    days float
    Number of days to wait before deleting snapshot
    hours float
    Number of hours to wait before deleting snapshot
    minutes float
    Number of minutes to wait before deleting snapshot
    weeks float
    Number of weeks to wait before deleting snapshot
    days Number
    Number of days to wait before deleting snapshot
    hours Number
    Number of hours to wait before deleting snapshot
    minutes Number
    Number of minutes to wait before deleting snapshot
    weeks Number
    Number of weeks to wait before deleting snapshot

    LifecyclepolicyVolume, LifecyclepolicyVolumeArgs

    Id string
    The ID of this resource.
    Name string
    Id string
    The ID of this resource.
    Name string
    id String
    The ID of this resource.
    name String
    id string
    The ID of this resource.
    name string
    id str
    The ID of this resource.
    name str
    id String
    The ID of this resource.
    name String

    Import

    import using <project_id>:<region_id>:<lifecyclepolicy_id> format

    $ pulumi import gcorelabs:index/lifecyclepolicy:Lifecyclepolicy lifecyclepolicy1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    gcorelabs g-core/terraform-provider-gcorelabs
    License
    Notes
    This Pulumi package is based on the gcorelabs Terraform Provider.
    gcorelabs logo
    gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core