-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::ECS::CreateAndAttachNetworkInterface.json
119 lines (119 loc) · 3.14 KB
/
ACS::ECS::CreateAndAttachNetworkInterface.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
111
112
113
114
115
116
117
118
119
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::ECS::CreateAndAttachNetworkInterface",
"name-zh-cn": "创建并将网卡挂载至ECS实例",
"en": "Creates an elastic network interface (ENI) and attaches to an instance",
"zh-cn": "创建一个弹性网卡并将其挂载到实例"
},
"Parameters": {
"regionId": {
"Description": {
"en": "The ID of region",
"zh-cn": "地域ID"
},
"Type": "String",
"Default": "{{ ACS::RegionId }}"
},
"instanceId": {
"Description": {
"en": "The ID of the ECS instance",
"zh-cn": "ECS实例ID"
},
"Type": "String",
"MinLength": 1,
"MaxLength": 30
},
"securityGroupId": {
"Description": {
"en": "The ID of the security group",
"zh-cn": "安全组ID"
},
"Type": "String",
"AllowedPattern": "sg-[A-Za-z0-9]*",
"MinLength": 1,
"MaxLength": 30
},
"vSwitchId": {
"Description": {
"en": "The ID of the VSwitch",
"zh-cn": "交换机ID"
},
"Type": "String",
"AllowedPattern": "vsw-[A-Za-z0-9]*",
"MinLength": 1,
"MaxLength": 30
}
},
"Tasks": [
{
"Name": "checkInstanceReady",
"Action": "ACS::CheckFor",
"Description": {
"en": "Checks whether the ECS instance status is running or stopped",
"zh-cn": "检测ECS实例的状态为Running或Stopped"
},
"Properties": {
"Service": "ECS",
"API": "DescribeInstances",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceIds": [
"{{ instanceId }}"
]
},
"DesiredValues": [
"Running",
"Stopped"
],
"PropertySelector": "Instances.Instance[].Status"
}
},
{
"Name": "createNetworkInterface",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Creates an elastic network interface (ENI)",
"zh-cn": "创建弹性网卡"
},
"Properties": {
"Service": "ECS",
"API": "CreateNetworkInterface",
"Parameters": {
"RegionId": "{{ regionId }}",
"SecurityGroupId": "{{ securityGroupId }}",
"VSwitchId": "{{ vSwitchId }}"
}
},
"Outputs": {
"networkInterfaceId": {
"Type": "String",
"ValueSelector": "NetworkInterfaceId"
}
}
},
{
"Name": "attachNetworkInterface",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Attaches an ENI to a VPC-connected instance",
"zh-cn": "绑定一个弹性网卡(ENI)到一台专有网络VPC类型ECS实例上"
},
"Properties": {
"Service": "ECS",
"API": "AttachNetworkInterface",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceId": "{{ instanceId }}",
"NetworkInterfaceId": "{{ createNetworkInterface.networkInterfaceId }}"
}
}
}
],
"Outputs": {
"networkInterfaceId": {
"Type": "String",
"Value": "{{ createNetworkInterface.networkInterfaceId }}"
}
}
}