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,118 @@
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': 'bill-union.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': 'bill-union'
23
+ }
24
+ }
25
+ });
26
+
27
+ _defineProperty(this, "_apiList", {
28
+ 'DescribeBillSummaryByPayMode': {
29
+ 'url': '/',
30
+ 'method': 'GET',
31
+ 'config': {
32
+ 'query': {
33
+ 'Version': '2020-01-01',
34
+ 'Action': 'DescribeBillSummaryByPayMode'
35
+ },
36
+ 'headers': {
37
+ 'Content-Type': 'application/json'
38
+ }
39
+ },
40
+ 'paramsType': {}
41
+ },
42
+ 'DescribeBillSummaryByProduct': {
43
+ 'url': '/',
44
+ 'method': 'GET',
45
+ 'config': {
46
+ 'query': {
47
+ 'Version': '2020-01-01',
48
+ 'Action': 'DescribeBillSummaryByProduct'
49
+ },
50
+ 'headers': {
51
+ 'Content-Type': 'application/json'
52
+ }
53
+ },
54
+ 'paramsType': {}
55
+ },
56
+ 'DescribeBillSummaryByProject': {
57
+ 'url': '/',
58
+ 'method': 'GET',
59
+ 'config': {
60
+ 'query': {
61
+ 'Version': '2020-01-01',
62
+ 'Action': 'DescribeBillSummaryByProject'
63
+ },
64
+ 'headers': {
65
+ 'Content-Type': 'application/json'
66
+ }
67
+ },
68
+ 'paramsType': {
69
+ 'BillBeginMonth': 'String',
70
+ 'BillEndMonth': 'String'
71
+ }
72
+ },
73
+ 'DescribeInstanceSummaryBills': {
74
+ 'url': '/',
75
+ 'method': 'GET',
76
+ 'config': {
77
+ 'query': {
78
+ 'Version': '2020-01-01',
79
+ 'Action': 'DescribeInstanceSummaryBills'
80
+ },
81
+ 'headers': {
82
+ 'Content-Type': 'application/json'
83
+ }
84
+ },
85
+ 'paramsType': {}
86
+ },
87
+ 'DescribeProductCode': {
88
+ 'url': '/',
89
+ 'method': 'GET',
90
+ 'config': {
91
+ 'query': {
92
+ 'Version': '2020-01-01',
93
+ 'Action': 'DescribeProductCode'
94
+ },
95
+ 'headers': {
96
+ 'Content-Type': 'application/json'
97
+ }
98
+ },
99
+ 'paramsType': {}
100
+ },
101
+ 'DescribeSplitItemBillDetails': {
102
+ 'url': '/',
103
+ 'method': 'GET',
104
+ 'config': {
105
+ 'query': {
106
+ 'Version': '2020-01-01',
107
+ 'Action': 'DescribeSplitItemBillDetails'
108
+ },
109
+ 'headers': {
110
+ 'Content-Type': 'application/json'
111
+ }
112
+ },
113
+ 'paramsType': {}
114
+ }
115
+ });
116
+ }
117
+
118
+ };
@@ -0,0 +1,45 @@
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': 'bill-union.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': 'bill-union'
23
+ }
24
+ }
25
+ });
26
+
27
+ _defineProperty(this, "_apiList", {
28
+ 'DescribeCostBill': {
29
+ 'url': '/',
30
+ 'method': 'GET',
31
+ 'config': {
32
+ 'query': {
33
+ 'Version': '2021-12-09',
34
+ 'Action': 'DescribeCostBill'
35
+ },
36
+ 'headers': {
37
+ 'Content-Type': 'application/json'
38
+ }
39
+ },
40
+ 'paramsType': {}
41
+ }
42
+ });
43
+ }
44
+
45
+ };
@@ -0,0 +1,359 @@
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': 'ebs.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': 'ebs'
23
+ }
24
+ }
25
+ });
26
+
27
+ _defineProperty(this, "_apiList", {
28
+ 'CreateVolume': {
29
+ 'url': '/',
30
+ 'method': 'GET',
31
+ 'config': {
32
+ 'query': {
33
+ 'Version': '2016-03-04',
34
+ 'Action': 'CreateVolume'
35
+ },
36
+ 'headers': {
37
+ 'Content-Type': 'application/json'
38
+ }
39
+ },
40
+ 'paramsType': {
41
+ 'VolumeName': 'String',
42
+ 'VolumeType': 'String',
43
+ 'VolumeDesc': 'String',
44
+ 'Size': 'Int',
45
+ 'AvailabilityZone': 'String',
46
+ 'ChargeType': 'String',
47
+ 'PurchaseTime': 'Int',
48
+ 'ProjectId': 'String',
49
+ 'SubOrderId': 'String'
50
+ }
51
+ },
52
+ 'AttachVolume': {
53
+ 'url': '/',
54
+ 'method': 'GET',
55
+ 'config': {
56
+ 'query': {
57
+ 'Version': '2016-03-04',
58
+ 'Action': 'AttachVolume'
59
+ },
60
+ 'headers': {
61
+ 'Content-Type': 'application/json'
62
+ }
63
+ },
64
+ 'paramsType': {
65
+ 'VolumeId': 'String',
66
+ 'InstanceId': 'String',
67
+ 'DeleteWithInstance': 'String'
68
+ }
69
+ },
70
+ 'DetachVolume': {
71
+ 'url': '/',
72
+ 'method': 'GET',
73
+ 'config': {
74
+ 'query': {
75
+ 'Version': '2016-03-04',
76
+ 'Action': 'DetachVolume'
77
+ },
78
+ 'headers': {
79
+ 'Content-Type': 'application/json'
80
+ }
81
+ },
82
+ 'paramsType': {
83
+ 'InstanceId': 'String',
84
+ 'VolumeId': 'String'
85
+ }
86
+ },
87
+ 'DeleteVolume': {
88
+ 'url': '/',
89
+ 'method': 'GET',
90
+ 'config': {
91
+ 'query': {
92
+ 'Version': '2016-03-04',
93
+ 'Action': 'DeleteVolume'
94
+ },
95
+ 'headers': {
96
+ 'Content-Type': 'application/json'
97
+ }
98
+ },
99
+ 'paramsType': {
100
+ 'VolumeId': 'String',
101
+ 'ForceDelete': 'Boolean'
102
+ }
103
+ },
104
+ 'ResizeVolume': {
105
+ 'url': '/',
106
+ 'method': 'GET',
107
+ 'config': {
108
+ 'query': {
109
+ 'Version': '2016-03-04',
110
+ 'Action': 'ResizeVolume'
111
+ },
112
+ 'headers': {
113
+ 'Content-Type': 'application/json'
114
+ }
115
+ },
116
+ 'paramsType': {
117
+ 'VolumeId': 'String',
118
+ 'Size': 'String',
119
+ 'OnlineResize': 'Boolean',
120
+ 'SubOrderId': 'String'
121
+ }
122
+ },
123
+ 'DescribeVolumes': {
124
+ 'url': '/',
125
+ 'method': 'GET',
126
+ 'config': {
127
+ 'query': {
128
+ 'Version': '2016-03-04',
129
+ 'Action': 'DescribeVolumes'
130
+ },
131
+ 'headers': {
132
+ 'Content-Type': 'application/json'
133
+ }
134
+ },
135
+ 'paramsType': {
136
+ 'VolumeId': 'Filter',
137
+ 'VolumeCategory': 'String',
138
+ 'VolumeStatus': 'String',
139
+ 'VolumeType': 'String',
140
+ 'VolumeCreateDate': 'String',
141
+ 'Marker': 'Int',
142
+ 'MaxResults': 'Int'
143
+ }
144
+ },
145
+ 'ModifyVolume': {
146
+ 'url': '/',
147
+ 'method': 'GET',
148
+ 'config': {
149
+ 'query': {
150
+ 'Version': '2016-03-04',
151
+ 'Action': 'ModifyVolume'
152
+ },
153
+ 'headers': {
154
+ 'Content-Type': 'application/json'
155
+ }
156
+ },
157
+ 'paramsType': {
158
+ 'VolumeId': 'String',
159
+ 'VolumeName': 'String',
160
+ 'VolumeDesc': 'String',
161
+ 'DeleteWithInstance': 'String'
162
+ }
163
+ },
164
+ 'DescribeEbsInstances': {
165
+ 'url': '/',
166
+ 'method': 'GET',
167
+ 'config': {
168
+ 'query': {
169
+ 'Version': '2016-03-04',
170
+ 'Action': 'DescribeEbsInstances'
171
+ },
172
+ 'headers': {
173
+ 'Content-Type': 'application/json'
174
+ }
175
+ },
176
+ 'paramsType': {
177
+ 'AvailabilityZone': 'String',
178
+ 'VolumeType': 'String'
179
+ }
180
+ },
181
+ 'DescribeInstanceVolumes': {
182
+ 'url': '/',
183
+ 'method': 'GET',
184
+ 'config': {
185
+ 'query': {
186
+ 'Version': '2016-03-04',
187
+ 'Action': 'DescribeInstanceVolumes'
188
+ },
189
+ 'headers': {
190
+ 'Content-Type': 'application/json'
191
+ }
192
+ },
193
+ 'paramsType': {
194
+ 'InstanceId': 'String'
195
+ }
196
+ },
197
+ 'RenewVolume': {
198
+ 'url': '/',
199
+ 'method': 'GET',
200
+ 'config': {
201
+ 'query': {
202
+ 'Version': '2016-03-04',
203
+ 'Action': 'RenewVolume'
204
+ },
205
+ 'headers': {
206
+ 'Content-Type': 'application/json'
207
+ }
208
+ },
209
+ 'paramsType': {
210
+ 'VolumeId': 'String',
211
+ 'PurchaseTime': 'Int'
212
+ }
213
+ },
214
+ 'UpdateVolumeProject': {
215
+ 'url': '/',
216
+ 'method': 'GET',
217
+ 'config': {
218
+ 'query': {
219
+ 'Version': '2016-03-04',
220
+ 'Action': 'UpdateVolumeProject'
221
+ },
222
+ 'headers': {
223
+ 'Content-Type': 'application/json'
224
+ }
225
+ },
226
+ 'paramsType': {
227
+ 'VolumeId': 'Filter',
228
+ 'ProjectId': 'String'
229
+ }
230
+ },
231
+ 'DescribeSnapshots': {
232
+ 'url': '/',
233
+ 'method': 'GET',
234
+ 'config': {
235
+ 'query': {
236
+ 'Version': '2016-03-04',
237
+ 'Action': 'DescribeSnapshots'
238
+ },
239
+ 'headers': {
240
+ 'Content-Type': 'application/json'
241
+ }
242
+ },
243
+ 'paramsType': {
244
+ 'VolumeId': 'String',
245
+ 'VolumeCategory': 'String',
246
+ 'SnapshotId': 'String',
247
+ 'AvailabilityZone': 'String',
248
+ 'SnapshotName': 'String',
249
+ 'PageNumber': 'Int',
250
+ 'PageSize': 'Int'
251
+ }
252
+ },
253
+ 'CreateSnapshot': {
254
+ 'url': '/',
255
+ 'method': 'GET',
256
+ 'config': {
257
+ 'query': {
258
+ 'Version': '2016-03-04',
259
+ 'Action': 'CreateSnapshot'
260
+ },
261
+ 'headers': {
262
+ 'Content-Type': 'application/json'
263
+ }
264
+ },
265
+ 'paramsType': {
266
+ 'VolumeId': 'String',
267
+ 'SnapshotName': 'String',
268
+ 'SnapshotDesc': 'String',
269
+ 'SnapshotType': 'String'
270
+ }
271
+ },
272
+ 'DeleteSnapshot': {
273
+ 'url': '/',
274
+ 'method': 'GET',
275
+ 'config': {
276
+ 'query': {
277
+ 'Version': '2016-03-04',
278
+ 'Action': 'DeleteSnapshot'
279
+ },
280
+ 'headers': {
281
+ 'Content-Type': 'application/json'
282
+ }
283
+ },
284
+ 'paramsType': {
285
+ 'SnapshotId': 'String'
286
+ }
287
+ },
288
+ 'RollbackSnapshot': {
289
+ 'url': '/',
290
+ 'method': 'GET',
291
+ 'config': {
292
+ 'query': {
293
+ 'Version': '2016-03-04',
294
+ 'Action': 'RollbackSnapshot'
295
+ },
296
+ 'headers': {
297
+ 'Content-Type': 'application/json'
298
+ }
299
+ },
300
+ 'paramsType': {
301
+ 'VolumeId': 'String',
302
+ 'SnapshotId': 'String'
303
+ }
304
+ },
305
+ 'ModifySnapshot': {
306
+ 'url': '/',
307
+ 'method': 'GET',
308
+ 'config': {
309
+ 'query': {
310
+ 'Version': '2016-03-04',
311
+ 'Action': 'ModifySnapshot'
312
+ },
313
+ 'headers': {
314
+ 'Content-Type': 'application/json'
315
+ }
316
+ },
317
+ 'paramsType': {
318
+ 'SnapshotId': 'String',
319
+ 'SnapshotName': 'String',
320
+ 'SnapshotDesc': 'String'
321
+ }
322
+ },
323
+ 'RecoveryVolume': {
324
+ 'url': '/',
325
+ 'method': 'GET',
326
+ 'config': {
327
+ 'query': {
328
+ 'Version': '2016-03-04',
329
+ 'Action': 'RecoveryVolume'
330
+ },
331
+ 'headers': {
332
+ 'Content-Type': 'application/json'
333
+ }
334
+ },
335
+ 'paramsType': {
336
+ 'VolumeId': 'String'
337
+ }
338
+ },
339
+ 'ValidateAttachInstance': {
340
+ 'url': '/',
341
+ 'method': 'GET',
342
+ 'config': {
343
+ 'query': {
344
+ 'Version': '2016-03-04',
345
+ 'Action': 'ValidateAttachInstance'
346
+ },
347
+ 'headers': {
348
+ 'Content-Type': 'application/json'
349
+ }
350
+ },
351
+ 'paramsType': {
352
+ 'VolumeType': 'String',
353
+ 'InstanceId': 'String'
354
+ }
355
+ }
356
+ });
357
+ }
358
+
359
+ };