-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::ECS::BulkyEncryptDataDisk.json
110 lines (110 loc) · 2.62 KB
/
ACS::ECS::BulkyEncryptDataDisk.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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::ECS::BulkyEncryptDataDisk",
"name-zh-cn": "批量加密数据盘",
"en": "Bulky encrypt Data disk",
"zh-cn": "批量加密数据盘"
},
"Parameters": {
"regionId": {
"Label": {
"en": "RegionId",
"zh-cn": "地域ID"
},
"Type": "String",
"AssociationProperty": "RegionId",
"Default": "{{ ACS::RegionId }}"
},
"instanceId": {
"Label": {
"en": "InstanceId",
"zh-cn": "实例ID"
},
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId"
},
"KMSKeyId": {
"Label": {
"en": "KMSKeyId",
"zh-cn": "加密快照使用的KMS密钥ID"
},
"Type": "String"
}
},
"Tasks": [
{
"Name": "waitInstanceReady",
"Action": "ACS::WaitFor",
"Description": {
"en": "Waits the ECS instance status to running or stopped",
"zh-cn": "等待实例到running或者stopped状态"
},
"Properties": {
"Service": "ECS",
"API": "DescribeInstances",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceIds": [
"{{ instanceId }}"
]
},
"DesiredValues": [
"Running",
"Stopped"
],
"PropertySelector": "Instances.Instance[].Status"
},
"Outputs": {
"keyPairName": {
"Type": "String",
"ValueSelector": "Instances.Instance[].KeyPairName"
}
}
},
{
"Name": "describeDisk",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Query the disk info",
"zh-cn": "获取磁盘信息"
},
"Properties": {
"Service": "ECS",
"API": "DescribeDisks",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceId": "{{ instanceId }}",
"DiskType": "Data"
}
},
"Outputs": {
"diskIds": {
"Type": "List",
"ValueSelector": "Disks.Disk[].DiskId"
}
}
},
{
"Name": "encryptDataDisk",
"Action": "ACS::ECS::EncryptDataDisk",
"Description": {
"en": "Encrypt data disk",
"zh-cn": "加密数据盘"
},
"Properties": {
"regionId": "{{ regionId }}",
"diskId": "{{ ACS::TaskLoopItem }}",
"KMSKeyId": "{{ KMSKeyId }}"
},
"Loop": {
"Items": "{{ describeDisk.diskIds }}",
"RateControl": {
"Mode": "Concurrency",
"MaxErrors": 0,
"Concurrency": 1
}
}
}
]
}