ksyun-sdk-node 1.0.5 → 1.2.4

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 (99) hide show
  1. package/dist/base/BaseClient.js +90 -55
  2. package/dist/index.js +9 -12
  3. package/dist/lib/fetch.js +4 -5
  4. package/dist/lib/sign.js +31 -33
  5. package/dist/lib/signautreV4.js +167 -0
  6. package/dist/service/Actiontrail/v20190401/index.js +4 -7
  7. package/dist/service/Bill/v20180601/index.js +11 -50
  8. package/dist/service/Bill/v20220601/index.js +64 -0
  9. package/dist/service/Bill_union/v20200101/index.js +48 -10
  10. package/dist/service/Bill_union/v20221222/index.js +142 -0
  11. package/dist/service/Bws/v20160304/index.js +23 -6
  12. package/dist/service/Cdn/v20160901/index.js +42 -0
  13. package/dist/service/Cdn/v20200630/index.js +410 -0
  14. package/dist/service/Cdn/v20200901/index.js +162 -0
  15. package/dist/service/Cen/v20160304/index.js +460 -0
  16. package/dist/service/Clickhouse/v20210101/index.js +546 -0
  17. package/dist/service/Ebs/v20160304/index.js +3 -6
  18. package/dist/service/Eip/v20160304/index.js +3 -6
  19. package/dist/service/Epc/v20151101/index.js +36 -60
  20. package/dist/service/Iam/v20151101/index.js +61 -7
  21. package/dist/service/Kad/v20161122/index.js +3 -6
  22. package/dist/service/Kce/v20180314/index.js +320 -0
  23. package/dist/service/Kce/v20190806/index.js +482 -0
  24. package/dist/service/Kce/v20201231/index.js +63 -0
  25. package/dist/service/Kcf/v20211215/index.js +203 -0
  26. package/dist/service/Kcm/v20160304/index.js +120 -0
  27. package/dist/service/Kcrs/v20211109/index.js +851 -0
  28. package/dist/service/Kcs/v20160701/index.js +1106 -0
  29. package/dist/service/Kcs/v20170401/index.js +81 -0
  30. package/dist/service/Kead/v20200101/index.js +3 -6
  31. package/dist/service/Kec/v20160304/index.js +107 -42
  32. package/dist/service/Ket/v20170101/index.js +141 -0
  33. package/dist/service/Kkms/v20160304/index.js +167 -0
  34. package/dist/service/Klog/v20200731/index.js +804 -0
  35. package/dist/service/Kls/v20170101/index.js +194 -0
  36. package/dist/service/Krds/v20160701/index.js +1302 -0
  37. package/dist/service/Krds/v20200825/index.js +174 -0
  38. package/dist/service/Memcached/v20180627/index.js +249 -0
  39. package/dist/service/Mongodb/v20170101/index.js +22 -7
  40. package/dist/service/Monitor/v20100525/index.js +70 -0
  41. package/dist/service/Monitor/v20181114/index.js +49 -0
  42. package/dist/service/Monitor/v20210101/index.js +179 -0
  43. package/dist/service/Monitor/v20220101/index.js +68 -0
  44. package/dist/service/Rabbitmq/v20191017/index.js +242 -0
  45. package/dist/service/Resourcemanager/v20210320/index.js +3 -6
  46. package/dist/service/Sks/v20151101/index.js +3 -6
  47. package/dist/service/Slb/v20160304/index.js +517 -8
  48. package/dist/service/Sts/v20151101/index.js +4 -7
  49. package/dist/service/Tagv2/v20200901/index.js +174 -0
  50. package/dist/service/Tidb/v20210520/index.js +363 -0
  51. package/dist/service/Trade/v20200114/index.js +3 -6
  52. package/dist/service/Trade/v20200831/index.js +3 -6
  53. package/dist/service/Vpc/v20160304/index.js +239 -7
  54. package/dist/service/Waf/v20200707/index.js +248 -0
  55. package/package.json +1 -1
  56. package/src/base/BaseClient.js +85 -36
  57. package/src/lib/signautreV4.js +166 -0
  58. package/src/service/Actiontrail/v20190401/index.js +1 -1
  59. package/src/service/Bill/v20180601/index.js +6 -46
  60. package/src/service/Bill/v20220601/index.js +56 -0
  61. package/src/service/Bill_union/v20200101/index.js +37 -0
  62. package/src/service/Bill_union/v20221222/index.js +134 -0
  63. package/src/service/Bws/v20160304/index.js +20 -0
  64. package/src/service/{Bill_union/v20211209 → Cdn/v20160901}/index.js +6 -6
  65. package/src/service/Cdn/v20200630/index.js +402 -0
  66. package/src/service/Cdn/v20200901/index.js +154 -0
  67. package/src/service/Cen/v20160304/index.js +452 -0
  68. package/src/service/Clickhouse/v20210101/index.js +538 -0
  69. package/src/service/Ebs/v20160304/index.js +1 -4
  70. package/src/service/Epc/v20151101/index.js +26 -50
  71. package/src/service/Iam/v20151101/index.js +57 -0
  72. package/src/service/Kce/v20180314/index.js +312 -0
  73. package/src/service/Kce/v20190806/index.js +474 -0
  74. package/src/service/Kce/v20201231/index.js +55 -0
  75. package/src/service/Kcf/v20211215/index.js +197 -0
  76. package/src/service/Kcm/v20160304/index.js +112 -0
  77. package/src/service/Kcrs/v20211109/index.js +857 -0
  78. package/src/service/Kcs/v20160701/index.js +1101 -0
  79. package/src/service/Kcs/v20170401/index.js +73 -0
  80. package/src/service/Kec/v20160304/index.js +86 -22
  81. package/src/service/Ket/v20170101/index.js +133 -0
  82. package/src/service/Kkms/v20160304/index.js +159 -0
  83. package/src/service/Klog/v20200731/index.js +810 -0
  84. package/src/service/Kls/v20170101/index.js +186 -0
  85. package/src/service/Krds/v20160701/index.js +1296 -0
  86. package/src/service/Krds/v20200825/index.js +166 -0
  87. package/src/service/Memcached/v20180627/index.js +248 -0
  88. package/src/service/Mongodb/v20170101/index.js +18 -0
  89. package/src/service/Monitor/v20100525/index.js +62 -0
  90. package/src/service/{Slb/v20171210 → Monitor/v20181114}/index.js +13 -11
  91. package/src/service/Monitor/v20210101/index.js +172 -0
  92. package/src/service/Monitor/v20220101/index.js +60 -0
  93. package/src/service/Rabbitmq/v20191017/index.js +234 -0
  94. package/src/service/Slb/v20160304/index.js +512 -0
  95. package/src/service/Sts/v20151101/index.js +1 -1
  96. package/src/service/Tagv2/v20200901/index.js +166 -0
  97. package/src/service/Tidb/v20210520/index.js +355 -0
  98. package/src/service/Vpc/v20160304/index.js +235 -0
  99. package/src/service/Waf/v20200707/index.js +240 -0
