-
Notifications
You must be signed in to change notification settings - Fork 35
/
auto-snapshot-policy.yml
72 lines (72 loc) · 3.04 KB
/
auto-snapshot-policy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建ECS磁盘自动快照策略,支持自定义快照时间点、保留天数、周期重复日期及关联磁盘,可应用于多磁盘管理。
en: Create an ECS disk automatic snapshot policy, supporting customization of snapshot
time points, retention days, recurring dates in cycles, and association with disks,
applicable to multi-disk management.
Parameters:
TimePoints:
Type: Json
Description: |-
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 a list of [0, 1, ..., 23] and the time points are separated by commas (,).
Default:
- 20
- 23
DiskIds:
Type: Json
Description: The disk ID. When you want to apply the automatic snapshot policy
to multiple disks, you can set the DiskIds to an array. The format is list of
["d-xxxxxxxxx", "d-yyyyyyyyy", ..., "d-zzzzzzzzz"] and the IDs are separated
by commas (,).
Default: null
RetentionDays:
Type: Number
Description: |-
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.
Default: 1
MinValue: -1
MaxValue: 65536
RepeatWeekdays:
Type: Json
Description: |-
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 a list of [1, 2, ..., 7] and the time points are separated by commas (,).
Default:
- 1
- 2
AutoSnapshotPolicyName:
Type: String
Description: |-
The name of the automatic snapshot policy.
It can consist of [2, 128] English or Chinese characters.
Must begin with an uppercase or lowercase letter or a Chinese character. Can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-).
Cannot start with http:// or https://.
Default value: null.
Default: fvt-sda-123
Resources:
AutoSnapshotPolicy:
Type: ALIYUN::ECS::AutoSnapshotPolicy
Properties:
TimePoints:
Ref: TimePoints
DiskIds:
Ref: DiskIds
RetentionDays:
Ref: RetentionDays
RepeatWeekdays:
Ref: RepeatWeekdays
AutoSnapshotPolicyName:
Ref: AutoSnapshotPolicyName
Outputs:
AutoSnapshotPolicyId:
Description: The automatic snapshot policy ID.
Value:
Fn::GetAtt:
- AutoSnapshotPolicy
- AutoSnapshotPolicyId