ksyun-sdk-node 1.2.4 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +12 -0
- package/dist/base/BaseClient.js +50 -4
- package/dist/service/Actiontrail/v20190401/index.js +31 -31
- package/dist/service/Aicp/v20240612/index.js +511 -0
- package/dist/service/Bill/v20180601/index.js +45 -45
- package/dist/service/Bill/v20220601/index.js +35 -35
- package/dist/service/Bill_union/v20200101/index.js +139 -103
- package/dist/service/Bill_union/v20221222/index.js +93 -93
- package/dist/service/Bill_union/v20250801/index.js +66 -0
- package/dist/service/Bws/v20160304/index.js +103 -103
- package/dist/service/Cdn/v20160901/index.js +66 -19
- package/dist/service/Cdn/v20200630/index.js +306 -306
- package/dist/service/Cdn/v20200901/index.js +108 -108
- package/dist/service/Cdn/v20211201/index.js +45 -0
- package/dist/service/Cdn/v20250503/index.js +71 -0
- package/dist/service/Cen/v20160304/index.js +321 -321
- package/dist/service/Clickhouse/v20210101/index.js +387 -387
- package/dist/service/Ebs/v20160304/index.js +262 -262
- package/dist/service/Eip/v20160304/index.js +101 -101
- package/dist/service/Epc/v20151101/index.js +1741 -766
- package/dist/service/Iam/v20151101/index.js +863 -756
- package/dist/service/Iam/v20240513/index.js +47 -0
- package/dist/service/Iam/v20240703/index.js +44 -0
- package/dist/service/Kad/v20161122/index.js +81 -81
- package/dist/service/Kce/v20180314/index.js +216 -216
- package/dist/service/Kce/v20190806/index.js +343 -343
- package/dist/service/Kce/v20201231/index.js +39 -39
- package/dist/service/Kcf/v20211215/index.js +141 -141
- package/dist/service/Kcm/v20160304/index.js +81 -81
- package/dist/service/Kcrs/v20211109/index.js +611 -611
- package/dist/service/Kcs/v20160701/index.js +800 -800
- package/dist/service/Kcs/v20170401/index.js +47 -47
- package/dist/service/Kead/v20200101/index.js +25 -25
- package/dist/service/Kec/v20160304/index.js +1697 -1533
- package/dist/service/Kes/v20201215/index.js +171 -0
- package/dist/service/Ket/v20170101/index.js +92 -92
- package/dist/service/Kkms/v20160304/index.js +108 -108
- package/dist/service/Klog/v20200731/index.js +232 -705
- package/dist/service/Kls/v20170101/index.js +135 -135
- package/dist/service/Kmr/v20210902/index.js +422 -0
- package/dist/service/Kmr/v20231231/index.js +154 -0
- package/dist/service/Kmr/v20240814/index.js +370 -0
- package/dist/service/Krds/v20160701/index.js +991 -991
- package/dist/service/Krds/v20200825/index.js +115 -115
- package/dist/service/Memcached/v20180627/index.js +172 -172
- package/dist/service/Mongodb/v20170101/index.js +514 -514
- package/dist/service/Monitor/v20100525/index.js +41 -41
- package/dist/service/Monitor/v20181114/index.js +25 -25
- package/dist/service/Monitor/v20210101/index.js +153 -116
- package/dist/service/Monitor/v20220101/index.js +30 -40
- package/dist/service/Monitor/v20250101/index.js +71 -0
- package/dist/service/Rabbitmq/v20191017/index.js +163 -163
- package/dist/service/Resourcemanager/v20210320/index.js +110 -110
- package/dist/service/Sks/v20151101/index.js +69 -69
- package/dist/service/Slb/v20160304/index.js +1208 -1208
- package/dist/service/Sts/v20151101/index.js +23 -23
- package/dist/service/Tagv2/v20200901/index.js +115 -115
- package/dist/service/Tidb/v20210520/index.js +254 -254
- package/dist/service/Trade/v20200114/index.js +20 -20
- package/dist/service/Trade/v20200831/index.js +22 -22
- package/dist/service/Vpc/v20160304/index.js +1947 -1209
- package/dist/service/Waf/v20200707/index.js +174 -174
- package/example/iam.js +2 -1
- package/example/res.js +2 -1
- package/package.json +1 -1
- package/src/base/BaseClient.js +51 -4
- package/src/service/Actiontrail/v20190401/index.js +42 -42
- package/src/service/Aicp/v20240612/index.js +503 -0
- package/src/service/Bill/v20180601/index.js +63 -64
- package/src/service/Bill/v20220601/index.js +50 -50
- package/src/service/Bill_union/v20200101/index.js +181 -146
- package/src/service/Bill_union/v20221222/index.js +124 -124
- package/src/service/Bill_union/v20250801/index.js +58 -0
- package/src/service/Bws/v20160304/index.js +138 -138
- package/src/service/Cdn/v20160901/index.js +78 -32
- package/src/service/Cdn/v20200630/index.js +399 -399
- package/src/service/Cdn/v20200901/index.js +143 -143
- package/src/service/Cdn/v20211201/index.js +37 -0
- package/src/service/Cdn/v20250503/index.js +63 -0
- package/src/service/Cen/v20160304/index.js +449 -449
- package/src/service/Clickhouse/v20210101/index.js +535 -535
- package/src/service/Ebs/v20160304/index.js +365 -365
- package/src/service/Eip/v20160304/index.js +135 -136
- package/src/service/Epc/v20151101/index.js +1984 -1009
- package/src/service/Iam/v20151101/index.js +1155 -1050
- package/src/service/Iam/v20240513/index.js +39 -0
- package/src/service/Iam/v20240703/index.js +36 -0
- package/src/service/Kad/v20161122/index.js +112 -112
- package/src/service/Kce/v20180314/index.js +309 -309
- package/src/service/Kce/v20190806/index.js +471 -471
- package/src/service/Kce/v20201231/index.js +50 -50
- package/src/service/Kcf/v20211215/index.js +192 -194
- package/src/service/Kcm/v20160304/index.js +104 -104
- package/src/service/Kcrs/v20211109/index.js +840 -854
- package/src/service/Kcs/v20160701/index.js +1095 -1098
- package/src/service/Kcs/v20170401/index.js +66 -66
- package/src/service/Kead/v20200101/index.js +36 -36
- package/src/service/Kec/v20160304/index.js +2061 -1902
- package/src/service/Kes/v20201215/index.js +163 -0
- package/src/service/Ket/v20170101/index.js +123 -123
- package/src/service/Kkms/v20160304/index.js +156 -156
- package/src/service/Klog/v20200731/index.js +320 -807
- package/src/service/Kls/v20170101/index.js +183 -183
- package/src/service/Kmr/v20210902/index.js +414 -0
- package/src/service/Kmr/v20231231/index.js +146 -0
- package/src/service/Kmr/v20240814/index.js +362 -0
- package/src/service/Krds/v20160701/index.js +1291 -1293
- package/src/service/Krds/v20200825/index.js +163 -163
- package/src/service/Memcached/v20180627/index.js +238 -245
- package/src/service/Mongodb/v20170101/index.js +672 -672
- package/src/service/Monitor/v20100525/index.js +56 -56
- package/src/service/Monitor/v20181114/index.js +36 -36
- package/src/service/Monitor/v20210101/index.js +205 -169
- package/src/service/Monitor/v20220101/index.js +44 -54
- package/src/service/Monitor/v20250101/index.js +63 -0
- package/src/service/Rabbitmq/v20191017/index.js +231 -231
- package/src/service/Resourcemanager/v20210320/index.js +157 -158
- package/src/service/Sks/v20151101/index.js +95 -96
- package/src/service/Slb/v20160304/index.js +1471 -1471
- package/src/service/Sts/v20151101/index.js +34 -34
- package/src/service/Tagv2/v20200901/index.js +163 -163
- package/src/service/Tidb/v20210520/index.js +352 -352
- package/src/service/Trade/v20200114/index.js +31 -31
- package/src/service/Trade/v20200831/index.js +33 -33
- package/src/service/Vpc/v20160304/index.js +2404 -1667
- package/src/service/Waf/v20200707/index.js +237 -237
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
7
|
+
module.exports = class Client extends BaseClient {
|
|
8
|
+
constructor(...args) {
|
|
9
|
+
super(...args);
|
|
10
|
+
_defineProperty(this, "_baseConfig", {
|
|
11
|
+
protocol: "http://",
|
|
12
|
+
endpoint: "kmr.api.ksyun.com",
|
|
13
|
+
config: {
|
|
14
|
+
timeout: 60,
|
|
15
|
+
//设置timeout
|
|
16
|
+
headers: {
|
|
17
|
+
Accept: "application/json"
|
|
18
|
+
},
|
|
19
|
+
credentials: {
|
|
20
|
+
region: "cn-shanghai-3",
|
|
21
|
+
service: "kmr"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
_defineProperty(this, "_apiList", {
|
|
26
|
+
DescribeCluster: {
|
|
27
|
+
url: "/",
|
|
28
|
+
method: "POST",
|
|
29
|
+
config: {
|
|
30
|
+
query: {
|
|
31
|
+
Version: "2021-09-02",
|
|
32
|
+
Action: "DescribeCluster"
|
|
33
|
+
},
|
|
34
|
+
headers: {
|
|
35
|
+
"Content-Type": "application/json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
paramsType: {
|
|
39
|
+
ClusterId: "String"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
LaunchCluster: {
|
|
43
|
+
url: "/",
|
|
44
|
+
method: "POST",
|
|
45
|
+
config: {
|
|
46
|
+
query: {
|
|
47
|
+
Version: "2021-09-02",
|
|
48
|
+
Action: "LaunchCluster"
|
|
49
|
+
},
|
|
50
|
+
headers: {
|
|
51
|
+
"Content-Type": "application/json"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
paramsType: {
|
|
55
|
+
ClusterName: "String",
|
|
56
|
+
Distribution: "String",
|
|
57
|
+
MainVersion: "String",
|
|
58
|
+
ChargeType: "String",
|
|
59
|
+
DatabaseInfo: "Object",
|
|
60
|
+
Services: "Array",
|
|
61
|
+
ProjectId: "Int",
|
|
62
|
+
VpcDomainId: "String",
|
|
63
|
+
SecurityGroupId: "String",
|
|
64
|
+
InstanceGroups: "Array"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
ScaleInInstanceGroups: {
|
|
68
|
+
url: "/",
|
|
69
|
+
method: "POST",
|
|
70
|
+
config: {
|
|
71
|
+
query: {
|
|
72
|
+
Version: "2021-09-02",
|
|
73
|
+
Action: "ScaleInInstanceGroups"
|
|
74
|
+
},
|
|
75
|
+
headers: {
|
|
76
|
+
"Content-Type": "application/json"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
paramsType: {
|
|
80
|
+
ClusterId: "String",
|
|
81
|
+
InstanceGroups: "Array",
|
|
82
|
+
GracefulScaleIn: "Boolean",
|
|
83
|
+
GracefulScaleInTimeout: "Int"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
ScaleOutInstanceGroups: {
|
|
87
|
+
url: "/",
|
|
88
|
+
method: "POST",
|
|
89
|
+
config: {
|
|
90
|
+
query: {
|
|
91
|
+
Version: "2021-09-02",
|
|
92
|
+
Action: "ScaleOutInstanceGroups"
|
|
93
|
+
},
|
|
94
|
+
headers: {
|
|
95
|
+
"Content-Type": "application/json"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
paramsType: {
|
|
99
|
+
ClusterId: "String",
|
|
100
|
+
InstanceGroups: "Array",
|
|
101
|
+
ProjectId: "Int"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
DescribeClusterInfo: {
|
|
105
|
+
url: "/",
|
|
106
|
+
method: "POST",
|
|
107
|
+
config: {
|
|
108
|
+
query: {
|
|
109
|
+
Version: "2021-09-02",
|
|
110
|
+
Action: "DescribeClusterInfo"
|
|
111
|
+
},
|
|
112
|
+
headers: {
|
|
113
|
+
"Content-Type": "application/json"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
paramsType: {
|
|
117
|
+
ClusterId: "String"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
ListServiceStatus: {
|
|
121
|
+
url: "/",
|
|
122
|
+
method: "POST",
|
|
123
|
+
config: {
|
|
124
|
+
query: {
|
|
125
|
+
Version: "2021-09-02",
|
|
126
|
+
Action: "ListServiceStatus"
|
|
127
|
+
},
|
|
128
|
+
headers: {
|
|
129
|
+
"Content-Type": "application/json"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
paramsType: {
|
|
133
|
+
ClusterId: "String"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
ListClusters: {
|
|
137
|
+
url: "/",
|
|
138
|
+
method: "POST",
|
|
139
|
+
config: {
|
|
140
|
+
query: {
|
|
141
|
+
Version: "2021-09-02",
|
|
142
|
+
Action: "ListClusters"
|
|
143
|
+
},
|
|
144
|
+
headers: {
|
|
145
|
+
"Content-Type": "application/json"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
paramsType: {
|
|
149
|
+
Marker: "String"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
ListClusterVersions: {
|
|
153
|
+
url: "/",
|
|
154
|
+
method: "POST",
|
|
155
|
+
config: {
|
|
156
|
+
query: {
|
|
157
|
+
Version: "2021-09-02",
|
|
158
|
+
Action: "ListClusterVersions"
|
|
159
|
+
},
|
|
160
|
+
headers: {
|
|
161
|
+
"Content-Type": "application/json"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
paramsType: {
|
|
165
|
+
DistributionVersion: "String"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
DescribeService: {
|
|
169
|
+
url: "/",
|
|
170
|
+
method: "POST",
|
|
171
|
+
config: {
|
|
172
|
+
query: {
|
|
173
|
+
Version: "2021-09-02",
|
|
174
|
+
Action: "DescribeService"
|
|
175
|
+
},
|
|
176
|
+
headers: {
|
|
177
|
+
"Content-Type": "application/json"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
paramsType: {
|
|
181
|
+
ClusterId: "String"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
ListConfigurations: {
|
|
185
|
+
url: "/",
|
|
186
|
+
method: "POST",
|
|
187
|
+
config: {
|
|
188
|
+
query: {
|
|
189
|
+
Version: "2021-09-02",
|
|
190
|
+
Action: "ListConfigurations"
|
|
191
|
+
},
|
|
192
|
+
headers: {
|
|
193
|
+
"Content-Type": "application/json"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
paramsType: {
|
|
197
|
+
ClusterId: "String",
|
|
198
|
+
ServiceName: "String"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
ListConfigurationHistory: {
|
|
202
|
+
url: "/",
|
|
203
|
+
method: "POST",
|
|
204
|
+
config: {
|
|
205
|
+
query: {
|
|
206
|
+
Version: "2021-09-02",
|
|
207
|
+
Action: "ListConfigurationHistory"
|
|
208
|
+
},
|
|
209
|
+
headers: {
|
|
210
|
+
"Content-Type": "application/json"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
paramsType: {
|
|
214
|
+
ClusterId: "String",
|
|
215
|
+
ServiceName: "String",
|
|
216
|
+
Marker: "String"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
ListTagValues: {
|
|
220
|
+
url: "/",
|
|
221
|
+
method: "POST",
|
|
222
|
+
config: {
|
|
223
|
+
query: {
|
|
224
|
+
Version: "2021-09-02",
|
|
225
|
+
Action: "ListTagValues"
|
|
226
|
+
},
|
|
227
|
+
headers: {
|
|
228
|
+
"Content-Type": "application/json"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
paramsType: {
|
|
232
|
+
ClusterId: "String"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
ListTagKeys: {
|
|
236
|
+
url: "/",
|
|
237
|
+
method: "POST",
|
|
238
|
+
config: {
|
|
239
|
+
query: {
|
|
240
|
+
Version: "2021-09-02",
|
|
241
|
+
Action: "ListTagKeys"
|
|
242
|
+
},
|
|
243
|
+
headers: {
|
|
244
|
+
"Content-Type": "application/json"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
paramsType: {
|
|
248
|
+
ClusterId: "String"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
BindTags: {
|
|
252
|
+
url: "/",
|
|
253
|
+
method: "POST",
|
|
254
|
+
config: {
|
|
255
|
+
query: {
|
|
256
|
+
Version: "2021-09-02",
|
|
257
|
+
Action: "BindTags"
|
|
258
|
+
},
|
|
259
|
+
headers: {
|
|
260
|
+
"Content-Type": "application/json"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
paramsType: {
|
|
264
|
+
ClusterId: "String",
|
|
265
|
+
Tags: "Array"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
StartInstances: {
|
|
269
|
+
url: "/",
|
|
270
|
+
method: "POST",
|
|
271
|
+
config: {
|
|
272
|
+
query: {
|
|
273
|
+
Version: "2021-09-02",
|
|
274
|
+
Action: "StartInstances"
|
|
275
|
+
},
|
|
276
|
+
headers: {
|
|
277
|
+
"Content-Type": "application/json"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
paramsType: {
|
|
281
|
+
ClusterId: "String",
|
|
282
|
+
InstanceIds: "Array"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
RestartInstances: {
|
|
286
|
+
url: "/",
|
|
287
|
+
method: "POST",
|
|
288
|
+
config: {
|
|
289
|
+
query: {
|
|
290
|
+
Version: "2021-09-02",
|
|
291
|
+
Action: "RestartInstances"
|
|
292
|
+
},
|
|
293
|
+
headers: {
|
|
294
|
+
"Content-Type": "application/json"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
paramsType: {
|
|
298
|
+
ClusterId: "String",
|
|
299
|
+
InstanceIds: "Array",
|
|
300
|
+
Interval: "Int",
|
|
301
|
+
RollingRestart: "Boolean",
|
|
302
|
+
ForceReboot: "Boolean"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
StopInstances: {
|
|
306
|
+
url: "/",
|
|
307
|
+
method: "POST",
|
|
308
|
+
config: {
|
|
309
|
+
query: {
|
|
310
|
+
Version: "2021-09-02",
|
|
311
|
+
Action: "StopInstances"
|
|
312
|
+
},
|
|
313
|
+
headers: {
|
|
314
|
+
"Content-Type": "application/json"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
paramsType: {
|
|
318
|
+
ClusterId: "String",
|
|
319
|
+
InstanceIds: "Array"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
ListScaleStrategy: {
|
|
323
|
+
url: "/",
|
|
324
|
+
method: "POST",
|
|
325
|
+
config: {
|
|
326
|
+
query: {
|
|
327
|
+
Version: "2021-09-02",
|
|
328
|
+
Action: "ListScaleStrategy"
|
|
329
|
+
},
|
|
330
|
+
headers: {
|
|
331
|
+
"Content-Type": "application/json"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
paramsType: {
|
|
335
|
+
ClusterId: "String"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
ModifyScaleStrategy: {
|
|
339
|
+
url: "/",
|
|
340
|
+
method: "POST",
|
|
341
|
+
config: {
|
|
342
|
+
query: {
|
|
343
|
+
Version: "2021-09-02",
|
|
344
|
+
Action: "ModifyScaleStrategy"
|
|
345
|
+
},
|
|
346
|
+
headers: {
|
|
347
|
+
"Content-Type": "application/json"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
paramsType: {
|
|
351
|
+
ClusterId: "String"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
DeleteScaleStrategy: {
|
|
355
|
+
url: "/",
|
|
356
|
+
method: "POST",
|
|
357
|
+
config: {
|
|
358
|
+
query: {
|
|
359
|
+
Version: "2021-09-02",
|
|
360
|
+
Action: "DeleteScaleStrategy"
|
|
361
|
+
},
|
|
362
|
+
headers: {
|
|
363
|
+
"Content-Type": "application/json"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
paramsType: {
|
|
367
|
+
ClusterId: "String",
|
|
368
|
+
StrategyId: "String",
|
|
369
|
+
StrategyModule: "String"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
ListScaleHistory: {
|
|
373
|
+
url: "/",
|
|
374
|
+
method: "POST",
|
|
375
|
+
config: {
|
|
376
|
+
query: {
|
|
377
|
+
Version: "2021-09-02",
|
|
378
|
+
Action: "ListScaleHistory"
|
|
379
|
+
},
|
|
380
|
+
headers: {
|
|
381
|
+
"Content-Type": "application/json"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
paramsType: {
|
|
385
|
+
ClusterId: "String"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
AddLoadBasedScaleStrategy: {
|
|
389
|
+
url: "/",
|
|
390
|
+
method: "POST",
|
|
391
|
+
config: {
|
|
392
|
+
query: {
|
|
393
|
+
Version: "2021-09-02",
|
|
394
|
+
Action: "AddLoadBasedScaleStrategy"
|
|
395
|
+
},
|
|
396
|
+
headers: {
|
|
397
|
+
"Content-Type": "application/json"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
paramsType: {
|
|
401
|
+
ClusterId: "String"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
ModifyLoadBasedScaleStrategy: {
|
|
405
|
+
url: "/",
|
|
406
|
+
method: "POST",
|
|
407
|
+
config: {
|
|
408
|
+
query: {
|
|
409
|
+
Version: "2021-09-02",
|
|
410
|
+
Action: "ModifyLoadBasedScaleStrategy"
|
|
411
|
+
},
|
|
412
|
+
headers: {
|
|
413
|
+
"Content-Type": "application/json"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
paramsType: {
|
|
417
|
+
ClusterId: "String"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
7
|
+
module.exports = class Client extends BaseClient {
|
|
8
|
+
constructor(...args) {
|
|
9
|
+
super(...args);
|
|
10
|
+
_defineProperty(this, "_baseConfig", {
|
|
11
|
+
protocol: "http://",
|
|
12
|
+
endpoint: "kmr.api.ksyun.com",
|
|
13
|
+
config: {
|
|
14
|
+
timeout: 60,
|
|
15
|
+
//设置timeout
|
|
16
|
+
headers: {
|
|
17
|
+
Accept: "application/json"
|
|
18
|
+
},
|
|
19
|
+
credentials: {
|
|
20
|
+
region: "cn-shanghai-3",
|
|
21
|
+
service: "kmr"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
_defineProperty(this, "_apiList", {
|
|
26
|
+
ListInstances: {
|
|
27
|
+
url: "/",
|
|
28
|
+
method: "POST",
|
|
29
|
+
config: {
|
|
30
|
+
query: {
|
|
31
|
+
Version: "2023-12-31",
|
|
32
|
+
Action: "ListInstances"
|
|
33
|
+
},
|
|
34
|
+
headers: {
|
|
35
|
+
"Content-Type": "application/json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
paramsType: {
|
|
39
|
+
PageNumber: "Int",
|
|
40
|
+
PageSize: "Int",
|
|
41
|
+
InstanceStatus: "Array",
|
|
42
|
+
InstanceNameOrId: "String"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
GetInstanceDetail: {
|
|
46
|
+
url: "/",
|
|
47
|
+
method: "POST",
|
|
48
|
+
config: {
|
|
49
|
+
query: {
|
|
50
|
+
Version: "2023-12-31",
|
|
51
|
+
Action: "GetInstanceDetail"
|
|
52
|
+
},
|
|
53
|
+
headers: {
|
|
54
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
paramsType: {
|
|
58
|
+
InstanceId: "String"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
ModifyHosts: {
|
|
62
|
+
url: "/",
|
|
63
|
+
method: "POST",
|
|
64
|
+
config: {
|
|
65
|
+
query: {
|
|
66
|
+
Version: "2023-12-31",
|
|
67
|
+
Action: "ModifyHosts"
|
|
68
|
+
},
|
|
69
|
+
headers: {
|
|
70
|
+
"Content-Type": "application/json"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
paramsType: {
|
|
74
|
+
InstanceId: "String",
|
|
75
|
+
TunaHosts: "Array"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
ListAutoScaleHistory: {
|
|
79
|
+
url: "/",
|
|
80
|
+
method: "POST",
|
|
81
|
+
config: {
|
|
82
|
+
query: {
|
|
83
|
+
Version: "2023-12-31",
|
|
84
|
+
Action: "ListAutoScaleHistory"
|
|
85
|
+
},
|
|
86
|
+
headers: {
|
|
87
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
paramsType: {
|
|
91
|
+
InstanceId: "String",
|
|
92
|
+
ExecAtStart: "String",
|
|
93
|
+
ExecAtEnd: "String",
|
|
94
|
+
PolicyName: "String",
|
|
95
|
+
PageNumber: "Int",
|
|
96
|
+
PageSize: "Int"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
CreateAutoScalePolicy: {
|
|
100
|
+
url: "/",
|
|
101
|
+
method: "POST",
|
|
102
|
+
config: {
|
|
103
|
+
query: {
|
|
104
|
+
Version: "2023-12-31",
|
|
105
|
+
Action: "CreateAutoScalePolicy"
|
|
106
|
+
},
|
|
107
|
+
headers: {
|
|
108
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
paramsType: {
|
|
112
|
+
InstanceId: "String",
|
|
113
|
+
PolicyName: "String",
|
|
114
|
+
ChargeType: "String",
|
|
115
|
+
ExecuteCycle: "String",
|
|
116
|
+
ExecuteRules: "Object"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
ListAutoScalePolicy: {
|
|
120
|
+
url: "/",
|
|
121
|
+
method: "POST",
|
|
122
|
+
config: {
|
|
123
|
+
query: {
|
|
124
|
+
Version: "2023-12-31",
|
|
125
|
+
Action: "ListAutoScalePolicy"
|
|
126
|
+
},
|
|
127
|
+
headers: {
|
|
128
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
paramsType: {
|
|
132
|
+
InstanceId: "String"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
DeleteAutoScalePolicy: {
|
|
136
|
+
url: "/",
|
|
137
|
+
method: "POST",
|
|
138
|
+
config: {
|
|
139
|
+
query: {
|
|
140
|
+
Version: "2023-12-31",
|
|
141
|
+
Action: "DeleteAutoScalePolicy"
|
|
142
|
+
},
|
|
143
|
+
headers: {
|
|
144
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
paramsType: {
|
|
148
|
+
InstanceId: "String",
|
|
149
|
+
PolicyId: "String"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
};
|