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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ksyun-sdk-node",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -0,0 +1,129 @@
1
+ const BaseClient = require("../../../base/BaseClient.js");
2
+
3
+ module.exports = class Client extends BaseClient {
4
+ _baseConfig = {
5
+ 'protocol': 'http://',
6
+ 'endpoint': 'bws.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': 'bws',
15
+ },
16
+ },
17
+ }
18
+ _apiList = {
19
+ 'CreateBandWidthShare': {
20
+ 'url': '/',
21
+ 'method': 'GET',
22
+ 'config': {
23
+ 'query': {
24
+ 'Version': '2016-03-04',
25
+ 'Action': 'CreateBandWidthShare',
26
+ },
27
+ 'headers': {
28
+ 'Content-Type': 'application/x-www-form-urlencoded'
29
+ },
30
+ },
31
+ 'paramsType': {
32
+ 'LineId': 'String',
33
+ 'BandWidth': 'Int',
34
+ 'BandWidthShareName': 'String',
35
+ 'ProjectId': 'String',
36
+ 'ChargeType': 'String',
37
+ }
38
+ },
39
+ 'DescribeBandWidthShares': {
40
+ 'url': '/',
41
+ 'method': 'GET',
42
+ 'config': {
43
+ 'query': {
44
+ 'Version': '2016-03-04',
45
+ 'Action': 'DescribeBandWidthShares',
46
+ },
47
+ 'headers': {
48
+ 'Content-Type': 'application/x-www-form-urlencoded'
49
+ },
50
+ },
51
+ 'paramsType': {
52
+ 'ProjectId': 'Filter',
53
+ 'BandWidthShareId': 'Filter',
54
+ 'Filter': 'Filter',
55
+ 'MaxResults': 'Int',
56
+ 'NextToken': 'String',
57
+ }
58
+ },
59
+ 'AssociateBandWidthShare': {
60
+ 'url': '/',
61
+ 'method': 'GET',
62
+ 'config': {
63
+ 'query': {
64
+ 'Version': '2016-03-04',
65
+ 'Action': 'AssociateBandWidthShare',
66
+ },
67
+ 'headers': {
68
+ 'Content-Type': 'application/x-www-form-urlencoded'
69
+ },
70
+ },
71
+ 'paramsType': {
72
+ 'BandWidthShareId': 'String',
73
+ 'AllocationId': 'String',
74
+ }
75
+ },
76
+ 'DisassociateBandWidthShare': {
77
+ 'url': '/',
78
+ 'method': 'GET',
79
+ 'config': {
80
+ 'query': {
81
+ 'Version': '2016-03-04',
82
+ 'Action': 'DisassociateBandWidthShare',
83
+ },
84
+ 'headers': {
85
+ 'Content-Type': 'application/x-www-form-urlencoded'
86
+ },
87
+ },
88
+ 'paramsType': {
89
+ 'BandWidthShareId': 'String',
90
+ 'AllocationId': 'String',
91
+ 'BandWidth': 'Int',
92
+ }
93
+ },
94
+ 'ModifyBandWidthShare': {
95
+ 'url': '/',
96
+ 'method': 'GET',
97
+ 'config': {
98
+ 'query': {
99
+ 'Version': '2016-03-04',
100
+ 'Action': 'ModifyBandWidthShare',
101
+ },
102
+ 'headers': {
103
+ 'Content-Type': 'application/x-www-form-urlencoded'
104
+ },
105
+ },
106
+ 'paramsType': {
107
+ 'BandWidthShareId': 'String',
108
+ 'BandWidth': 'Int',
109
+ 'BandWidthShareName': 'String',
110
+ }
111
+ },
112
+ 'DeleteBandWidthShare': {
113
+ 'url': '/',
114
+ 'method': 'GET',
115
+ 'config': {
116
+ 'query': {
117
+ 'Version': '2016-03-04',
118
+ 'Action': 'DeleteBandWidthShare',
119
+ },
120
+ 'headers': {
121
+ 'Content-Type': 'application/x-www-form-urlencoded'
122
+ },
123
+ },
124
+ 'paramsType': {
125
+ 'BandWidthShareId': 'String',
126
+ }
127
+ },
128
+ }
129
+ }
@@ -0,0 +1,147 @@
1
+ const BaseClient = require("../../../base/BaseClient.js");
2
+
3
+ module.exports = class Client extends BaseClient {
4
+ _baseConfig = {
5
+ 'protocol': 'http://',
6
+ 'endpoint': 'eip.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': 'eip',
15
+ },
16
+ },
17
+ }
18
+ _apiList = {
19
+ 'GetLines': {
20
+ 'url': '/',
21
+ 'method': 'GET',
22
+ 'config': {
23
+ 'query': {
24
+ 'Version': '2016-03-04',
25
+ 'Action': 'GetLines',
26
+ },
27
+ 'headers': {
28
+ 'Content-Type': 'application/x-www-form-urlencoded'
29
+ },
30
+ },
31
+ 'paramsType': {
32
+ }
33
+ },
34
+ 'DescribeAddresses': {
35
+ 'url': '/',
36
+ 'method': 'GET',
37
+ 'config': {
38
+ 'query': {
39
+ 'Version': '2016-03-04',
40
+ 'Action': 'DescribeAddresses',
41
+ },
42
+ 'headers': {
43
+ 'Content-Type': 'application/x-www-form-urlencoded'
44
+ },
45
+ },
46
+ 'paramsType': {
47
+ 'ProjectId': 'Filter',
48
+ 'AllocationId': 'Filter',
49
+ 'Filter': 'Filter',
50
+ 'MaxResults': 'Int',
51
+ 'NextToken': 'String',
52
+ 'State': 'String',
53
+ 'IpVersion': 'String',
54
+ }
55
+ },
56
+ 'AllocateAddress': {
57
+ 'url': '/',
58
+ 'method': 'GET',
59
+ 'config': {
60
+ 'query': {
61
+ 'Version': '2016-03-04',
62
+ 'Action': 'AllocateAddress',
63
+ },
64
+ 'headers': {
65
+ 'Content-Type': 'application/x-www-form-urlencoded'
66
+ },
67
+ },
68
+ 'paramsType': {
69
+ 'LineId': 'String',
70
+ 'BandWidth': 'Int',
71
+ 'ProjectId': 'String',
72
+ 'ChargeType': 'String',
73
+ 'PurchaseTime': 'Int',
74
+ }
75
+ },
76
+ 'ReleaseAddress': {
77
+ 'url': '/',
78
+ 'method': 'GET',
79
+ 'config': {
80
+ 'query': {
81
+ 'Version': '2016-03-04',
82
+ 'Action': 'ReleaseAddress',
83
+ },
84
+ 'headers': {
85
+ 'Content-Type': 'application/x-www-form-urlencoded'
86
+ },
87
+ },
88
+ 'paramsType': {
89
+ 'AllocationId': 'String',
90
+ }
91
+ },
92
+ 'AssociateAddress': {
93
+ 'url': '/',
94
+ 'method': 'GET',
95
+ 'config': {
96
+ 'query': {
97
+ 'Version': '2016-03-04',
98
+ 'Action': 'AssociateAddress',
99
+ },
100
+ 'headers': {
101
+ 'Content-Type': 'application/x-www-form-urlencoded'
102
+ },
103
+ },
104
+ 'paramsType': {
105
+ 'AllocationId': 'String',
106
+ 'InstanceType': 'String',
107
+ 'InstanceId': 'String',
108
+ 'NetworkInterfaceId': 'String',
109
+ 'Mode': 'String',
110
+ 'PrivateIpAddress': 'String',
111
+ }
112
+ },
113
+ 'DisassociateAddress': {
114
+ 'url': '/',
115
+ 'method': 'GET',
116
+ 'config': {
117
+ 'query': {
118
+ 'Version': '2016-03-04',
119
+ 'Action': 'DisassociateAddress',
120
+ },
121
+ 'headers': {
122
+ 'Content-Type': 'application/x-www-form-urlencoded'
123
+ },
124
+ },
125
+ 'paramsType': {
126
+ 'AllocationId': 'String',
127
+ }
128
+ },
129
+ 'ModifyAddress': {
130
+ 'url': '/',
131
+ 'method': 'GET',
132
+ 'config': {
133
+ 'query': {
134
+ 'Version': '2016-03-04',
135
+ 'Action': 'ModifyAddress',
136
+ },
137
+ 'headers': {
138
+ 'Content-Type': 'application/x-www-form-urlencoded'
139
+ },
140
+ },
141
+ 'paramsType': {
142
+ 'AllocationId': 'String',
143
+ 'BandWidth': 'Int',
144
+ }
145
+ },
146
+ }
147
+ }