Class: TencentCloud::Tic::V20201117::Client

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

def initialize(credential, region, profile = nil)
    api_version = '2020-11-17'
    api_endpoint = 'tic.tencentcloudapi.com'
    sdk_version = 'TIC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#ApplyStack(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::ApplyStackResponse`

Parameters:

  • request:

    Request instance for ApplyStack.



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/v20201117/client.rb', line 40

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

#CreateStack(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::CreateStackResponse`

Parameters:

  • request:

    Request instance for CreateStack.



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/v20201117/client.rb', line 64

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

#CreateStackVersion(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::CreateStackVersionResponse`

Parameters:

  • request:

    Request instance for CreateStackVersion.



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

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

#DeleteStack(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DeleteStackResponse`

Parameters:

  • request:

    Request instance for DeleteStack.



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

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

#DeleteStackVersion(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DeleteStackVersionResponse`

Parameters:

  • request:

    Request instance for DeleteStackVersion.



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

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

#DescribeStackEvent(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DescribeStackEventResponse`

Parameters:

  • request:

    Request instance for DescribeStackEvent.



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

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

#DescribeStackEvents(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DescribeStackEventsResponse`

Parameters:

  • request:

    Request instance for DescribeStackEvents.



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/v20201117/client.rb', line 188

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

#DescribeStacks(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DescribeStacksResponse`

Parameters:

  • request:

    Request instance for DescribeStacks.



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/v20201117/client.rb', line 243

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

#DescribeStackVersions(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DescribeStackVersionsResponse`

Parameters:

  • request:

    Request instance for DescribeStackVersions.



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/v20201117/client.rb', line 216

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

#DestroyStack(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::DestroyStackResponse`

Parameters:

  • request:

    Request instance for DestroyStack.



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/v20201117/client.rb', line 267

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

#PlanStack(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::PlanStackResponse`

Parameters:

  • request:

    Request instance for PlanStack.



294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/v20201117/client.rb', line 294

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

#UpdateStack(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::UpdateStackResponse`

Parameters:

  • request:

    Request instance for UpdateStack.



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/v20201117/client.rb', line 318

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

#UpdateStackVersion(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tic::V20201117::UpdateStackVersionResponse`

Parameters:

  • request:

    Request instance for UpdateStackVersion.



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/v20201117/client.rb', line 342

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