forked from aliyun/oos-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathACS-ECS-RunShellScript.json
94 lines (94 loc) · 2.5 KB
/
ACS-ECS-RunShellScript.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
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"en": "Run shell script.",
"zh-cn": "\u8fd0\u884cshell\u811a\u672c",
"title": "ACS-ECS-RunShellScript",
"name-zh-cn": "\u8fd0\u884cshell\u811a\u672c",
"categories": [
"run_command"
]
},
"Parameters": {
"regionId": {
"Type": "String",
"Description": {
"en": "The id of region.",
"zh-cn": "\u5730\u57dfID\u3002"
},
"AssociationProperty": "RegionId",
"Default": "{{ ACS::RegionId }}"
},
"instanceId": {
"Description": {
"en": "The ID of ECS Instance.",
"zh-cn": "ECS\u5b9e\u4f8bID\u3002"
},
"Type": "String",
"MaxLength": 30,
"MinLength": 1
},
"commandContent": {
"Description": {
"en": "The content of command.",
"zh-cn": "\u547d\u4ee4\u3002"
},
"Type": "String",
"AssociationProperty": "Code"
},
"workingDir": {
"Description": {
"en": "The directory where the shell script runs on the ECS instances.",
"zh-cn": "ECS\u5b9e\u4f8b\u4e2d\u8fd0\u884c\u547d\u4ee4\u7684\u76ee\u5f55\u3002"
},
"Type": "String"
},
"timeout": {
"Description": {
"en": "The number of the invocation timeout period of a command on ECS instances in seconds.",
"zh-cn": "\u6700\u5927\u8d85\u65f6\u65f6\u95f4\uff0c\u65f6\u95f4\u5355\u4f4d\u662f\u79d2\u3002"
},
"Type": "Number",
"Default": 600
},
"OOSAssumeRole": {
"Description": {
"en": "The RAM role to be assumed by OOS.",
"zh-cn": "OOS\u626e\u6f14\u7684RAM\u89d2\u8272\u3002"
},
"Type": "String",
"Default": "OOSServiceRole"
}
},
"RamRole": "{{ OOSAssumeRole }}",
"Tasks": [
{
"Name": "runCommand",
"Description": {
"en": "Execute cloud assistant command.",
"zh-cn": "\u6267\u884c\u4e91\u52a9\u624b\u547d\u4ee4\u3002"
},
"Action": "ACS::ECS::RunCommand",
"Properties": {
"regionId": "{{ regionId }}",
"commandContent": "{{ commandContent }}",
"instanceId": "{{ instanceId }}",
"commandType": "RunShellScript",
"workingDir": "{{ workingDir }}",
"timeout": "{{ timeout }}"
},
"Outputs": {
"commandOutput": {
"Type": "String",
"ValueSelector": "invocationOutput"
}
}
}
],
"Outputs": {
"commandOutput": {
"Type": "String",
"Value": "{{ runCommand.commandOutput }}"
}
}
}