-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::ECS::ApplyAutoSnapshotPolicy.yml
51 lines (51 loc) · 1.37 KB
/
ACS::ECS::ApplyAutoSnapshotPolicy.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
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::ECS::ApplyAutoSnapshotPolic
name-zh-cn: 为云盘应用自动快照策略
en: Apply an automatic snapshot policy to one or more disks
zh-cn: 为一块或者多块云盘应用自动快照策略
Parameters:
regionId:
Description:
en: The ID of region
zh-cn: 地域ID
Type: String
Default: '{{ ACS::RegionId }}'
autoSnapshotPolicyId:
Description:
en: The ID of ECS AutoSnapshotPolicy
zh-cn: ECS 自动快照策略的ID
Type: String
instanceId:
Description:
en: The ID of ECS instance
zh-cn: ECS实例ID
Type: String
Tasks:
- Name: getDiskIds
Action: 'ACS::ExecuteAPI'
Description:
en: Queries all disk IDs of the ECS instance
zh-cn: 获取ECS实例的所有磁盘的ID
Properties:
Service: ECS
API: DescribeDisks
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ instanceId }}'
Outputs:
diskIds:
Type: List
ValueSelector: 'Disks.Disk[].DiskId'
- Name: applyAutoSnapshotPolicy
Action: 'ACS::ExecuteAPI'
Description:
en: Apply auto snapshot policy to disk
zh-cn: 应用自动快照策略
Properties:
Service: ECS
API: ApplyAutoSnapshotPolicy
Parameters:
RegionId: '{{ regionId }}'
autoSnapshotPolicyId: '{{ autoSnapshotPolicyId }}'
diskIds: '{{ getDiskIds.diskIds }}'