AutoSnapshotPolicyArgs

data class AutoSnapshotPolicyArgs(val copiedSnapshotsRetentionDays: Output<Int>? = null, val enableCrossRegionCopy: Output<Boolean>? = null, val name: Output<String>? = null, val repeatWeekdays: Output<List<String>>? = null, val retentionDays: Output<Int>? = null, val tags: Output<Map<String, Any>>? = null, val targetCopyRegions: Output<List<String>>? = null, val timePoints: Output<List<String>>? = null) : ConvertibleToJava<AutoSnapshotPolicyArgs>

Provides a ECS Auto Snapshot Policy resource. For information about ECS Auto Snapshot Policy and how to use it, see What is Auto Snapshot Policy.

NOTE: Available in v1.117.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ecs.AutoSnapshotPolicy("example", {
name: "tf-testAcc",
repeatWeekdays: [
"1",
"2",
"3",
],
retentionDays: -1,
timePoints: [
"1",
"22",
"23",
],
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ecs.AutoSnapshotPolicy("example",
name="tf-testAcc",
repeat_weekdays=[
"1",
"2",
"3",
],
retention_days=-1,
time_points=[
"1",
"22",
"23",
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ecs.AutoSnapshotPolicy("example", new()
{
Name = "tf-testAcc",
RepeatWeekdays = new[]
{
"1",
"2",
"3",
},
RetentionDays = -1,
TimePoints = new[]
{
"1",
"22",
"23",
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewAutoSnapshotPolicy(ctx, "example", &ecs.AutoSnapshotPolicyArgs{
Name: pulumi.String("tf-testAcc"),
RepeatWeekdays: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("2"),
pulumi.String("3"),
},
RetentionDays: -1,
TimePoints: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("22"),
pulumi.String("23"),
},
})
if err != nil {
return err
}
return nil
})
}
resources:
example:
type: alicloud:ecs:AutoSnapshotPolicy
properties:
name: tf-testAcc
repeatWeekdays:
- '1'
- '2'
- '3'
retentionDays: -1
timePoints:
- '1'
- '22'
- '23'

Import

ECS Auto Snapshot Policy can be imported using the id, e.g.

$ pulumi import alicloud:ecs/autoSnapshotPolicy:AutoSnapshotPolicy example <id>

Constructors

Link copied to clipboard
constructor(copiedSnapshotsRetentionDays: Output<Int>? = null, enableCrossRegionCopy: Output<Boolean>? = null, name: Output<String>? = null, repeatWeekdays: Output<List<String>>? = null, retentionDays: Output<Int>? = null, tags: Output<Map<String, Any>>? = null, targetCopyRegions: Output<List<String>>? = null, timePoints: Output<List<String>>? = null)

Properties

Link copied to clipboard
val copiedSnapshotsRetentionDays: Output<Int>? = null

The retention period of the snapshot copied across regions.

Link copied to clipboard
val enableCrossRegionCopy: Output<Boolean>? = null

Specifies whether to enable the system to automatically copy snapshots across regions.

Link copied to clipboard
val name: Output<String>? = null

The snapshot policy name.

Link copied to clipboard
val repeatWeekdays: Output<List<String>>? = null

The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: 1, 7, which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

Link copied to clipboard
val retentionDays: Output<Int>? = null

The snapshot retention time, and the unit of measurement is day. Optional values:

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val targetCopyRegions: Output<List<String>>? = null

The destination region to which the snapshot is copied. You can set a destination region.

Link copied to clipboard
val timePoints: Output<List<String>>? = null

The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: 0, 23, which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

Functions

Link copied to clipboard
open override fun toJava(): AutoSnapshotPolicyArgs