alicloud.ecs.SnapshotPolicy
Explore with Pulumi AI
DEPRECATED: This resource has been renamed to alicloud.ecs.AutoSnapshotPolicy from version 1.117.0.
Provides an ECS snapshot policy resource.
For information about snapshot policy and how to use it, see Snapshot.
NOTE: Available in 1.42.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sp = new alicloud.ecs.SnapshotPolicy("sp", {
name: "tf-testAcc-sp",
repeatWeekdays: [
"1",
"2",
"3",
],
retentionDays: -1,
timePoints: [
"1",
"22",
"23",
],
});
import pulumi
import pulumi_alicloud as alicloud
sp = alicloud.ecs.SnapshotPolicy("sp",
name="tf-testAcc-sp",
repeat_weekdays=[
"1",
"2",
"3",
],
retention_days=-1,
time_points=[
"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.NewSnapshotPolicy(ctx, "sp", &ecs.SnapshotPolicyArgs{
Name: pulumi.String("tf-testAcc-sp"),
RepeatWeekdays: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("2"),
pulumi.String("3"),
},
RetentionDays: pulumi.Int(-1),
TimePoints: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("22"),
pulumi.String("23"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var sp = new AliCloud.Ecs.SnapshotPolicy("sp", new()
{
Name = "tf-testAcc-sp",
RepeatWeekdays = new[]
{
"1",
"2",
"3",
},
RetentionDays = -1,
TimePoints = new[]
{
"1",
"22",
"23",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.SnapshotPolicy;
import com.pulumi.alicloud.ecs.SnapshotPolicyArgs;
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 sp = new SnapshotPolicy("sp", SnapshotPolicyArgs.builder()
.name("tf-testAcc-sp")
.repeatWeekdays(
"1",
"2",
"3")
.retentionDays(-1)
.timePoints(
"1",
"22",
"23")
.build());
}
}
resources:
sp:
type: alicloud:ecs:SnapshotPolicy
properties:
name: tf-testAcc-sp
repeatWeekdays:
- '1'
- '2'
- '3'
retentionDays: -1
timePoints:
- '1'
- '22'
- '23'
Create SnapshotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnapshotPolicy(name: string, args: SnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def SnapshotPolicy(resource_name: str,
args: SnapshotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SnapshotPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
repeat_weekdays: Optional[Sequence[str]] = None,
retention_days: Optional[int] = None,
time_points: Optional[Sequence[str]] = None,
copied_snapshots_retention_days: Optional[int] = None,
enable_cross_region_copy: Optional[bool] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
target_copy_regions: Optional[Sequence[str]] = None)
func NewSnapshotPolicy(ctx *Context, name string, args SnapshotPolicyArgs, opts ...ResourceOption) (*SnapshotPolicy, error)
public SnapshotPolicy(string name, SnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public SnapshotPolicy(String name, SnapshotPolicyArgs args)
public SnapshotPolicy(String name, SnapshotPolicyArgs args, CustomResourceOptions options)
type: alicloud:ecs:SnapshotPolicy
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 SnapshotPolicyArgs
- 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 SnapshotPolicyArgs
- 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 SnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnapshotPolicyArgs
- 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 snapshotPolicyResource = new AliCloud.Ecs.SnapshotPolicy("snapshotPolicyResource", new()
{
RepeatWeekdays = new[]
{
"string",
},
RetentionDays = 0,
TimePoints = new[]
{
"string",
},
CopiedSnapshotsRetentionDays = 0,
EnableCrossRegionCopy = false,
Name = "string",
Tags =
{
{ "string", "string" },
},
TargetCopyRegions = new[]
{
"string",
},
});
example, err := ecs.NewSnapshotPolicy(ctx, "snapshotPolicyResource", &ecs.SnapshotPolicyArgs{
RepeatWeekdays: pulumi.StringArray{
pulumi.String("string"),
},
RetentionDays: pulumi.Int(0),
TimePoints: pulumi.StringArray{
pulumi.String("string"),
},
CopiedSnapshotsRetentionDays: pulumi.Int(0),
EnableCrossRegionCopy: pulumi.Bool(false),
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetCopyRegions: pulumi.StringArray{
pulumi.String("string"),
},
})
var snapshotPolicyResource = new SnapshotPolicy("snapshotPolicyResource", SnapshotPolicyArgs.builder()
.repeatWeekdays("string")
.retentionDays(0)
.timePoints("string")
.copiedSnapshotsRetentionDays(0)
.enableCrossRegionCopy(false)
.name("string")
.tags(Map.of("string", "string"))
.targetCopyRegions("string")
.build());
snapshot_policy_resource = alicloud.ecs.SnapshotPolicy("snapshotPolicyResource",
repeat_weekdays=["string"],
retention_days=0,
time_points=["string"],
copied_snapshots_retention_days=0,
enable_cross_region_copy=False,
name="string",
tags={
"string": "string",
},
target_copy_regions=["string"])
const snapshotPolicyResource = new alicloud.ecs.SnapshotPolicy("snapshotPolicyResource", {
repeatWeekdays: ["string"],
retentionDays: 0,
timePoints: ["string"],
copiedSnapshotsRetentionDays: 0,
enableCrossRegionCopy: false,
name: "string",
tags: {
string: "string",
},
targetCopyRegions: ["string"],
});
type: alicloud:ecs:SnapshotPolicy
properties:
copiedSnapshotsRetentionDays: 0
enableCrossRegionCopy: false
name: string
repeatWeekdays:
- string
retentionDays: 0
tags:
string: string
targetCopyRegions:
- string
timePoints:
- string
SnapshotPolicy 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 SnapshotPolicy resource accepts the following input properties:
- Repeat
Weekdays List<string> - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- Time
Points List<string> - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- Copied
Snapshots intRetention Days - Enable
Cross boolRegion Copy - Name string
- The snapshot policy name.
- Dictionary<string, string>
- Target
Copy List<string>Regions
- Repeat
Weekdays []string - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- Time
Points []string - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- Copied
Snapshots intRetention Days - Enable
Cross boolRegion Copy - Name string
- The snapshot policy name.
- map[string]string
- Target
Copy []stringRegions
- repeat
Weekdays List<String> - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention
Days Integer The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- time
Points List<String> - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied
Snapshots IntegerRetention Days - enable
Cross BooleanRegion Copy - name String
- The snapshot policy name.
- Map<String,String>
- target
Copy List<String>Regions
- repeat
Weekdays string[] - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention
Days number The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- time
Points string[] - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied
Snapshots numberRetention Days - enable
Cross booleanRegion Copy - name string
- The snapshot policy name.
- {[key: string]: string}
- target
Copy string[]Regions
- repeat_
weekdays Sequence[str] - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention_
days int The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- time_
points Sequence[str] - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied_
snapshots_ intretention_ days - enable_
cross_ boolregion_ copy - name str
- The snapshot policy name.
- Mapping[str, str]
- target_
copy_ Sequence[str]regions
- repeat
Weekdays List<String> - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention
Days Number The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- time
Points List<String> - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied
Snapshots NumberRetention Days - enable
Cross BooleanRegion Copy - name String
- The snapshot policy name.
- Map<String>
- target
Copy List<String>Regions
Outputs
All input properties are implicitly available as output properties. Additionally, the SnapshotPolicy resource produces the following output properties:
Look up Existing SnapshotPolicy Resource
Get an existing SnapshotPolicy 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?: SnapshotPolicyState, opts?: CustomResourceOptions): SnapshotPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
copied_snapshots_retention_days: Optional[int] = None,
enable_cross_region_copy: Optional[bool] = None,
name: Optional[str] = None,
repeat_weekdays: Optional[Sequence[str]] = None,
retention_days: Optional[int] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
target_copy_regions: Optional[Sequence[str]] = None,
time_points: Optional[Sequence[str]] = None) -> SnapshotPolicy
func GetSnapshotPolicy(ctx *Context, name string, id IDInput, state *SnapshotPolicyState, opts ...ResourceOption) (*SnapshotPolicy, error)
public static SnapshotPolicy Get(string name, Input<string> id, SnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static SnapshotPolicy get(String name, Output<String> id, SnapshotPolicyState 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.
- Copied
Snapshots intRetention Days - Enable
Cross boolRegion Copy - Name string
- The snapshot policy name.
- Repeat
Weekdays List<string> - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- Status string
- Dictionary<string, string>
- Target
Copy List<string>Regions - Time
Points List<string> - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- Copied
Snapshots intRetention Days - Enable
Cross boolRegion Copy - Name string
- The snapshot policy name.
- Repeat
Weekdays []string - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- Retention
Days int The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- Status string
- map[string]string
- Target
Copy []stringRegions - Time
Points []string - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied
Snapshots IntegerRetention Days - enable
Cross BooleanRegion Copy - name String
- The snapshot policy name.
- repeat
Weekdays List<String> - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention
Days Integer The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- status String
- Map<String,String>
- target
Copy List<String>Regions - time
Points List<String> - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied
Snapshots numberRetention Days - enable
Cross booleanRegion Copy - name string
- The snapshot policy name.
- repeat
Weekdays string[] - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention
Days number The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- status string
- {[key: string]: string}
- target
Copy string[]Regions - time
Points string[] - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied_
snapshots_ intretention_ days - enable_
cross_ boolregion_ copy - name str
- The snapshot policy name.
- repeat_
weekdays Sequence[str] - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention_
days int The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- status str
- Mapping[str, str]
- target_
copy_ Sequence[str]regions - time_
points Sequence[str] - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
- copied
Snapshots NumberRetention Days - enable
Cross BooleanRegion Copy - name String
- The snapshot policy name.
- repeat
Weekdays List<String> - 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.
- A maximum of seven time points can be selected.
- The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- retention
Days Number The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently.
- [1, 65536]: The number of days retained.
Default value: -1.
- status String
- Map<String>
- target
Copy List<String>Regions - time
Points List<String> - 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.
- A maximum of 24 time points can be selected.
- The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
Import
Snapshot can be imported using the id, e.g.
$ pulumi import alicloud:ecs/snapshotPolicy:SnapshotPolicy snapshot sp-abc1234567890000
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.