tencentcloud-sdk-cloudstudio 3.0.594 → 3.0.595

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edbbabe2a80f3a8cdec61959b07223636e316f7b
4
- data.tar.gz: e57b6fe5d27673a8e2044d1065597575e54c712a
3
+ metadata.gz: c17b1c42025e7fed39cc5f79be9aae82a3343403
4
+ data.tar.gz: bb27cccce71480a0304e4d8f75fc99056c4f3426
5
5
  SHA512:
6
- metadata.gz: 821fe5ffd563e81fca0f43480700e111db84685f13571332e3092a091703457333ecfa94447e440054902a4931ad26cab99d91bfd94c2dc87d7895dc43f03b21
7
- data.tar.gz: 2d6b50e404105bc62b44bca41d81fc68963ef98563dc06805f644576273cfcca922534d244217911d8c3ce7d030110187b38fb76683be6916b00e185fd40db94
6
+ metadata.gz: c92d2aad1211904d942d89101d64f7823020a2e61d110f6177d9c71c605138018b49b2f2fa520c84dbc9d9c1935c767cbfabd3c4450859e7f5094562bc860e9a
7
+ data.tar.gz: 97a1200145cb6dcdb516d8a8ec45c2d8cc1c747651aaa9a330c41573608cb1b68341fcd11b18fbf30d227408d940c76c99aaf0ab425aa9a8c0520bc88f10b742
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.594
1
+ 3.0.595
@@ -2,6 +2,9 @@
2
2
 
3
3
  require 'tencentcloud-sdk-common'
4
4
 
5
+ require_relative 'v20230508/client'
6
+ require_relative 'v20230508/models'
7
+
5
8
  require_relative 'v20210524/client'
6
9
  require_relative 'v20210524/models'
7
10
 
