Class: TencentCloud::Thpc::V20220401::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20220401/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential, region, profile = nil) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/v20220401/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2022-04-01'
    api_endpoint = 'thpc.tencentcloudapi.com'
    sdk_version = 'THPC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#AddClusterStorageOption(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::AddClusterStorageOptionResponse`

Parameters:

  • request:

    Request instance for AddClusterStorageOption.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/v20220401/client.rb', line 37

def AddClusterStorageOption(request)
  body = send_request('AddClusterStorageOption', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = AddClusterStorageOptionResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#AddNodes(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::AddNodesResponse`

Parameters:

  • request:

    Request instance for AddNodes.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/v20220401/client.rb', line 61

def AddNodes(request)
  body = send_request('AddNodes', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = AddNodesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#AddQueue(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::AddQueueResponse`

Parameters:

  • request:

    Request instance for AddQueue.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/v20220401/client.rb', line 87

def AddQueue(request)
  body = send_request('AddQueue', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = AddQueueResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#BindAutoScalingGroup(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::BindAutoScalingGroupResponse`

Parameters:

  • request:

    Request instance for BindAutoScalingGroup.



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/v20220401/client.rb', line 111

def BindAutoScalingGroup(request)
  body = send_request('BindAutoScalingGroup', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = BindAutoScalingGroupResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateCluster(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::CreateClusterResponse`

Parameters:

  • request:

    Request instance for CreateCluster.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/v20220401/client.rb', line 137

def CreateCluster(request)
  body = send_request('CreateCluster', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateClusterResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteCluster(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DeleteClusterResponse`

Parameters:

  • request:

    Request instance for DeleteCluster.



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/v20220401/client.rb', line 161

def DeleteCluster(request)
  body = send_request('DeleteCluster', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteClusterResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteClusterStorageOption(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DeleteClusterStorageOptionResponse`

Parameters:

  • request:

    Request instance for DeleteClusterStorageOption.



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/v20220401/client.rb', line 185

def DeleteClusterStorageOption(request)
  body = send_request('DeleteClusterStorageOption', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteClusterStorageOptionResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteNodes(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DeleteNodesResponse`

Parameters:

  • request:

    Request instance for DeleteNodes.



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/v20220401/client.rb', line 209

def DeleteNodes(request)
  body = send_request('DeleteNodes', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteNodesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteQueue(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DeleteQueueResponse`

Parameters:

  • request:

    Request instance for DeleteQueue.



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/v20220401/client.rb', line 236

def DeleteQueue(request)
  body = send_request('DeleteQueue', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteQueueResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeAutoScalingConfiguration(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DescribeAutoScalingConfigurationResponse`

Parameters:

  • request:

    Request instance for DescribeAutoScalingConfiguration.



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/v20220401/client.rb', line 260

def DescribeAutoScalingConfiguration(request)
  body = send_request('DescribeAutoScalingConfiguration', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeAutoScalingConfigurationResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeClusterActivities(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DescribeClusterActivitiesResponse`

Parameters:

  • request:

    Request instance for DescribeClusterActivities.



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/v20220401/client.rb', line 284

def DescribeClusterActivities(request)
  body = send_request('DescribeClusterActivities', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeClusterActivitiesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeClusters(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DescribeClustersResponse`

Parameters:

  • request:

    Request instance for DescribeClusters.



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/v20220401/client.rb', line 332

def DescribeClusters(request)
  body = send_request('DescribeClusters', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeClustersResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeClusterStorageOption(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DescribeClusterStorageOptionResponse`

Parameters:

  • request:

    Request instance for DescribeClusterStorageOption.



308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/v20220401/client.rb', line 308

def DescribeClusterStorageOption(request)
  body = send_request('DescribeClusterStorageOption', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeClusterStorageOptionResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeNodes(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DescribeNodesResponse`

Parameters:

  • request:

    Request instance for DescribeNodes.



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/v20220401/client.rb', line 356

def DescribeNodes(request)
  body = send_request('DescribeNodes', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeNodesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeQueues(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::DescribeQueuesResponse`

Parameters:

  • request:

    Request instance for DescribeQueues.



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/v20220401/client.rb', line 380

def DescribeQueues(request)
  body = send_request('DescribeQueues', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeQueuesResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#SetAutoScalingConfiguration(request) ⇒ Object

@rtype: :class:‘Tencentcloud::thpc::V20220401::SetAutoScalingConfigurationResponse`

Parameters:

  • request:

    Request instance for SetAutoScalingConfiguration.



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/v20220401/client.rb', line 404

def SetAutoScalingConfiguration(request)
  body = send_request('SetAutoScalingConfiguration', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SetAutoScalingConfigurationResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end