-
Notifications
You must be signed in to change notification settings - Fork 35
/
instance-image-disk-snapshot.yml
248 lines (248 loc) · 8.68 KB
/
instance-image-disk-snapshot.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 通过指定镜像ID和磁盘快照,配置网络与安全设置,创建具有自定义系统盘的ECS实例。
en: Create an ECS instance with a customized system disk by specifying the image
ID, disk snapshot, configuring network settings, and security configurations.
Parameters:
AllocatePublicIP:
Type: Boolean
Label:
en: Allocate Public IP
zh-cn: 公网IP
Description:
en: If selected, a public IP will be allocated to the created ECS instance.
This attribute only takes effect for classic instances.
zh-cn: 如果选中,则会为创建的ECS实例分配一个公共IP。此属性仅对经典实例生效
Default: true
SecurityGroupId:
Type: String
Label:
en: Security Group ID
zh-cn: 安全组ID
Description:
en: The existing security group ID that the ECS instance belongs to. net type
is classic.
zh-cn: ECS实例所属的现有安全组ID。网络类型是经典的。
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
SnapshotId:
Type: String
Label:
en: Snapshot ID
zh-cn: 快照ID
Description:
en: ID of the snapshot to create the volume.
zh-cn: 创建卷的快照的ID。
AssociationProperty: ALIYUN::ECS::Snapshot::SnapshotId
DiskName:
Type: String
Label:
en: Disk Name
zh-cn: 磁盘名称
Description:
en: Display name of the disk, [2, 128] English or Chinese characters, must start
with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
zh-cn: 磁盘的显示名称,[2,128]英文或中文字符,必须以字母或中文开头,可以包含数字、下划线或“.”、“-”。
Default: MyDiskName
DiskSize:
Type: Number
Label:
en: Disk Size
zh-cn: 磁盘大小
Description:
en: 'The size of the volume, unit in GB.Value range: cloud: [5,2000], cloud_efficiency:
[20,32768], cloud_ssd: [20,32768], ephemeral_ssd: [5,800].The value should
be equal to or greater than the specific snapshot.'
zh-cn: 磁盘大小,单位为GB。值范围:cloud:[5-2000]、cloud_efficiency:[20-32768]、cloud_ssd:[20-32768]、ephemeral_ssd:[5-800]。该值应等于或大于特定快照。
Default: 20
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: 可用区
Description:
en: Availability ID
zh-cn: 可用区ID
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
ImageId:
Type: String
Label:
en: Image ID
zh-cn: 镜像ID
Description:
en: Image ID, represents the image resource to startup one ECS instance, <font><a
href='https://www.alibabacloud.com/help/doc-detail/112977.html' target='_blank'><b>View
image resources</b></font color='blue'></a>
zh-cn: 镜像ID,ECS实例的镜像资源, <font><a href='https://help.aliyun.com/document_detail/112977.html'
target='_blank'><b>查看镜像资源</b></font color='blue'></a>
AssociationProperty: ALIYUN::ECS::Image::ImageId
AssociationPropertyMetadata:
InstanceType: ${InstanceType}
SupportedImageOwnerAlias:
- system
- self
- others
Default: centos_7_04_64_20G_alibase_201701015.vhd
InstanceName:
Type: String
Label:
en: Instance Name
zh-cn: 实例名称
Description:
en: The name of ECS instance
zh-cn: ECS实例名称
Default: myecsInstance
InstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例类型
Description:
en: The ECS instance type, please select the classic network type specification
and make sure it is available, <font><a href='https://www.alibabacloud.com/help/doc-detail/25378.html'
target='_blank'><b>View instance types</b></font color='blue'></a>.
zh-cn: ECS实例类型,请选择经典网络类型规格并确保可用,<font><a href='https://help.aliyun.com/document_detail/25378.html'
target='_blank'><b>查看实例类型</b></font color='blue'></a>
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
InternetChargeType:
Type: String
Label:
en: Internet Charge Type
zh-cn: 实例的收费类型
Description:
en: The charge type of public internet instance
zh-cn: 实例的收费类型,paybytraffic:按流量付费,paybybandwidth:按带宽付费
AssociationPropertyMetadata:
LocaleKey: InternetChargeType
Default: PayByTraffic
AllowedValues:
- PayByBandwidth
- PayByTraffic
SystemDiskCategory:
Type: String
Label:
en: System Disk Category
zh-cn: 系统盘类别
Description:
en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency:
<font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD
Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud:
<font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local
SSD Cloud Disk</font>]'
zh-cn: '<font color=''blue''><b>可选值:</b></font><br>[cloud_efficiency: <font
color=''green''>高效云盘</font>]<br>[cloud_ssd: <font color=''green''>SSD云盘</font>]<br>[cloud_essd:
<font color=''green''>ESSD云盘</font>]<br>[cloud: <font color=''green''>普通云盘</font>]<br>[ephemeral_ssd:
<font color=''green''>本地SSD盘</font>]'
AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
AssociationPropertyMetadata:
InstanceType: InstanceType
MaxAmount:
Type: Number
Label:
en: The Maximum of ECS Instances
zh-cn: 最大ECS实例数
Description:
en: The maximum of ECS instances to be created, must be greater than or equal
to the minimum.
zh-cn: 要创建的ECS实例的最大值必须大于或等于最小值。
ConstraintDescription:
en: An integer within [1, 100]
zh-cn: '[1, 100] 内的整数'
Default: 1
MinValue: 1
MaxValue: 100
Password:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: The root password of ECS instance. The password is a string of 8 to 30 characters
and must contain uppercase/lowercase letters, numbers.
zh-cn: ECS实例密码。密码是一个8到30个字符的字符串,必须包含大写/小写字母和数字。
ConstraintDescription:
en: 'Length 8-30, must contain upper case letters, lower case letters, Numbers,
special symbols three; special characters include: ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/'
zh-cn: 长度8-30,必须包含大写字母、小写字母、数字、特殊符号三种;特殊字符包括:()`~!@#$%^&*_-+=|{}[]:;' <>,.?/
AllowedPattern: '[a-zA-Z0-9-\(\)\`\~\!@\#\$%\^&\*-+=\|\{\}\[\]\:\;\‘\,\.\?\/]*'
MinLength: '8'
MaxLength: '30'
NoEcho: true
Resources:
ECSInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
SecurityGroupId:
Ref: SecurityGroupId
ImageId:
Ref: ImageId
AllocatePublicIP:
Ref: AllocatePublicIP
DiskMappings:
- DiskName:
Ref: DiskName
Size:
Ref: DiskSize
SnapshotId:
Ref: SnapshotId
InstanceName:
Ref: InstanceName
InstanceType:
Ref: InstanceType
InternetChargeType:
Ref: InternetChargeType
IoOptimized: optimized
MaxAmount:
Ref: MaxAmount
Password:
Ref: Password
SystemDiskCategory:
Ref: SystemDiskCategory
Outputs:
InnerIps:
Description: Inner IP address list of the specified instance. Only for classical
instance.
Value:
Fn::GetAtt:
- ECSInstanceGroup
- InnerIps
InstanceIds:
Description: The instance id list of created ecs instance
Value:
Fn::GetAtt:
- ECSInstanceGroup
- InstanceIds
PublicIps:
Description: Public IP address list of created ecs instance.
Value:
Fn::GetAtt:
- ECSInstanceGroup
- PublicIps
ZoneIds:
Description: Zone id of created instance.
Value:
Fn::GetAtt:
- ECSInstanceGroup
- ZoneIds
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ZoneId
- AllocatePublicIP
- SecurityGroupId
- SnapshotId
- DiskName
- DiskSize
- InstanceType
- ImageId
- InstanceName
- InternetChargeType
- SystemDiskCategory
- MaxAmount
- Password
Label:
default: ECS
TemplateTags:
- acs:example:弹性计算:指定镜像、磁盘快照创建ECS实例