-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::ECS::RebootInstance.json
80 lines (80 loc) · 1.94 KB
/
ACS::ECS::RebootInstance.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
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::ECS::RebootInstance",
"name-zh-cn": "重启实例(ECS)",
"en": "Restarts the ECS instance by specifying instanceId",
"zh-cn": "重启指定的ECS实例."
},
"Parameters": {
"regionId": {
"Label": {
"en": "RegionId",
"zh-cn": "地域ID"
},
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId",
"Default": "{{ ACS::RegionId }}"
},
"instanceId": {
"Label": {
"en": "ECSInstanceId",
"zh-cn": "ECS实例ID"
},
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId",
"AssociationPropertyMetadata": {
"RegionId": "regionId"
}
},
"forceStop": {
"Label": {
"en": "ForceStop",
"zh-cn": "是否强制关机"
},
"Type": "Boolean",
"Default": false
}
},
"Tasks": [
{
"Name": "rebootInstance",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Restarts the ECS instance",
"zh-cn": "重启ECS实例"
},
"Properties": {
"Service": "ECS",
"API": "RebootInstance",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceId": "{{ instanceId }}",
"ForceStop": "{{ forceStop }}"
}
}
},
{
"Name": "untilInstanceReady",
"Action": "ACS::WaitFor",
"Description": {
"en": "Waits for the ECS instance to enter Running status",
"zh-cn": "等待ECS实例至运行中状态"
},
"Properties": {
"Service": "ECS",
"API": "DescribeInstances",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceIds": [
"{{ instanceId }}"
]
},
"DesiredValues": [
"Running"
],
"PropertySelector": "Instances.Instance[].Status"
}
}
]
}