ksyun-sdk-node 1.2.4 → 1.4.8

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 (126) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/dist/base/BaseClient.js +50 -4
  3. package/dist/service/Actiontrail/v20190401/index.js +31 -31
  4. package/dist/service/Aicp/v20240612/index.js +511 -0
  5. package/dist/service/Bill/v20180601/index.js +45 -45
  6. package/dist/service/Bill/v20220601/index.js +35 -35
  7. package/dist/service/Bill_union/v20200101/index.js +139 -103
  8. package/dist/service/Bill_union/v20221222/index.js +93 -93
  9. package/dist/service/Bill_union/v20250801/index.js +66 -0
  10. package/dist/service/Bws/v20160304/index.js +103 -103
  11. package/dist/service/Cdn/v20160901/index.js +66 -19
  12. package/dist/service/Cdn/v20200630/index.js +306 -306
  13. package/dist/service/Cdn/v20200901/index.js +108 -108
  14. package/dist/service/Cdn/v20211201/index.js +45 -0
  15. package/dist/service/Cdn/v20250503/index.js +71 -0
  16. package/dist/service/Cen/v20160304/index.js +321 -321
  17. package/dist/service/Clickhouse/v20210101/index.js +387 -387
  18. package/dist/service/Ebs/v20160304/index.js +262 -262
  19. package/dist/service/Eip/v20160304/index.js +101 -101
  20. package/dist/service/Epc/v20151101/index.js +1741 -766
  21. package/dist/service/Iam/v20151101/index.js +863 -756
  22. package/dist/service/Iam/v20240513/index.js +47 -0
  23. package/dist/service/Iam/v20240703/index.js +44 -0
  24. package/dist/service/Kad/v20161122/index.js +81 -81
  25. package/dist/service/Kce/v20180314/index.js +216 -216
  26. package/dist/service/Kce/v20190806/index.js +343 -343
  27. package/dist/service/Kce/v20201231/index.js +39 -39
  28. package/dist/service/Kcf/v20211215/index.js +141 -141
  29. package/dist/service/Kcm/v20160304/index.js +81 -81
  30. package/dist/service/Kcrs/v20211109/index.js +611 -611
  31. package/dist/service/Kcs/v20160701/index.js +800 -800
  32. package/dist/service/Kcs/v20170401/index.js +47 -47
  33. package/dist/service/Kead/v20200101/index.js +25 -25
  34. package/dist/service/Kec/v20160304/index.js +1697 -1533
  35. package/dist/service/Kes/v20201215/index.js +171 -0
  36. package/dist/service/Ket/v20170101/index.js +92 -92
  37. package/dist/service/Kkms/v20160304/index.js +108 -108
  38. package/dist/service/Klog/v20200731/index.js +232 -705
  39. package/dist/service/Kls/v20170101/index.js +135 -135
  40. package/dist/service/Kmr/v20210902/index.js +422 -0
  41. package/dist/service/Kmr/v20231231/index.js +154 -0
  42. package/dist/service/Kmr/v20240814/index.js +370 -0
  43. package/dist/service/Krds/v20160701/index.js +991 -991
  44. package/dist/service/Krds/v20200825/index.js +115 -115
  45. package/dist/service/Memcached/v20180627/index.js +172 -172
  46. package/dist/service/Mongodb/v20170101/index.js +514 -514
  47. package/dist/service/Monitor/v20100525/index.js +41 -41
  48. package/dist/service/Monitor/v20181114/index.js +25 -25
  49. package/dist/service/Monitor/v20210101/index.js +153 -116
  50. package/dist/service/Monitor/v20220101/index.js +30 -40
  51. package/dist/service/Monitor/v20250101/index.js +71 -0
  52. package/dist/service/Rabbitmq/v20191017/index.js +163 -163
  53. package/dist/service/Resourcemanager/v20210320/index.js +110 -110
  54. package/dist/service/Sks/v20151101/index.js +69 -69
  55. package/dist/service/Slb/v20160304/index.js +1208 -1208
  56. package/dist/service/Sts/v20151101/index.js +23 -23
  57. package/dist/service/Tagv2/v20200901/index.js +115 -115
  58. package/dist/service/Tidb/v20210520/index.js +254 -254
  59. package/dist/service/Trade/v20200114/index.js +20 -20
  60. package/dist/service/Trade/v20200831/index.js +22 -22
  61. package/dist/service/Vpc/v20160304/index.js +1947 -1209
  62. package/dist/service/Waf/v20200707/index.js +174 -174
  63. package/example/iam.js +2 -1
  64. package/example/res.js +2 -1
  65. package/package.json +1 -1
  66. package/src/base/BaseClient.js +51 -4
  67. package/src/service/Actiontrail/v20190401/index.js +42 -42
  68. package/src/service/Aicp/v20240612/index.js +503 -0
  69. package/src/service/Bill/v20180601/index.js +63 -64
  70. package/src/service/Bill/v20220601/index.js +50 -50
  71. package/src/service/Bill_union/v20200101/index.js +181 -146
  72. package/src/service/Bill_union/v20221222/index.js +124 -124
  73. package/src/service/Bill_union/v20250801/index.js +58 -0
  74. package/src/service/Bws/v20160304/index.js +138 -138
  75. package/src/service/Cdn/v20160901/index.js +78 -32
  76. package/src/service/Cdn/v20200630/index.js +399 -399
  77. package/src/service/Cdn/v20200901/index.js +143 -143
  78. package/src/service/Cdn/v20211201/index.js +37 -0
  79. package/src/service/Cdn/v20250503/index.js +63 -0
  80. package/src/service/Cen/v20160304/index.js +449 -449
  81. package/src/service/Clickhouse/v20210101/index.js +535 -535
  82. package/src/service/Ebs/v20160304/index.js +365 -365
  83. package/src/service/Eip/v20160304/index.js +135 -136
  84. package/src/service/Epc/v20151101/index.js +1984 -1009
  85. package/src/service/Iam/v20151101/index.js +1155 -1050
  86. package/src/service/Iam/v20240513/index.js +39 -0
  87. package/src/service/Iam/v20240703/index.js +36 -0
  88. package/src/service/Kad/v20161122/index.js +112 -112
  89. package/src/service/Kce/v20180314/index.js +309 -309
  90. package/src/service/Kce/v20190806/index.js +471 -471
  91. package/src/service/Kce/v20201231/index.js +50 -50
  92. package/src/service/Kcf/v20211215/index.js +192 -194
  93. package/src/service/Kcm/v20160304/index.js +104 -104
  94. package/src/service/Kcrs/v20211109/index.js +840 -854
  95. package/src/service/Kcs/v20160701/index.js +1095 -1098
  96. package/src/service/Kcs/v20170401/index.js +66 -66
  97. package/src/service/Kead/v20200101/index.js +36 -36
  98. package/src/service/Kec/v20160304/index.js +2061 -1902
  99. package/src/service/Kes/v20201215/index.js +163 -0
  100. package/src/service/Ket/v20170101/index.js +123 -123
  101. package/src/service/Kkms/v20160304/index.js +156 -156
  102. package/src/service/Klog/v20200731/index.js +320 -807
  103. package/src/service/Kls/v20170101/index.js +183 -183
  104. package/src/service/Kmr/v20210902/index.js +414 -0
  105. package/src/service/Kmr/v20231231/index.js +146 -0
  106. package/src/service/Kmr/v20240814/index.js +362 -0
  107. package/src/service/Krds/v20160701/index.js +1291 -1293
  108. package/src/service/Krds/v20200825/index.js +163 -163
  109. package/src/service/Memcached/v20180627/index.js +238 -245
  110. package/src/service/Mongodb/v20170101/index.js +672 -672
  111. package/src/service/Monitor/v20100525/index.js +56 -56
  112. package/src/service/Monitor/v20181114/index.js +36 -36
  113. package/src/service/Monitor/v20210101/index.js +205 -169
  114. package/src/service/Monitor/v20220101/index.js +44 -54
  115. package/src/service/Monitor/v20250101/index.js +63 -0
  116. package/src/service/Rabbitmq/v20191017/index.js +231 -231
  117. package/src/service/Resourcemanager/v20210320/index.js +157 -158
  118. package/src/service/Sks/v20151101/index.js +95 -96
  119. package/src/service/Slb/v20160304/index.js +1471 -1471
  120. package/src/service/Sts/v20151101/index.js +34 -34
  121. package/src/service/Tagv2/v20200901/index.js +163 -163
  122. package/src/service/Tidb/v20210520/index.js +352 -352
  123. package/src/service/Trade/v20200114/index.js +31 -31
  124. package/src/service/Trade/v20200831/index.js +33 -33
  125. package/src/service/Vpc/v20160304/index.js +2404 -1667
  126. package/src/service/Waf/v20200707/index.js +237 -237
