-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS-ECS-InheritDiskTagToSnapshot.yml
91 lines (91 loc) · 2.44 KB
/
ACS-ECS-InheritDiskTagToSnapshot.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-ECS-InheritDiskTagToSnapshot
name-zh-cn: 某个地域所有磁盘标签继承到快照
en: All snapshots in the specified region inherit the specified tag on the corresponding disk.
zh-cn: 指定地域下所有的快照继承对应磁盘上指定的标签
categories:
- tag_manage
Parameters:
regionId:
Type: String
Description:
en: The id of region
zh-cn: 地域ID
Label:
en: Region
zh-cn: 地域
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
tagKeys:
Type: List
Description:
en: The list of tag key
zh-cn: 标签Key的集合
Label:
en: TagKeys
zh-cn: 所需继承的标签键列表
isUpdate:
Type: Boolean
Label:
en: IsUpdate
zh-cn: 是否覆盖标签值
Description:
en: Whether to overwrite the tag value if the tag key is the same
zh-cn: 如果标签键相同,是否覆盖标签值
Default: false
rateControl:
Label:
en: RateControl
zh-cn: 任务执行的并发比率
Description:
en: Concurrency rate of task execution
zh-cn: 任务执行的并发比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 100
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Description:
name-en: The RAM role to be assumed by OOS.
name-zh-cn: OOS扮演的RAM角色。
Type: String
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getDisks
Action: ACS::ExecuteAPI
Description:
en: Query the disk information
zh-cn: 查询磁盘信息
Properties:
Service: ECS
API: DescribeDisks
Parameters:
RegionId: '{{ regionId }}'
Outputs:
disks:
Type: List
ValueSelector: .Disks.Disk[].DiskId
- Name: tagSnapshot
Action: ACS::ECS::InheritDiskTagToSnapshot
Description:
en: Inherit the specified disk tags to snapshots
zh-cn: 将指定磁盘的标签继承到快照
Properties:
regionId: '{{ regionId }}'
diskId: '{{ACS::TaskLoopItem}}'
tagKeys: '{{tagKeys}}'
isUpdate: '{{isUpdate}}'
rateControl: '{{rateControl}}'
Loop:
RateControl: '{{rateControl}}'
Items: '{{getDisks.disks}}'
Outputs:
tagResult:
AggregateType: Fn::ListJoin
AggregateField: reqResult