forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs-instance-group-clone.yml
106 lines (106 loc) · 3.8 KB
/
ecs-instance-group-clone.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 克隆ECS实例模板:根据SourceInstanceId,复制相同配置的ECS实例,用户自定义名称、数量、密码,输出新实例ID、公网IP、可用区ID。
en: 'Clone ECS Instance from Template: Replicate an ECS instance with identical
configurations based on the provided SourceInstanceId, allowing users to customize
the name, quantity, and password. The process outputs the new instance IDs, public
IP addresses, and availability zone IDs.'
Parameters:
InstanceName:
Type: String
Label:
en: Instance Name
zh-cn: 实例名称
Description:
en: '[2, 128] alphanumeric letters, underline, dot or hyphen'
zh-cn: 实例名称;2~128个字符,可包含英文、中文、数字、下划线(_)、点号(.)和连字符(-)。
ConstraintDescription:
en: '[2, 128] characters, consists of uppercase letter, lowercase letter, number
or special characters.'
zh-cn: '[2, 128] 个字符,由大写字母、小写字母、数字或特殊字符组成。'
Default: ClonedECS
MinLength: 2
MaxLength: 128
SourceInstanceId:
Type: String
Label:
en: Source Instance ID
zh-cn: 源实例 ID
Description:
en: The source ECS instance ID to be cloned
zh-cn: 需要克隆的ECS实例ID
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
MaxAmount:
Type: Number
Label:
en: The Maximum of ECS Instances
zh-cn: 最大个数
Description:
en: The maximum of ECS instances, must be greater than or equal to the minimum.
zh-cn: 一次性创建ECS实例的最大个数,必须大于或等于一次性创建ECS实例的最小个数
ConstraintDescription:
en: An integer within [1, 100]
zh-cn: '[1, 100] 内的整数'
Default: 1
MinValue: 1
MaxValue: 100
Password:
Type: String
Label:
en: ECS Instance Password
zh-cn: ECS实例密码
Description:
en: '[8, 30] characters, consists of uppercase letter, lowercase letter, number
or special characters such as ( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ;
‘ < > , . ? / '
zh-cn: '长度为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::InstanceGroupClone
Properties:
MaxAmount:
Ref: MaxAmount
Password:
Ref: Password
SourceInstanceId:
Ref: SourceInstanceId
Outputs:
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:
- InstanceName
- SourceInstanceId
- MaxAmount
- Password
Label:
default: ECS
TemplateTags:
- acs:example:弹性计算:指定SourceInstanceId克隆出相同配置的一组ECS实例