@@ -0,0 +1,73 @@
1
+ const BaseClient = require("../../../base/BaseClient.js");
2
+
3
+ module.exports = class Client extends BaseClient {
4
+ _baseConfig = {
5
+ 'protocol': 'http://',
6
+ 'endpoint': 'kcs.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': 'kcs',
15
+ },
16
+ },
17
+ }
18
+ _apiList = {
19
+ 'DescribeCacheReadonlyNode': {
20
+ 'url': '/',
21
+ 'method': 'GET',
22
+ 'config': {
23
+ 'query': {
24
+ 'Version': '2017-04-01',
25
+ 'Action': 'DescribeCacheReadonlyNode',
26
+ },
27
+ 'headers': {
28
+ 'Content-Type': 'application/json'
29
+ },
30
+ },
31
+ 'paramsType': {
32
+ 'CacheId': 'String',
33
+ 'AvailableZone': 'String',
34
+ }
35
+ },
36
+ 'AddCacheSlaveNode': {
37
+ 'url': '/',
38
+ 'method': 'PUT',
39
+ 'config': {
40
+ 'query': {
41
+ 'Version': '2017-04-01',
42
+ 'Action': 'AddCacheSlaveNode',
43
+ },
44
+ 'headers': {
45
+ 'Content-Type': 'application/json'
46
+ },
47
+ },
48
+ 'paramsType': {
49
+ 'AvailableZone': 'String',
50
+ 'CacheId': 'String',
51
+ 'SlaveVip': 'String',
52
+ }
53
+ },
54
+ 'DeleteCacheSlaveNode': {
55
+ 'url': '/',
56
+ 'method': 'PUT',
57
+ 'config': {
58
+ 'query': {
59
+ 'Version': '2017-04-01',
60
+ 'Action': 'DeleteCacheSlaveNode',
61
+ },
62
+ 'headers': {
63
+ 'Content-Type': 'application/json'
64
+ },
65
+ },
66
+ 'paramsType': {
67
+ 'AvailableZone': 'String',
68
+ 'CacheId': 'String',
69
+ 'NodeId': 'String',
70
+ }
71
+ },
72
+ }
73
+ }
@@ -70,9 +70,26 @@ module.exports = class Client extends BaseClient {
70
70
  'ProjectId': 'Int',
71
71
  'DataDisk': 'Filter',
72
72
  'NetworkInterface': 'Filter',
73
- 'Userdata': 'String',
73
+ 'UserData': 'String',
74
74
  'SystemDisk.DiskType': 'String',
75
75
  'SystemDisk.DiskSize': 'Int',
76
+ 'ModelId': 'String',
77
+ 'ModelVersion': 'Int',
78
+ 'AssembledImageDataDiskType': 'String',
79
+ 'AutoCreateEbs': 'Boolean',
80
+ 'LineId': 'String',
81
+ 'AddressBandWidth': 'Int',
82
+ 'AddressChargeType': 'String',
83
+ 'AddressProjectId': 'String',
84
+ 'AddressPurchaseTime': 'Int',
85
+ 'KeyId': 'Filter',
86
+ 'keepImageLogin': 'Boolean',
87
+ 'HostName': 'String',
88
+ 'HostNameSuffix': 'Int',
89
+ 'Password': 'String',
90
+ 'FailureAutoDelete': 'Boolean',
91
+ 'Tag': 'Filter',
92
+ 'DataGuardId': 'String',
76
93
  }
