alicloud.ecs.AutoSnapshotPolicy
Explore with Pulumi AI
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",
])
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
})
}
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",
},
});
});
Coming soon!
resources:
example:
type: alicloud:ecs:AutoSnapshotPolicy
properties:
name: tf-testAcc
repeatWeekdays:
- '1'
- '2'
- '3'
retentionDays: -1
timePoints:
- '1'
- '22'
- '23'
Create AutoSnapshotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AutoSnapshotPolicy(name: string, args: AutoSnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def AutoSnapshotPolicy(resource_name: str,
args: AutoSnapshotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AutoSnapshotPolicy(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, Any]] = None,
target_copy_regions: Optional[Sequence[str]] = None)
func NewAutoSnapshotPolicy(ctx *Context, name string, args AutoSnapshotPolicyArgs, opts ...ResourceOption) (*AutoSnapshotPolicy, error)
public AutoSnapshotPolicy(string name, AutoSnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public AutoSnapshotPolicy(String name, AutoSnapshotPolicyArgs args)
public AutoSnapshotPolicy(String name, AutoSnapshotPolicyArgs args, CustomResourceOptions options)
type: alicloud:ecs:AutoSnapshotPolicy
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 AutoSnapshotPolicyArgs
- 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 AutoSnapshotPolicyArgs
- 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 AutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- 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 autoSnapshotPolicyResource = new AliCloud.Ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource", new()
{
RepeatWeekdays = new[]
{
"string",
},
RetentionDays = 0,
TimePoints = new[]
{
"string",
},
CopiedSnapshotsRetentionDays = 0,
EnableCrossRegionCopy = false,
Name = "string",
Tags =
{
{ "string", "any" },
},
TargetCopyRegions = new[]
{
"string",
},
});
example, err := ecs.NewAutoSnapshotPolicy(ctx, "autoSnapshotPolicyResource", &ecs.AutoSnapshotPolicyArgs{
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.Map{
"string": pulumi.Any("any"),
},
TargetCopyRegions: pulumi.StringArray{
pulumi.String("string"),
},
})
var autoSnapshotPolicyResource = new AutoSnapshotPolicy("autoSnapshotPolicyResource", AutoSnapshotPolicyArgs.builder()
.repeatWeekdays("string")
.retentionDays(0)
.timePoints("string")
.copiedSnapshotsRetentionDays(0)
.enableCrossRegionCopy(false)
.name("string")
.tags(Map.of("string", "any"))
.targetCopyRegions("string")
.build());
auto_snapshot_policy_resource = alicloud.ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource",
repeat_weekdays=["string"],
retention_days=0,
time_points=["string"],
copied_snapshots_retention_days=0,
enable_cross_region_copy=False,
name="string",
tags={
"string": "any",
},
target_copy_regions=["string"])
const autoSnapshotPolicyResource = new alicloud.ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource", {
repeatWeekdays: ["string"],
retentionDays: 0,
timePoints: ["string"],
copiedSnapshotsRetentionDays: 0,
enableCrossRegionCopy: false,
name: "string",
tags: {
string: "any",
},
targetCopyRegions: ["string"],
});
type: alicloud:ecs:AutoSnapshotPolicy
properties:
copiedSnapshotsRetentionDays: 0
enableCrossRegionCopy: false
name: string
repeatWeekdays:
- string
retentionDays: 0
tags:
string: any
targetCopyRegions:
- string
timePoints:
- string
AutoSnapshotPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AutoSnapshotPolicy 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- Enable
Cross boolRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- Name string
- The snapshot policy name.
- Dictionary<string, object>
- A mapping of tags to assign to the resource.
- Target
Copy List<string>Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- Enable
Cross boolRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- Name string
- The snapshot policy name.
- map[string]interface{}
- A mapping of tags to assign to the resource.
- Target
Copy []stringRegions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable
Cross BooleanRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- name String
- The snapshot policy name.
- Map<String,Object>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable
Cross booleanRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- name string
- The snapshot policy name.
- {[key: string]: any}
- A mapping of tags to assign to the resource.
- target
Copy string[]Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable_
cross_ boolregion_ copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- name str
- The snapshot policy name.
- Mapping[str, Any]
- A mapping of tags to assign to the resource.
- target_
copy_ Sequence[str]regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable
Cross BooleanRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- name String
- The snapshot policy name.
- Map<Any>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which the snapshot is copied. You can set a destination region.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutoSnapshotPolicy resource produces the following output properties:
Look up Existing AutoSnapshotPolicy Resource
Get an existing AutoSnapshotPolicy 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?: AutoSnapshotPolicyState, opts?: CustomResourceOptions): AutoSnapshotPolicy
@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, Any]] = None,
target_copy_regions: Optional[Sequence[str]] = None,
time_points: Optional[Sequence[str]] = None) -> AutoSnapshotPolicy
func GetAutoSnapshotPolicy(ctx *Context, name string, id IDInput, state *AutoSnapshotPolicyState, opts ...ResourceOption) (*AutoSnapshotPolicy, error)
public static AutoSnapshotPolicy Get(string name, Input<string> id, AutoSnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static AutoSnapshotPolicy get(String name, Output<String> id, AutoSnapshotPolicyState 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- Enable
Cross boolRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- 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
- The status of Auto Snapshot Policy.
- Dictionary<string, object>
- A mapping of tags to assign to the resource.
- Target
Copy List<string>Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- Enable
Cross boolRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- 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
- The status of Auto Snapshot Policy.
- map[string]interface{}
- A mapping of tags to assign to the resource.
- Target
Copy []stringRegions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable
Cross BooleanRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- 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
- The status of Auto Snapshot Policy.
- Map<String,Object>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable
Cross booleanRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- 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
- The status of Auto Snapshot Policy.
- {[key: string]: any}
- A mapping of tags to assign to the resource.
- target
Copy string[]Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable_
cross_ boolregion_ copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- 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
- The status of Auto Snapshot Policy.
- Mapping[str, Any]
- A mapping of tags to assign to the resource.
- target_
copy_ Sequence[str]regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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 - The retention period of the snapshot copied across regions.
- -1: The snapshot is permanently retained.
- [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
- enable
Cross BooleanRegion Copy - Specifies whether to enable the system to automatically copy snapshots across regions.
- 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
- The status of Auto Snapshot Policy.
- Map<Any>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which the snapshot is copied. You can set a destination region.
- 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
ECS Auto Snapshot Policy can be imported using the id, e.g.
$ pulumi import alicloud:ecs/autoSnapshotPolicy:AutoSnapshotPolicy example <id>
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.