@@ -0,0 +1,252 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-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, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Cloudstudio
21
+ module V20230508
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2023-05-08'
26
+ api_endpoint = 'cloudstudio.tencentcloudapi.com'
27
+ sdk_version = 'CLOUDSTUDIO_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 创建工作空间
33
+
34
+ # @param request: Request instance for CreateWorkspace.
35
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::CreateWorkspaceRequest`
36
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::CreateWorkspaceResponse`
37
+ def CreateWorkspace(request)
38
+ body = send_request('CreateWorkspace', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreateWorkspaceResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 为工作空间创建临时访问凭证,重复调用会创建新的 Token,旧的 Token 将会自动失效
57
+
58
+ # @param request: Request instance for CreateWorkspaceToken.
59
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::CreateWorkspaceTokenRequest`
60
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::CreateWorkspaceTokenResponse`
61
+ def CreateWorkspaceToken(request)
62
+ body = send_request('CreateWorkspaceToken', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = CreateWorkspaceTokenResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 获取用户配置
81
+
82
+ # @param request: Request instance for DescribeConfig.
83
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::DescribeConfigRequest`
84
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::DescribeConfigResponse`
85
+ def DescribeConfig(request)
86
+ body = send_request('DescribeConfig', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = DescribeConfigResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+ # 获取基础镜像列表
105
+
106
+ # @param request: Request instance for DescribeImages.
107
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::DescribeImagesRequest`
108
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::DescribeImagesResponse`
109
+ def DescribeImages(request)
110
+ body = send_request('DescribeImages', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = DescribeImagesResponse.new
114
+ model.deserialize(response['Response'])
115
+ model
116
+ else
117
+ code = response['Response']['Error']['Code']
118
+ message = response['Response']['Error']['Message']
119
+ reqid = response['Response']['RequestId']
120
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
121
+ end
122
+ rescue TencentCloud::Common::TencentCloudSDKException => e
123
+ raise e
124
+ rescue StandardError => e
125
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
126
+ end
127
+
128
+ # 获取用户工作空间列表
129
+
130
+ # @param request: Request instance for DescribeWorkspaces.
131
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::DescribeWorkspacesRequest`
132
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::DescribeWorkspacesResponse`
133
+ def DescribeWorkspaces(request)
134
+ body = send_request('DescribeWorkspaces', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = DescribeWorkspacesResponse.new
138
+ model.deserialize(response['Response'])
139
+ model
140
+ else
141
+ code = response['Response']['Error']['Code']
142
+ message = response['Response']['Error']['Message']
143
+ reqid = response['Response']['RequestId']
144
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
145
+ end
146
+ rescue TencentCloud::Common::TencentCloudSDKException => e
147
+ raise e
148
+ rescue StandardError => e
149
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
150
+ end
151
+
152
+ # 修改工作空间
153
+
154
+ # @param request: Request instance for ModifyWorkspace.
155
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::ModifyWorkspaceRequest`
156
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::ModifyWorkspaceResponse`
157
+ def ModifyWorkspace(request)
158
+ body = send_request('ModifyWorkspace', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = ModifyWorkspaceResponse.new
162
+ model.deserialize(response['Response'])
163
+ model
164
+ else
165
+ code = response['Response']['Error']['Code']
166
+ message = response['Response']['Error']['Message']
167
+ reqid = response['Response']['RequestId']
168
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
169
+ end
170
+ rescue TencentCloud::Common::TencentCloudSDKException => e
171
+ raise e
172
+ rescue StandardError => e
173
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
174
+ end
175
+
176
+ # 删除工作空间
177
+
178
+ # @param request: Request instance for RemoveWorkspace.
179
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::RemoveWorkspaceRequest`
180
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::RemoveWorkspaceResponse`
181
+ def RemoveWorkspace(request)
182
+ body = send_request('RemoveWorkspace', request.serialize)
183
+ response = JSON.parse(body)
184
+ if response['Response'].key?('Error') == false
185
+ model = RemoveWorkspaceResponse.new
186
+ model.deserialize(response['Response'])
187
+ model
188
+ else
189
+ code = response['Response']['Error']['Code']
190
+ message = response['Response']['Error']['Message']
191
+ reqid = response['Response']['RequestId']
192
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
193
+ end
194
+ rescue TencentCloud::Common::TencentCloudSDKException => e
195
+ raise e
196
+ rescue StandardError => e
197
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
198
+ end
199
+
200
+ # 运行空间
201
+
202
+ # @param request: Request instance for RunWorkspace.
203
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::RunWorkspaceRequest`
204
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::RunWorkspaceResponse`
205
+ def RunWorkspace(request)
206
+ body = send_request('RunWorkspace', request.serialize)
207
+ response = JSON.parse(body)
208
+ if response['Response'].key?('Error') == false
209
+ model = RunWorkspaceResponse.new
210
+ model.deserialize(response['Response'])
211
+ model
212
+ else
213
+ code = response['Response']['Error']['Code']
214
+ message = response['Response']['Error']['Message']
215
+ reqid = response['Response']['RequestId']
216
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
217
+ end
218
+ rescue TencentCloud::Common::TencentCloudSDKException => e
219
+ raise e
220
+ rescue StandardError => e
221
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
222
+ end
223
+
224
+ # 停止运行空间
225
+
226
+ # @param request: Request instance for StopWorkspace.
227
+ # @type request: :class:`Tencentcloud::cloudstudio::V20230508::StopWorkspaceRequest`
228
+ # @rtype: :class:`Tencentcloud::cloudstudio::V20230508::StopWorkspaceResponse`
229
+ def StopWorkspace(request)
230
+ body = send_request('StopWorkspace', request.serialize)
231
+ response = JSON.parse(body)
232
+ if response['Response'].key?('Error') == false
233
+ model = StopWorkspaceResponse.new
234
+ model.deserialize(response['Response'])
235
+ model
236
+ else
237
+ code = response['Response']['Error']['Code']
238
+ message = response['Response']['Error']['Message']
239
+ reqid = response['Response']['RequestId']
240
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
241
+ end
242
+ rescue TencentCloud::Common::TencentCloudSDKException => e
243
+ raise e
244
+ rescue StandardError => e
245
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
246
+ end
247
+
248
+
249
+ end
250
+ end
251
+ end
252
+ end
@@ -0,0 +1,633 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-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, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Cloudstudio
19
+ module V20230508
20
+ # CreateWorkspace请求参数结构体
21
+ class CreateWorkspaceRequest < TencentCloud::Common::AbstractModel
22
+ # @param Name: 工作空间名称
23
+ # @type Name: String
24
+ # @param Description: 工作空间描述
25
+ # @type Description: String
26
+ # @param Specs: 工作空间规格。Standard: 2C4G, Calculation: 4C8G, Profession: 8C16G. 默认是 Standard。
27
+ # @type Specs: String
28
+ # @param Image: 工作空间基础镜像名称, 默认会使用 All In One 镜像
29
+ # @type Image: String
30
+ # @param Repository: Git 仓库. 工作空间启动时会自动克隆该仓库
31
+ # @type Repository: :class:`Tencentcloud::Cloudstudio.v20230508.models.GitRepository`
32
+ # @param Envs: 环境变量. 会被注入到工作空间中
33
+ # @type Envs: Array
34
+ # @param Extensions: 预装插件. 工作空间启动时, 会自动安装这些插件
35
+ # @type Extensions: Array
36
+ # @param Lifecycle: 工作空间生命周期钩子. 分为三个阶段 init, start, destroy. 分别表示工作空间数据初始化阶段, 工作空间启动阶段, 工作空间关闭阶段. 用户可以自定义 shell 命令.
37
+ # @type Lifecycle: :class:`Tencentcloud::Cloudstudio.v20230508.models.LifeCycle`
38
+
39
+ attr_accessor :Name, :Description, :Specs, :Image, :Repository, :Envs, :Extensions, :Lifecycle
40
+
41
+ def initialize(name=nil, description=nil, specs=nil, image=nil, repository=nil, envs=nil, extensions=nil, lifecycle=nil)
42
+ @Name = name
43
+ @Description = description
44
+ @Specs = specs
45
+ @Image = image
46
+ @Repository = repository
47
+ @Envs = envs
48
+ @Extensions = extensions
49
+ @Lifecycle = lifecycle
50
+ end
51
+
52
+ def deserialize(params)
53
+ @Name = params['Name']
54
+ @Description = params['Description']
55
+ @Specs = params['Specs']
56
+ @Image = params['Image']
57
+ unless params['Repository'].nil?
58
+ @Repository = GitRepository.new
59
+ @Repository.deserialize(params['Repository'])
60
+ end
61
+ unless params['Envs'].nil?
62
+ @Envs = []
63
+ params['Envs'].each do |i|
64
+ env_tmp = Env.new
65
+ env_tmp.deserialize(i)
66
+ @Envs << env_tmp
67
+ end
68
+ end
69
+ @Extensions = params['Extensions']
70
+ unless params['Lifecycle'].nil?
71
+ @Lifecycle = LifeCycle.new
72
+ @Lifecycle.deserialize(params['Lifecycle'])
73
+ end
74
+ end
75
+ end
76
+
77
+ # CreateWorkspace返回参数结构体
78
+ class CreateWorkspaceResponse < TencentCloud::Common::AbstractModel
79
+ # @param SpaceKey: 工作空间 SpaceKey
80
+ # @type SpaceKey: String
81
+ # @param Name: 工作空间名称
82
+ # @type Name: String
83
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
84
+ # @type RequestId: String
85
+
86
+ attr_accessor :SpaceKey, :Name, :RequestId
87
+
88
+ def initialize(spacekey=nil, name=nil, requestid=nil)
89
+ @SpaceKey = spacekey
90
+ @Name = name
91
+ @RequestId = requestid
92
+ end
93
+
94
+ def deserialize(params)
95
+ @SpaceKey = params['SpaceKey']
96
+ @Name = params['Name']
97
+ @RequestId = params['RequestId']
98
+ end
99
+ end
100
+
101
+ # CreateWorkspaceToken请求参数结构体
102
+ class CreateWorkspaceTokenRequest < TencentCloud::Common::AbstractModel
103
+ # @param SpaceKey: 工作空间 SpaceKey
104
+ # @type SpaceKey: String
105
+ # @param TokenExpiredLimitSec: token过期时间,单位是秒,默认 3600
106
+ # @type TokenExpiredLimitSec: Integer
107
+
108
+ attr_accessor :SpaceKey, :TokenExpiredLimitSec
109
+
110
+ def initialize(spacekey=nil, tokenexpiredlimitsec=nil)
111
+ @SpaceKey = spacekey
112
+ @TokenExpiredLimitSec = tokenexpiredlimitsec
113
+ end
114
+
115
+ def deserialize(params)
116
+ @SpaceKey = params['SpaceKey']
117
+ @TokenExpiredLimitSec = params['TokenExpiredLimitSec']
118
+ end
119
+ end
120
+
121
+ # CreateWorkspaceToken返回参数结构体
122
+ class CreateWorkspaceTokenResponse < TencentCloud::Common::AbstractModel
123
+ # @param Token: 访问工作空间临时凭证
124
+ # @type Token: String
125
+ # @param ExpiredTime: token 过期时间
126
+ # @type ExpiredTime: String
127
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
128
+ # @type RequestId: String
129
+
130
+ attr_accessor :Token, :ExpiredTime, :RequestId
131
+
132
+ def initialize(token=nil, expiredtime=nil, requestid=nil)
133
+ @Token = token
134
+ @ExpiredTime = expiredtime
135
+ @RequestId = requestid
136
+ end
137
+
138
+ def deserialize(params)
139
+ @Token = params['Token']
140
+ @ExpiredTime = params['ExpiredTime']
141
+ @RequestId = params['RequestId']
142
+ end
143
+ end
144
+
145
+ # DescribeConfig请求参数结构体
146
+ class DescribeConfigRequest < TencentCloud::Common::AbstractModel
147
+ # @param Name: 配置名称
148
+ # @type Name: String
149
+
150
+ attr_accessor :Name
151
+
152
+ def initialize(name=nil)
153
+ @Name = name
154
+ end
155
+
156
+ def deserialize(params)
157
+ @Name = params['Name']
158
+ end
159
+ end
160
+
161
+ # DescribeConfig返回参数结构体
162
+ class DescribeConfigResponse < TencentCloud::Common::AbstractModel
163
+ # @param Data: 配置值
164
+ # 注意:此字段可能返回 null,表示取不到有效值。
165
+ # @type Data: String
166
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
167
+ # @type RequestId: String
168
+
169
+ attr_accessor :Data, :RequestId
170
+
171
+ def initialize(data=nil, requestid=nil)
172
+ @Data = data
173
+ @RequestId = requestid
174
+ end
175
+
176
+ def deserialize(params)
177
+ @Data = params['Data']
178
+ @RequestId = params['RequestId']
179
+ end
180
+ end
181
+
182
+ # DescribeImages请求参数结构体
183
+ class DescribeImagesRequest < TencentCloud::Common::AbstractModel
184
+
185
+
186
+ def initialize()
187
+ end
188
+
189
+ def deserialize(params)
190
+ end
191
+ end
192
+
193
+ # DescribeImages返回参数结构体
194
+ class DescribeImagesResponse < TencentCloud::Common::AbstractModel
195
+ # @param Images: 镜像列表
196
+ # @type Images: Array
197
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
198
+ # @type RequestId: String
199
+
200
+ attr_accessor :Images, :RequestId
201
+
202
+ def initialize(images=nil, requestid=nil)
203
+ @Images = images
204
+ @RequestId = requestid
205
+ end
206
+
207
+ def deserialize(params)
208
+ unless params['Images'].nil?
209
+ @Images = []
210
+ params['Images'].each do |i|
211
+ image_tmp = Image.new
212
+ image_tmp.deserialize(i)
213
+ @Images << image_tmp
214
+ end
215
+ end
216
+ @RequestId = params['RequestId']
217
+ end
218
+ end
219
+
220
+ # DescribeWorkspaces请求参数结构体
221
+ class DescribeWorkspacesRequest < TencentCloud::Common::AbstractModel
222
+ # @param Name: 工作空间名称过滤条件
223
+ # @type Name: String
224
+
225
+ attr_accessor :Name
226
+
227
+ def initialize(name=nil)
228
+ @Name = name
229
+ end
230
+
231
+ def deserialize(params)
232
+ @Name = params['Name']
233
+ end
234
+ end
235
+
236
+ # DescribeWorkspaces返回参数结构体
237
+ class DescribeWorkspacesResponse < TencentCloud::Common::AbstractModel
238
+ # @param Data: 工作空间列表
239
+ # @type Data: Array
240
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
241
+ # @type RequestId: String
242
+
243
+ attr_accessor :Data, :RequestId
244
+
245
+ def initialize(data=nil, requestid=nil)
246
+ @Data = data
247
+ @RequestId = requestid
248
+ end
249
+
250
+ def deserialize(params)
251
+ unless params['Data'].nil?
252
+ @Data = []
253
+ params['Data'].each do |i|
254
+ workspacestatusinfo_tmp = WorkspaceStatusInfo.new
255
+ workspacestatusinfo_tmp.deserialize(i)
256
+ @Data << workspacestatusinfo_tmp
257
+ end
258
+ end
259
+ @RequestId = params['RequestId']
260
+ end
261
+ end
262
+
263
+ # 环境变量
264
+ class Env < TencentCloud::Common::AbstractModel
265
+ # @param Name: 环境变量 key
266
+ # @type Name: String
267
+ # @param Value: 环境变量 value
268
+ # @type Value: String
269
+
270
+ attr_accessor :Name, :Value
271
+
272
+ def initialize(name=nil, value=nil)
273
+ @Name = name
274
+ @Value = value
275
+ end
276
+
277
+ def deserialize(params)
278
+ @Name = params['Name']
279
+ @Value = params['Value']
280
+ end
281
+ end
282
+
283
+ # Git 仓库
284
+ class GitRepository < TencentCloud::Common::AbstractModel
285
+ # @param Url: Git 仓库地址
286
+ # @type Url: String
287
+ # @param Branch: Git 仓库分支名或 Tag 名
288
+ # @type Branch: String
289
+
290
+ attr_accessor :Url, :Branch
291
+
292
+ def initialize(url=nil, branch=nil)
293
+ @Url = url
294
+ @Branch = branch
295
+ end
296
+
297
+ def deserialize(params)
298
+ @Url = params['Url']
299
+ @Branch = params['Branch']
300
+ end
301
+ end
302
+
303
+ # 基础镜像
304
+ class Image < TencentCloud::Common::AbstractModel
305
+ # @param Name: 镜像名称
306
+ # @type Name: String
307
+ # @param Repository: 镜像仓库
308
+ # @type Repository: String
309
+ # @param Tags: tag 列表
310
+ # @type Tags: Array
311
+
312
+ attr_accessor :Name, :Repository, :Tags
313
+
314
+ def initialize(name=nil, repository=nil, tags=nil)
315
+ @Name = name
316
+ @Repository = repository
317
+ @Tags = tags
318
+ end
319
+
320
+ def deserialize(params)
321
+ @Name = params['Name']
322
+ @Repository = params['Repository']
323
+ @Tags = params['Tags']
324
+ end
325
+ end
326
+
327
+ # 工作空间生命周期自动执行脚本
328
+ class LifeCycle < TencentCloud::Common::AbstractModel
329
+ # @param Init: 工作空间首次初始化时执行
330
+ # @type Init: Array
331
+ # @param Start: 每次工作空间启动时执行
332
+ # @type Start: Array
333
+ # @param Destroy: 每次工作空间关闭时执行
334
+ # @type Destroy: Array
335
+
336
+ attr_accessor :Init, :Start, :Destroy
337
+
338
+ def initialize(init=nil, start=nil, destroy=nil)
339
+ @Init = init
340
+ @Start = start
341
+ @Destroy = destroy
342
+ end
343
+
344
+ def deserialize(params)
345
+ unless params['Init'].nil?
346
+ @Init = []
347
+ params['Init'].each do |i|
348
+ lifecyclecommand_tmp = LifeCycleCommand.new
349
+ lifecyclecommand_tmp.deserialize(i)
350
+ @Init << lifecyclecommand_tmp
351
+ end
352
+ end
353
+ unless params['Start'].nil?
354
+ @Start = []
355
+ params['Start'].each do |i|
356
+ lifecyclecommand_tmp = LifeCycleCommand.new
357
+ lifecyclecommand_tmp.deserialize(i)
358
+ @Start << lifecyclecommand_tmp
359
+ end
360
+ end
361
+ unless params['Destroy'].nil?
362
+ @Destroy = []
363
+ params['Destroy'].each do |i|
364
+ lifecyclecommand_tmp = LifeCycleCommand.new
365
+ lifecyclecommand_tmp.deserialize(i)
366
+ @Destroy << lifecyclecommand_tmp
367
+ end
368
+ end
369
+ end
370
+ end
371
+
372
+ # 工作空间生命周期执行指令
373
+ class LifeCycleCommand < TencentCloud::Common::AbstractModel
374
+ # @param Name: 指令描述
375
+ # @type Name: String
376
+ # @param Command: 具体命令
377
+ # @type Command: String
378
+
379
+ attr_accessor :Name, :Command
380
+
381
+ def initialize(name=nil, command=nil)
382
+ @Name = name
383
+ @Command = command
384
+ end
385
+
386
+ def deserialize(params)
387
+ @Name = params['Name']
388
+ @Command = params['Command']
389
+ end
390
+ end
391
+
392
+ # ModifyWorkspace请求参数结构体
393
+ class ModifyWorkspaceRequest < TencentCloud::Common::AbstractModel
394
+ # @param SpaceKey: 工作空间 SpaceKey. 更新该工作空间的属性
395
+ # @type SpaceKey: String
396
+ # @param Name: 工作空间名称
397
+ # @type Name: String
398
+ # @param Description: 工作空间描述
399
+ # @type Description: String
400
+ # @param Specs: 工作空间规格。STANDARD: 2C4G, CALCULATION: 4C8G, PROFESSION: 8C16G. 默认是 STANDARD。
401
+ # @type Specs: String
402
+ # @param Envs: 环境变量. 会被注入到工作空间中
403
+ # @type Envs: Array
404
+ # @param Extensions: 预装插件. 工作空间启动时, 会自动安装这些插件
405
+ # @type Extensions: Array
406
+ # @param Lifecycle: 工作空间生命周期钩子. 分为三个阶段 init, start, destroy. 分别表示工作空间数据初始化阶段, 工作空间启动阶段, 工作空间关闭阶段. 用户可以自定义 shell 命令.
407
+ # @type Lifecycle: :class:`Tencentcloud::Cloudstudio.v20230508.models.LifeCycle`
408
+
409
+ attr_accessor :SpaceKey, :Name, :Description, :Specs, :Envs, :Extensions, :Lifecycle
410
+
411
+ def initialize(spacekey=nil, name=nil, description=nil, specs=nil, envs=nil, extensions=nil, lifecycle=nil)
412
+ @SpaceKey = spacekey
413
+ @Name = name
414
+ @Description = description
415
+ @Specs = specs
416
+ @Envs = envs
417
+ @Extensions = extensions
418
+ @Lifecycle = lifecycle
419
+ end
420
+
421
+ def deserialize(params)
422
+ @SpaceKey = params['SpaceKey']
423
+ @Name = params['Name']
424
+ @Description = params['Description']
425
+ @Specs = params['Specs']
426
+ unless params['Envs'].nil?
427
+ @Envs = []
428
+ params['Envs'].each do |i|
429
+ env_tmp = Env.new
430
+ env_tmp.deserialize(i)
431
+ @Envs << env_tmp
432
+ end
433
+ end
434
+ @Extensions = params['Extensions']
435
+ unless params['Lifecycle'].nil?
436
+ @Lifecycle = LifeCycle.new
437
+ @Lifecycle.deserialize(params['Lifecycle'])
438
+ end
439
+ end
440
+ end
441
+
442
+ # ModifyWorkspace返回参数结构体
443
+ class ModifyWorkspaceResponse < TencentCloud::Common::AbstractModel
444
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
445
+ # @type RequestId: String
446
+
447
+ attr_accessor :RequestId
448
+
449
+ def initialize(requestid=nil)
450
+ @RequestId = requestid
451
+ end
452
+
453
+ def deserialize(params)
454
+ @RequestId = params['RequestId']
455
+ end
456
+ end
457
+
458
+ # RemoveWorkspace请求参数结构体
459
+ class RemoveWorkspaceRequest < TencentCloud::Common::AbstractModel
460
+ # @param SpaceKey: 工作空间 SpaceKey
461
+ # @type SpaceKey: String
462
+
463
+ attr_accessor :SpaceKey
464
+
465
+ def initialize(spacekey=nil)
466
+ @SpaceKey = spacekey
467
+ end
468
+
469
+ def deserialize(params)
470
+ @SpaceKey = params['SpaceKey']
471
+ end
472
+ end
473
+
474
+ # RemoveWorkspace返回参数结构体
475
+ class RemoveWorkspaceResponse < TencentCloud::Common::AbstractModel
476
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
477
+ # @type RequestId: String
478
+
479
+ attr_accessor :RequestId
480
+
481
+ def initialize(requestid=nil)
482
+ @RequestId = requestid
483
+ end
484
+
485
+ def deserialize(params)
486
+ @RequestId = params['RequestId']
487
+ end
488
+ end
489
+
490
+ # RunWorkspace请求参数结构体
491
+ class RunWorkspaceRequest < TencentCloud::Common::AbstractModel
492
+ # @param SpaceKey: 工作空间 SpaceKey
493
+ # @type SpaceKey: String
494
+
495
+ attr_accessor :SpaceKey
496
+
497
+ def initialize(spacekey=nil)
498
+ @SpaceKey = spacekey
499
+ end
500
+
501
+ def deserialize(params)
502
+ @SpaceKey = params['SpaceKey']
503
+ end
504
+ end
505
+
506
+ # RunWorkspace返回参数结构体
507
+ class RunWorkspaceResponse < TencentCloud::Common::AbstractModel
508
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
509
+ # @type RequestId: String
510
+
511
+ attr_accessor :RequestId
512
+
513
+ def initialize(requestid=nil)
514
+ @RequestId = requestid
515
+ end
516
+
517
+ def deserialize(params)
518
+ @RequestId = params['RequestId']
519
+ end
520
+ end
521
+
522
+ # StopWorkspace请求参数结构体
523
+ class StopWorkspaceRequest < TencentCloud::Common::AbstractModel
524
+ # @param SpaceKey: 工作空间 SpaceKey
525
+ # @type SpaceKey: String
526
+
527
+ attr_accessor :SpaceKey
528
+
529
+ def initialize(spacekey=nil)
530
+ @SpaceKey = spacekey
531
+ end
532
+
533
+ def deserialize(params)
534
+ @SpaceKey = params['SpaceKey']
535
+ end
536
+ end
537
+
538
+ # StopWorkspace返回参数结构体
539
+ class StopWorkspaceResponse < TencentCloud::Common::AbstractModel
540
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
541
+ # @type RequestId: String
542
+
543
+ attr_accessor :RequestId
544
+
545
+ def initialize(requestid=nil)
546
+ @RequestId = requestid
547
+ end
548
+
549
+ def deserialize(params)
550
+ @RequestId = params['RequestId']
551
+ end
552
+ end
553
+
554
+ # 获取用户工作空间返回信息
555
+ class WorkspaceStatusInfo < TencentCloud::Common::AbstractModel
556
+ # @param Id: 工作空间 ID
557
+ # @type Id: Integer
558
+ # @param Name: 工作空间名称
559
+ # @type Name: String
560
+ # @param SpaceKey: 工作空间标识
561
+ # @type SpaceKey: String
562
+ # @param Status: 工作空间状态
563
+ # @type Status: String
564
+ # @param Cpu: CPU数量
565
+ # @type Cpu: Integer
566
+ # @param Memory: 内存
567
+ # @type Memory: Integer
568
+ # @param Icon: 工作空间图标
569
+ # 注意:此字段可能返回 null,表示取不到有效值。
570
+ # @type Icon: String
571
+ # @param StatusReason: 工作空间状态, 异常原因
572
+ # 注意:此字段可能返回 null,表示取不到有效值。
573
+ # @type StatusReason: String
574
+ # @param Description: 工作空间描述
575
+ # 注意:此字段可能返回 null,表示取不到有效值。
576
+ # @type Description: String
577
+ # @param WorkspaceType: 工作空间类型
578
+ # 注意:此字段可能返回 null,表示取不到有效值。
579
+ # @type WorkspaceType: String
580
+ # @param VersionControlUrl: Git 仓库 HTTPS 地址
581
+ # 注意:此字段可能返回 null,表示取不到有效值。
582
+ # @type VersionControlUrl: String
583
+ # @param VersionControlRef: Git 仓库引用。指定分支使用 /refs/heads/{分支名}, 指定 Tag 用 /refs/tags/{Tag名}
584
+ # 注意:此字段可能返回 null,表示取不到有效值。
585
+ # @type VersionControlRef: String
586
+ # @param LastOpsDate: 最后操作时间
587
+ # 注意:此字段可能返回 null,表示取不到有效值。
588
+ # @type LastOpsDate: String
589
+ # @param CreateDate: 创建时间
590
+ # 注意:此字段可能返回 null,表示取不到有效值。
591
+ # @type CreateDate: String
592
+
593
+ attr_accessor :Id, :Name, :SpaceKey, :Status, :Cpu, :Memory, :Icon, :StatusReason, :Description, :WorkspaceType, :VersionControlUrl, :VersionControlRef, :LastOpsDate, :CreateDate
594
+
595
+ def initialize(id=nil, name=nil, spacekey=nil, status=nil, cpu=nil, memory=nil, icon=nil, statusreason=nil, description=nil, workspacetype=nil, versioncontrolurl=nil, versioncontrolref=nil, lastopsdate=nil, createdate=nil)
596
+ @Id = id
597
+ @Name = name
598
+ @SpaceKey = spacekey
599
+ @Status = status
600
+ @Cpu = cpu
601
+ @Memory = memory
602
+ @Icon = icon
603
+ @StatusReason = statusreason
604
+ @Description = description
605
+ @WorkspaceType = workspacetype
606
+ @VersionControlUrl = versioncontrolurl
607
+ @VersionControlRef = versioncontrolref
608
+ @LastOpsDate = lastopsdate
609
+ @CreateDate = createdate
610
+ end
611
+
612
+ def deserialize(params)
613
+ @Id = params['Id']
614
+ @Name = params['Name']
615
+ @SpaceKey = params['SpaceKey']
616
+ @Status = params['Status']
617
+ @Cpu = params['Cpu']
618
+ @Memory = params['Memory']
619
+ @Icon = params['Icon']
620
+ @StatusReason = params['StatusReason']
621
+ @Description = params['Description']
622
+ @WorkspaceType = params['WorkspaceType']
623
+ @VersionControlUrl = params['VersionControlUrl']
624
+ @VersionControlRef = params['VersionControlRef']
625
+ @LastOpsDate = params['LastOpsDate']
626
+ @CreateDate = params['CreateDate']
627
+ end
628
+ end
629
+
630
+ end
631
+ end
632
+ end
633
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-cloudstudio
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.594
4
+ version: 3.0.595
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-16 00:00:00.000000000 Z
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common
@@ -36,6 +36,8 @@ files:
36
36
  - lib/tencentcloud-sdk-cloudstudio.rb
37
37
  - lib/v20210524/client.rb
38
38
  - lib/v20210524/models.rb
39
+ - lib/v20230508/client.rb
40
+ - lib/v20230508/models.rb
39
41
  - lib/VERSION
40
42
  homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
43
  licenses: