tencentcloud-sdk-nodejs-cloudstudio 4.0.623 → 4.0.624

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.
@@ -0,0 +1,144 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /*
3
+ * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
+ import {
20
+ DescribeConfigRequest,
21
+ DescribeWorkspacesRequest,
22
+ Env,
23
+ RunWorkspaceRequest,
24
+ CreateWorkspaceTokenResponse,
25
+ GitRepository,
26
+ CreateWorkspaceTokenRequest,
27
+ CreateWorkspaceRequest,
28
+ RunWorkspaceResponse,
29
+ StopWorkspaceResponse,
30
+ RemoveWorkspaceResponse,
31
+ RemoveWorkspaceRequest,
32
+ LifeCycleCommand,
33
+ StopWorkspaceRequest,
34
+ WorkspaceStatusInfo,
35
+ LifeCycle,
36
+ ModifyWorkspaceResponse,
37
+ CreateWorkspaceResponse,
38
+ Image,
39
+ DescribeConfigResponse,
40
+ DescribeImagesRequest,
41
+ DescribeWorkspacesResponse,
42
+ ModifyWorkspaceRequest,
43
+ DescribeImagesResponse,
44
+ } from "./cloudstudio_models"
45
+
46
+ /**
47
+ * cloudstudio client
48
+ * @class
49
+ */
50
+ export class Client extends TencentCloudCommon.AbstractClient {
51
+ constructor(clientConfig: TencentCloudCommon.ClientConfig) {
52
+ super("cloudstudio.tencentcloudapi.com", "2023-05-08", clientConfig)
53
+ }
54
+
55
+ /**
56
+ * 获取用户配置
57
+ */
58
+ async DescribeConfig(
59
+ req: DescribeConfigRequest,
60
+ cb?: (error: string, rep: DescribeConfigResponse) => void
61
+ ): Promise<DescribeConfigResponse> {
62
+ return this.request("DescribeConfig", req, cb)
63
+ }
64
+
65
+ /**
66
+ * 修改工作空间
67
+ */
68
+ async ModifyWorkspace(
69
+ req: ModifyWorkspaceRequest,
70
+ cb?: (error: string, rep: ModifyWorkspaceResponse) => void
71
+ ): Promise<ModifyWorkspaceResponse> {
72
+ return this.request("ModifyWorkspace", req, cb)
73
+ }
74
+
75
+ /**
76
+ * 获取用户工作空间列表
77
+ */
78
+ async DescribeWorkspaces(
79
+ req: DescribeWorkspacesRequest,
80
+ cb?: (error: string, rep: DescribeWorkspacesResponse) => void
81
+ ): Promise<DescribeWorkspacesResponse> {
82
+ return this.request("DescribeWorkspaces", req, cb)
83
+ }
84
+
85
+ /**
86
+ * 获取基础镜像列表
87
+ */
88
+ async DescribeImages(
89
+ req?: DescribeImagesRequest,
90
+ cb?: (error: string, rep: DescribeImagesResponse) => void
91
+ ): Promise<DescribeImagesResponse> {
92
+ return this.request("DescribeImages", req, cb)
93
+ }
94
+
95
+ /**
96
+ * 创建工作空间
97
+ */
98
+ async CreateWorkspace(
99
+ req: CreateWorkspaceRequest,
100
+ cb?: (error: string, rep: CreateWorkspaceResponse) => void
101
+ ): Promise<CreateWorkspaceResponse> {
102
+ return this.request("CreateWorkspace", req, cb)
103
+ }
104
+
105
+ /**
106
+ * 为工作空间创建临时访问凭证,重复调用会创建新的 Token,旧的 Token 将会自动失效
107
+ */
108
+ async CreateWorkspaceToken(
109
+ req: CreateWorkspaceTokenRequest,
110
+ cb?: (error: string, rep: CreateWorkspaceTokenResponse) => void
111
+ ): Promise<CreateWorkspaceTokenResponse> {
112
+ return this.request("CreateWorkspaceToken", req, cb)
113
+ }
114
+
115
+ /**
116
+ * 删除工作空间
117
+ */
118
+ async RemoveWorkspace(
119
+ req: RemoveWorkspaceRequest,
120
+ cb?: (error: string, rep: RemoveWorkspaceResponse) => void
121
+ ): Promise<RemoveWorkspaceResponse> {
122
+ return this.request("RemoveWorkspace", req, cb)
123
+ }
124
+
125
+ /**
126
+ * 停止运行空间
127
+ */
128
+ async StopWorkspace(
129
+ req: StopWorkspaceRequest,
130
+ cb?: (error: string, rep: StopWorkspaceResponse) => void
131
+ ): Promise<StopWorkspaceResponse> {
132
+ return this.request("StopWorkspace", req, cb)
133
+ }
134
+
135
+ /**
136
+ * 运行空间
137
+ */
138
+ async RunWorkspace(
139
+ req: RunWorkspaceRequest,
140
+ cb?: (error: string, rep: RunWorkspaceResponse) => void
141
+ ): Promise<RunWorkspaceResponse> {
142
+ return this.request("RunWorkspace", req, cb)
143
+ }
144
+ }
@@ -0,0 +1,424 @@
1
+ /*
2
+ * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing,
11
+ * software distributed under the License is distributed on an
12
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
+ * KIND, either express or implied. See the License for the
14
+ * specific language governing permissions and limitations
15
+ * under the License.
16
+ */
17
+
18
+ /**
19
+ * DescribeConfig请求参数结构体
20
+ */
21
+ export interface DescribeConfigRequest {
22
+ /**
23
+ * 配置名称
24
+ */
25
+ Name: string
26
+ }
27
+
28
+ /**
29
+ * DescribeWorkspaces请求参数结构体
30
+ */
31
+ export interface DescribeWorkspacesRequest {
32
+ /**
33
+ * 工作空间名称过滤条件
34
+ */
35
+ Name?: string
36
+ }
37
+
38
+ /**
39
+ * 环境变量
40
+ */
41
+ export interface Env {
42
+ /**
43
+ * 环境变量 key
44
+ */
45
+ Name: string
46
+ /**
47
+ * 环境变量 value
48
+ */
49
+ Value: string
50
+ }
51
+
52
+ /**
53
+ * RunWorkspace请求参数结构体
54
+ */
55
+ export interface RunWorkspaceRequest {
56
+ /**
57
+ * 工作空间 SpaceKey
58
+ */
59
+ SpaceKey: string
60
+ }
61
+
62
+ /**
63
+ * CreateWorkspaceToken返回参数结构体
64
+ */
65
+ export interface CreateWorkspaceTokenResponse {
66
+ /**
67
+ * 访问工作空间临时凭证
68
+ */
69
+ Token?: string
70
+ /**
71
+ * token 过期时间
72
+ */
73
+ ExpiredTime?: string
74
+ /**
75
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
76
+ */
77
+ RequestId?: string
78
+ }
79
+
80
+ /**
81
+ * Git 仓库
82
+ */
83
+ export interface GitRepository {
84
+ /**
85
+ * Git 仓库地址
86
+ */
87
+ Url: string
88
+ /**
89
+ * Git 仓库分支名或 Tag 名
90
+ */
91
+ Branch?: string
92
+ }
93
+
94
+ /**
95
+ * CreateWorkspaceToken请求参数结构体
96
+ */
97
+ export interface CreateWorkspaceTokenRequest {
98
+ /**
99
+ * 工作空间 SpaceKey
100
+ */
101
+ SpaceKey?: string
102
+ /**
103
+ * token过期时间,单位是秒,默认 3600
104
+ */
105
+ TokenExpiredLimitSec?: number
106
+ }
107
+
108
+ /**
109
+ * CreateWorkspace请求参数结构体
110
+ */
111
+ export interface CreateWorkspaceRequest {
112
+ /**
113
+ * 工作空间名称
114
+ */
115
+ Name: string
116
+ /**
117
+ * 工作空间描述
118
+ */
119
+ Description?: string
120
+ /**
121
+ * 工作空间规格。Standard: 2C4G, Calculation: 4C8G, Profession: 8C16G. 默认是 Standard。
122
+ */
123
+ Specs?: string
124
+ /**
125
+ * 工作空间基础镜像名称, 默认会使用 All In One 镜像
126
+ */
127
+ Image?: string
128
+ /**
129
+ * Git 仓库. 工作空间启动时会自动克隆该仓库
130
+ */
131
+ Repository?: GitRepository
132
+ /**
133
+ * 环境变量. 会被注入到工作空间中
134
+ */
135
+ Envs?: Array<Env>
136
+ /**
137
+ * 预装插件. 工作空间启动时, 会自动安装这些插件
138
+ */
139
+ Extensions?: Array<string>
140
+ /**
141
+ * 工作空间生命周期钩子. 分为三个阶段 init, start, destroy. 分别表示工作空间数据初始化阶段, 工作空间启动阶段, 工作空间关闭阶段. 用户可以自定义 shell 命令.
142
+ */
143
+ Lifecycle?: LifeCycle
144
+ }
145
+
146
+ /**
147
+ * RunWorkspace返回参数结构体
148
+ */
149
+ export interface RunWorkspaceResponse {
150
+ /**
151
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
152
+ */
153
+ RequestId?: string
154
+ }
155
+
156
+ /**
157
+ * StopWorkspace返回参数结构体
158
+ */
159
+ export interface StopWorkspaceResponse {
160
+ /**
161
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
162
+ */
163
+ RequestId?: string
164
+ }
165
+
166
+ /**
167
+ * RemoveWorkspace返回参数结构体
168
+ */
169
+ export interface RemoveWorkspaceResponse {
170
+ /**
171
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
172
+ */
173
+ RequestId?: string
174
+ }
175
+
176
+ /**
177
+ * RemoveWorkspace请求参数结构体
178
+ */
179
+ export interface RemoveWorkspaceRequest {
180
+ /**
181
+ * 工作空间 SpaceKey
182
+ */
183
+ SpaceKey: string
184
+ }
185
+
186
+ /**
187
+ * 工作空间生命周期执行指令
188
+ */
189
+ export interface LifeCycleCommand {
190
+ /**
191
+ * 指令描述
192
+ */
193
+ Name: string
194
+ /**
195
+ * 具体命令
196
+ */
197
+ Command: string
198
+ }
199
+
200
+ /**
201
+ * StopWorkspace请求参数结构体
202
+ */
203
+ export interface StopWorkspaceRequest {
204
+ /**
205
+ * 工作空间 SpaceKey
206
+ */
207
+ SpaceKey: string
208
+ }
209
+
210
+ /**
211
+ * 获取用户工作空间返回信息
212
+ */
213
+ export interface WorkspaceStatusInfo {
214
+ /**
215
+ * 工作空间 ID
216
+ */
217
+ Id: number
218
+ /**
219
+ * 工作空间名称
220
+ */
221
+ Name: string
222
+ /**
223
+ * 工作空间标识
224
+ */
225
+ SpaceKey: string
226
+ /**
227
+ * 工作空间状态
228
+ */
229
+ Status: string
230
+ /**
231
+ * CPU数量
232
+ */
233
+ Cpu: number
234
+ /**
235
+ * 内存
236
+ */
237
+ Memory: number
238
+ /**
239
+ * 工作空间图标
240
+ 注意:此字段可能返回 null,表示取不到有效值。
241
+ */
242
+ Icon?: string
243
+ /**
244
+ * 工作空间状态, 异常原因
245
+ 注意:此字段可能返回 null,表示取不到有效值。
246
+ */
247
+ StatusReason?: string
248
+ /**
249
+ * 工作空间描述
250
+ 注意:此字段可能返回 null,表示取不到有效值。
251
+ */
252
+ Description: string
253
+ /**
254
+ * 工作空间类型
255
+ 注意:此字段可能返回 null,表示取不到有效值。
256
+ */
257
+ WorkspaceType?: string
258
+ /**
259
+ * Git 仓库 HTTPS 地址
260
+ 注意:此字段可能返回 null,表示取不到有效值。
261
+ */
262
+ VersionControlUrl: string
263
+ /**
264
+ * Git 仓库引用。指定分支使用 /refs/heads/{分支名}, 指定 Tag 用 /refs/tags/{Tag名}
265
+ 注意:此字段可能返回 null,表示取不到有效值。
266
+ */
267
+ VersionControlRef: string
268
+ /**
269
+ * 最后操作时间
270
+ 注意:此字段可能返回 null,表示取不到有效值。
271
+ */
272
+ LastOpsDate: string
273
+ /**
274
+ * 创建时间
275
+ 注意:此字段可能返回 null,表示取不到有效值。
276
+ */
277
+ CreateDate: string
278
+ }
279
+
280
+ /**
281
+ * 工作空间生命周期自动执行脚本
282
+ */
283
+ export interface LifeCycle {
284
+ /**
285
+ * 工作空间首次初始化时执行
286
+ */
287
+ Init?: Array<LifeCycleCommand>
288
+ /**
289
+ * 每次工作空间启动时执行
290
+ */
291
+ Start?: Array<LifeCycleCommand>
292
+ /**
293
+ * 每次工作空间关闭时执行
294
+ */
295
+ Destroy?: Array<LifeCycleCommand>
296
+ }
297
+
298
+ /**
299
+ * ModifyWorkspace返回参数结构体
300
+ */
301
+ export interface ModifyWorkspaceResponse {
302
+ /**
303
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
304
+ */
305
+ RequestId?: string
306
+ }
307
+
308
+ /**
309
+ * CreateWorkspace返回参数结构体
310
+ */
311
+ export interface CreateWorkspaceResponse {
312
+ /**
313
+ * 工作空间 SpaceKey
314
+ */
315
+ SpaceKey?: string
316
+ /**
317
+ * 工作空间名称
318
+ */
319
+ Name?: string
320
+ /**
321
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
322
+ */
323
+ RequestId?: string
324
+ }
325
+
326
+ /**
327
+ * 基础镜像
328
+ */
329
+ export interface Image {
330
+ /**
331
+ * 镜像名称
332
+ */
333
+ Name?: string
334
+ /**
335
+ * 镜像仓库
336
+ */
337
+ Repository?: string
338
+ /**
339
+ * tag 列表
340
+ */
341
+ Tags?: Array<string>
342
+ }
343
+
344
+ /**
345
+ * DescribeConfig返回参数结构体
346
+ */
347
+ export interface DescribeConfigResponse {
348
+ /**
349
+ * 配置值
350
+ 注意:此字段可能返回 null,表示取不到有效值。
351
+ */
352
+ Data?: string
353
+ /**
354
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
355
+ */
356
+ RequestId?: string
357
+ }
358
+
359
+ /**
360
+ * DescribeImages请求参数结构体
361
+ */
362
+ export type DescribeImagesRequest = null
363
+
364
+ /**
365
+ * DescribeWorkspaces返回参数结构体
366
+ */
367
+ export interface DescribeWorkspacesResponse {
368
+ /**
369
+ * 工作空间列表
370
+ */
371
+ Data?: Array<WorkspaceStatusInfo>
372
+ /**
373
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
374
+ */
375
+ RequestId?: string
376
+ }
377
+
378
+ /**
379
+ * ModifyWorkspace请求参数结构体
380
+ */
381
+ export interface ModifyWorkspaceRequest {
382
+ /**
383
+ * 工作空间 SpaceKey. 更新该工作空间的属性
384
+ */
385
+ SpaceKey: string
386
+ /**
387
+ * 工作空间名称
388
+ */
389
+ Name?: string
390
+ /**
391
+ * 工作空间描述
392
+ */
393
+ Description?: string
394
+ /**
395
+ * 工作空间规格。STANDARD: 2C4G, CALCULATION: 4C8G, PROFESSION: 8C16G. 默认是 STANDARD。
396
+ */
397
+ Specs?: string
398
+ /**
399
+ * 环境变量. 会被注入到工作空间中
400
+ */
401
+ Envs?: Array<Env>
402
+ /**
403
+ * 预装插件. 工作空间启动时, 会自动安装这些插件
404
+ */
405
+ Extensions?: Array<string>
406
+ /**
407
+ * 工作空间生命周期钩子. 分为三个阶段 init, start, destroy. 分别表示工作空间数据初始化阶段, 工作空间启动阶段, 工作空间关闭阶段. 用户可以自定义 shell 命令.
408
+ */
409
+ Lifecycle?: LifeCycle
410
+ }
411
+
412
+ /**
413
+ * DescribeImages返回参数结构体
414
+ */
415
+ export interface DescribeImagesResponse {
416
+ /**
417
+ * 镜像列表
418
+ */
419
+ Images?: Array<Image>
420
+ /**
421
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
422
+ */
423
+ RequestId?: string
424
+ }
@@ -0,0 +1,6 @@
1
+ import * as Models from "./cloudstudio_models"
2
+ import { Client } from "./cloudstudio_client"
3
+ export const v20230508 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ }
@@ -1,4 +1,8 @@
1
1
  export declare const cloudstudio: {
2
+ v20230508: {
3
+ Client: typeof import("./v20230508/cloudstudio_client").Client;
4
+ Models: typeof import("./v20230508/cloudstudio_models");
5
+ };
2
6
  v20210524: {
3
7
  Client: typeof import("./v20210524/cloudstudio_client").Client;
4
8
  Models: typeof import("./v20210524/cloudstudio_models");
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cloudstudio = void 0;
4
+ const v20230508_1 = require("./v20230508");
4
5
  const v20210524_1 = require("./v20210524");
5
6
  exports.cloudstudio = {
7
+ v20230508: v20230508_1.v20230508,
6
8
  v20210524: v20210524_1.v20210524,
7
9
  };
@@ -0,0 +1,45 @@
1
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
+ import { DescribeConfigRequest, DescribeWorkspacesRequest, RunWorkspaceRequest, CreateWorkspaceTokenResponse, CreateWorkspaceTokenRequest, CreateWorkspaceRequest, RunWorkspaceResponse, StopWorkspaceResponse, RemoveWorkspaceResponse, RemoveWorkspaceRequest, StopWorkspaceRequest, ModifyWorkspaceResponse, CreateWorkspaceResponse, DescribeConfigResponse, DescribeImagesRequest, DescribeWorkspacesResponse, ModifyWorkspaceRequest, DescribeImagesResponse } from "./cloudstudio_models";
3
+ /**
4
+ * cloudstudio client
5
+ * @class
6
+ */
7
+ export declare class Client extends TencentCloudCommon.AbstractClient {
8
+ constructor(clientConfig: TencentCloudCommon.ClientConfig);
9
+ /**
10
+ * 获取用户配置
11
+ */
12
+ DescribeConfig(req: DescribeConfigRequest, cb?: (error: string, rep: DescribeConfigResponse) => void): Promise<DescribeConfigResponse>;
13
+ /**
14
+ * 修改工作空间
15
+ */
16
+ ModifyWorkspace(req: ModifyWorkspaceRequest, cb?: (error: string, rep: ModifyWorkspaceResponse) => void): Promise<ModifyWorkspaceResponse>;
17
+ /**
18
+ * 获取用户工作空间列表
19
+ */
20
+ DescribeWorkspaces(req: DescribeWorkspacesRequest, cb?: (error: string, rep: DescribeWorkspacesResponse) => void): Promise<DescribeWorkspacesResponse>;
21
+ /**
22
+ * 获取基础镜像列表
23
+ */
24
+ DescribeImages(req?: DescribeImagesRequest, cb?: (error: string, rep: DescribeImagesResponse) => void): Promise<DescribeImagesResponse>;
25
+ /**
26
+ * 创建工作空间
27
+ */
28
+ CreateWorkspace(req: CreateWorkspaceRequest, cb?: (error: string, rep: CreateWorkspaceResponse) => void): Promise<CreateWorkspaceResponse>;
29
+ /**
30
+ * 为工作空间创建临时访问凭证,重复调用会创建新的 Token,旧的 Token 将会自动失效
31
+ */
32
+ CreateWorkspaceToken(req: CreateWorkspaceTokenRequest, cb?: (error: string, rep: CreateWorkspaceTokenResponse) => void): Promise<CreateWorkspaceTokenResponse>;
33
+ /**
34
+ * 删除工作空间
35
+ */
36
+ RemoveWorkspace(req: RemoveWorkspaceRequest, cb?: (error: string, rep: RemoveWorkspaceResponse) => void): Promise<RemoveWorkspaceResponse>;
37
+ /**
38
+ * 停止运行空间
39
+ */
40
+ StopWorkspace(req: StopWorkspaceRequest, cb?: (error: string, rep: StopWorkspaceResponse) => void): Promise<StopWorkspaceResponse>;
41
+ /**
42
+ * 运行空间
43
+ */
44
+ RunWorkspace(req: RunWorkspaceRequest, cb?: (error: string, rep: RunWorkspaceResponse) => void): Promise<RunWorkspaceResponse>;
45
+ }