-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS-CDN-SetDomainServerCertificate.json
212 lines (212 loc) · 5.42 KB
/
ACS-CDN-SetDomainServerCertificate.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"en": "Set domain server certificate",
"zh-cn": "启用指定域名下证书功能",
"name-en": "ACS-CDN-SetDomainServerCertificate",
"name-zh-cn": "启用指定域名下证书功能",
"categories": [
"security"
]
},
"Parameters": {
"regionId": {
"Label": {
"en": "RegionId",
"zh-cn": "地域ID"
},
"AssociationProperty": "RegionId",
"Type": "String",
"Default": "{{ ACS::RegionId }}"
},
"domainName": {
"Label": {
"en": "DomainName",
"zh-cn": "域名"
},
"Type": "String"
},
"serverCertificateStatus": {
"Label": {
"en": "ServerCertificateStatus",
"zh-cn": "HTTPS证书是否启用"
},
"Type": "String",
"AllowedValues": [
"on",
"off"
],
"Default": "on"
},
"certType": {
"Description": {
"en": "When the certificate type is cas, PrivateKey does not need to pass parameters",
"zh-cn": "当证书类型为cas时,PrivateKey无需传参"
},
"Label": {
"en": "CertType",
"zh-cn": "证书类型"
},
"Type": "String",
"AllowedValues": [
"cas",
"free",
"upload"
]
},
"certName": {
"Label": {
"en": "CertName",
"zh-cn": "证书名称"
},
"Type": "String"
},
"serverCertificate": {
"Description": {
"en": "Specify the content of the certificate only if you enable the SSL certificate",
"zh-cn": "不启用证书则无需输入,配置证书请输入证书内容"
},
"Label": {
"en": "ServerCertificate",
"zh-cn": "安全证书内容"
},
"Type": "String",
"Default": ""
},
"privateKey": {
"Description": {
"en": "Specify the private key only if you enable the SSL certificate",
"zh-cn": "不启用证书则无需输入,配置证书请输入私钥内容"
},
"Label": {
"en": "PrivateKey",
"zh-cn": "私钥内容"
},
"Type": "String",
"Default": ""
},
"forceSet": {
"Description": {
"en": "If you set the value to 1, the system does not check the certificate name for duplicates and overwrites the information of the existing certificate with the same name",
"zh-cn": "设置为1时,忽略证书名称重复的校验,覆盖原有同名证书信息"
},
"Label": {
"en": "ForceSet",
"zh-cn": "是否覆盖原有同名证书信息"
},
"Type": "String",
"Default": 1
},
"OOSAssumeRole": {
"Label": {
"en": "OOSAssumeRole",
"zh-cn": "OOS扮演的RAM角色"
},
"Type": "String",
"Default": ""
}
},
"RamRole": "{{ OOSAssumeRole }}",
"Tasks": [
{
"Name": "getDomainDetail",
"Action": "ACS::ExecuteApi",
"Description": {
"en": "get domain detail.",
"zh-cn": "获取域名详情。"
},
"Properties": {
"Service": "CDN",
"API": "DescribeCdnDomainDetail",
"Parameters": {
"RegionId": "{{ regionId }}",
"DomainName": "{{ domainName }}"
}
},
"Outputs": {
"serverCertificateStatus": {
"Type": "String",
"ValueSelector": "GetDomainDetailModel.ServerCertificateStatus"
}
}
},
{
"Name": "whetherDomainIsReady",
"Action": "ACS::Choice",
"Description": {
"en": "Choose next task by server eertificate status",
"zh-cn": "根据证书的状态选择下一个任务"
},
"Properties": {
"DefaultTask": "SetDomainServerCertificate",
"Choices": [
{
"When": {
"Fn::Equals": [
"on",
"{{ getDomainDetail.serverCertificateStatus }}"
]
},
"NextTask": "ACS::END"
}
]
}
},
{
"Name": "SetDomainServerCertificate",
"Action": "ACS::ExecuteApi",
"Description": {
"en": "Set domain server certificate",
"zh-cn": "设置指定域名下证书功能。"
},
"Properties": {
"Service": "CDN",
"API": "SetDomainServerCertificate",
"Parameters": {
"RegionId": "{{ regionId }}",
"DomainName": "{{ domainName }}",
"ServerCertificateStatus": "{{ serverCertificateStatus }}",
"CertType": "{{ certType }}",
"ServerCertificate": "{{ serverCertificate }}",
"PrivateKey": "{{ privateKey }}",
"ForceSet": "{{ forceSet }}"
}
}
}
],
"Metadata": {
"ALIYUN::OOS::Interface": {
"ParameterGroups": [
{
"Parameters": [
"regionId",
"domainName",
"serverCertificateStatus",
"certType",
"certName",
"serverCertificate",
"privateKey",
"forceSet"
],
"Label": {
"default": {
"zh-cn": "配置参数",
"en": "Configure Parameters"
}
}
},
{
"Parameters": [
"OOSAssumeRole"
],
"Label": {
"default": {
"zh-cn": "高级选项",
"en": "Control Options"
}
}
}
]
}
}
}