-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::ECS::DeleteSnapshotsExceptSharedFromOthers.json
65 lines (65 loc) · 1.82 KB
/
ACS::ECS::DeleteSnapshotsExceptSharedFromOthers.json
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
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::ECS::DeleteSnapshotsExceptSharedFromOthers",
"name-zh-cn": "删除快照(排除来自其他用户的共享快照)",
"en": "Delete snapshots except shared from others.",
"zh-cn": "删除快照(排除来自其他用户的共享快照)"
},
"Parameters": {
"regionId": {
"Type": "String",
"Label": {
"en": "RegionId",
"zh-cn": "地域Id"
}
}
},
"Tasks": [
{
"Name": "DescribeSnapshotsExceptSharedFromOthers",
"Action": "ACS::ExecuteApi",
"Description": {
"en": "Describe snapshots except shared from others",
"zh-cn": "查询快照(排除来自其他用户的共享快照)"
},
"Properties": {
"Service": "ECS",
"API": "DescribeSnapshots",
"Parameters": {
"RegionId": "{{ regionId }}"
}
},
"Outputs": {
"snapshotIds": {
"Type": "List",
"ValueSelector": ".Snapshots.Snapshot | map(select(all(.Tags.Tag[]; .TagKey != \"acs:ecs:sharedFrom\")) | .SnapshotId) | .[]"
}
}
},
{
"Name": "DeleteSnapshotsExceptSharedFromOthers",
"Action": "ACS::ExecuteApi",
"Description": {
"en": "Delete snapshots except shared from others",
"zh-cn": "删除快照(排除来自其他用户的共享快照)"
},
"Properties": {
"Service": "ECS",
"API": "DeleteSnapshot",
"Parameters": {
"SnapshotId": "{{ ACS::TaskLoopItem }}",
"Force": true
}
},
"Loop": {
"Items": "{{ DescribeSnapshotsExceptSharedFromOthers.snapshotIds }}",
"RateControl": {
"MaxErrors": 0,
"Mode": "Concurrency",
"Concurrency": 1
}
}
}
]
}