-
Notifications
You must be signed in to change notification settings - Fork 96
/
cloudstudio_client.js
85 lines (85 loc) · 2.44 KB
/
cloudstudio_client.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Client = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars */
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const abstract_client_1 = require("../../../common/abstract_client");
/**
* cloudstudio client
* @class
*/
class Client extends abstract_client_1.AbstractClient {
constructor(clientConfig) {
super("cloudstudio.tencentcloudapi.com", "2023-05-08", clientConfig);
}
/**
* 获取用户配置
*/
async DescribeConfig(req, cb) {
return this.request("DescribeConfig", req, cb);
}
/**
* 修改工作空间
*/
async ModifyWorkspace(req, cb) {
return this.request("ModifyWorkspace", req, cb);
}
/**
* 获取用户工作空间列表
*/
async DescribeWorkspaces(req, cb) {
return this.request("DescribeWorkspaces", req, cb);
}
/**
* 获取基础镜像列表
*/
async DescribeImages(req, cb) {
return this.request("DescribeImages", req, cb);
}
/**
* 创建工作空间
*/
async CreateWorkspace(req, cb) {
return this.request("CreateWorkspace", req, cb);
}
/**
* 创建工作空间临时访问凭证,重复调用会创建新的 Token,旧的 Token 将会自动失效
*/
async CreateWorkspaceToken(req, cb) {
return this.request("CreateWorkspaceToken", req, cb);
}
/**
* 删除工作空间
*/
async RemoveWorkspace(req, cb) {
return this.request("RemoveWorkspace", req, cb);
}
/**
* 停止运行空间
*/
async StopWorkspace(req, cb) {
return this.request("StopWorkspace", req, cb);
}
/**
* 运行空间
*/
async RunWorkspace(req, cb) {
return this.request("RunWorkspace", req, cb);
}
}
exports.Client = Client;