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.
- package/.browserslistrc +1 -0
- package/.eslintignore +1 -0
- package/.eslintrc.json +14 -0
- package/README.md +75 -0
- package/babel.config.json +11 -0
- package/dist/base/BaseClient.js +104 -0
- package/dist/index.js +41 -0
- package/dist/lib/fetch.js +35 -0
- package/dist/lib/sign.js +155 -0
- package/dist/service/Actiontrail/v20190401/index.js +58 -0
- package/dist/service/Bill/v20180601/index.js +117 -0
- package/dist/service/Bill_union/v20200101/index.js +118 -0
- package/dist/service/Bill_union/v20211209/index.js +45 -0
- package/dist/service/Ebs/v20160304/index.js +359 -0
- package/dist/service/Iam/v20151101/index.js +887 -0
- package/dist/service/Kad/v20161122/index.js +133 -0
- package/dist/service/Kead/v20200101/index.js +52 -0
- package/dist/service/Resourcemanager/v20210320/index.js +171 -0
- package/dist/service/Sts/v20151101/index.js +50 -0
- package/dist/service/Trade/v20200114/index.js +47 -0
- package/dist/service/Trade/v20200831/index.js +49 -0
- package/example/iam.js +40 -0
- package/example/res.js +43 -0
- package/package.json +33 -0
- package/src/base/BaseClient.js +92 -0
- package/src/index.js +34 -0
- package/src/lib/fetch.js +35 -0
- package/src/lib/sign.js +148 -0
- package/src/service/Actiontrail/v20190401/index.js +47 -0
- package/src/service/Bill/v20180601/index.js +111 -0
- package/src/service/Bill_union/v20200101/index.js +112 -0
- package/src/service/Bill_union/v20211209/index.js +35 -0
- package/src/service/Ebs/v20160304/index.js +348 -0
- package/src/service/Iam/v20151101/index.js +876 -0
- package/src/service/Kad/v20161122/index.js +122 -0
- package/src/service/Kead/v20200101/index.js +41 -0
- package/src/service/Resourcemanager/v20210320/index.js +161 -0
- package/src/service/Sts/v20151101/index.js +39 -0
- package/src/service/Trade/v20200114/index.js +36 -0
- package/src/service/Trade/v20200831/index.js +38 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
2
|
+
|
|
3
|
+
module.exports = class Client extends BaseClient {
|
|
4
|
+
_baseConfig = {
|
|
5
|
+
'protocol': 'http://',
|
|
6
|
+
'endpoint': 'kad.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': 'kad',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
_apiList = {
|
|
19
|
+
'CreateForwardConf': {
|
|
20
|
+
'url': '/',
|
|
21
|
+
'method': 'POST',
|
|
22
|
+
'config': {
|
|
23
|
+
'query': {
|
|
24
|
+
'Version': '2016-11-22',
|
|
25
|
+
'Action': 'CreateForwardConf',
|
|
26
|
+
},
|
|
27
|
+
'headers': {
|
|
28
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'paramsType': {
|
|
32
|
+
'KadId': 'String',
|
|
33
|
+
'Protocol': 'String',
|
|
34
|
+
'ServicePort': 'Int',
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
'DeleteForwardConf': {
|
|
38
|
+
'url': '/',
|
|
39
|
+
'method': 'POST',
|
|
40
|
+
'config': {
|
|
41
|
+
'query': {
|
|
42
|
+
'Version': '2016-11-22',
|
|
43
|
+
'Action': 'DeleteForwardConf',
|
|
44
|
+
},
|
|
45
|
+
'headers': {
|
|
46
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'paramsType': {
|
|
50
|
+
'ForwardConfId': 'String',
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
'DescribeForwardConf': {
|
|
54
|
+
'url': '/',
|
|
55
|
+
'method': 'GET',
|
|
56
|
+
'config': {
|
|
57
|
+
'query': {
|
|
58
|
+
'Version': '2016-11-22',
|
|
59
|
+
'Action': 'DescribeForwardConf',
|
|
60
|
+
},
|
|
61
|
+
'headers': {
|
|
62
|
+
'Content-Type': 'application/json'
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
'paramsType': {
|
|
66
|
+
'KadId': 'String',
|
|
67
|
+
'ForwardConfId': 'Filter',
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
'CreateForwardSource': {
|
|
71
|
+
'url': '/',
|
|
72
|
+
'method': 'POST',
|
|
73
|
+
'config': {
|
|
74
|
+
'query': {
|
|
75
|
+
'Version': '2016-11-22',
|
|
76
|
+
'Action': 'CreateForwardSource',
|
|
77
|
+
},
|
|
78
|
+
'headers': {
|
|
79
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
'paramsType': {
|
|
83
|
+
'ForwardConfId': 'String',
|
|
84
|
+
'SourceIp': 'String',
|
|
85
|
+
'SourcePort': 'String',
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
'DeleteForwardSource': {
|
|
89
|
+
'url': '/',
|
|
90
|
+
'method': 'POST',
|
|
91
|
+
'config': {
|
|
92
|
+
'query': {
|
|
93
|
+
'Version': '2016-11-22',
|
|
94
|
+
'Action': 'DeleteForwardSource',
|
|
95
|
+
},
|
|
96
|
+
'headers': {
|
|
97
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
'paramsType': {
|
|
101
|
+
'ForwardSourceId': 'String',
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
'DescribeForwardSource': {
|
|
105
|
+
'url': '/',
|
|
106
|
+
'method': 'GET',
|
|
107
|
+
'config': {
|
|
108
|
+
'query': {
|
|
109
|
+
'Version': '2016-11-22',
|
|
110
|
+
'Action': 'DescribeForwardSource',
|
|
111
|
+
},
|
|
112
|
+
'headers': {
|
|
113
|
+
'Content-Type': 'application/json'
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
'paramsType': {
|
|
117
|
+
'ForwardConfId': 'String',
|
|
118
|
+
'ForwardSourceId': 'Filter',
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
2
|
+
|
|
3
|
+
module.exports = class Client extends BaseClient {
|
|
4
|
+
_baseConfig = {
|
|
5
|
+
'protocol': 'http://',
|
|
6
|
+
'endpoint': 'kead.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': 'kead',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
_apiList = {
|
|
19
|
+
'DescribeBlockIp': {
|
|
20
|
+
'url': '/',
|
|
21
|
+
'method': 'GET',
|
|
22
|
+
'config': {
|
|
23
|
+
'query': {
|
|
24
|
+
'Version': '2020-01-01',
|
|
25
|
+
'Action': 'DescribeBlockIp',
|
|
26
|
+
},
|
|
27
|
+
'headers': {
|
|
28
|
+
'Content-Type': 'application/json'
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'paramsType': {
|
|
32
|
+
'SearchStr': 'String',
|
|
33
|
+
'Status': 'String',
|
|
34
|
+
'InstanceType': 'String',
|
|
35
|
+
'RegionCode': 'String',
|
|
36
|
+
'StartTime': 'String',
|
|
37
|
+
'endTime': 'String',
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
2
|
+
|
|
3
|
+
module.exports = class Client extends BaseClient {
|
|
4
|
+
_baseConfig = {
|
|
5
|
+
'protocol': 'http://',
|
|
6
|
+
'endpoint': 'resourcemanager.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': 'resourcemanager',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
_apiList = {
|
|
19
|
+
'CreateFolder': {
|
|
20
|
+
'url': '/',
|
|
21
|
+
'method': 'POST',
|
|
22
|
+
'config': {
|
|
23
|
+
'query': {
|
|
24
|
+
'Version': '2021-03-20',
|
|
25
|
+
'Action': 'CreateFolder',
|
|
26
|
+
},
|
|
27
|
+
'headers': {
|
|
28
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'paramsType': {
|
|
32
|
+
'ParentId': 'String',
|
|
33
|
+
'Name': 'String',
|
|
34
|
+
'Desc': 'String',
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
'DeleteFolder': {
|
|
38
|
+
'url': '/',
|
|
39
|
+
'method': 'POST',
|
|
40
|
+
'config': {
|
|
41
|
+
'query': {
|
|
42
|
+
'Version': '2021-03-20',
|
|
43
|
+
'Action': 'DeleteFolder',
|
|
44
|
+
},
|
|
45
|
+
'headers': {
|
|
46
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'paramsType': {
|
|
50
|
+
'FolderId': 'String',
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
'UpdateFolder': {
|
|
54
|
+
'url': '/',
|
|
55
|
+
'method': 'POST',
|
|
56
|
+
'config': {
|
|
57
|
+
'query': {
|
|
58
|
+
'Version': '2021-03-20',
|
|
59
|
+
'Action': 'UpdateFolder',
|
|
60
|
+
},
|
|
61
|
+
'headers': {
|
|
62
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
'paramsType': {
|
|
66
|
+
'FolderId': 'String',
|
|
67
|
+
'ParentId': 'String',
|
|
68
|
+
'Name': 'String',
|
|
69
|
+
'Desc': 'String',
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
'ListAccountsForParent': {
|
|
73
|
+
'url': '/',
|
|
74
|
+
'method': 'GET',
|
|
75
|
+
'config': {
|
|
76
|
+
'query': {
|
|
77
|
+
'Version': '2021-03-20',
|
|
78
|
+
'Action': 'ListAccountsForParent',
|
|
79
|
+
},
|
|
80
|
+
'headers': {
|
|
81
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
'paramsType': {
|
|
85
|
+
'FolderId': 'String',
|
|
86
|
+
'Search': 'String',
|
|
87
|
+
'Page': 'Int',
|
|
88
|
+
'PageSize': 'Int',
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
'MoveAccount': {
|
|
92
|
+
'url': '/',
|
|
93
|
+
'method': 'POST',
|
|
94
|
+
'config': {
|
|
95
|
+
'query': {
|
|
96
|
+
'Version': '2021-03-20',
|
|
97
|
+
'Action': 'MoveAccount',
|
|
98
|
+
},
|
|
99
|
+
'headers': {
|
|
100
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
'paramsType': {
|
|
104
|
+
'Ids': 'String',
|
|
105
|
+
'FromFolderId': 'String',
|
|
106
|
+
'ToFolderId': 'String',
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
'UpdateAccount': {
|
|
110
|
+
'url': '/',
|
|
111
|
+
'method': 'POST',
|
|
112
|
+
'config': {
|
|
113
|
+
'query': {
|
|
114
|
+
'Version': '2021-03-20',
|
|
115
|
+
'Action': 'UpdateAccount',
|
|
116
|
+
},
|
|
117
|
+
'headers': {
|
|
118
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
'paramsType': {
|
|
122
|
+
'MemberId': 'Int',
|
|
123
|
+
'NewDisplayName': 'String',
|
|
124
|
+
'FolderId': 'String',
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
'ListAccounts': {
|
|
128
|
+
'url': '/',
|
|
129
|
+
'method': 'GET',
|
|
130
|
+
'config': {
|
|
131
|
+
'query': {
|
|
132
|
+
'Version': '2021-03-20',
|
|
133
|
+
'Action': 'ListAccounts',
|
|
134
|
+
},
|
|
135
|
+
'headers': {
|
|
136
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
'paramsType': {
|
|
140
|
+
'PageNumber': 'Int',
|
|
141
|
+
'PageSize': 'Int',
|
|
142
|
+
'IsAll': 'Int',
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
'ListFolders': {
|
|
146
|
+
'url': '/',
|
|
147
|
+
'method': 'GET',
|
|
148
|
+
'config': {
|
|
149
|
+
'query': {
|
|
150
|
+
'Version': '2021-03-20',
|
|
151
|
+
'Action': 'ListFolders',
|
|
152
|
+
},
|
|
153
|
+
'headers': {
|
|
154
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
'paramsType': {
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
2
|
+
|
|
3
|
+
module.exports = class Client extends BaseClient {
|
|
4
|
+
_baseConfig = {
|
|
5
|
+
'protocol': 'http://',
|
|
6
|
+
'endpoint': 'sts.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': 'sts',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
_apiList = {
|
|
19
|
+
'AssumeRole': {
|
|
20
|
+
'url': '/',
|
|
21
|
+
'method': 'POST',
|
|
22
|
+
'config': {
|
|
23
|
+
'query': {
|
|
24
|
+
'Version': '2015-11-01',
|
|
25
|
+
'Action': 'AssumeRole',
|
|
26
|
+
},
|
|
27
|
+
'headers': {
|
|
28
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'paramsType': {
|
|
32
|
+
'RoleKrn': 'String',
|
|
33
|
+
'RoleSessionName': 'String',
|
|
34
|
+
'DurationSeconds': 'String',
|
|
35
|
+
'Policy': 'String',
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
2
|
+
|
|
3
|
+
module.exports = class Client extends BaseClient {
|
|
4
|
+
_baseConfig = {
|
|
5
|
+
'protocol': 'http://',
|
|
6
|
+
'endpoint': 'trade.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': 'trade',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
_apiList = {
|
|
19
|
+
'DescribeInstances': {
|
|
20
|
+
'url': '/',
|
|
21
|
+
'method': 'POST',
|
|
22
|
+
'config': {
|
|
23
|
+
'query': {
|
|
24
|
+
'Version': '2020-01-14',
|
|
25
|
+
'Action': 'DescribeInstances',
|
|
26
|
+
},
|
|
27
|
+
'headers': {
|
|
28
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'paramsType': {
|
|
32
|
+
'InstanceIds': 'String',
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const BaseClient = require("../../../base/BaseClient.js");
|
|
2
|
+
|
|
3
|
+
module.exports = class Client extends BaseClient {
|
|
4
|
+
_baseConfig = {
|
|
5
|
+
'protocol': 'http://',
|
|
6
|
+
'endpoint': 'trade.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': 'trade',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
_apiList = {
|
|
19
|
+
'SetRenewal': {
|
|
20
|
+
'url': '/',
|
|
21
|
+
'method': 'POST',
|
|
22
|
+
'config': {
|
|
23
|
+
'query': {
|
|
24
|
+
'Version': '2020-08-31',
|
|
25
|
+
'Action': 'SetRenewal',
|
|
26
|
+
},
|
|
27
|
+
'headers': {
|
|
28
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'paramsType': {
|
|
32
|
+
'InstanceIds': 'String',
|
|
33
|
+
'RenewStrategy': 'Int',
|
|
34
|
+
'RenewDuration': 'Int',
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
}
|