-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS-SAE-CreateDemoApp.json
112 lines (112 loc) · 2.55 KB
/
ACS-SAE-CreateDemoApp.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
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"en": "Create SAE application and bind them to SLB",
"zh-cn": "创建SAE应用并为应用绑定SLB",
"name-en": "ACS-SAE-CreateDemoApp",
"name-zh-cn": "创建SAE应用"
},
"Parameters": {
"applicationInfos": {
"Label": {
"en": "SAEApplicationInfos",
"zh-cn": "SAE应用信息"
},
"Type": "Json",
"Default": [
{
"appName": "appName",
"imageUrl": "imageUrl"
}
]
}
},
"Tasks": [
{
"Name": "createApplications",
"Action": "ACS::SAE::CreateApplication",
"Description": {
"en": "Create SAE application",
"zh-cn": "创建SAE应用"
},
"Properties": {
"applicationInfo": "{{ ACS::TaskLoopItem }}"
},
"Loop": {
"Items": "{{ applicationInfos }}",
"RateControl": {
"Mode": "Concurrency",
"MaxErrors": 0,
"Concurrency": 3
},
"Outputs": {
"appIds": {
"AggregateType": "Fn::ListJoin",
"AggregateField": "appId"
}
}
},
"Outputs": {
"appId": {
"Type": "String",
"ValueSelector": "appId"
}
}
},
{
"Name": "bindSlb",
"Action": "ACS::ExecuteApi",
"Description": {
"en": "Bind app to SLB",
"zh-cn": "为应用绑定SLB"
},
"Properties": {
"Service": "SAE",
"API": "BindSlb",
"Parameters": {
"AppId": {
"Fn::Select": [
0,
"{{ createApplications.appIds }}"
]
},
"Internet": "[{\"port\":80,\"targetPort\":9999,\"protocol\":\"TCP\"}]"
}
},
"Outputs": {
"ChangeOrderId": {
"ValueSelector": ".Data.ChangeOrderId",
"Type": "String"
}
}
},
{
"Name": "describeBindSlbChangeOrder",
"Action": "ACS::WaitFor",
"Description": {
"en": "Waits for the APP bind to SLB",
"zh-cn": "等待应用成功绑定SLB"
},
"Properties": {
"Service": "SAE",
"API": "DescribeChangeOrder",
"Parameters": {
"ChangeOrderId": "{{ bindSlb.ChangeOrderId }}"
},
"StopRetryValues": [
2,
3,
6,
10
],
"DesiredValues": [
2
],
"PropertySelector": ".Data.Status"
},
"DelayType": "Constant",
"Delay": 6,
"Retries": 10
}
]
}