Class: TencentCloud::Ms::V20180408::Client

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

def initialize(credential, region, profile = nil)
    api_version = '2018-04-08'
    api_endpoint = 'ms.tencentcloudapi.com'
    sdk_version = 'MS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#CancelEncryptTask(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CancelEncryptTaskResponse`

Parameters:

  • request:

    Request instance for CancelEncryptTask.



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

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

#CreateBindInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateBindInstanceResponse`

Parameters:

  • request:

    Request instance for CreateBindInstance.



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

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

#CreateCosSecKeyInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateCosSecKeyInstanceResponse`

Parameters:

  • request:

    Request instance for CreateCosSecKeyInstance.



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

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

#CreateEncryptInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateEncryptInstanceResponse`

Parameters:

  • request:

    Request instance for CreateEncryptInstance.



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

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

#CreateOrderInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateOrderInstanceResponse`

Parameters:

  • request:

    Request instance for CreateOrderInstance.



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

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

#CreateResourceInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateResourceInstancesResponse`

Parameters:

  • request:

    Request instance for CreateResourceInstances.



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

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

#CreateShieldInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateShieldInstanceResponse`

Parameters:

  • request:

    Request instance for CreateShieldInstance.



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

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

#CreateShieldPlanInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::CreateShieldPlanInstanceResponse`

Parameters:

  • request:

    Request instance for CreateShieldPlanInstance.



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

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

#DeleteShieldInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DeleteShieldInstancesResponse`

Parameters:

  • request:

    Request instance for DeleteShieldInstances.



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/v20180408/client.rb', line 233

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

#DescribeApkDetectionResult(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeApkDetectionResultResponse`

Parameters:

  • request:

    Request instance for DescribeApkDetectionResult.



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/v20180408/client.rb', line 257

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

#DescribeEncryptInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeEncryptInstancesResponse`

Parameters:

  • request:

    Request instance for DescribeEncryptInstances.



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/v20180408/client.rb', line 281

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

#DescribeEncryptPlan(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeEncryptPlanResponse`

Parameters:

  • request:

    Request instance for DescribeEncryptPlan.



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/v20180408/client.rb', line 305

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

#DescribeOrderInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeOrderInstancesResponse`

Parameters:

  • request:

    Request instance for DescribeOrderInstances.



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

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

#DescribeResourceInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeResourceInstancesResponse`

Parameters:

  • request:

    Request instance for DescribeResourceInstances.



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

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

#DescribeShieldInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeShieldInstancesResponse`

Parameters:

  • request:

    Request instance for DescribeShieldInstances.



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

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

#DescribeShieldPlanInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeShieldPlanInstanceResponse`

Parameters:

  • request:

    Request instance for DescribeShieldPlanInstance.



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

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

#DescribeShieldResult(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeShieldResultResponse`

Parameters:

  • request:

    Request instance for DescribeShieldResult.



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/v20180408/client.rb', line 430

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

#DescribeUrlDetectionResult(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeUrlDetectionResultResponse`

Parameters:

  • request:

    Request instance for DescribeUrlDetectionResult.



454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/v20180408/client.rb', line 454

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

#DescribeUserBaseInfoInstance(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DescribeUserBaseInfoInstanceResponse`

Parameters:

  • request:

    Request instance for DescribeUserBaseInfoInstance.



478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/v20180408/client.rb', line 478

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

#DestroyResourceInstances(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::DestroyResourceInstancesResponse`

Parameters:

  • request:

    Request instance for DestroyResourceInstances.



503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/v20180408/client.rb', line 503

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

#RequestLocalTask(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::RequestLocalTaskResponse`

Parameters:

  • request:

    Request instance for RequestLocalTask.



527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/v20180408/client.rb', line 527

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

#UpdateClientState(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::UpdateClientStateResponse`

Parameters:

  • request:

    Request instance for UpdateClientState.



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/v20180408/client.rb', line 551

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

#UpdateLocalTaskResult(request) ⇒ Object

@rtype: :class:‘Tencentcloud::ms::V20180408::UpdateLocalTaskResultResponse`

Parameters:

  • request:

    Request instance for UpdateLocalTaskResult.



575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
# File 'lib/v20180408/client.rb', line 575

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