ksyun-sdk-node 1.0.1

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.
Files changed (40) hide show
  1. package/.browserslistrc +1 -0
  2. package/.eslintignore +1 -0
  3. package/.eslintrc.json +14 -0
  4. package/README.md +75 -0
  5. package/babel.config.json +11 -0
  6. package/dist/base/BaseClient.js +104 -0
  7. package/dist/index.js +41 -0
  8. package/dist/lib/fetch.js +35 -0
  9. package/dist/lib/sign.js +155 -0
  10. package/dist/service/Actiontrail/v20190401/index.js +58 -0
  11. package/dist/service/Bill/v20180601/index.js +117 -0
  12. package/dist/service/Bill_union/v20200101/index.js +118 -0
  13. package/dist/service/Bill_union/v20211209/index.js +45 -0
  14. package/dist/service/Ebs/v20160304/index.js +359 -0
  15. package/dist/service/Iam/v20151101/index.js +887 -0
  16. package/dist/service/Kad/v20161122/index.js +133 -0
  17. package/dist/service/Kead/v20200101/index.js +52 -0
  18. package/dist/service/Resourcemanager/v20210320/index.js +171 -0
  19. package/dist/service/Sts/v20151101/index.js +50 -0
  20. package/dist/service/Trade/v20200114/index.js +47 -0
  21. package/dist/service/Trade/v20200831/index.js +49 -0
  22. package/example/iam.js +40 -0
  23. package/example/res.js +43 -0
  24. package/package.json +33 -0
  25. package/src/base/BaseClient.js +92 -0
  26. package/src/index.js +34 -0
  27. package/src/lib/fetch.js +35 -0
  28. package/src/lib/sign.js +148 -0
  29. package/src/service/Actiontrail/v20190401/index.js +47 -0
  30. package/src/service/Bill/v20180601/index.js +111 -0
  31. package/src/service/Bill_union/v20200101/index.js +112 -0
  32. package/src/service/Bill_union/v20211209/index.js +35 -0
  33. package/src/service/Ebs/v20160304/index.js +348 -0
  34. package/src/service/Iam/v20151101/index.js +876 -0
  35. package/src/service/Kad/v20161122/index.js +122 -0
  36. package/src/service/Kead/v20200101/index.js +41 -0
  37. package/src/service/Resourcemanager/v20210320/index.js +161 -0
  38. package/src/service/Sts/v20151101/index.js +39 -0
  39. package/src/service/Trade/v20200114/index.js +36 -0
  40. package/src/service/Trade/v20200831/index.js +38 -0
