forked from aliyun/oos-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathACS-ECS-BulkyAuthorizeSecurityGroup.json
142 lines (142 loc) · 4.49 KB
/
ACS-ECS-BulkyAuthorizeSecurityGroup.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"en": "Add a security group policy to multiple security groups.",
"zh-cn": "\u5c06\u4e00\u6761\u5b89\u5168\u7ec4\u7b56\u7565\u6dfb\u52a0\u81f3\u591a\u4e2a\u5b89\u5168\u7ec4\u3002",
"name-en": "ACS-ECS-BulkyAuthorizeSecurityGroup",
"name-zh-cn": "\u6279\u91cf\u6388\u6743\u5b89\u5168\u7ec4\u7b56\u7565",
"categories": [
"instance_manage"
]
},
"Parameters": {
"regionId": {
"Type": "String",
"Description": {
"en": "The id of region.",
"zh-cn": "\u5730\u57dfID\u3002"
},
"AssociationProperty": "RegionId",
"Default": "{{ ACS::RegionId }}"
},
"securityGroupIds": {
"Description": {
"en": "The security group id.",
"zh-cn": "\u5b89\u5168\u7ec4ID\u3002"
},
"Type": "List"
},
"ipProtocol": {
"Description": {
"en": "Transport layer protocol.",
"zh-cn": "\u4f20\u8f93\u5c42\u534f\u8bae\u3002"
},
"Type": "String",
"AllowedValues": [
"tcp",
"udp",
"icmp",
"gre",
"all"
]
},
"portRange": {
"Description": {
"en": "Transport layer protocol, correct style:1/200, error style:200/1. ranges:(TCP/UDP:1~65535, ICMP:-1/-1, GRE:-1/-1, IpProtocol value is all:-1/-1).",
"zh-cn": "\u4f20\u8f93\u5c42\u534f\u8bae\u7aef\u53e3\u8303\u56f4\uff0c\u6b63\u786e\u6837\u5f0f\uff1a1/200, \u9519\u8bef\u6837\u5f0f200/1\uff1a\u3002\u53d6\u503c\u8303\u56f4:(TCP/UDP\uff1a1~65535, ICMP\u534f\u8bae\uff1a-1/-1, GRE\u534f\u8bae\uff1a-1/-1, IpProtocol\u53d6\u503c\u4e3aall\uff1a-1/-1)\u3002"
},
"Type": "String"
},
"nicType": {
"Description": {
"en": "Network card type (internet:public network card, intrant:inner network card).",
"zh-cn": "\u7f51\u5361\u7c7b\u578b\uff08internet\uff1a\u516c\u7f51\u7f51\u5361\uff0cintranet\uff1a\u5185\u7f51\u7f51\u5361\uff09\u3002"
},
"Type": "String",
"AllowedValues": [
"internet",
"intranet"
],
"Default": "intranet"
},
"policy": {
"Description": {
"en": "Set access(accept:Accept interview, drop:Access denied).",
"zh-cn": "\u8bbe\u7f6e\u8bbf\u95ee\u6743\u9650(accept:\u63a5\u53d7\u8bbf\u95ee,drop:\u62d2\u7edd\u8bbf\u95ee)\u3002"
},
"Type": "String",
"AllowedValues": [
"accept",
"drop"
],
"Default": "accept"
},
"priority": {
"Description": {
"en": "Security group rule priority.",
"zh-cn": "\u5b89\u5168\u7ec4\u89c4\u5219\u4f18\u5148\u7ea7\u3002\u53d6\u503c\u8303\u56f4\uff1a1~100\u3002"
},
"Type": "Number",
"MinValue": 1,
"MaxValue": 100,
"Default": 1
},
"sourceCidrIp": {
"Description": {
"en": "Source IPv4 CIDR address segment, for example:10.0.0.0/8.",
"zh-cn": "\u6e90\u7aefIPv4 CIDR\u5730\u5740\u6bb5, \u4f8b\u5982\uff1a10.0.0.0/8\u3002"
},
"Type": "String"
},
"rateControl": {
"Description": {
"en": "Concurrency ratio of task execution.",
"zh-cn": "\u4efb\u52a1\u6267\u884c\u7684\u5e76\u53d1\u6bd4\u7387\u3002"
},
"Type": "Json",
"AssociationProperty": "RateControl",
"Default": {
"Mode": "Concurrency",
"MaxErrors": 0,
"Concurrency": 10
}
},
"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": "AuthorizeSecurityGroup",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Authorize Security Group Policy to multiple Security Group.",
"zh-cn": "\u6388\u6743\u5b89\u5168\u7ec4\u7b56\u7565\u81f3\u591a\u4e2a\u5b89\u5168\u7ec4\u3002"
},
"Properties": {
"Service": "ECS",
"API": "AuthorizeSecurityGroup",
"Parameters": {
"RegionId": "{{ regionId }}",
"IpProtocol": "{{ ipProtocol }}",
"PortRange": "{{ portRange }}",
"NicType": "{{ nicType }}",
"Policy": "{{ policy }}",
"Priority": "{{ priority }}",
"SourceCidrIp": "{{ sourceCidrIp }}",
"SecurityGroupId": "{{ ACS::TaskLoopItem }}"
}
},
"Loop": {
"RateControl": "{{ rateControl }}",
"Items": "{{ securityGroupIds }}"
}
}
]
}