tencentcloud-sdk-thpc 1.0.288 → 1.0.291
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 +4 -4
- data/lib/VERSION +1 -1
- data/lib/tencentcloud-sdk-thpc.rb +3 -0
- data/lib/v20211109/models.rb +126 -7
- data/lib/v20220401/client.rb +180 -0
- data/lib/v20220401/models.rb +1062 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e3dbe10743cf4a69a7bebc6cd78045b8fa07af7
|
|
4
|
+
data.tar.gz: f74772d6599455430e1d053bd5a593ea88c17520
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e07d09923e94f88116c37610c3af303a765a02859c33a2ed1d0d4002565d95a2e8af6d1b3211613b2cde9cfec7151feff06ca3039576c19b53f9d04bd4468642
|
|
7
|
+
data.tar.gz: c473f92a6c9fdb98a101096a71ff484b2b7610270b1d624a17f1d6c6409d31d742390125568241f05732e1e9d131d5da87d50dcbf7b0dc4a1e226af4ac26492d
|
data/lib/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.291
|
data/lib/v20211109/models.rb
CHANGED
|
@@ -87,7 +87,10 @@ module TencentCloud
|
|
|
87
87
|
# @type LocalPath: String
|
|
88
88
|
# @param RemotePath: 文件系统远程挂载ip及路径
|
|
89
89
|
# @type RemotePath: String
|
|
90
|
-
# @param Protocol: 文件系统协议类型,默认值NFS 3.0
|
|
90
|
+
# @param Protocol: 文件系统协议类型,默认值NFS 3.0。
|
|
91
|
+
# <li>NFS 3.0。
|
|
92
|
+
# <li>NFS 4.0。
|
|
93
|
+
# <li>TURBO。
|
|
91
94
|
# @type Protocol: String
|
|
92
95
|
# @param StorageType: 文件系统存储类型,默认值SD;其中 SD 为通用标准型标准型存储, HP为通用性能型存储, TB为turbo标准型, TP 为turbo性能型。
|
|
93
96
|
# @type StorageType: String
|
|
@@ -275,15 +278,15 @@ module TencentCloud
|
|
|
275
278
|
# @type Placement: :class:`Tencentcloud::Thpc.v20211109.models.Placement`
|
|
276
279
|
# @param ManagerNode: 指定管理节点。
|
|
277
280
|
# @type ManagerNode: :class:`Tencentcloud::Thpc.v20211109.models.ManagerNode`
|
|
278
|
-
# @param ManagerNodeCount:
|
|
281
|
+
# @param ManagerNodeCount: 指定管理节点的数量。默认取值:1。取值范围:1~2。
|
|
279
282
|
# @type ManagerNodeCount: Integer
|
|
280
283
|
# @param ComputeNode: 指定计算节点。
|
|
281
284
|
# @type ComputeNode: :class:`Tencentcloud::Thpc.v20211109.models.ComputeNode`
|
|
282
285
|
# @param ComputeNodeCount: 指定计算节点的数量。默认取值:0。
|
|
283
286
|
# @type ComputeNodeCount: Integer
|
|
284
|
-
# @param SchedulerType: 调度器类型。<br><li>SGE:SGE调度器。
|
|
287
|
+
# @param SchedulerType: 调度器类型。<br><li>SGE:SGE调度器。<br><li>SLURM:SLURM调度器。
|
|
285
288
|
# @type SchedulerType: String
|
|
286
|
-
# @param ImageId: 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx
|
|
289
|
+
# @param ImageId: 指定有效的[镜像](https://cloud.tencent.com/document/product/213/4940)ID,格式形如`img-xxx`。目前仅支持公有镜像。
|
|
287
290
|
# @type ImageId: String
|
|
288
291
|
# @param VirtualPrivateCloud: 私有网络相关信息配置。
|
|
289
292
|
# @type VirtualPrivateCloud: :class:`Tencentcloud::Thpc.v20211109.models.VirtualPrivateCloud`
|
|
@@ -299,16 +302,25 @@ module TencentCloud
|
|
|
299
302
|
# 如果检查通过,则返回RequestId.
|
|
300
303
|
# false(默认):发送正常请求,通过检查后直接创建实例
|
|
301
304
|
# @type DryRun: Boolean
|
|
302
|
-
# @param AccountType:
|
|
305
|
+
# @param AccountType: 域名字服务类型。默认值:NIS
|
|
306
|
+
# <li>NIS:NIS域名字服务。
|
|
303
307
|
# @type AccountType: String
|
|
304
308
|
# @param ClusterName: 集群显示名称。
|
|
305
309
|
# @type ClusterName: String
|
|
306
310
|
# @param StorageOption: 集群存储选项
|
|
307
311
|
# @type StorageOption: :class:`Tencentcloud::Thpc.v20211109.models.StorageOption`
|
|
312
|
+
# @param LoginNode: 已废弃。
|
|
313
|
+
# 指定登录节点。
|
|
314
|
+
# @type LoginNode: Array
|
|
315
|
+
# @param LoginNodeCount: 已废弃。
|
|
316
|
+
# 指定登录节点的数量。默认取值:0。取值范围:0~10。
|
|
317
|
+
# @type LoginNodeCount: Integer
|
|
318
|
+
# @param Tags: 创建集群时同时绑定的标签对说明。
|
|
319
|
+
# @type Tags: Array
|
|
308
320
|
|
|
309
|
-
attr_accessor :Placement, :ManagerNode, :ManagerNodeCount, :ComputeNode, :ComputeNodeCount, :SchedulerType, :ImageId, :VirtualPrivateCloud, :LoginSettings, :SecurityGroupIds, :ClientToken, :DryRun, :AccountType, :ClusterName, :StorageOption
|
|
321
|
+
attr_accessor :Placement, :ManagerNode, :ManagerNodeCount, :ComputeNode, :ComputeNodeCount, :SchedulerType, :ImageId, :VirtualPrivateCloud, :LoginSettings, :SecurityGroupIds, :ClientToken, :DryRun, :AccountType, :ClusterName, :StorageOption, :LoginNode, :LoginNodeCount, :Tags
|
|
310
322
|
|
|
311
|
-
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, storageoption=nil)
|
|
323
|
+
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, storageoption=nil, loginnode=nil, loginnodecount=nil, tags=nil)
|
|
312
324
|
@Placement = placement
|
|
313
325
|
@ManagerNode = managernode
|
|
314
326
|
@ManagerNodeCount = managernodecount
|
|
@@ -324,6 +336,9 @@ module TencentCloud
|
|
|
324
336
|
@AccountType = accounttype
|
|
325
337
|
@ClusterName = clustername
|
|
326
338
|
@StorageOption = storageoption
|
|
339
|
+
@LoginNode = loginnode
|
|
340
|
+
@LoginNodeCount = loginnodecount
|
|
341
|
+
@Tags = tags
|
|
327
342
|
end
|
|
328
343
|
|
|
329
344
|
def deserialize(params)
|
|
@@ -360,6 +375,23 @@ module TencentCloud
|
|
|
360
375
|
@StorageOption = StorageOption.new
|
|
361
376
|
@StorageOption.deserialize(params['StorageOption'])
|
|
362
377
|
end
|
|
378
|
+
unless params['LoginNode'].nil?
|
|
379
|
+
@LoginNode = []
|
|
380
|
+
params['LoginNode'].each do |i|
|
|
381
|
+
loginnode_tmp = LoginNode.new
|
|
382
|
+
loginnode_tmp.deserialize(i)
|
|
383
|
+
@LoginNode << loginnode_tmp
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
@LoginNodeCount = params['LoginNodeCount']
|
|
387
|
+
unless params['Tags'].nil?
|
|
388
|
+
@Tags = []
|
|
389
|
+
params['Tags'].each do |i|
|
|
390
|
+
tag_tmp = Tag.new
|
|
391
|
+
tag_tmp.deserialize(i)
|
|
392
|
+
@Tags << tag_tmp
|
|
393
|
+
end
|
|
394
|
+
end
|
|
363
395
|
end
|
|
364
396
|
end
|
|
365
397
|
|
|
@@ -565,6 +597,73 @@ module TencentCloud
|
|
|
565
597
|
end
|
|
566
598
|
end
|
|
567
599
|
|
|
600
|
+
# 登录节点信息。
|
|
601
|
+
class LoginNode < TencentCloud::Common::AbstractModel
|
|
602
|
+
# @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。
|
|
603
|
+
# @type InstanceChargeType: String
|
|
604
|
+
# @param InstanceChargePrepaid: 预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月节点的购买时长、是否设置自动续费等属性。若指定节点的付费模式为预付费则该参数必传。
|
|
605
|
+
# @type InstanceChargePrepaid: :class:`Tencentcloud::Thpc.v20211109.models.InstanceChargePrepaid`
|
|
606
|
+
# @param InstanceType: 节点机型。不同实例机型指定了不同的资源规格。
|
|
607
|
+
# <br><li>具体取值可通过调用接口[DescribeInstanceTypeConfigs](https://cloud.tencent.com/document/api/213/15749)来获得最新的规格表或参见[实例规格](https://cloud.tencent.com/document/product/213/11518)描述。
|
|
608
|
+
# @type InstanceType: String
|
|
609
|
+
# @param SystemDisk: 节点系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。
|
|
610
|
+
# @type SystemDisk: Array
|
|
611
|
+
# @param DataDisks: 节点数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。
|
|
612
|
+
# @type DataDisks: Array
|
|
613
|
+
# @param InternetAccessible: 节点数据盘配置信息。若不指定该参数,则默认不购买数据盘。支持购买的时候指定21块数据盘,其中最多包含1块LOCAL_BASIC数据盘或者LOCAL_SSD数据盘,最多包含20块CLOUD_BASIC数据盘、CLOUD_PREMIUM数据盘或者CLOUD_SSD数据盘。
|
|
614
|
+
# @type InternetAccessible: Array
|
|
615
|
+
# @param InstanceName: 节点显示名称。<br><li>
|
|
616
|
+
# 不指定节点显示名称则默认显示‘未命名’。
|
|
617
|
+
# 最多支持60个字符。
|
|
618
|
+
# @type InstanceName: String
|
|
619
|
+
|
|
620
|
+
attr_accessor :InstanceChargeType, :InstanceChargePrepaid, :InstanceType, :SystemDisk, :DataDisks, :InternetAccessible, :InstanceName
|
|
621
|
+
|
|
622
|
+
def initialize(instancechargetype=nil, instancechargeprepaid=nil, instancetype=nil, systemdisk=nil, datadisks=nil, internetaccessible=nil, instancename=nil)
|
|
623
|
+
@InstanceChargeType = instancechargetype
|
|
624
|
+
@InstanceChargePrepaid = instancechargeprepaid
|
|
625
|
+
@InstanceType = instancetype
|
|
626
|
+
@SystemDisk = systemdisk
|
|
627
|
+
@DataDisks = datadisks
|
|
628
|
+
@InternetAccessible = internetaccessible
|
|
629
|
+
@InstanceName = instancename
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
def deserialize(params)
|
|
633
|
+
@InstanceChargeType = params['InstanceChargeType']
|
|
634
|
+
unless params['InstanceChargePrepaid'].nil?
|
|
635
|
+
@InstanceChargePrepaid = InstanceChargePrepaid.new
|
|
636
|
+
@InstanceChargePrepaid.deserialize(params['InstanceChargePrepaid'])
|
|
637
|
+
end
|
|
638
|
+
@InstanceType = params['InstanceType']
|
|
639
|
+
unless params['SystemDisk'].nil?
|
|
640
|
+
@SystemDisk = []
|
|
641
|
+
params['SystemDisk'].each do |i|
|
|
642
|
+
systemdisk_tmp = SystemDisk.new
|
|
643
|
+
systemdisk_tmp.deserialize(i)
|
|
644
|
+
@SystemDisk << systemdisk_tmp
|
|
645
|
+
end
|
|
646
|
+
end
|
|
647
|
+
unless params['DataDisks'].nil?
|
|
648
|
+
@DataDisks = []
|
|
649
|
+
params['DataDisks'].each do |i|
|
|
650
|
+
datadisk_tmp = DataDisk.new
|
|
651
|
+
datadisk_tmp.deserialize(i)
|
|
652
|
+
@DataDisks << datadisk_tmp
|
|
653
|
+
end
|
|
654
|
+
end
|
|
655
|
+
unless params['InternetAccessible'].nil?
|
|
656
|
+
@InternetAccessible = []
|
|
657
|
+
params['InternetAccessible'].each do |i|
|
|
658
|
+
internetaccessible_tmp = InternetAccessible.new
|
|
659
|
+
internetaccessible_tmp.deserialize(i)
|
|
660
|
+
@InternetAccessible << internetaccessible_tmp
|
|
661
|
+
end
|
|
662
|
+
end
|
|
663
|
+
@InstanceName = params['InstanceName']
|
|
664
|
+
end
|
|
665
|
+
end
|
|
666
|
+
|
|
568
667
|
# 登录节点概览。
|
|
569
668
|
class LoginNodeOverview < TencentCloud::Common::AbstractModel
|
|
570
669
|
# @param NodeId: 登录节点ID。
|
|
@@ -752,6 +851,26 @@ module TencentCloud
|
|
|
752
851
|
end
|
|
753
852
|
end
|
|
754
853
|
|
|
854
|
+
# 标签键值对。
|
|
855
|
+
class Tag < TencentCloud::Common::AbstractModel
|
|
856
|
+
# @param Key: 标签键
|
|
857
|
+
# @type Key: String
|
|
858
|
+
# @param Value: 标签值
|
|
859
|
+
# @type Value: String
|
|
860
|
+
|
|
861
|
+
attr_accessor :Key, :Value
|
|
862
|
+
|
|
863
|
+
def initialize(key=nil, value=nil)
|
|
864
|
+
@Key = key
|
|
865
|
+
@Value = value
|
|
866
|
+
end
|
|
867
|
+
|
|
868
|
+
def deserialize(params)
|
|
869
|
+
@Key = params['Key']
|
|
870
|
+
@Value = params['Value']
|
|
871
|
+
end
|
|
872
|
+
end
|
|
873
|
+
|
|
755
874
|
# 描述了VPC相关信息
|
|
756
875
|
class VirtualPrivateCloud < TencentCloud::Common::AbstractModel
|
|
757
876
|
# @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网络。
|
|
@@ -0,0 +1,180 @@
|
|
|
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 V20220401
|
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
|
23
|
+
|
|
24
|
+
def initialize(credential, region, profile = nil)
|
|
25
|
+
api_version = '2022-04-01'
|
|
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
|
+
# 本接口(AddNodes)用于添加一个或者多个计算节点或者登录节点到指定集群。
|
|
33
|
+
|
|
34
|
+
# @param request: Request instance for AddNodes.
|
|
35
|
+
# @type request: :class:`Tencentcloud::thpc::V20220401::AddNodesRequest`
|
|
36
|
+
# @rtype: :class:`Tencentcloud::thpc::V20220401::AddNodesResponse`
|
|
37
|
+
def AddNodes(request)
|
|
38
|
+
body = send_request('AddNodes', request.serialize)
|
|
39
|
+
response = JSON.parse(body)
|
|
40
|
+
if response['Response'].key?('Error') == false
|
|
41
|
+
model = AddNodesResponse.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
|
+
# 本接口(BindAutoScalingGroup)用于为集群队列绑定弹性伸缩组
|
|
57
|
+
|
|
58
|
+
# @param request: Request instance for BindAutoScalingGroup.
|
|
59
|
+
# @type request: :class:`Tencentcloud::thpc::V20220401::BindAutoScalingGroupRequest`
|
|
60
|
+
# @rtype: :class:`Tencentcloud::thpc::V20220401::BindAutoScalingGroupResponse`
|
|
61
|
+
def BindAutoScalingGroup(request)
|
|
62
|
+
body = send_request('BindAutoScalingGroup', request.serialize)
|
|
63
|
+
response = JSON.parse(body)
|
|
64
|
+
if response['Response'].key?('Error') == false
|
|
65
|
+
model = BindAutoScalingGroupResponse.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
|
+
# 本接口 (CreateCluster) 用于创建并启动集群。
|
|
81
|
+
|
|
82
|
+
# @param request: Request instance for CreateCluster.
|
|
83
|
+
# @type request: :class:`Tencentcloud::thpc::V20220401::CreateClusterRequest`
|
|
84
|
+
# @rtype: :class:`Tencentcloud::thpc::V20220401::CreateClusterResponse`
|
|
85
|
+
def CreateCluster(request)
|
|
86
|
+
body = send_request('CreateCluster', request.serialize)
|
|
87
|
+
response = JSON.parse(body)
|
|
88
|
+
if response['Response'].key?('Error') == false
|
|
89
|
+
model = CreateClusterResponse.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
|
+
# 本接口(DeleteCluster)用于删除一个指定的集群。
|
|
105
|
+
|
|
106
|
+
# @param request: Request instance for DeleteCluster.
|
|
107
|
+
# @type request: :class:`Tencentcloud::thpc::V20220401::DeleteClusterRequest`
|
|
108
|
+
# @rtype: :class:`Tencentcloud::thpc::V20220401::DeleteClusterResponse`
|
|
109
|
+
def DeleteCluster(request)
|
|
110
|
+
body = send_request('DeleteCluster', request.serialize)
|
|
111
|
+
response = JSON.parse(body)
|
|
112
|
+
if response['Response'].key?('Error') == false
|
|
113
|
+
model = DeleteClusterResponse.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
|
+
# 本接口(DeleteNodes)用于删除指定集群中一个或者多个计算节点或者登录节点。
|
|
129
|
+
|
|
130
|
+
# @param request: Request instance for DeleteNodes.
|
|
131
|
+
# @type request: :class:`Tencentcloud::thpc::V20220401::DeleteNodesRequest`
|
|
132
|
+
# @rtype: :class:`Tencentcloud::thpc::V20220401::DeleteNodesResponse`
|
|
133
|
+
def DeleteNodes(request)
|
|
134
|
+
body = send_request('DeleteNodes', request.serialize)
|
|
135
|
+
response = JSON.parse(body)
|
|
136
|
+
if response['Response'].key?('Error') == false
|
|
137
|
+
model = DeleteNodesResponse.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
|
+
# 本接口(DescribeClusters)用于查询集群列表。
|
|
153
|
+
|
|
154
|
+
# @param request: Request instance for DescribeClusters.
|
|
155
|
+
# @type request: :class:`Tencentcloud::thpc::V20220401::DescribeClustersRequest`
|
|
156
|
+
# @rtype: :class:`Tencentcloud::thpc::V20220401::DescribeClustersResponse`
|
|
157
|
+
def DescribeClusters(request)
|
|
158
|
+
body = send_request('DescribeClusters', request.serialize)
|
|
159
|
+
response = JSON.parse(body)
|
|
160
|
+
if response['Response'].key?('Error') == false
|
|
161
|
+
model = DescribeClustersResponse.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
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|