@@ -0,0 +1,12 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(node example/res.js:*)",
5
+ "Bash(npm run build:*)",
6
+ "Bash(npm view:*)",
7
+ "Bash(npm whoami:*)"
8
+ ],
9
+ "deny": [],
10
+ "ask": []
11
+ }
12
+ }
@@ -42,6 +42,25 @@ module.exports = class BaseClient {
42
42
  ...(this._baseConfig.config.headers || {}),
43
43
  ...(apiConfig.config.headers || {})
44
44
  };
45
+
46
+ // 处理自定义path
47
+ let customPath = this.httpProfile.path || '';
48
+ // 清理path中的?参数
49
+ if (customPath && customPath.includes('?')) {
50
+ customPath = customPath.split('?')[0];
51
+ }
52
+
53
+ // 处理path拼接,避免双斜杠
54
+ let finalPath = apiConfig.url;
55
+ if (customPath) {
56
+ // 清理endpoint末尾的斜杠
57
+ endpoint = endpoint.replace(/\/+$/, '');
58
+ // 确保customPath以/开头
59
+ if (!customPath.startsWith('/')) {
60
+ customPath = '/' + customPath;
61
+ }
62
+ finalPath = customPath;
63
+ }
45
64
  let query = apiConfig.config.query;
46
65
  if (['GET', 'OPTION', 'HEAD'].includes(method)) {
47
66
  query = {
@@ -51,7 +70,7 @@ module.exports = class BaseClient {
51
70
  }
52
71
  let body = this.getBody(method, headers['Content-Type'], params);
53
72
  let signParams = {
54
- path: apiConfig.url,
73
+ path: finalPath,
55
74
  query,
56
75
  body: body || '',
57
76
  headers,
@@ -63,8 +82,11 @@ module.exports = class BaseClient {
63
82
  secret_key: this.sk
64
83
  };
65
84
  let signHeaders = getSignatureHeaders(signParams);
66
- let url = `${protocol}${endpoint}${apiConfig.url}?${getCanonicalizedQuery(query)}`;
85
+ let url = `${protocol}${endpoint}${finalPath}?${getCanonicalizedQuery(query)}`;
67
86
  let timeoutSecond = this.httpProfile.timeout || this._baseConfig.config.timeout;
87
+
88
+ // 打印 curl 命令
89
+ this.printCurl(url, method, signHeaders, body);
68
90
  return fetch(url, {
69
91
  method: method,
70
92
  timeout: timeoutSecond * 1000,
@@ -90,7 +112,7 @@ module.exports = class BaseClient {
90
112
  if (['String', 'Int', 'Double', 'Long', 'Boolean', 'Array'].includes(type) && params[key] != null) {
91
113
  res[key] = params[key];
92
114
  }
93
- if (type == 'Filter') {
115
+ if (type == 'Filter' || type == 'Object') {
94
116
  res = {
95
117
  ...res,
96
118
  ...this.formatFilter(key, params[key])
@@ -129,11 +151,35 @@ module.exports = class BaseClient {
129
151
  }
130
152
  // 目前只有下面这两种
131
153
  if (contentType == 'application/x-www-form-urlencoded') {
132
- return qs.stringify(params);
154
+ return qs.stringify(params, {
155
+ allowDots: true,
156
+ // 对象转成a.b.c
157
+ arrayFormat: 'indices' // 数组转成a[0]=b&a[1]=c
158
+ });
133
159
  }
134
160
  if (contentType == 'application/json') {
135
161
  return JSON.stringify(params);
136
162
  }
137
163
  return JSON.stringify(params);
138
164
  }
165
+
166
+ /**
167
+ * 打印 curl 命令
168
+ */
169
+ printCurl(url, method, headers, body) {
170
+ let curlCmd = `curl -X ${method} '${url}'`;
171
+
172
+ // 添加 headers
173
+ Object.keys(headers).forEach(key => {
174
+ curlCmd += ` \\\n -H '${key}: ${headers[key]}'`;
175
+ });
176
+
177
+ // 添加 body
178
+ if (body) {
179
+ curlCmd += ` \\\n -d '${body}'`;
180
+ }
181
+ console.log('\n========== CURL 请求 ==========');
182
+ console.log(curlCmd);
183
+ console.log('================================\n');
184
+ }
139
185
  };
@@ -8,46 +8,46 @@ module.exports = class Client extends BaseClient {
8
8
  constructor(...args) {
9
9
  super(...args);
10
10
  _defineProperty(this, "_baseConfig", {
11
- 'protocol': 'http://',
12
- 'endpoint': 'actiontrail.api.ksyun.com',
13
- 'config': {
14
- 'timeout': 60,
11
+ protocol: "http://",
12
+ endpoint: "actiontrail.api.ksyun.com",
13
+ config: {
14
+ timeout: 60,
15
15
  //设置timeout
16
- 'headers': {
17
- 'Accept': 'application/json'
16
+ headers: {
17
+ Accept: "application/json"
18
18
  },
19
- 'credentials': {
20
- 'region': 'cn-shanghai-3',
21
- 'service': 'actiontrail'
19
+ credentials: {
20
+ region: "cn-shanghai-3",
21
+ service: "actiontrail"
22
22
  }
23
23
  }
24
24
  });
25
25
  _defineProperty(this, "_apiList", {
26
- 'ListOperateLogs': {
27
- 'url': '/',
28
- 'method': 'GET',
29
- 'config': {
30
- 'query': {
31
- 'Version': '2019-04-01',
32
- 'Action': 'ListOperateLogs'
26
+ ListOperateLogs: {
27
+ url: "/",
28
+ method: "GET",
29
+ config: {
30
+ query: {
31
+ Version: "2019-04-01",
32
+ Action: "ListOperateLogs"
33
33
  },
34
- 'headers': {
35
- 'Content-Type': 'application/json'
34
+ headers: {
35
+ "Content-Type": "application/json"
36
36
  }
37
37
  },
38
- 'paramsType': {
39
- 'EventName': 'String',
40
- 'EventRw': 'String',
41
- 'ServiceName': 'String',
42
- 'UserName': 'String',
43
- 'AccessKey': 'String',
44
- 'EventBeginDate': 'String',
45
- 'EventEndDate': 'String',
46
- 'ResourceType': 'String',
47
- 'ResourceName': 'String',
48
- 'Page': 'String',
49
- 'PageSize': 'String',
50
- 'SearchAfter': 'String'
38
+ paramsType: {
39
+ EventName: "String",
40
+ EventRw: "String",
41
+ ServiceName: "String",
42
+ UserName: "String",
43
+ AccessKey: "String",
44
+ EventBeginDate: "String",
45
+ EventEndDate: "String",
46
+ ResourceType: "String",
47
+ ResourceName: "String",
48
+ Page: "String",
49
+ PageSize: "String",
50
+ SearchAfter: "String"
51
51
  }
52
52
  }
53
53
  });
@@ -0,0 +1,511 @@
1
+ "use strict";
2
+
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ const BaseClient = require("../../../base/BaseClient.js");
7
+ module.exports = class Client extends BaseClient {
8
+ constructor(...args) {
9
+ super(...args);
10
+ _defineProperty(this, "_baseConfig", {
11
+ protocol: "http://",
12
+ endpoint: "aicp.api.ksyun.com",
13
+ config: {
14
+ timeout: 60,
15
+ //设置timeout
16
+ headers: {
17
+ Accept: "application/json"
18
+ },
19
+ credentials: {
20
+ region: "cn-shanghai-3",
21
+ service: "aicp"
22
+ }
23
+ }
24
+ });
25
+ _defineProperty(this, "_apiList", {
26
+ SaveNotebookImage: {
27
+ url: "/",
28
+ method: "POST",
29
+ config: {
30
+ query: {
31
+ Version: "2024-06-12",
32
+ Action: "SaveNotebookImage"
33
+ },
34
+ headers: {
35
+ "Content-Type": "application/x-www-form-urlencoded"
36
+ }
37
+ },
38
+ paramsType: {
39
+ ImageName: "String",
40
+ Description: "String",
41
+ ImageType: "String",
42
+ Namespace: "String",
43
+ NamespacePermission: "String",
44
+ ImageRepo: "String",
45
+ ImageVersion: "String",
46
+ OfficialInstance: "String",
47
+ UserName: "String",
48
+ Password: "String",
49
+ ImagePermission: "String",
50
+ NotebookId: "String",
51
+ ImageDomain: "String"
52
+ }
53
+ },
54
+ ModifyNotebook: {
55
+ url: "/",
56
+ method: "POST",
57
+ config: {
58
+ query: {
59
+ Version: "2024-06-12",
60
+ Action: "ModifyNotebook"
61
+ },
62
+ headers: {
63
+ "Content-Type": "application/json"
64
+ }
65
+ },
66
+ paramsType: {
67
+ NotebookId: "String",
68
+ NotebookName: "String",
69
+ Description: "String",
70
+ ImageId: "String",
71
+ QueueName: "String",
72
+ GPUType: "String",
73
+ GPUNumber: "Int",
74
+ CPUNum: "Int",
75
+ Memory: "Int",
76
+ AccessType: "String",
77
+ EnablePublicNetworkSsh: "Boolean",
78
+ SshAuthorizedKeys: "String",
79
+ StorageConfigs: "Array",
80
+ ServiceConfigs: "Array",
81
+ AutoSave: "Boolean",
82
+ RunOnCPU: "String",
83
+ EnableSSH: "String",
84
+ SSHPort: "Int",
85
+ SSHAuthorizedKeys: "String",
86
+ EnablePublicNetworkSSH: "Boolean",
87
+ AllocationId: "String",
88
+ ImageTagId: "String",
89
+ ImageSource: "String",
90
+ ImageRepoId: "String",
91
+ ImageRegistryId: "String"
92
+ }
93
+ },
94
+ DeleteNotebook: {
95
+ url: "/",
96
+ method: "GET",
97
+ config: {
98
+ query: {
99
+ Version: "2024-06-12",
100
+ Action: "DeleteNotebook"
101
+ },
102
+ headers: {
103
+ "Content-Type": "application/x-www-form-urlencoded"
104
+ }
105
+ },
106
+ paramsType: {
107
+ NotebookId: "String"
108
+ }
109
+ },
110
+ DescribeNotebooks: {
111
+ url: "/",
112
+ method: "GET",
113
+ config: {
114
+ query: {
115
+ Version: "2024-06-12",
116
+ Action: "DescribeNotebooks"
117
+ },
118
+ headers: {
119
+ "Content-Type": "application/x-www-form-urlencoded"
120
+ }
121
+ },
122
+ paramsType: {
123
+ NotebookId: "Filter",
124
+ Name: "String",
125
+ Marker: "Int",
126
+ MaxResults: "Int",
127
+ State: "String",
128
+ Filter: "Filter",
129
+ QueueId: "String"
130
+ }
131
+ },
132
+ CreateNotebook: {
133
+ url: "/",
134
+ method: "POST",
135
+ config: {
136
+ query: {
137
+ Version: "2024-06-12",
138
+ Action: "CreateNotebook"
139
+ },
140
+ headers: {
141
+ "Content-Type": "application/json"
142
+ }
143
+ },
144
+ paramsType: {
145
+ NotebookName: "String",
146
+ Description: "String",
147
+ ResourcePoolId: "String",
148
+ QueueName: "String",
149
+ GPUType: "String",
150
+ GPUNumber: "Int",
151
+ CPUNum: "Int",
152
+ Memory: "Int",
153
+ AccessType: "String",
154
+ StorageConfigs: "Array",
155
+ AutoSave: "Boolean",
156
+ ServiceConfigs: "Array",
157
+ ImageSource: "String",
158
+ ImageId: "String",
159
+ ImageRegistryId: "String",
160
+ ImageRepoId: "String",
161
+ ImageTagId: "String",
162
+ EnableSSH: "Boolean",
163
+ SSHAuthorizedKeys: "String",
164
+ SSHPort: "Int",
165
+ EnablePublicNetworkSSH: "Boolean",
166
+ AllocationId: "String",
167
+ RunOnCPU: "String"
168
+ }
169
+ },
170
+ StopNotebook: {
171
+ url: "/",
172
+ method: "GET",
173
+ config: {
174
+ query: {
175
+ Version: "2024-06-12",
176
+ Action: "StopNotebook"
177
+ },
178
+ headers: {
179
+ "Content-Type": "application/json"
180
+ }
181
+ },
182
+ paramsType: {
183
+ NotebookId: "String"
184
+ }
185
+ },
186
+ StartNotebook: {
187
+ url: "/",
188
+ method: "GET",
189
+ config: {
190
+ query: {
191
+ Version: "2024-06-12",
192
+ Action: "StartNotebook"
193
+ },
194
+ headers: {
195
+ "Content-Type": "application/x-www-form-urlencoded"
196
+ }
197
+ },
198
+ paramsType: {
199
+ NotebookId: "String"
200
+ }
201
+ },
202
+ GetWebIdeUrl: {
203
+ url: "/",
204
+ method: "GET",
205
+ config: {
206
+ query: {
207
+ Version: "2024-06-12",
208
+ Action: "GetWebIdeUrl"
209
+ },
210
+ headers: {
211
+ "Content-Type": "application/x-www-form-urlencoded"
212
+ }
213
+ },
214
+ paramsType: {
215
+ NotebookId: "String",
216
+ ExpirationMinute: "String"
217
+ }
218
+ },
219
+ DescribeNotebookEvents: {
220
+ url: "/",
221
+ method: "GET",
222
+ config: {
223
+ query: {
224
+ Version: "2024-06-12",
225
+ Action: "DescribeNotebookEvents"
226
+ },
227
+ headers: {
228
+ "Content-Type": "application/x-www-form-urlencoded"
229
+ }
230
+ },
231
+ paramsType: {
232
+ NotebookId: "String"
233
+ }
234
+ },
235
+ DescribeNotebookLog: {
236
+ url: "/",
237
+ method: "GET",
238
+ config: {
239
+ query: {
240
+ Version: "2024-06-12",
241
+ Action: "DescribeNotebookLog"
242
+ },
243
+ headers: {
244
+ "Content-Type": "application/x-www-form-urlencoded"
245
+ }
246
+ },
247
+ paramsType: {}
248
+ },
249
+ StopNotebookSavingImage: {
250
+ url: "/",
251
+ method: "GET",
252
+ config: {
253
+ query: {
254
+ Version: "2024-06-12",
255
+ Action: "StopNotebookSavingImage"
256
+ },
257
+ headers: {
258
+ "Content-Type": "application/x-www-form-urlencoded"
259
+ }
260
+ },
261
+ paramsType: {
262
+ NotebookId: "String"
263
+ }
264
+ },
265
+ CreateTrainJob: {
266
+ url: "/",
267
+ method: "POST",
268
+ config: {
269
+ query: {
270
+ Version: "2024-06-12",
271
+ Action: "CreateTrainJob"
272
+ },
273
+ headers: {
274
+ "Content-Type": "application/json"
275
+ }
276
+ },
277
+ paramsType: {
278
+ TrainJobName: "String",
279
+ Description: "String",
280
+ ResourcePoolId: "String",
281
+ QueueName: "String",
282
+ Priority: "String",
283
+ Command: "String",
284
+ Framework: "String",
285
+ ImageSource: "String",
286
+ FrameworkReplicas: "Object",
287
+ RestartPolicy: "String",
288
+ Envs: "Array",
289
+ SupportTensorboard: "Boolean",
290
+ ImageId: "String",
291
+ ImageRegistryId: "String",
292
+ ImageRepoId: "String",
293
+ ImageTagId: "String",
294
+ GPUType: "String",
295
+ GPUNumber: "Int",
296
+ CPUNum: "Int",
297
+ Memory: "Int",
298
+ StorageConfigs: "Array",
299
+ AccessType: "String",
300
+ MaxRuntime: "Int",
301
+ SelfHealing: "Boolean",
302
+ RunOnCPU: "Boolean"
303
+ }
304
+ },
305
+ DescribeTrainJobEvents: {
306
+ url: "/",
307
+ method: "GET",
308
+ config: {
309
+ query: {
310
+ Version: "2024-06-12",
311
+ Action: "DescribeTrainJobEvents"
312
+ },
313
+ headers: {
314
+ "Content-Type": "application/x-www-form-urlencoded"
315
+ }
316
+ },
317
+ paramsType: {
318
+ ResourcePoolId: "String",
319
+ TrainJobId: "String"
320
+ }
321
+ },
322
+ StopTrainJob: {
323
+ url: "/",
324
+ method: "GET",
325
+ config: {
326
+ query: {
327
+ Version: "2024-06-12",
328
+ Action: "StopTrainJob"
329
+ },
330
+ headers: {
331
+ "Content-Type": "application/x-www-form-urlencoded"
332
+ }
333
+ },
334
+ paramsType: {
335
+ TrainJobId: "String"
336
+ }
337
+ },
338
+ DescribeTrainJob: {
339
+ url: "/",
340
+ method: "GET",
341
+ config: {
342
+ query: {
343
+ Version: "2024-06-12",
344
+ Action: "DescribeTrainJob"
345
+ },
346
+ headers: {
347
+ "Content-Type": "application/x-www-form-urlencoded"
348
+ }
349
+ },
350
+ paramsType: {
351
+ TrainJobId: "Filter",
352
+ Filter: "Filter",
353
+ Marker: "Int",
354
+ MaxResults: "Int"
355
+ }
356
+ },
357
+ StartTrainJob: {
358
+ url: "/",
359
+ method: "GET",
360
+ config: {
361
+ query: {
362
+ Version: "2024-06-12",
363
+ Action: "StartTrainJob"
364
+ },
365
+ headers: {
366
+ "Content-Type": "application/x-www-form-urlencoded"
367
+ }
368
+ },
369
+ paramsType: {
370
+ TrainJobId: "String"
371
+ }
372
+ },
373
+ DeleteTrainJob: {
374
+ url: "/",
375
+ method: "GET",
376
+ config: {
377
+ query: {
378
+ Version: "2024-06-12",
379
+ Action: "DeleteTrainJob"
380
+ },
381
+ headers: {
382
+ "Content-Type": "application/x-www-form-urlencoded"
383
+ }
384
+ },
385
+ paramsType: {
386
+ TrainJobId: "String"
387
+ }
388
+ },
389
+ ModifyTrainJob: {
390
+ url: "/",
391
+ method: "POST",
392
+ config: {
393
+ query: {
394
+ Version: "2024-06-12",
395
+ Action: "ModifyTrainJob"
396
+ },
397
+ headers: {
398
+ "Content-Type": "application/json"
399
+ }
400
+ },
401
+ paramsType: {
402
+ TrainJobId: "String",
403
+ Priority: "String"
404
+ }
405
+ },
406
+ DescribeTrainJobPodLogs: {
407
+ url: "/",
408
+ method: "GET",
409
+ config: {
410
+ query: {
411
+ Version: "2024-06-12",
412
+ Action: "DescribeTrainJobPodLogs"
413
+ },
414
+ headers: {
415
+ "Content-Type": "application/x-www-form-urlencoded"
416
+ }
417
+ },
418
+ paramsType: {
419
+ ResourcePoolId: "String",
420
+ TrainJobId: "String",
421
+ PodName: "String",
422
+ SinceSeconds: "Int",
423
+ TailLines: "Int"
424
+ }
425
+ },
426
+ DescribeTrainJobPods: {
427
+ url: "/",
428
+ method: "GET",
429
+ config: {
430
+ query: {
431
+ Version: "2024-06-12",
432
+ Action: "DescribeTrainJobPods"
433
+ },
434
+ headers: {
435
+ "Content-Type": "application/x-www-form-urlencoded"
436
+ }
437
+ },
438
+ paramsType: {
439
+ Marker: "String",
440
+ MaxResults: "String",
441
+ TrainJobId: "String",
442
+ Filter: "Filter"
443
+ }
444
+ },
445
+ DescribeResourcePools: {
446
+ url: "/",
447
+ method: "GET",
448
+ config: {
449
+ query: {
450
+ Version: "2024-06-12",
451
+ Action: "DescribeResourcePools"
452
+ },
453
+ headers: {
454
+ "Content-Type": "application/x-www-form-urlencoded"
455
+ }
456
+ },
457
+ paramsType: {
458
+ Sort: "String",
459
+ Page: "Int",
460
+ PageSize: "Int",
461
+ ResourcePoolName: "String",
462
+ Component: "String",
463
+ ResourcePoolId: "Filter",
464
+ Filter: "Filter"
465
+ }
466
+ },
467
+ DescribeResourcePoolInstances: {
468
+ url: "/",
469
+ method: "GET",
470
+ config: {
471
+ query: {
472
+ Version: "2024-06-12",
473
+ Action: "DescribeResourcePoolInstances"
474
+ },
475
+ headers: {
476
+ "Content-Type": "application/x-www-form-urlencoded"
477
+ }
478
+ },
479
+ paramsType: {
480
+ ResourcePoolId: "String",
481
+ PageSize: "Int",
482
+ Page: "Int",
483
+ InstanceName: "String",
484
+ InstanceId: "Filter",
485
+ ProjectId: "Filter",
486
+ Filter: "Filter"
487
+ }
488
+ },
489
+ DescribeModelChats: {
490
+ url: "/",
491
+ method: "GET",
492
+ config: {
493
+ query: {
494
+ Version: "2024-06-12",
495
+ Action: "DescribeModelChats"
496
+ },
497
+ headers: {
498
+ "Content-Type": "application/x-www-form-urlencoded"
499
+ }
500
+ },
501
+ paramsType: {
502
+ ChatId: "String",
503
+ CreateTimeStart: "Int",
504
+ CreateTimeEnd: "Int",
505
+ Marker: "Int",
506
+ MaxResults: "Int"
507
+ }
508
+ }
509
+ });
510
+ }
511
+ };