1. Packages
  2. Gcore Provider
  3. API Docs
  4. Lifecyclepolicy
gcore 0.20.0 published on Tuesday, Apr 22, 2025 by g-core

gcore.Lifecyclepolicy

Explore with Pulumi AI

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.Lifecyclepolicy("lp", {
    action: "volume_snapshot",
    projectId: 1,
    regionId: 1,
    schedules: [{
        interval: {
            days: 2,
            hours: 3,
            minutes: 4,
            weeks: 1,
        },
        maxQuantity: 4,
        resourceNameTemplate: "reserve snap of the volume {volume_id}",
        retentionTime: {
            days: 3,
            hours: 2,
            minutes: 1,
            weeks: 4,
        },
    }],
    status: "active",
    volumes: [{
        id: "fe93bfdd-4ce3-4041-b89b-4f10d0d49498",
    }],
});
Copy
import pulumi
import pulumi_gcore as gcore

lp = gcore.Lifecyclepolicy("lp",
    action="volume_snapshot",
    project_id=1,
    region_id=1,
    schedules=[{
        "interval": {
            "days": 2,
            "hours": 3,
            "minutes": 4,
            "weeks": 1,
        },
        "max_quantity": 4,
        "resource_name_template": "reserve snap of the volume {volume_id}",
        "retention_time": {
            "days": 3,
            "hours": 2,
            "minutes": 1,
            "weeks": 4,
        },
    }],
    status="active",
    volumes=[{
        "id": "fe93bfdd-4ce3-4041-b89b-4f10d0d49498",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gcore.NewLifecyclepolicy(ctx, "lp", &gcore.LifecyclepolicyArgs{
			Action:    pulumi.String("volume_snapshot"),
			ProjectId: pulumi.Float64(1),
			RegionId:  pulumi.Float64(1),
			Schedules: gcore.LifecyclepolicyScheduleArray{
				&gcore.LifecyclepolicyScheduleArgs{
					Interval: &gcore.LifecyclepolicyScheduleIntervalArgs{
						Days:    pulumi.Float64(2),
						Hours:   pulumi.Float64(3),
						Minutes: pulumi.Float64(4),
						Weeks:   pulumi.Float64(1),
					},
					MaxQuantity:          pulumi.Float64(4),
					ResourceNameTemplate: pulumi.String("reserve snap of the volume {volume_id}"),
					RetentionTime: &gcore.LifecyclepolicyScheduleRetentionTimeArgs{
						Days:    pulumi.Float64(3),
						Hours:   pulumi.Float64(2),
						Minutes: pulumi.Float64(1),
						Weeks:   pulumi.Float64(4),
					},
				},
			},
			Status: pulumi.String("active"),
			Volumes: gcore.LifecyclepolicyVolumeArray{
				&gcore.LifecyclepolicyVolumeArgs{
					Id: pulumi.String("fe93bfdd-4ce3-4041-b89b-4f10d0d49498"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;

return await Deployment.RunAsync(() => 
{
    var lp = new Gcore.Lifecyclepolicy("lp", new()
    {
        Action = "volume_snapshot",
        ProjectId = 1,
        RegionId = 1,
        Schedules = new[]
        {
            new Gcore.Inputs.LifecyclepolicyScheduleArgs
            {
                Interval = new Gcore.Inputs.LifecyclepolicyScheduleIntervalArgs
                {
                    Days = 2,
                    Hours = 3,
                    Minutes = 4,
                    Weeks = 1,
                },
                MaxQuantity = 4,
                ResourceNameTemplate = "reserve snap of the volume {volume_id}",
                RetentionTime = new Gcore.Inputs.LifecyclepolicyScheduleRetentionTimeArgs
                {
                    Days = 3,
                    Hours = 2,
                    Minutes = 1,
                    Weeks = 4,
                },
            },
        },
        Status = "active",
        Volumes = new[]
        {
            new Gcore.Inputs.LifecyclepolicyVolumeArgs
            {
                Id = "fe93bfdd-4ce3-4041-b89b-4f10d0d49498",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.Lifecyclepolicy;
import com.pulumi.gcore.LifecyclepolicyArgs;
import com.pulumi.gcore.inputs.LifecyclepolicyScheduleArgs;
import com.pulumi.gcore.inputs.LifecyclepolicyScheduleIntervalArgs;
import com.pulumi.gcore.inputs.LifecyclepolicyScheduleRetentionTimeArgs;
import com.pulumi.gcore.inputs.LifecyclepolicyVolumeArgs;
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 Lifecyclepolicy("lp", LifecyclepolicyArgs.builder()
            .action("volume_snapshot")
            .projectId(1)
            .regionId(1)
            .schedules(LifecyclepolicyScheduleArgs.builder()
                .interval(LifecyclepolicyScheduleIntervalArgs.builder()
                    .days(2)
                    .hours(3)
                    .minutes(4)
                    .weeks(1)
                    .build())
                .maxQuantity(4)
                .resourceNameTemplate("reserve snap of the volume {volume_id}")
                .retentionTime(LifecyclepolicyScheduleRetentionTimeArgs.builder()
                    .days(3)
                    .hours(2)
                    .minutes(1)
                    .weeks(4)
                    .build())
                .build())
            .status("active")
            .volumes(LifecyclepolicyVolumeArgs.builder()
                .id("fe93bfdd-4ce3-4041-b89b-4f10d0d49498")
                .build())
            .build());

    }
}
Copy
resources:
  lp:
    type: gcore:Lifecyclepolicy
    properties:
      action: volume_snapshot
      projectId: 1
      regionId: 1
      schedules:
        - interval:
            days: 2
            hours: 3
            minutes: 4
            weeks: 1
          maxQuantity: 4
          resourceNameTemplate: reserve snap of the volume {volume_id}
          retentionTime:
            days: 3
            hours: 2
            minutes: 1
            weeks: 4
      status: active
      volumes:
        - id: fe93bfdd-4ce3-4041-b89b-4f10d0d49498
Copy

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: gcore:Lifecyclepolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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 Gcore.Lifecyclepolicy("lifecyclepolicyResource", new()
{
    Action = "string",
    LifecyclepolicyId = "string",
    Name = "string",
    ProjectId = 0,
    ProjectName = "string",
    RegionId = 0,
    RegionName = "string",
    Schedules = new[]
    {
        new Gcore.Inputs.LifecyclepolicyScheduleArgs
        {
            MaxQuantity = 0,
            Cron = new Gcore.Inputs.LifecyclepolicyScheduleCronArgs
            {
                Day = "string",
                DayOfWeek = "string",
                Hour = "string",
                Minute = "string",
                Month = "string",
                Timezone = "string",
                Week = "string",
            },
            Id = "string",
            Interval = new Gcore.Inputs.LifecyclepolicyScheduleIntervalArgs
            {
                Days = 0,
                Hours = 0,
                Minutes = 0,
                Weeks = 0,
            },
            ResourceNameTemplate = "string",
            RetentionTime = new Gcore.Inputs.LifecyclepolicyScheduleRetentionTimeArgs
            {
                Days = 0,
                Hours = 0,
                Minutes = 0,
                Weeks = 0,
            },
            Type = "string",
        },
    },
    Status = "string",
    Volumes = new[]
    {
        new Gcore.Inputs.LifecyclepolicyVolumeArgs
        {
            Id = "string",
            Name = "string",
        },
    },
});
Copy
example, err := gcore.NewLifecyclepolicy(ctx, "lifecyclepolicyResource", &gcore.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: gcore.LifecyclepolicyScheduleArray{
		&gcore.LifecyclepolicyScheduleArgs{
			MaxQuantity: pulumi.Float64(0),
			Cron: &gcore.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: &gcore.LifecyclepolicyScheduleIntervalArgs{
				Days:    pulumi.Float64(0),
				Hours:   pulumi.Float64(0),
				Minutes: pulumi.Float64(0),
				Weeks:   pulumi.Float64(0),
			},
			ResourceNameTemplate: pulumi.String("string"),
			RetentionTime: &gcore.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: gcore.LifecyclepolicyVolumeArray{
		&gcore.LifecyclepolicyVolumeArgs{
			Id:   pulumi.String("string"),
			Name: pulumi.String("string"),
		},
	},
})
Copy
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());
Copy
lifecyclepolicy_resource = gcore.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",
    }])
Copy
const lifecyclepolicyResource = new gcore.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",
    }],
});
Copy
type: gcore: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
Copy

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: gcore:Lifecyclepolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. string
The ID of this resource.
Name string
Id This property is required. string
The ID of this resource.
Name string
id This property is required. String
The ID of this resource.
name String
id This property is required. string
The ID of this resource.
name string
id This property is required. str
The ID of this resource.
name str
id This property is required. String
The ID of this resource.
name String

Import

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

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

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

Package Details

Repository
gcore g-core/terraform-provider-gcore
License
Notes
This Pulumi package is based on the gcore Terraform Provider.