Class: TencentCloud::Tke::V20220501::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20220501/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/v20220501/client.rb', line 24

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

Instance Method Details

#CreateHealthCheckPolicy(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::CreateHealthCheckPolicyResponse`

Parameters:

  • request:

    Request instance for CreateHealthCheckPolicy.



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

def CreateHealthCheckPolicy(request)
  body = send_request('CreateHealthCheckPolicy', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateHealthCheckPolicyResponse.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

#CreateNodePool(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::CreateNodePoolResponse`

Parameters:

  • request:

    Request instance for CreateNodePool.



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

def CreateNodePool(request)
  body = send_request('CreateNodePool', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateNodePoolResponse.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

#DeleteHealthCheckPolicy(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DeleteHealthCheckPolicyResponse`

Parameters:

  • request:

    Request instance for DeleteHealthCheckPolicy.



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

def DeleteHealthCheckPolicy(request)
  body = send_request('DeleteHealthCheckPolicy', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteHealthCheckPolicyResponse.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

#DeleteNodePool(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DeleteNodePoolResponse`

Parameters:

  • request:

    Request instance for DeleteNodePool.



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

def DeleteNodePool(request)
  body = send_request('DeleteNodePool', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteNodePoolResponse.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

#DescribeClusterInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DescribeClusterInstancesResponse`

Parameters:

  • request:

    Request instance for DescribeClusterInstances.



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/v20220501/client.rb', line 133

def DescribeClusterInstances(request)
  body = send_request('DescribeClusterInstances', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeClusterInstancesResponse.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

#DescribeHealthCheckPolicies(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DescribeHealthCheckPoliciesResponse`

Parameters:

  • request:

    Request instance for DescribeHealthCheckPolicies.



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/v20220501/client.rb', line 157

def DescribeHealthCheckPolicies(request)
  body = send_request('DescribeHealthCheckPolicies', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeHealthCheckPoliciesResponse.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

#DescribeHealthCheckPolicyBindings(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DescribeHealthCheckPolicyBindingsResponse`

Parameters:

  • request:

    Request instance for DescribeHealthCheckPolicyBindings.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/v20220501/client.rb', line 181

def DescribeHealthCheckPolicyBindings(request)
  body = send_request('DescribeHealthCheckPolicyBindings', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeHealthCheckPolicyBindingsResponse.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

#DescribeHealthCheckTemplate(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DescribeHealthCheckTemplateResponse`

Parameters:

  • request:

    Request instance for DescribeHealthCheckTemplate.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/v20220501/client.rb', line 205

def DescribeHealthCheckTemplate(request)
  body = send_request('DescribeHealthCheckTemplate', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeHealthCheckTemplateResponse.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

#DescribeNodePools(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::DescribeNodePoolsResponse`

Parameters:

  • request:

    Request instance for DescribeNodePools.



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/v20220501/client.rb', line 229

def DescribeNodePools(request)
  body = send_request('DescribeNodePools', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeNodePoolsResponse.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

#ModifyHealthCheckPolicy(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::ModifyHealthCheckPolicyResponse`

Parameters:

  • request:

    Request instance for ModifyHealthCheckPolicy.



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/v20220501/client.rb', line 253

def ModifyHealthCheckPolicy(request)
  body = send_request('ModifyHealthCheckPolicy', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyHealthCheckPolicyResponse.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

#ModifyNodePool(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::ModifyNodePoolResponse`

Parameters:

  • request:

    Request instance for ModifyNodePool.



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/v20220501/client.rb', line 277

def ModifyNodePool(request)
  body = send_request('ModifyNodePool', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyNodePoolResponse.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

#RebootMachines(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::RebootMachinesResponse`

Parameters:

  • request:

    Request instance for RebootMachines.



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'lib/v20220501/client.rb', line 301

def RebootMachines(request)
  body = send_request('RebootMachines', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = RebootMachinesResponse.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

#StartMachines(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::StartMachinesResponse`

Parameters:

  • request:

    Request instance for StartMachines.



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

def StartMachines(request)
  body = send_request('StartMachines', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = StartMachinesResponse.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

#StopMachines(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tke::V20220501::StopMachinesResponse`

Parameters:

  • request:

    Request instance for StopMachines.



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/v20220501/client.rb', line 360

def StopMachines(request)
  body = send_request('StopMachines', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = StopMachinesResponse.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