@@ -0,0 +1,348 @@
1
+ const BaseClient = require("../../../base/BaseClient.js");
2
+
3
+ module.exports = class Client extends BaseClient {
4
+ _baseConfig = {
5
+ 'protocol': 'http://',
6
+ 'endpoint': 'ebs.api.ksyun.com',
7
+ 'config': {
8
+ 'timeout': 60, //设置timeout
9
+ 'headers': {
10
+ 'Accept': 'application/json'
11
+ },
12
+ 'credentials': {
13
+ 'region': 'cn-shanghai-3',
14
+ 'service': 'ebs',
15
+ },
16
+ },
17
+ }
18
+ _apiList = {
19
+ 'CreateVolume': {
20
+ 'url': '/',
21
+ 'method': 'GET',
22
+ 'config': {
23
+ 'query': {
24
+ 'Version': '2016-03-04',
25
+ 'Action': 'CreateVolume',
26
+ },
27
+ 'headers': {
28
+ 'Content-Type': 'application/json'
29
+ },
30
+ },
31
+ 'paramsType': {
32
+ 'VolumeName': 'String',
33
+ 'VolumeType': 'String',
34
+ 'VolumeDesc': 'String',
35
+ 'Size': 'Int',
36
+ 'AvailabilityZone': 'String',
37
+ 'ChargeType': 'String',
38
+ 'PurchaseTime': 'Int',
39
+ 'ProjectId': 'String',
40
+ 'SubOrderId': 'String',
41
+ }
42
+ },
43
+ 'AttachVolume': {
44
+ 'url': '/',
45
+ 'method': 'GET',
46
+ 'config': {
47
+ 'query': {
48
+ 'Version': '2016-03-04',
49
+ 'Action': 'AttachVolume',
50
+ },
51
+ 'headers': {
52
+ 'Content-Type': 'application/json'
53
+ },
54
+ },
55
+ 'paramsType': {
56
+ 'VolumeId': 'String',
57
+ 'InstanceId': 'String',
58
+ 'DeleteWithInstance': 'String',
59
+ }
60
+ },
61
+ 'DetachVolume': {
62
+ 'url': '/',
63
+ 'method': 'GET',
64
+ 'config': {
65
+ 'query': {
66
+ 'Version': '2016-03-04',
67
+ 'Action': 'DetachVolume',
68
+ },
69
+ 'headers': {
70
+ 'Content-Type': 'application/json'
71
+ },
72
+ },
73
+ 'paramsType': {
74
+ 'InstanceId': 'String',
75
+ 'VolumeId': 'String',
76
+ }
77
+ },
78
+ 'DeleteVolume': {
79
+ 'url': '/',
80
+ 'method': 'GET',
81
+ 'config': {
82
+ 'query': {
83
+ 'Version': '2016-03-04',
84
+ 'Action': 'DeleteVolume',
85
+ },
86
+ 'headers': {
87
+ 'Content-Type': 'application/json'
88
+ },
89
+ },
90
+ 'paramsType': {
91
+ 'VolumeId': 'String',
92
+ 'ForceDelete': 'Boolean',
93
+ }
94
+ },
95
+ 'ResizeVolume': {
96
+ 'url': '/',
97
+ 'method': 'GET',
98
+ 'config': {
99
+ 'query': {
100
+ 'Version': '2016-03-04',
101
+ 'Action': 'ResizeVolume',
102
+ },
103
+ 'headers': {
104
+ 'Content-Type': 'application/json'
105
+ },
106
+ },
107
+ 'paramsType': {
108
+ 'VolumeId': 'String',
109
+ 'Size': 'String',
110
+ 'OnlineResize': 'Boolean',
111
+ 'SubOrderId': 'String',
112
+ }
113
+ },
114
+ 'DescribeVolumes': {
115
+ 'url': '/',
116
+ 'method': 'GET',
117
+ 'config': {
118
+ 'query': {
119
+ 'Version': '2016-03-04',
120
+ 'Action': 'DescribeVolumes',
121
+ },
122
+ 'headers': {
123
+ 'Content-Type': 'application/json'
124
+ },
125
+ },
126
+ 'paramsType': {
127
+ 'VolumeId': 'Filter',
128
+ 'VolumeCategory': 'String',
129
+ 'VolumeStatus': 'String',
130
+ 'VolumeType': 'String',
131
+ 'VolumeCreateDate': 'String',
132
+ 'Marker': 'Int',
133
+ 'MaxResults': 'Int',
134
+ }
135
+ },
136
+ 'ModifyVolume': {
137
+ 'url': '/',
138
+ 'method': 'GET',
139
+ 'config': {
140
+ 'query': {
141
+ 'Version': '2016-03-04',
142
+ 'Action': 'ModifyVolume',
143
+ },
144
+ 'headers': {
145
+ 'Content-Type': 'application/json'
146
+ },
147
+ },
148
+ 'paramsType': {
149
+ 'VolumeId': 'String',
150
+ 'VolumeName': 'String',
151
+ 'VolumeDesc': 'String',
152
+ 'DeleteWithInstance': 'String',
153
+ }
154
+ },
155
+ 'DescribeEbsInstances': {
156
+ 'url': '/',
157
+ 'method': 'GET',
158
+ 'config': {
159
+ 'query': {
160
+ 'Version': '2016-03-04',
161
+ 'Action': 'DescribeEbsInstances',
162
+ },
163
+ 'headers': {
164
+ 'Content-Type': 'application/json'
165
+ },
166
+ },
167
+ 'paramsType': {
168
+ 'AvailabilityZone': 'String',
169
+ 'VolumeType': 'String',
170
+ }
171
+ },
172
+ 'DescribeInstanceVolumes': {
173
+ 'url': '/',
174
+ 'method': 'GET',
175
+ 'config': {
176
+ 'query': {
177
+ 'Version': '2016-03-04',
178
+ 'Action': 'DescribeInstanceVolumes',
179
+ },
180
+ 'headers': {
181
+ 'Content-Type': 'application/json'
182
+ },
183
+ },
184
+ 'paramsType': {
185
+ 'InstanceId': 'String',
186
+ }
187
+ },
188
+ 'RenewVolume': {
189
+ 'url': '/',
190
+ 'method': 'GET',
191
+ 'config': {
192
+ 'query': {
193
+ 'Version': '2016-03-04',
194
+ 'Action': 'RenewVolume',
195
+ },
196
+ 'headers': {
197
+ 'Content-Type': 'application/json'
198
+ },
199
+ },
200
+ 'paramsType': {
201
+ 'VolumeId': 'String',
202
+ 'PurchaseTime': 'Int',
203
+ }
204
+ },
205
+ 'UpdateVolumeProject': {
206
+ 'url': '/',
207
+ 'method': 'GET',
208
+ 'config': {
209
+ 'query': {
210
+ 'Version': '2016-03-04',
211
+ 'Action': 'UpdateVolumeProject',
212
+ },
213
+ 'headers': {
214
+ 'Content-Type': 'application/json'
215
+ },
216
+ },
217
+ 'paramsType': {
218
+ 'VolumeId': 'Filter',
219
+ 'ProjectId': 'String',
220
+ }
221
+ },
222
+ 'DescribeSnapshots': {
223
+ 'url': '/',
224
+ 'method': 'GET',
225
+ 'config': {
226
+ 'query': {
227
+ 'Version': '2016-03-04',
228
+ 'Action': 'DescribeSnapshots',
229
+ },
230
+ 'headers': {
231
+ 'Content-Type': 'application/json'
232
+ },
233
+ },
234
+ 'paramsType': {
235
+ 'VolumeId': 'String',
236
+ 'VolumeCategory': 'String',
237
+ 'SnapshotId': 'String',
238
+ 'AvailabilityZone': 'String',
239
+ 'SnapshotName': 'String',
240
+ 'PageNumber': 'Int',
241
+ 'PageSize': 'Int',
242
+ }
243
+ },
244
+ 'CreateSnapshot': {
245
+ 'url': '/',
246
+ 'method': 'GET',
247
+ 'config': {
248
+ 'query': {
249
+ 'Version': '2016-03-04',
250
+ 'Action': 'CreateSnapshot',
251
+ },
252
+ 'headers': {
253
+ 'Content-Type': 'application/json'
254
+ },
255
+ },
256
+ 'paramsType': {
257
+ 'VolumeId': 'String',
258
+ 'SnapshotName': 'String',
259
+ 'SnapshotDesc': 'String',
260
+ 'SnapshotType': 'String',
261
+ }
262
+ },
263
+ 'DeleteSnapshot': {
264
+ 'url': '/',
265
+ 'method': 'GET',
266
+ 'config': {
267
+ 'query': {
268
+ 'Version': '2016-03-04',
269
+ 'Action': 'DeleteSnapshot',
270
+ },
271
+ 'headers': {
272
+ 'Content-Type': 'application/json'
273
+ },
274
+ },
275
+ 'paramsType': {
276
+ 'SnapshotId': 'String',
277
+ }
278
+ },
279
+ 'RollbackSnapshot': {
280
+ 'url': '/',
281
+ 'method': 'GET',
282
+ 'config': {
283
+ 'query': {
284
+ 'Version': '2016-03-04',
285
+ 'Action': 'RollbackSnapshot',
286
+ },
287
+ 'headers': {
288
+ 'Content-Type': 'application/json'
289
+ },
290
+ },
291
+ 'paramsType': {
292
+ 'VolumeId': 'String',
293
+ 'SnapshotId': 'String',
294
+ }
295
+ },
296
+ 'ModifySnapshot': {
297
+ 'url': '/',
298
+ 'method': 'GET',
299
+ 'config': {
300
+ 'query': {
301
+ 'Version': '2016-03-04',
302
+ 'Action': 'ModifySnapshot',
303
+ },
304
+ 'headers': {
305
+ 'Content-Type': 'application/json'
306
+ },
307
+ },
308
+ 'paramsType': {
309
+ 'SnapshotId': 'String',
310
+ 'SnapshotName': 'String',
311
+ 'SnapshotDesc': 'String',
312
+ }
313
+ },
314
+ 'RecoveryVolume': {
315
+ 'url': '/',
316
+ 'method': 'GET',
317
+ 'config': {
318
+ 'query': {
319
+ 'Version': '2016-03-04',
320
+ 'Action': 'RecoveryVolume',
321
+ },
322
+ 'headers': {
323
+ 'Content-Type': 'application/json'
324
+ },
325
+ },
326
+ 'paramsType': {
327
+ 'VolumeId': 'String',
328
+ }
329
+ },
330
+ 'ValidateAttachInstance': {
331
+ 'url': '/',
332
+ 'method': 'GET',
333
+ 'config': {
334
+ 'query': {
335
+ 'Version': '2016-03-04',
336
+ 'Action': 'ValidateAttachInstance',
337
+ },
338
+ 'headers': {
339
+ 'Content-Type': 'application/json'
340
+ },
341
+ },
342
+ 'paramsType': {
343
+ 'VolumeType': 'String',
344
+ 'InstanceId': 'String',
345
+ }
346
+ },
347
+ }
348
+ }