tencentcloud-sdk-thpc 1.0.213

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5519209148b3e25c74221deb7399bf3545031eef
4
+ data.tar.gz: eb60bfc026f0684e9b17ea83b4bb86949b0850ba
5
+ SHA512:
6
+ metadata.gz: f7ec77a0fc281cdb47e448c8cf1b87df6d39849955ee687c62344060dc11c543e32a03c144f4e9a9e5967c3d1ff75ecf395fc3a9f766ac580495e53c4d628663
7
+ data.tar.gz: 705c45d9d38523ebf55294f540f409a8d9a2b22cca122cd42596df4b3a5145c2a9b831c683ecb33e46062d4cfbd4a56dbe9a3c5d5cea980196ba451cc11dea1d
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.213
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20211109/client'
6
+ require_relative 'v20211109/models'
7
+
8
+ module TencentCloud
9
+ module Thpc
10
+ end
11
+ end
@@ -0,0 +1,84 @@
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 Thpc
21
+ module V20211109
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2021-11-09'
26
+ api_endpoint = 'thpc.tencentcloudapi.com'
27
+ sdk_version = 'THPC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 本接口 (CreateCluster) 用于创建并启动集群。
33
+
34
+ # @param request: Request instance for CreateCluster.
35
+ # @type request: :class:`Tencentcloud::thpc::V20211109::CreateClusterRequest`
36
+ # @rtype: :class:`Tencentcloud::thpc::V20211109::CreateClusterResponse`
37
+ def CreateCluster(request)
38
+ body = send_request('CreateCluster', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreateClusterResponse.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
+ # 本接口(DeleteCluster)用于删除一个指定的集群。
57
+
58
+ # @param request: Request instance for DeleteCluster.
59
+ # @type request: :class:`Tencentcloud::thpc::V20211109::DeleteClusterRequest`
60
+ # @rtype: :class:`Tencentcloud::thpc::V20211109::DeleteClusterResponse`
61
+ def DeleteCluster(request)
62
+ body = send_request('DeleteCluster', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = DeleteClusterResponse.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
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,433 @@
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 Thpc
19
+ module V20211109
20
+ # 计算节点信息。
21
+ class ComputeNode < TencentCloud::Common::AbstractModel
22
+ # @param InstanceChargeType: 节点[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月<br><li>POSTPAID_BY_HOUR:按小时后付费<br><li>SPOTPAID:竞价付费<br>默认值:POSTPAID_BY_HOUR。
23
+ # @type InstanceChargeType: String
24
+ # @param InstanceChargePrepaid: 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月节点的购买时长、是否设置自动续费等属性。若指定节点的付费模式为预付费则该参数必传。
25
+ # @type InstanceChargePrepaid: :class:`Tencentcloud::Thpc.v20211109.models.InstanceChargePrepaid`
26
+ # @param InstanceType: 节点机型。不同实例机型指定了不同的资源规格。
27
+ # <br><li>具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。
28
+ # @type InstanceType: String
29
+ # @param SystemDisk: 节点系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。
30
+ # @type SystemDisk: :class:`Tencentcloud::Thpc.v20211109.models.SystemDisk`
31
+ # @param DataDisks: 节点数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。
32
+ # @type DataDisks: Array
33
+ # @param InternetAccessible: 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。
34
+ # @type InternetAccessible: :class:`Tencentcloud::Thpc.v20211109.models.InternetAccessible`
35
+ # @param InstanceName: 节点显示名称。<br><li>
36
+ # 不指定节点显示名称则默认显示‘未命名’。
37
+ # </li><li>购买多个节点,如果指定模式串`{R:x}`,表示生成数字[`[x, x+n-1]`,其中`n`表示购买节点的数量,例如`server_{R:3}`,购买1个时,节点显示名称为`server_3`;购买2个时,节点显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
38
+ # 购买多个节点,如果不指定模式串,则在节点显示名称添加后缀`1、2...n`,其中`n`表示购买节点的数量,例如`server_`,购买2个时,节点显示名称分别为`server_1`,`server_2`。</li><li>
39
+ # 最多支持60个字符(包含模式串)。
40
+ # @type InstanceName: String
41
+
42
+ attr_accessor :InstanceChargeType, :InstanceChargePrepaid, :InstanceType, :SystemDisk, :DataDisks, :InternetAccessible, :InstanceName
43
+
44
+ def initialize(instancechargetype=nil, instancechargeprepaid=nil, instancetype=nil, systemdisk=nil, datadisks=nil, internetaccessible=nil, instancename=nil)
45
+ @InstanceChargeType = instancechargetype
46
+ @InstanceChargePrepaid = instancechargeprepaid
47
+ @InstanceType = instancetype
48
+ @SystemDisk = systemdisk
49
+ @DataDisks = datadisks
50
+ @InternetAccessible = internetaccessible
51
+ @InstanceName = instancename
52
+ end
53
+
54
+ def deserialize(params)
55
+ @InstanceChargeType = params['InstanceChargeType']
56
+ unless params['InstanceChargePrepaid'].nil?
57
+ @InstanceChargePrepaid = InstanceChargePrepaid.new
58
+ @InstanceChargePrepaid.deserialize(params['InstanceChargePrepaid'])
59
+ end
60
+ @InstanceType = params['InstanceType']
61
+ unless params['SystemDisk'].nil?
62
+ @SystemDisk = SystemDisk.new
63
+ @SystemDisk.deserialize(params['SystemDisk'])
64
+ end
65
+ unless params['DataDisks'].nil?
66
+ @DataDisks = []
67
+ params['DataDisks'].each do |i|
68
+ datadisk_tmp = DataDisk.new
69
+ datadisk_tmp.deserialize(i)
70
+ @DataDisks << datadisk_tmp
71
+ end
72
+ end
73
+ unless params['InternetAccessible'].nil?
74
+ @InternetAccessible = InternetAccessible.new
75
+ @InternetAccessible.deserialize(params['InternetAccessible'])
76
+ end
77
+ @InstanceName = params['InstanceName']
78
+ end
79
+ end
80
+
81
+ # CreateCluster请求参数结构体
82
+ class CreateClusterRequest < TencentCloud::Common::AbstractModel
83
+ # @param Placement: 集群中实例所在的位置。
84
+ # @type Placement: :class:`Tencentcloud::Thpc.v20211109.models.Placement`
85
+ # @param ManagerNode: 指定管理节点。
86
+ # @type ManagerNode: :class:`Tencentcloud::Thpc.v20211109.models.ManagerNode`
87
+ # @param ManagerNodeCount: 指定管理节点的数量。目前仅支持一个管理节点。
88
+ # @type ManagerNodeCount: Integer
89
+ # @param ComputeNode: 指定计算节点。
90
+ # @type ComputeNode: :class:`Tencentcloud::Thpc.v20211109.models.ComputeNode`
91
+ # @param ComputeNodeCount: 指定计算节点的数量。默认取值:0。
92
+ # @type ComputeNodeCount: Integer
93
+ # @param SchedulerType: 调度器类型。目前仅支持SGE调度器。
94
+ # @type SchedulerType: String
95
+ # @param ImageId: 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。目前仅支持公有镜像和自定义镜像。
96
+ # @type ImageId: String
97
+ # @param VirtualPrivateCloud: 私有网络相关信息配置。
98
+ # @type VirtualPrivateCloud: :class:`Tencentcloud::Thpc.v20211109.models.VirtualPrivateCloud`
99
+ # @param LoginSettings: 集群登录设置。
100
+ # @type LoginSettings: :class:`Tencentcloud::Thpc.v20211109.models.LoginSettings`
101
+ # @param SecurityGroupIds: 集群中实例所属安全组。该参数可以通过调用 [DescribeSecurityGroups](https://cloud.tencent.com/document/api/215/15808) 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。
102
+ # @type SecurityGroupIds: Array
103
+ # @param ClientToken: 用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。
104
+ # @type ClientToken: String
105
+ # @param DryRun: 是否只预检此次请求。
106
+ # true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制和云服务器库存。
107
+ # 如果检查不通过,则返回对应错误码;
108
+ # 如果检查通过,则返回RequestId.
109
+ # false(默认):发送正常请求,通过检查后直接创建实例
110
+ # @type DryRun: Boolean
111
+ # @param AccountType: 域名字服务类型。目前仅支持NIS域名字服务。
112
+ # @type AccountType: String
113
+ # @param ClusterName: 集群显示名称。
114
+ # @type ClusterName: String
115
+
116
+ attr_accessor :Placement, :ManagerNode, :ManagerNodeCount, :ComputeNode, :ComputeNodeCount, :SchedulerType, :ImageId, :VirtualPrivateCloud, :LoginSettings, :SecurityGroupIds, :ClientToken, :DryRun, :AccountType, :ClusterName
117
+
118
+ def initialize(placement=nil, managernode=nil, managernodecount=nil, computenode=nil, computenodecount=nil, schedulertype=nil, imageid=nil, virtualprivatecloud=nil, loginsettings=nil, securitygroupids=nil, clienttoken=nil, dryrun=nil, accounttype=nil, clustername=nil)
119
+ @Placement = placement
120
+ @ManagerNode = managernode
121
+ @ManagerNodeCount = managernodecount
122
+ @ComputeNode = computenode
123
+ @ComputeNodeCount = computenodecount
124
+ @SchedulerType = schedulertype
125
+ @ImageId = imageid
126
+ @VirtualPrivateCloud = virtualprivatecloud
127
+ @LoginSettings = loginsettings
128
+ @SecurityGroupIds = securitygroupids
129
+ @ClientToken = clienttoken
130
+ @DryRun = dryrun
131
+ @AccountType = accounttype
132
+ @ClusterName = clustername
133
+ end
134
+
135
+ def deserialize(params)
136
+ unless params['Placement'].nil?
137
+ @Placement = Placement.new
138
+ @Placement.deserialize(params['Placement'])
139
+ end
140
+ unless params['ManagerNode'].nil?
141
+ @ManagerNode = ManagerNode.new
142
+ @ManagerNode.deserialize(params['ManagerNode'])
143
+ end
144
+ @ManagerNodeCount = params['ManagerNodeCount']
145
+ unless params['ComputeNode'].nil?
146
+ @ComputeNode = ComputeNode.new
147
+ @ComputeNode.deserialize(params['ComputeNode'])
148
+ end
149
+ @ComputeNodeCount = params['ComputeNodeCount']
150
+ @SchedulerType = params['SchedulerType']
151
+ @ImageId = params['ImageId']
152
+ unless params['VirtualPrivateCloud'].nil?
153
+ @VirtualPrivateCloud = VirtualPrivateCloud.new
154
+ @VirtualPrivateCloud.deserialize(params['VirtualPrivateCloud'])
155
+ end
156
+ unless params['LoginSettings'].nil?
157
+ @LoginSettings = LoginSettings.new
158
+ @LoginSettings.deserialize(params['LoginSettings'])
159
+ end
160
+ @SecurityGroupIds = params['SecurityGroupIds']
161
+ @ClientToken = params['ClientToken']
162
+ @DryRun = params['DryRun']
163
+ @AccountType = params['AccountType']
164
+ @ClusterName = params['ClusterName']
165
+ end
166
+ end
167
+
168
+ # CreateCluster返回参数结构体
169
+ class CreateClusterResponse < TencentCloud::Common::AbstractModel
170
+ # @param ClusterId: 集群ID。
171
+ # @type ClusterId: String
172
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
173
+ # @type RequestId: String
174
+
175
+ attr_accessor :ClusterId, :RequestId
176
+
177
+ def initialize(clusterid=nil, requestid=nil)
178
+ @ClusterId = clusterid
179
+ @RequestId = requestid
180
+ end
181
+
182
+ def deserialize(params)
183
+ @ClusterId = params['ClusterId']
184
+ @RequestId = params['RequestId']
185
+ end
186
+ end
187
+
188
+ # 描述了数据盘的信息
189
+ class DataDisk < TencentCloud::Common::AbstractModel
190
+ # @param DiskSize: 数据盘大小,单位:GB。最小调整步长为10G,不同数据盘类型取值范围不同,具体限制详见:[存储概述](https://cloud.tencent.com/document/product/213/4952)。默认值为0,表示不购买数据盘。更多限制详见产品文档。
191
+ # @type DiskSize: Integer
192
+ # @param DiskType: 数据盘类型。数据盘类型限制详见[存储概述](https://cloud.tencent.com/document/product/213/4952)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>LOCAL_NVME:本地NVME硬盘,与InstanceType强相关,不支持指定<br><li>LOCAL_PRO:本地HDD硬盘,与InstanceType强相关,不支持指定<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><li>CLOUD_HSSD:增强型SSD云硬盘<br><li>CLOUD_TSSD:极速型SSD云硬盘<br><br>默认取值:LOCAL_BASIC。
193
+ # @type DiskType: String
194
+
195
+ attr_accessor :DiskSize, :DiskType
196
+
197
+ def initialize(disksize=nil, disktype=nil)
198
+ @DiskSize = disksize
199
+ @DiskType = disktype
200
+ end
201
+
202
+ def deserialize(params)
203
+ @DiskSize = params['DiskSize']
204
+ @DiskType = params['DiskType']
205
+ end
206
+ end
207
+
208
+ # DeleteCluster请求参数结构体
209
+ class DeleteClusterRequest < TencentCloud::Common::AbstractModel
210
+ # @param ClusterId: 集群ID。
211
+ # @type ClusterId: String
212
+
213
+ attr_accessor :ClusterId
214
+
215
+ def initialize(clusterid=nil)
216
+ @ClusterId = clusterid
217
+ end
218
+
219
+ def deserialize(params)
220
+ @ClusterId = params['ClusterId']
221
+ end
222
+ end
223
+
224
+ # DeleteCluster返回参数结构体
225
+ class DeleteClusterResponse < TencentCloud::Common::AbstractModel
226
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
227
+ # @type RequestId: String
228
+
229
+ attr_accessor :RequestId
230
+
231
+ def initialize(requestid=nil)
232
+ @RequestId = requestid
233
+ end
234
+
235
+ def deserialize(params)
236
+ @RequestId = params['RequestId']
237
+ end
238
+ end
239
+
240
+ # 描述了实例的计费模式
241
+ class InstanceChargePrepaid < TencentCloud::Common::AbstractModel
242
+ # @param Period: 购买实例的时长,单位:月。取值范围:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48, 60。
243
+ # @type Period: Integer
244
+ # @param RenewFlag: 自动续费标识。取值范围:
245
+ # NOTIFY_AND_AUTO_RENEW:通知过期且自动续费
246
+ # NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费
247
+ # DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费
248
+
249
+ # 默认取值:NOTIFY_AND_MANUAL_RENEW。若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。
250
+ # @type RenewFlag: String
251
+
252
+ attr_accessor :Period, :RenewFlag
253
+
254
+ def initialize(period=nil, renewflag=nil)
255
+ @Period = period
256
+ @RenewFlag = renewflag
257
+ end
258
+
259
+ def deserialize(params)
260
+ @Period = params['Period']
261
+ @RenewFlag = params['RenewFlag']
262
+ end
263
+ end
264
+
265
+ # 描述了实例的公网可访问性,声明了实例的公网使用计费模式,最大带宽等
266
+ class InternetAccessible < TencentCloud::Common::AbstractModel
267
+ # @param InternetChargeType: 网络计费类型。取值范围:
268
+ # BANDWIDTH_PREPAID:预付费按带宽结算
269
+ # TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费
270
+ # BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费
271
+ # BANDWIDTH_PACKAGE:带宽包用户
272
+ # 默认取值:非带宽包用户默认与子机付费类型保持一致。
273
+ # @type InternetChargeType: String
274
+ # @param InternetMaxBandwidthOut: 公网出带宽上限,单位:Mbps。默认值:0Mbps。不同机型带宽上限范围不一致,具体限制详见购买网络带宽。
275
+ # @type InternetMaxBandwidthOut: Integer
276
+
277
+ attr_accessor :InternetChargeType, :InternetMaxBandwidthOut
278
+
279
+ def initialize(internetchargetype=nil, internetmaxbandwidthout=nil)
280
+ @InternetChargeType = internetchargetype
281
+ @InternetMaxBandwidthOut = internetmaxbandwidthout
282
+ end
283
+
284
+ def deserialize(params)
285
+ @InternetChargeType = params['InternetChargeType']
286
+ @InternetMaxBandwidthOut = params['InternetMaxBandwidthOut']
287
+ end
288
+ end
289
+
290
+ # 描述了实例登录相关配置与信息。
291
+ class LoginSettings < TencentCloud::Common::AbstractModel
292
+ # @param Password: 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:<br><li>Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。<br><li>Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。<br><br>若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。
293
+ # @type Password: String
294
+
295
+ attr_accessor :Password
296
+
297
+ def initialize(password=nil)
298
+ @Password = password
299
+ end
300
+
301
+ def deserialize(params)
302
+ @Password = params['Password']
303
+ end
304
+ end
305
+
306
+ # 管控节点信息
307
+ class ManagerNode < TencentCloud::Common::AbstractModel
308
+ # @param InstanceChargeType: 节点[计费类型](https://cloud.tencent.com/document/product/213/2180)。<br><li>PREPAID:预付费,即包年包月<br><li>POSTPAID_BY_HOUR:按小时后付费<br>默认值:POSTPAID_BY_HOUR。
309
+ # @type InstanceChargeType: String
310
+ # @param InstanceChargePrepaid: 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月节点的购买时长、是否设置自动续费等属性。若指定节点的付费模式为预付费则该参数必传。
311
+ # @type InstanceChargePrepaid: :class:`Tencentcloud::Thpc.v20211109.models.InstanceChargePrepaid`
312
+ # @param InstanceType: 节点机型。不同实例机型指定了不同的资源规格。
313
+ # <br><li>对于付费模式为PREPAID或POSTPAID\_BY\_HOUR的实例创建,具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。
314
+ # @type InstanceType: String
315
+ # @param SystemDisk: 节点系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。
316
+ # @type SystemDisk: :class:`Tencentcloud::Thpc.v20211109.models.SystemDisk`
317
+ # @param DataDisks: 节点数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。
318
+ # @type DataDisks: Array
319
+ # @param InternetAccessible: 公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。
320
+ # @type InternetAccessible: :class:`Tencentcloud::Thpc.v20211109.models.InternetAccessible`
321
+ # @param InstanceName: 节点显示名称。<br><li>
322
+ # 不指定节点显示名称则默认显示‘未命名’。
323
+ # </li><li>购买多个节点,如果指定模式串`{R:x}`,表示生成数字[`[x, x+n-1]`,其中`n`表示购买节点的数量,例如`server_{R:3}`,购买1个时,节点显示名称为`server_3`;购买2个时,节点显示名称分别为`server_3`,`server_4`。支持指定多个模式串`{R:x}`。
324
+ # 购买多个节点,如果不指定模式串,则在节点显示名称添加后缀`1、2...n`,其中`n`表示购买节点的数量,例如`server_`,购买2个时,节点显示名称分别为`server_1`,`server_2`。</li><li>
325
+ # 最多支持60个字符(包含模式串)。
326
+ # @type InstanceName: String
327
+
328
+ attr_accessor :InstanceChargeType, :InstanceChargePrepaid, :InstanceType, :SystemDisk, :DataDisks, :InternetAccessible, :InstanceName
329
+
330
+ def initialize(instancechargetype=nil, instancechargeprepaid=nil, instancetype=nil, systemdisk=nil, datadisks=nil, internetaccessible=nil, instancename=nil)
331
+ @InstanceChargeType = instancechargetype
332
+ @InstanceChargePrepaid = instancechargeprepaid
333
+ @InstanceType = instancetype
334
+ @SystemDisk = systemdisk
335
+ @DataDisks = datadisks
336
+ @InternetAccessible = internetaccessible
337
+ @InstanceName = instancename
338
+ end
339
+
340
+ def deserialize(params)
341
+ @InstanceChargeType = params['InstanceChargeType']
342
+ unless params['InstanceChargePrepaid'].nil?
343
+ @InstanceChargePrepaid = InstanceChargePrepaid.new
344
+ @InstanceChargePrepaid.deserialize(params['InstanceChargePrepaid'])
345
+ end
346
+ @InstanceType = params['InstanceType']
347
+ unless params['SystemDisk'].nil?
348
+ @SystemDisk = SystemDisk.new
349
+ @SystemDisk.deserialize(params['SystemDisk'])
350
+ end
351
+ unless params['DataDisks'].nil?
352
+ @DataDisks = []
353
+ params['DataDisks'].each do |i|
354
+ datadisk_tmp = DataDisk.new
355
+ datadisk_tmp.deserialize(i)
356
+ @DataDisks << datadisk_tmp
357
+ end
358
+ end
359
+ unless params['InternetAccessible'].nil?
360
+ @InternetAccessible = InternetAccessible.new
361
+ @InternetAccessible.deserialize(params['InternetAccessible'])
362
+ end
363
+ @InstanceName = params['InstanceName']
364
+ end
365
+ end
366
+
367
+ # 描述了实例的抽象位置
368
+ class Placement < TencentCloud::Common::AbstractModel
369
+ # @param Zone: 实例所属的可用区名称。该参数可以通过调用 [DescribeZones](https://cloud.tencent.com/document/product/213/15707) 的返回值中的Zone字段来获取。
370
+ # @type Zone: String
371
+
372
+ attr_accessor :Zone
373
+
374
+ def initialize(zone=nil)
375
+ @Zone = zone
376
+ end
377
+
378
+ def deserialize(params)
379
+ @Zone = params['Zone']
380
+ end
381
+ end
382
+
383
+ # 描述了操作系统所在块设备即系统盘的信息
384
+ class SystemDisk < TencentCloud::Common::AbstractModel
385
+ # @param DiskType: 系统盘类型。系统盘类型限制详见存储概述。取值范围:
386
+ # LOCAL_BASIC:本地硬盘
387
+ # LOCAL_SSD:本地SSD硬盘
388
+ # CLOUD_BASIC:普通云硬盘
389
+ # CLOUD_SSD:SSD云硬盘
390
+ # CLOUD_PREMIUM:高性能云硬盘
391
+
392
+ # 默认取值:当前有库存的硬盘类型。
393
+ # @type DiskType: String
394
+ # @param DiskSize: 系统盘大小,单位:GB。默认值为 50
395
+ # @type DiskSize: Integer
396
+
397
+ attr_accessor :DiskType, :DiskSize
398
+
399
+ def initialize(disktype=nil, disksize=nil)
400
+ @DiskType = disktype
401
+ @DiskSize = disksize
402
+ end
403
+
404
+ def deserialize(params)
405
+ @DiskType = params['DiskType']
406
+ @DiskSize = params['DiskSize']
407
+ end
408
+ end
409
+
410
+ # 描述了VPC相关信息
411
+ class VirtualPrivateCloud < TencentCloud::Common::AbstractModel
412
+ # @param VpcId: 私有网络ID,形如`vpc-xxx`。有效的VpcId可通过登录[控制台](https://console.cloud.tencent.com/vpc/vpc?rid=1)查询;也可以调用接口 [DescribeVpcEx](/document/api/215/1372) ,从接口返回中的`unVpcId`字段获取。若在创建子机时VpcId与SubnetId同时传入`DEFAULT`,则强制使用默认vpc网络。
413
+ # @type VpcId: String
414
+ # @param SubnetId: 私有网络子网ID,形如`subnet-xxx`。有效的私有网络子网ID可通过登录[控制台](https://console.cloud.tencent.com/vpc/subnet?rid=1)查询;也可以调用接口 [DescribeSubnets](/document/api/215/15784) ,从接口返回中的`unSubnetId`字段获取。若在创建子机时SubnetId与VpcId同时传入`DEFAULT`,则强制使用默认vpc网络。
415
+ # @type SubnetId: String
416
+
417
+ attr_accessor :VpcId, :SubnetId
418
+
419
+ def initialize(vpcid=nil, subnetid=nil)
420
+ @VpcId = vpcid
421
+ @SubnetId = subnetid
422
+ end
423
+
424
+ def deserialize(params)
425
+ @VpcId = params['VpcId']
426
+ @SubnetId = params['SubnetId']
427
+ end
428
+ end
429
+
430
+ end
431
+ end
432
+ end
433
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-thpc
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.213
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-11-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ THPC.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-thpc.rb
38
+ - lib/v20211109/client.rb
39
+ - lib/v20211109/models.rb
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-thpc
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.6.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - THPC
66
+ test_files: []