77
94
  },
78
95
  'StartInstances': {
@@ -171,6 +188,7 @@ module.exports = class Client extends BaseClient {
171
188
  'AutoRestart': 'Boolean',
172
189
  'SystemDisk.DiskSize': 'Int',
173
190
  'SystemDisk.ResizeType': 'String',
191
+ 'InstantAccess': 'Boolean',
174
192
  }
175
193
  },
176
194
  'TerminateInstances': {
@@ -247,6 +265,7 @@ module.exports = class Client extends BaseClient {
247
265
  'KeepImageLogin': 'Boolean',
248
266
  'SystemDisk.DiskType': 'String',
249
267
  'SystemDisk.ResizeType': 'String',
268
+ 'UserData': 'String',
250
269
  }
251
270
  },
252
271
  'CreateImage': {
@@ -267,6 +286,7 @@ module.exports = class Client extends BaseClient {
267
286
  'Type': 'String',
268
287
  'DataDiskIds': 'Filter',
269
288
  'SnapshotIds': 'Filter',
289
+ 'InstantAccess': 'Boolean',
270
290
  }
271
291
  },
272
292
  'RemoveImages': {
@@ -361,6 +381,15 @@ module.exports = class Client extends BaseClient {
361
381
  },
362
382
  'paramsType': {
363
383
  'InstanceName': 'String',
384
+ 'Marker': 'Int',
385
+ 'MaxResults': 'Int',
386
+ 'LocalVolumeId': 'String',
387
+ 'InstanceState': 'String',
388
+ 'LocalVolumeCategory': 'String',
389
+ 'LocalVolumeSize': 'Int',
390
+ 'BindSnapshotPolicy': 'Boolean',
391
+ 'AutoSnapshotPolicyId': 'String',
392
+ 'InstanceId': 'String',
364
393
  }
365
394
  },
366
395
  'CreateLocalVolumeSnapshot': {
@@ -379,6 +408,7 @@ module.exports = class Client extends BaseClient {
379
408
  'LocalVolumeId': 'String',
380
409
  'LocalVolumeSnapshotName': 'String',
381
410
  'LocalVolumeSnapshotDesc': 'String',
411
+ 'InstantAccess': 'Boolean',
382
412
  }
383
413
  },
384
414
  'DescribeLocalVolumeSnapshots': {
@@ -553,21 +583,21 @@ module.exports = class Client extends BaseClient {
553
583
  'Tag': 'Filter',
554
584
  }
555
585
  },
556
- 'RenameDedicatedHost': {
586
+ 'DeleteDedicatedHost': {
557
587
  'url': '/',
558
588
  'method': 'GET',
559
589
  'config': {
560
590
  'query': {
561
591
  'Version': '2016-03-04',
562
- 'Action': 'RenameDedicatedHost',
592
+ 'Action': 'DeleteDedicatedHost',
563
593
  },
564
594
  'headers': {
565
595
  'Content-Type': 'application/x-www-form-urlencoded'
566
596
  },
567
597
  },
568
598
  'paramsType': {
569
- 'DedicatedHostId': 'String',
570
- 'NewDedicatedHostName': 'String',
599
+ 'DedicatedHostId': 'Filter',
600
+ 'IsRefund': 'Boolean',
571
601
  }
572
602
  },
573
603
  'DescribeDedicatedHosts': {
@@ -1241,6 +1271,7 @@ module.exports = class Client extends BaseClient {
1241
1271
  },
1242
1272
  },
1243
1273
  'paramsType': {
1274
+ 'Filter': 'Filter',
1244
1275
  }
1245
1276
  },
1246
1277
  'DescribeInstanceFamilys': {
@@ -1293,6 +1324,7 @@ module.exports = class Client extends BaseClient {
1293
1324
  'StorageType': 'String',
1294
1325
  'ProtocolType': 'String',
1295
1326
  'FileSystemName': 'String',
1327
+ 'ProjectId': 'Int',
1296
1328
  }
1297
1329
  },
1298
1330
  'DeleteFileSystem': {
@@ -1324,9 +1356,12 @@ module.exports = class Client extends BaseClient {
1324
1356
  },
1325
1357
  },
1326
1358
  'paramsType': {
1327
- 'FileSystemId': 'String',
1359
+ 'FileSystemId': 'Filter',
1328
1360
  'MaxResults': 'Int',
1329
1361
  'Marker': 'Int',
1362
+ 'ProjectId': 'Filter',
1363
+ 'IncludeDel': 'Boolean',
1364
+ 'Filter': 'Filter',
1330
1365
  }
1331
1366
  },
1332
1367
  'ModifyFileSystem': {
@@ -1437,6 +1472,8 @@ module.exports = class Client extends BaseClient {
1437
1472
  'ModelName': 'String',
1438
1473
  'SystemDisk.DiskType': 'String',
1439
1474
  'SystemDisk.ResizeType': 'String',
1475
+ 'VersionDetail': 'String',
1476
+ 'FailureAutoDelete': 'Boolean',
1440
1477
  }
1441
1478
  },
1442
1479
  'TerminateModels': {
@@ -1452,7 +1489,8 @@ module.exports = class Client extends BaseClient {
1452
1489
  },
1453
1490
  },
1454
1491
  'paramsType': {
1455
- 'ModelId': 'Filter',
1492
+ 'ModelId': 'String',
1493
+ 'ModelVersion': 'Int',
1456
1494
  }
1457
1495
  },
1458
1496
  'DescribeModels': {
@@ -1574,6 +1612,25 @@ module.exports = class Client extends BaseClient {
1574
1612
  'DedicatedClusterName': 'String',
1575
1613
  }
1576
1614
  },
1615
+ 'InstanceMigrate': {
1616
+ 'url': '/',
1617
+ 'method': 'GET',
1618
+ 'config': {
1619
+ 'query': {
1620
+ 'Version': '2016-03-04',
1621
+ 'Action': 'InstanceMigrate',
1622
+ },
1623
+ 'headers': {
1624
+ 'Content-Type': 'application/x-www-form-urlencoded'
1625
+ },
1626
+ },
1627
+ 'paramsType': {
1628
+ 'DedicatedHostId': 'String',
1629
+ 'InstanceId': 'String',
1630
+ 'InstanceType': 'String',
1631
+ 'DataDisk': 'Filter',
1632
+ }
1633
+ },
1577
1634
  'ModifyInstanceAutoDeleteTime': {
1578
1635
  'url': '/',
1579
1636
  'method': 'GET',
@@ -1757,32 +1814,32 @@ module.exports = class Client extends BaseClient {
1757
1814
  'InstanceId': 'Filter',
1758
1815
  }
1759
1816
  },
