ksyun-sdk-node 1.0.4 → 1.0.5

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.
@@ -0,0 +1,668 @@
1
+ "use strict";
2
+
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+
5
+ const BaseClient = require("../../../base/BaseClient.js");
6
+
7
+ module.exports = class Client extends BaseClient {
8
+ constructor(...args) {
9
+ super(...args);
10
+
11
+ _defineProperty(this, "_baseConfig", {
12
+ 'protocol': 'http://',
13
+ 'endpoint': 'mongodb.api.ksyun.com',
14
+ 'config': {
15
+ 'timeout': 60,
16
+ //设置timeout
17
+ 'headers': {
18
+ 'Accept': 'application/json'
19
+ },
20
+ 'credentials': {
21
+ 'region': 'cn-shanghai-3',
22
+ 'service': 'mongodb'
23
+ }
24
+ }
25
+ });
26
+
27
+ _defineProperty(this, "_apiList", {
28
+ 'CreateMongoDBInstance': {
29
+ 'url': '/',
30
+ 'method': 'POST',
31
+ 'config': {
32
+ 'query': {
33
+ 'Version': '2017-01-01',
34
+ 'Action': 'CreateMongoDBInstance'
35
+ },
36
+ 'headers': {
37
+ 'Content-Type': 'application/x-www-form-urlencoded'
38
+ }
39
+ },
40
+ 'paramsType': {
41
+ 'PayType': 'String',
42
+ 'AvailabilityZone': 'Filter',
43
+ 'Name': 'String',
44
+ 'DbVersion': 'String',
45
+ 'NodeNum': 'Int',
46
+ 'Storage': 'Int',
47
+ 'Duration': 'Int',
48
+ 'IamProjectId': 'String',
49
+ 'VpcId': 'String',
50
+ 'VnetId': 'String',
51
+ 'InstancePassword': 'String',
52
+ 'InstanceClass': 'String'
53
+ }
54
+ },
55
+ 'DeleteMongoDBInstance': {
56
+ 'url': '/',
57
+ 'method': 'DELETE',
58
+ 'config': {
59
+ 'query': {
60
+ 'Version': '2017-01-01',
61
+ 'Action': 'DeleteMongoDBInstance'
62
+ },
63
+ 'headers': {
64
+ 'Content-Type': 'application/json'
65
+ }
66
+ },
67
+ 'paramsType': {
68
+ 'InstanceId': 'String'
69
+ }
70
+ },
71
+ 'DescribeMongoDBInstance': {
72
+ 'url': '/',
73
+ 'method': 'GET',
74
+ 'config': {
75
+ 'query': {
76
+ 'Version': '2017-01-01',
77
+ 'Action': 'DescribeMongoDBInstance'
78
+ },
79
+ 'headers': {
80
+ 'Content-Type': 'application/json'
81
+ }
82
+ },
83
+ 'paramsType': {
84
+ 'InstanceId': 'String'
85
+ }
86
+ },
87
+ 'DescribeMongoDBInstances': {
88
+ 'url': '/',
89
+ 'method': 'GET',
90
+ 'config': {
91
+ 'query': {
92
+ 'Version': '2017-01-01',
93
+ 'Action': 'DescribeMongoDBInstances'
94
+ },
95
+ 'headers': {
96
+ 'Content-Type': 'application/json'
97
+ }
98
+ },
99
+ 'paramsType': {
100
+ 'Area': 'String',
101
+ 'Vip': 'String',
102
+ 'VpcId': 'String',
103
+ 'VnetId': 'String',
104
+ 'IamProjectId': 'String',
105
+ 'InstanceId': 'String',
106
+ 'Name': 'String',
107
+ 'Mode': 'String',
108
+ 'DbVersion': 'String',
109
+ 'Status': 'String',
110
+ 'FuzzySearch': 'String',
111
+ 'TagKey': 'String',
112
+ 'TagValue': 'String',
113
+ 'Offset': 'Int',
114
+ 'Limit': 'Int',
115
+ 'OrderBy': 'String'
116
+ }
117
+ },
118
+ 'DescribeMongoDBInstanceNode': {
119
+ 'url': '/',
120
+ 'method': 'GET',
121
+ 'config': {
122
+ 'query': {
123
+ 'Version': '2017-01-01',
124
+ 'Action': 'DescribeMongoDBInstanceNode'
125
+ },
126
+ 'headers': {
127
+ 'Content-Type': 'application/json'
128
+ }
129
+ },
130
+ 'paramsType': {
131
+ 'InstanceId': 'String'
132
+ }
133
+ },
134
+ 'RenameMongoDBInstance': {
135
+ 'url': '/',
136
+ 'method': 'PUT',
137
+ 'config': {
138
+ 'query': {
139
+ 'Version': '2017-01-01',
140
+ 'Action': 'RenameMongoDBInstance'
141
+ },
142
+ 'headers': {
143
+ 'Content-Type': 'application/json'
144
+ }
145
+ },
146
+ 'paramsType': {
147
+ 'InstanceId': 'String',
148
+ 'Name': 'String'
149
+ }
150
+ },
151
+ 'ResetPasswordMongoDBInstance': {
152
+ 'url': '/',
153
+ 'method': 'PUT',
154
+ 'config': {
155
+ 'query': {
156
+ 'Version': '2017-01-01',
157
+ 'Action': 'ResetPasswordMongoDBInstance'
158
+ },
159
+ 'headers': {
160
+ 'Content-Type': 'application/json'
161
+ }
162
+ },
163
+ 'paramsType': {
164
+ 'InstanceId': 'String',
165
+ 'InstancePassword': 'String'
166
+ }
167
+ },
168
+ 'RestartMongoDBInstance': {
169
+ 'url': '/',
170
+ 'method': 'PUT',
171
+ 'config': {
172
+ 'query': {
173
+ 'Version': '2017-01-01',
174
+ 'Action': 'RestartMongoDBInstance'
175
+ },
176
+ 'headers': {
177
+ 'Content-Type': 'application/json'
178
+ }
179
+ },
180
+ 'paramsType': {
181
+ 'InstanceId': 'String'
182
+ }
183
+ },
184
+ 'CreateMongoDBSnapshot': {
185
+ 'url': '/',
186
+ 'method': 'POST',
187
+ 'config': {
188
+ 'query': {
189
+ 'Version': '2017-01-01',
190
+ 'Action': 'CreateMongoDBSnapshot'
191
+ },
192
+ 'headers': {
193
+ 'Content-Type': 'application/x-www-form-urlencoded'
194
+ }
195
+ },
196
+ 'paramsType': {
197
+ 'InstanceId': 'String',
198
+ 'Name': 'String',
199
+ 'BackupMode': 'String'
200
+ }
201
+ },
202
+ 'SetMongoDBTimingSnapshot': {
203
+ 'url': '/',
204
+ 'method': 'PUT',
205
+ 'config': {
206
+ 'query': {
207
+ 'Version': '2017-01-01',
208
+ 'Action': 'SetMongoDBTimingSnapshot'
209
+ },
210
+ 'headers': {
211
+ 'Content-Type': 'application/json'
212
+ }
213
+ },
214
+ 'paramsType': {
215
+ 'InstanceId': 'String',
216
+ 'TimingSwitch': 'String',
217
+ 'Timezone': 'String',
218
+ 'TimeCycle': 'String'
219
+ }
220
+ },
221
+ 'DescribeMongoDBSnapshot': {
222
+ 'url': '/',
223
+ 'method': 'GET',
224
+ 'config': {
225
+ 'query': {
226
+ 'Version': '2017-01-01',
227
+ 'Action': 'DescribeMongoDBSnapshot'
228
+ },
229
+ 'headers': {
230
+ 'Content-Type': 'application/json'
231
+ }
232
+ },
233
+ 'paramsType': {
234
+ 'InstanceId': 'String'
235
+ }
236
+ },
237
+ 'DeleteMongoDBSnapshot': {
238
+ 'url': '/',
239
+ 'method': 'DELETE',
240
+ 'config': {
241
+ 'query': {
242
+ 'Version': '2017-01-01',
243
+ 'Action': 'DeleteMongoDBSnapshot'
244
+ },
245
+ 'headers': {
246
+ 'Content-Type': 'application/json'
247
+ }
248
+ },
249
+ 'paramsType': {
250
+ 'InstanceId': 'String',
251
+ 'SnapshotId': 'String'
252
+ }
253
+ },
254
+ 'RenameMongoDBSnapshot': {
255
+ 'url': '/',
256
+ 'method': 'PUT',
257
+ 'config': {
258
+ 'query': {
259
+ 'Version': '2017-01-01',
260
+ 'Action': 'RenameMongoDBSnapshot'
261
+ },
262
+ 'headers': {
263
+ 'Content-Type': 'application/json'
264
+ }
265
+ },
266
+ 'paramsType': {
267
+ 'InstanceId': 'String',
268
+ 'SnapshotId': 'String',
269
+ 'Name': 'String'
270
+ }
271
+ },
272
+ 'AddSecurityGroupRule': {
273
+ 'url': '/',
274
+ 'method': 'POST',
275
+ 'config': {
276
+ 'query': {
277
+ 'Version': '2017-01-01',
278
+ 'Action': 'AddSecurityGroupRule'
279
+ },
280
+ 'headers': {
281
+ 'Content-Type': 'application/x-www-form-urlencoded'
282
+ }
283
+ },
284
+ 'paramsType': {
285
+ 'InstanceId': 'String',
286
+ 'Cidrs': 'String',
287
+ 'Type': 'String'
288
+ }
289
+ },
290
+ 'ListSecurityGroupRules': {
291
+ 'url': '/',
292
+ 'method': 'GET',
293
+ 'config': {
294
+ 'query': {
295
+ 'Version': '2017-01-01',
296
+ 'Action': 'ListSecurityGroupRules'
297
+ },
298
+ 'headers': {
299
+ 'Content-Type': 'application/json'
300
+ }
301
+ },
302
+ 'paramsType': {
303
+ 'InstanceId': 'String'
304
+ }
305
+ },
306
+ 'UpdateMongoDBInstance': {
307
+ 'url': '/',
308
+ 'method': 'POST',
309
+ 'config': {
310
+ 'query': {
311
+ 'Version': '2017-01-01',
312
+ 'Action': 'UpdateMongoDBInstance'
313
+ },
314
+ 'headers': {
315
+ 'Content-Type': 'application/x-www-form-urlencoded'
316
+ }
317
+ },
318
+ 'paramsType': {
319
+ 'InstanceId': 'String',
320
+ 'InstanceClass': 'String',
321
+ 'Storage': 'Int'
322
+ }
323
+ },
324
+ 'AddSecondaryInstance': {
325
+ 'url': '/',
326
+ 'method': 'PUT',
327
+ 'config': {
328
+ 'query': {
329
+ 'Version': '2017-01-01',
330
+ 'Action': 'AddSecondaryInstance'
331
+ },
332
+ 'headers': {
333
+ 'Content-Type': 'application/json'
334
+ }
335
+ },
336
+ 'paramsType': {
337
+ 'InstanceId': 'String',
338
+ 'NodeNum': 'String'
339
+ }
340
+ },
341
+ 'DescribeMongoDBShardNode': {
342
+ 'url': '/',
343
+ 'method': 'GET',
344
+ 'config': {
345
+ 'query': {
346
+ 'Version': '2017-01-01',
347
+ 'Action': 'DescribeMongoDBShardNode'
348
+ },
349
+ 'headers': {
350
+ 'Content-Type': 'application/json'
351
+ }
352
+ },
353
+ 'paramsType': {
354
+ 'InstanceId': 'String'
355
+ }
356
+ },
357
+ 'DescribeValidRegion': {
358
+ 'url': '/',
359
+ 'method': 'GET',
360
+ 'config': {
361
+ 'query': {
362
+ 'Version': '2017-01-01',
363
+ 'Action': 'DescribeValidRegion'
364
+ },
365
+ 'headers': {
366
+ 'Content-Type': 'application/json'
367
+ }
368
+ },
369
+ 'paramsType': {
370
+ 'Action': 'String'
371
+ }
372
+ },
373
+ 'AllocateEip': {
374
+ 'url': '/',
375
+ 'method': 'POST',
376
+ 'config': {
377
+ 'query': {
378
+ 'Version': '2017-01-01',
379
+ 'Action': 'AllocateEip'
380
+ },
381
+ 'headers': {
382
+ 'Content-Type': 'application/x-www-form-urlencoded'
383
+ }
384
+ },
385
+ 'paramsType': {
386
+ 'InstanceId': 'String',
387
+ 'Type': 'String'
388
+ }
389
+ },
390
+ 'DeallocateEip': {
391
+ 'url': '/',
392
+ 'method': 'POST',
393
+ 'config': {
394
+ 'query': {
395
+ 'Version': '2017-01-01',
396
+ 'Action': 'DeallocateEip'
397
+ },
398
+ 'headers': {
399
+ 'Content-Type': 'application/x-www-form-urlencoded'
400
+ }
401
+ },
402
+ 'paramsType': {
403
+ 'InstanceId': 'String'
404
+ }
405
+ },
406
+ 'DescribeRegions': {
407
+ 'url': '/',
408
+ 'method': 'GET',
409
+ 'config': {
410
+ 'query': {
411
+ 'Version': '2017-01-01',
412
+ 'Action': 'DescribeRegions'
413
+ },
414
+ 'headers': {
415
+ 'Content-Type': 'application/json'
416
+ }
417
+ },
418
+ 'paramsType': {
419
+ 'Action': 'String'
420
+ }
421
+ },
422
+ 'CreateMongoDBShardInstance': {
423
+ 'url': '/',
424
+ 'method': 'POST',
425
+ 'config': {
426
+ 'query': {
427
+ 'Version': '2017-01-01',
428
+ 'Action': 'CreateMongoDBShardInstance'
429
+ },
430
+ 'headers': {
431
+ 'Content-Type': 'application/x-www-form-urlencoded'
432
+ }
433
+ },
434
+ 'paramsType': {
435
+ 'PayType': 'String',
436
+ 'AvailabilityZone': 'Filter',
437
+ 'Name': 'String',
438
+ 'DbVersion': 'String',
439
+ 'Storage': 'String',
440
+ 'Duration': 'Int',
441
+ 'IamProjectId': 'String',
442
+ 'VpcId': 'String',
443
+ 'VnetId': 'String',
444
+ 'InstancePassword': 'String',
445
+ 'ShardClass': 'String',
446
+ 'ShardNum': 'Int',
447
+ 'MongosNum': 'Int',
448
+ 'MongosClass': 'String'
449
+ }
450
+ },
451
+ 'DownloadSnapshot': {
452
+ 'url': '/',
453
+ 'method': 'GET',
454
+ 'config': {
455
+ 'query': {
456
+ 'Version': '2017-01-01',
457
+ 'Action': 'DownloadSnapshot'
458
+ },
459
+ 'headers': {
460
+ 'Content-Type': 'application/json'
461
+ }
462
+ },
463
+ 'paramsType': {
464
+ 'SnapshotId': 'String'
465
+ }
466
+ },
467
+ 'CloneInstance': {
468
+ 'url': '/',
469
+ 'method': 'POST',
470
+ 'config': {
471
+ 'query': {
472
+ 'Version': '2017-01-01',
473
+ 'Action': 'CloneInstance'
474
+ },
475
+ 'headers': {
476
+ 'Content-Type': 'application/x-www-form-urlencoded'
477
+ }
478
+ },
479
+ 'paramsType': {
480
+ 'PayType': 'String',
481
+ 'AvailabilityZone': 'String',
482
+ 'Name': 'String',
483
+ 'Duration': 'Int',
484
+ 'IamProjectId': 'String',
485
+ 'VpcId': 'String',
486
+ 'VnetId': 'String',
487
+ 'InstancePassword': 'String',
488
+ 'SnapshotId': 'String',
489
+ 'InstanceId': 'String'
490
+ }
491
+ },
492
+ 'DescribeShardNode': {
493
+ 'url': '/',
494
+ 'method': 'GET',
495
+ 'config': {
496
+ 'query': {
497
+ 'Version': '2017-01-01',
498
+ 'Action': 'DescribeShardNode'
499
+ },
500
+ 'headers': {
501
+ 'Content-Type': 'application/json'
502
+ }
503
+ },
504
+ 'paramsType': {
505
+ 'InstanceId': 'String'
506
+ }
507
+ },
508
+ 'DescribeInstanceStatistic': {
509
+ 'url': '/',
510
+ 'method': 'GET',
511
+ 'config': {
512
+ 'query': {
513
+ 'Version': '2017-01-01',
514
+ 'Action': 'DescribeInstanceStatistic'
515
+ },
516
+ 'headers': {
517
+ 'Content-Type': 'application/json'
518
+ }
519
+ },
520
+ 'paramsType': {
521
+ 'Action': 'String'
522
+ }
523
+ },
524
+ 'AddClusterNode': {
525
+ 'url': '/',
526
+ 'method': 'POST',
527
+ 'config': {
528
+ 'query': {
529
+ 'Version': '2017-01-01',
530
+ 'Action': 'AddClusterNode'
531
+ },
532
+ 'headers': {
533
+ 'Content-Type': 'application/x-www-form-urlencoded'
534
+ }
535
+ },
536
+ 'paramsType': {
537
+ 'InstanceId': 'String',
538
+ 'NodeType': 'String',
539
+ 'NodeClass': 'String',
540
+ 'NodeStorage': 'Int'
541
+ }
542
+ },
543
+ 'DeleteClusterNode': {
544
+ 'url': '/',
545
+ 'method': 'POST',
546
+ 'config': {
547
+ 'query': {
548
+ 'Version': '2017-01-01',
549
+ 'Action': 'DeleteClusterNode'
550
+ },
551
+ 'headers': {
552
+ 'Content-Type': 'application/x-www-form-urlencoded'
553
+ }
554
+ },
555
+ 'paramsType': {
556
+ 'InstanceId': 'String',
557
+ 'NodeId': 'String'
558
+ }
559
+ },
560
+ 'DescribeSlowLogDetail': {
561
+ 'url': '/',
562
+ 'method': 'GET',
563
+ 'config': {
564
+ 'query': {
565
+ 'Version': '2017-01-01',
566
+ 'Action': 'DescribeSlowLogDetail'
567
+ },
568
+ 'headers': {
569
+ 'Content-Type': 'application/json'
570
+ }
571
+ },
572
+ 'paramsType': {
573
+ 'InstanceId': 'String',
574
+ 'NodeId': 'String',
575
+ 'InstanceType': 'String',
576
+ 'Database': 'String',
577
+ 'StartTime': 'String',
578
+ 'EndTime': 'String',
579
+ 'Marker': 'Int',
580
+ 'MaxRecords': 'Int'
581
+ }
582
+ },
583
+ 'DescribeSlowLogStatistics': {
584
+ 'url': '/',
585
+ 'method': 'GET',
586
+ 'config': {
587
+ 'query': {
588
+ 'Version': '2017-01-01',
589
+ 'Action': 'DescribeSlowLogStatistics'
590
+ },
591
+ 'headers': {
592
+ 'Content-Type': 'application/json'
593
+ }
594
+ },
595
+ 'paramsType': {
596
+ 'InstanceId': 'String',
597
+ 'NodeId': 'String',
598
+ 'InstanceType': 'String',
599
+ 'StartTime': 'String',
600
+ 'EndTime': 'String',
601
+ 'Marker': 'Int',
602
+ 'MaxRecords': 'Int'
603
+ }
604
+ },
605
+ 'DescribeSlowLogDatabase': {
606
+ 'url': '/',
607
+ 'method': 'GET',
608
+ 'config': {
609
+ 'query': {
610
+ 'Version': '2017-01-01',
611
+ 'Action': 'DescribeSlowLogDatabase'
612
+ },
613
+ 'headers': {
614
+ 'Content-Type': 'application/json'
615
+ }
616
+ },
617
+ 'paramsType': {
618
+ 'InstanceId': 'String',
619
+ 'NodeId': 'String',
620
+ 'InstanceType': 'String',
621
+ 'StartTime': 'String',
622
+ 'EndTime': 'String'
623
+ }
624
+ },
625
+ 'DescribeSlowLogLineChart': {
626
+ 'url': '/',
627
+ 'method': 'GET',
628
+ 'config': {
629
+ 'query': {
630
+ 'Version': '2017-01-01',
631
+ 'Action': 'DescribeSlowLogLineChart'
632
+ },
633
+ 'headers': {
634
+ 'Content-Type': 'application/json'
635
+ }
636
+ },
637
+ 'paramsType': {
638
+ 'InstanceId': 'String',
639
+ 'NodeId': 'String',
640
+ 'InstanceType': 'String',
641
+ 'StartTime': 'String',
642
+ 'EndTime': 'String'
643
+ }
644
+ },
645
+ 'UpdateMongoDBInstanceCluster': {
646
+ 'url': '/',
647
+ 'method': 'POST',
648
+ 'config': {
649
+ 'query': {
650
+ 'Version': '2017-01-01',
651
+ 'Action': 'UpdateMongoDBInstanceCluster'
652
+ },
653
+ 'headers': {
654
+ 'Content-Type': 'application/x-www-form-urlencoded'
655
+ }
656
+ },
657
+ 'paramsType': {
658
+ 'InstanceId': 'String',
659
+ 'InstanceClass': 'String',
660
+ 'NodeType': 'String',
661
+ 'NodeId': 'String',
662
+ 'Storage': 'Int'
663
+ }
664
+ }
665
+ });
666
+ }
667
+
668
+ };