1760
- 'PreMigrateInstance': {
1817
+ 'CopySnapshot': {
1761
1818
  'url': '/',
1762
1819
  'method': 'GET',
1763
1820
  'config': {
1764
1821
  'query': {
1765
1822
  'Version': '2016-03-04',
1766
- 'Action': 'PreMigrateInstance',
1823
+ 'Action': 'CopySnapshot',
1767
1824
  },
1768
1825
  'headers': {
1769
1826
  'Content-Type': 'application/x-www-form-urlencoded'
1770
1827
  },
1771
1828
  },
1772
1829
  'paramsType': {
1773
- 'InstanceId': 'String',
1774
- 'InstanceType': 'String',
1775
- 'SystemDiskType': 'String',
1776
- 'DataDiskType': 'String',
1830
+ 'SnapshotId': 'Filter',
1831
+ 'DestinationRegion': 'Filter',
1832
+ 'DestinationSnapshotName': 'String',
1833
+ 'DestinationSnapshotDesc': 'String',
1777
1834
  }
1778
1835
  },
1779
- 'CancelPreMigrateInstance': {
1836
+ 'PreMigrateInstance': {
1780
1837
  'url': '/',
1781
1838
  'method': 'GET',
1782
1839
  'config': {
1783
1840
  'query': {
1784
1841
  'Version': '2016-03-04',
1785
- 'Action': 'CancelPreMigrateInstance',
1842
+ 'Action': 'PreMigrateInstance',
1786
1843
  },
1787
1844
  'headers': {
1788
1845
  'Content-Type': 'application/x-www-form-urlencoded'
@@ -1790,51 +1847,58 @@ module.exports = class Client extends BaseClient {
1790
1847
  },
1791
1848
  'paramsType': {
1792
1849
  'InstanceId': 'String',
1850
+ 'InstanceType': 'String',
1851
+ 'SystemDiskType': 'String',
1852
+ 'DataDiskType': 'String',
1853
+ 'InstantAccess': 'Boolean',
1793
1854
  }
1794
1855
  },
1795
- 'DescribeInstanceKmr': {
1856
+ 'CancelPreMigrateInstance': {
1796
1857
  'url': '/',
1797
1858
  'method': 'GET',
1798
1859
  'config': {
1799
1860
  'query': {
1800
1861
  'Version': '2016-03-04',
1801
- 'Action': 'DescribeInstanceKmr',
1862
+ 'Action': 'CancelPreMigrateInstance',
1802
1863
  },
1803
1864
  'headers': {
1804
- 'Content-Type': 'application/json'
1865
+ 'Content-Type': 'application/x-www-form-urlencoded'
1805
1866
  },
1806
1867
  },
1807
1868
  'paramsType': {
1869
+ 'InstanceId': 'String',
1808
1870
  }
1809
1871
  },
1810
- 'DescribeMinFlavorCount': {
1872
+ 'GetVNCAddress': {
1811
1873
  'url': '/',
1812
1874
  'method': 'GET',
1813
1875
  'config': {
1814
1876
  'query': {
1815
1877
  'Version': '2016-03-04',
1816
- 'Action': 'DescribeMinFlavorCount',
1878
+ 'Action': 'GetVNCAddress',
1817
1879
  },
1818
1880
  'headers': {
1819
1881
  'Content-Type': 'application/json'
1820
1882
  },
1821
1883
  },
1822
1884
  'paramsType': {
1885
+ 'InstanceId': 'String',
1823
1886
  }
1824
1887
  },
1825
- 'DescribeProjectMaxNum': {
1888
+ 'SwitchImageType': {
1826
1889
  'url': '/',
1827
1890
  'method': 'GET',
1828
1891
  'config': {
1829
1892
  'query': {
1830
1893
  'Version': '2016-03-04',
1831
- 'Action': 'DescribeProjectMaxNum',
1894
+ 'Action': 'SwitchImageType',
1832
1895
  },
1833
1896
  'headers': {
1834
1897
  'Content-Type': 'application/x-www-form-urlencoded'
1835
1898
  },
1836
1899
  },
1837
1900
  'paramsType': {
1901
+ 'ImageId': 'Filter',
1838
1902
  }
1839
1903
  },
1840
1904
  }
@@ -0,0 +1,133 @@
1
+ const BaseClient = require("../../../base/BaseClient.js");
2
+
3
+ module.exports = class Client extends BaseClient {
4
+ _baseConfig = {
5
+ 'protocol': 'http://',
6
+ 'endpoint': 'ket.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': 'ket',
15
+ },
16
+ },
17
+ }
18
+ _apiList = {
19
+ 'Preset': {
20
+ 'url': '/',
21
+ 'method': 'POST',
22
+ 'config': {
23
+ 'query': {
24
+ 'Version': '2017-01-01',
25
+ 'Action': 'Preset',
26
+ },
27
+ 'headers': {
28
+ 'Content-Type': 'application/json'
29
+ },
30
+ },
31
+ 'paramsType': {
32
+ 'UniqName': 'String',
33
+ 'App': 'String',
34
+ 'Preset': 'String',
35
+ 'Description': 'String',
36
+ 'Output': 'String',
37
+ 'Video': 'String',
38
+ }
39
+ },
40
+ 'UpdatePreset': {
41
+ 'url': '/',
42
+ 'method': 'POST',
43
+ 'config': {
44
+ 'query': {
45
+ 'Version': '2017-01-01',
46
+ 'Action': 'UpdatePreset',
47
+ },
48
+ 'headers': {
49
+ 'Content-Type': 'application/x-www-form-urlencoded'
50
+ },
51
+ },
52
+ 'paramsType': {
53
+ 'UniqName': 'String',
54
+ 'App': 'String',
55
+ 'Preset': 'String',
56
+ 'Description': 'String',
57
+ 'Output': 'String',
58
+ 'Video': 'String',
59
+ }
60
+ },
61
+ 'DelPreset': {
62
+ 'url': '/',
63
+ 'method': 'GET',
64
+ 'config': {
65
+ 'query': {
66
+ 'Version': '2017-01-01',
67
+ 'Action': 'DelPreset',
68
+ },
69
+ 'headers': {
70
+ 'Content-Type': 'application/json'
71
+ },
72
+ },
73
+ 'paramsType': {
74
+ 'UniqName': 'String',
75
+ 'App': 'String',
76
+ 'Preset': 'String',
77
+ }
78
+ },
79
+ 'GetPresetList': {
80
+ 'url': '/',
81
+ 'method': 'GET',
82
+ 'config': {
83
+ 'query': {
84
+ 'Version': '2017-01-01',
85
+ 'Action': 'GetPresetList',
86
+ },
87
+ 'headers': {
88
+ 'Content-Type': 'application/x-www-form-urlencoded'
89
+ },
90
+ },
91
+ 'paramsType': {
92
+ 'UniqName': 'String',
93
+ 'App': 'String',
94
+ }
95
+ },
96
+ 'GetPresetDetail': {
97
+ 'url': '/',
98
+ 'method': 'GET',
99
+ 'config': {
100
+ 'query': {
101
+ 'Version': '2017-01-01',
102
+ 'Action': 'GetPresetDetail',
103
+ },
104
+ 'headers': {
105
+ 'Content-Type': 'application/x-www-form-urlencoded'
106
+ },
107
+ },
108
+ 'paramsType': {
109
+ 'UniqName': 'String',
110
+ 'App': 'String',
111
+ 'Preset': 'String',
112
+ }
113
+ },
114
+ 'GetStreamTranList': {
115
+ 'url': '/',
116
+ 'method': 'GET',
117
+ 'config': {
118
+ 'query': {
119
+ 'Version': '2017-01-01',
120
+ 'Action': 'GetStreamTranList',
121
+ },
122
+ 'headers': {
123
+ 'Content-Type': 'application/x-www-form-urlencoded'
124
+ },
125
+ },
126
+ 'paramsType': {
127
+ 'UniqName': 'String',
128
+ 'App': 'String',
129
+ 'StreamID': 'String',
130
+ }
131
+ },
132
+ }
133
+ }
@@ -0,0 +1,159 @@
1
+ const BaseClient = require("../../../base/BaseClient.js");
2
+
3
+ module.exports = class Client extends BaseClient {
4
+ _baseConfig = {
5
+ 'protocol': 'http://',
6
+ 'endpoint': 'kkms.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': 'kkms',
15
+ },
16
+ },
17
+ }
18
+ _apiList = {
19
+ 'CreateKey': {
20
+ 'url': '/',
21
+ 'method': 'GET',
22
+ 'config': {
23
+ 'query': {
24
+ 'Version': '2016-03-04',
25
+ 'Action': 'CreateKey',
26
+ },
27
+ 'headers': {
28
+ 'Content-Type': 'application/x-www-form-urlencoded'
29
+ },
30
+ },
31
+ 'paramsType': {
32
+ 'KeyName': 'String',
33
+ 'Description': 'String',
34
+ 'KeyUsage': 'String',
35
+ 'Origin': 'String',
36
+ 'ChargeType': 'String',
37
+ }
38
+ },
39
+ 'ModifyKey': {
40
+ 'url': '/',
41
+ 'method': 'GET',
42
+ 'config': {
43
+ 'query': {
44
+ 'Version': '2016-03-04',
45
+ 'Action': 'ModifyKey',
46
+ },
47
+ 'headers': {
48
+ 'Content-Type': 'application/x-www-form-urlencoded'
49
+ },
50
+ },
51
+ 'paramsType': {
52
+ 'KeyId': 'String',
53
+ 'KeyName': 'String',
54
+ 'Description': 'String',
55
+ }
56
+ },
57
+ 'ModifyKeyState': {
58
+ 'url': '/',
59
+ 'method': 'GET',
60
+ 'config': {
61
+ 'query': {
62
+ 'Version': '2016-03-04',
63
+ 'Action': 'ModifyKeyState',
64
+ },
65
+ 'headers': {
66
+ 'Content-Type': 'application/x-www-form-urlencoded'
67
+ },
68
+ },
69
+ 'paramsType': {
70
+ 'KeyId': 'String',
71
+ 'KeyState': 'String',
72
+ }
73
+ },
74
+ 'DeleteKey': {
75
+ 'url': '/',
76
+ 'method': 'GET',
77
+ 'config': {
78
+ 'query': {
79
+ 'Version': '2016-03-04',
80
+ 'Action': 'DeleteKey',
81
+ },
82
+ 'headers': {
83
+ 'Content-Type': 'application/x-www-form-urlencoded'
84
+ },
85
+ },
86
+ 'paramsType': {
87
+ 'KeyId': 'String',
88
+ }
89
+ },
90
+ 'DescribeKeys': {
91
+ 'url': '/',
92
+ 'method': 'GET',
93
+ 'config': {
94
+ 'query': {
95
+ 'Version': '2016-03-04',
96
+ 'Action': 'DescribeKeys',
97
+ },
98
+ 'headers': {
99
+ 'Content-Type': 'application/x-www-form-urlencoded'
100
+ },
101
+ },
102
+ 'paramsType': {
103
+ 'KeyId': 'Filter',
104
+ }
105
+ },
106
+ 'Encrypt': {
107
+ 'url': '/',
108
+ 'method': 'GET',
109
+ 'config': {
110
+ 'query': {
111
+ 'Version': '2016-03-04',
112
+ 'Action': 'Encrypt',
113
+ },
114
+ 'headers': {
115
+ 'Content-Type': 'application/x-www-form-urlencoded'
116
+ },
117
+ },
118
+ 'paramsType': {
119
+ 'KeyId': 'String',
120
+ 'Plaintext': 'String',
121
+ }
122
+ },
123
+ 'Decrypt': {
124
+ 'url': '/',
125
+ 'method': 'GET',
126
+ 'config': {
127
+ 'query': {
128
+ 'Version': '2016-03-04',
129
+ 'Action': 'Decrypt',
130
+ },
131
+ 'headers': {
132
+ 'Content-Type': 'application/x-www-form-urlencoded'
133
+ },
134
+ },
135
+ 'paramsType': {
136
+ 'KeyId': 'String',
137
+ 'CiphertextBlob': 'String',
138
+ }
139
+ },
140
+ 'GenerateDataKey': {
141
+ 'url': '/',
142
+ 'method': 'GET',
143
+ 'config': {
144
+ 'query': {
145
+ 'Version': '2016-03-04',
146
+ 'Action': 'GenerateDataKey',
147
+ },
148
+ 'headers': {
149
+ 'Content-Type': 'application/x-www-form-urlencoded'
150
+ },
151
+ },
152
+ 'paramsType': {
153
+ 'KeyId': 'String',
154
+ 'KeySpec': 'String',
155
+ 'NumberOfBytes': 'Int',
156
+ }
157
+ },
158
+ }
159
+ }