-
Notifications
You must be signed in to change notification settings - Fork 16
/
client.rb
2176 lines (1991 loc) · 103 KB
/
client.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# frozen_string_literal: true
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'json'
module TencentCloud
module Tcb
module V20180608
class Client < TencentCloud::Common::AbstractClient
def initialize(credential, region, profile = nil)
api_version = '2018-06-08'
api_endpoint = 'tcb.tencentcloudapi.com'
sdk_version = 'TCB_' + File.read(File.expand_path('../VERSION', __dir__)).strip
super(credential, region, api_version, api_endpoint, sdk_version, profile)
end
# 绑定另外一个环境下的网关,callContainer请求可以访问到该网关
# @param request: Request instance for BindEnvGateway.
# @type request: :class:`Tencentcloud::tcb::V20180608::BindEnvGatewayRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::BindEnvGatewayResponse`
def BindEnvGateway(request)
body = send_request('BindEnvGateway', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = BindEnvGatewayResponse.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
# 检查是否开通Tcb服务
# @param request: Request instance for CheckTcbService.
# @type request: :class:`Tencentcloud::tcb::V20180608::CheckTcbServiceRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CheckTcbServiceResponse`
def CheckTcbService(request)
body = send_request('CheckTcbService', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CheckTcbServiceResponse.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
# TCB云API统一入口
# @param request: Request instance for CommonServiceAPI.
# @type request: :class:`Tencentcloud::tcb::V20180608::CommonServiceAPIRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CommonServiceAPIResponse`
def CommonServiceAPI(request)
body = send_request('CommonServiceAPI', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CommonServiceAPIResponse.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
# 创建云开发项目
# @param request: Request instance for CreateAndDeployCloudBaseProject.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateAndDeployCloudBaseProjectRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateAndDeployCloudBaseProjectResponse`
def CreateAndDeployCloudBaseProject(request)
body = send_request('CreateAndDeployCloudBaseProject', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateAndDeployCloudBaseProjectResponse.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
# 增加安全域名
# @param request: Request instance for CreateAuthDomain.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateAuthDomainRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateAuthDomainResponse`
def CreateAuthDomain(request)
body = send_request('CreateAuthDomain', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateAuthDomainResponse.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
# 开通容器托管的资源,包括集群创建,VPC配置,异步任务创建,镜像托管,Coding等,查看创建结果需要根据DescribeCloudBaseRunResource接口来查看
# @param request: Request instance for CreateCloudBaseRunResource.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateCloudBaseRunResourceRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateCloudBaseRunResourceResponse`
def CreateCloudBaseRunResource(request)
body = send_request('CreateCloudBaseRunResource', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateCloudBaseRunResourceResponse.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
# 创建服务版本
# @param request: Request instance for CreateCloudBaseRunServerVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateCloudBaseRunServerVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateCloudBaseRunServerVersionResponse`
def CreateCloudBaseRunServerVersion(request)
body = send_request('CreateCloudBaseRunServerVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateCloudBaseRunServerVersionResponse.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
# 创建托管域名
# @param request: Request instance for CreateHostingDomain.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateHostingDomainRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateHostingDomainResponse`
def CreateHostingDomain(request)
body = send_request('CreateHostingDomain', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateHostingDomainResponse.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
# 开通后付费资源
# @param request: Request instance for CreatePostpayPackage.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreatePostpayPackageRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreatePostpayPackageResponse`
def CreatePostpayPackage(request)
body = send_request('CreatePostpayPackage', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreatePostpayPackageResponse.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
# 本接口(CreateStandaloneGateway)用于创建独立网关。
# @param request: Request instance for CreateStandaloneGateway.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateStandaloneGatewayRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateStandaloneGatewayResponse`
def CreateStandaloneGateway(request)
body = send_request('CreateStandaloneGateway', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateStandaloneGatewayResponse.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
# 创建静态托管资源,包括COS和CDN,异步任务创建,查看创建结果需要根据DescribeStaticStore接口来查看
# @param request: Request instance for CreateStaticStore.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateStaticStoreRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateStaticStoreResponse`
def CreateStaticStore(request)
body = send_request('CreateStaticStore', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateStaticStoreResponse.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
# 创建微信云托管
# @param request: Request instance for CreateWxCloudBaseRunEnv.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateWxCloudBaseRunEnvRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateWxCloudBaseRunEnvResponse`
def CreateWxCloudBaseRunEnv(request)
body = send_request('CreateWxCloudBaseRunEnv', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateWxCloudBaseRunEnvResponse.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
# 开通微信云托管MySQL数据库服务
# @param request: Request instance for CreateWxCloudBaseRunServerDBCluster.
# @type request: :class:`Tencentcloud::tcb::V20180608::CreateWxCloudBaseRunServerDBClusterRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::CreateWxCloudBaseRunServerDBClusterResponse`
def CreateWxCloudBaseRunServerDBCluster(request)
body = send_request('CreateWxCloudBaseRunServerDBCluster', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateWxCloudBaseRunServerDBClusterResponse.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
# 删除云项目
# @param request: Request instance for DeleteCloudBaseProjectLatestVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::DeleteCloudBaseProjectLatestVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DeleteCloudBaseProjectLatestVersionResponse`
def DeleteCloudBaseProjectLatestVersion(request)
body = send_request('DeleteCloudBaseProjectLatestVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteCloudBaseProjectLatestVersionResponse.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
# 删除服务版本
# @param request: Request instance for DeleteCloudBaseRunServerVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::DeleteCloudBaseRunServerVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DeleteCloudBaseRunServerVersionResponse`
def DeleteCloudBaseRunServerVersion(request)
body = send_request('DeleteCloudBaseRunServerVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteCloudBaseRunServerVersionResponse.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
# 删除终端用户
# @param request: Request instance for DeleteEndUser.
# @type request: :class:`Tencentcloud::tcb::V20180608::DeleteEndUserRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DeleteEndUserResponse`
def DeleteEndUser(request)
body = send_request('DeleteEndUser', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteEndUserResponse.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
# 删除网关某版本
# @param request: Request instance for DeleteGatewayVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::DeleteGatewayVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DeleteGatewayVersionResponse`
def DeleteGatewayVersion(request)
body = send_request('DeleteGatewayVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteGatewayVersionResponse.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
# 删除安全网关路由
# @param request: Request instance for DeleteWxGatewayRoute.
# @type request: :class:`Tencentcloud::tcb::V20180608::DeleteWxGatewayRouteRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DeleteWxGatewayRouteResponse`
def DeleteWxGatewayRoute(request)
body = send_request('DeleteWxGatewayRoute', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteWxGatewayRouteResponse.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
# 查询活动信息
# @param request: Request instance for DescribeActivityInfo.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeActivityInfoRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeActivityInfoResponse`
def DescribeActivityInfo(request)
body = send_request('DescribeActivityInfo', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeActivityInfoResponse.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
# 查询活动记录信息
# @param request: Request instance for DescribeActivityRecord.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeActivityRecordRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeActivityRecordResponse`
def DescribeActivityRecord(request)
body = send_request('DescribeActivityRecord', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeActivityRecordResponse.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
# 获取安全域名列表
# @param request: Request instance for DescribeAuthDomains.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeAuthDomainsRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeAuthDomainsResponse`
def DescribeAuthDomains(request)
body = send_request('DescribeAuthDomains', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeAuthDomainsResponse.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
# 获取新套餐列表,含详情,如果传了PackageId,则只获取指定套餐详情
# @param request: Request instance for DescribeBaasPackageList.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeBaasPackageListRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeBaasPackageListResponse`
def DescribeBaasPackageList(request)
body = send_request('DescribeBaasPackageList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeBaasPackageListResponse.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
# 获取计费相关信息
# @param request: Request instance for DescribeBillingInfo.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeBillingInfoRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeBillingInfoResponse`
def DescribeBillingInfo(request)
body = send_request('DescribeBillingInfo', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeBillingInfoResponse.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
# 查询服务版本的详情
# @param request: Request instance for DescribeCbrServerVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCbrServerVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCbrServerVersionResponse`
def DescribeCbrServerVersion(request)
body = send_request('DescribeCbrServerVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCbrServerVersionResponse.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
# 获取云托管代码上传url
# @param request: Request instance for DescribeCloudBaseBuildService.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseBuildServiceRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseBuildServiceResponse`
def DescribeCloudBaseBuildService(request)
body = send_request('DescribeCloudBaseBuildService', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseBuildServiceResponse.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
# 获取云开发项目列表
# @param request: Request instance for DescribeCloudBaseProjectLatestVersionList.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseProjectLatestVersionListRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseProjectLatestVersionListResponse`
def DescribeCloudBaseProjectLatestVersionList(request)
body = send_request('DescribeCloudBaseProjectLatestVersionList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseProjectLatestVersionListResponse.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
# 云项目部署列表
# @param request: Request instance for DescribeCloudBaseProjectVersionList.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseProjectVersionListRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseProjectVersionListResponse`
def DescribeCloudBaseProjectVersionList(request)
body = send_request('DescribeCloudBaseProjectVersionList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseProjectVersionListResponse.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
# 查询环境下所有的vpc列表
# @param request: Request instance for DescribeCloudBaseRunAllVpcs.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunAllVpcsRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunAllVpcsResponse`
def DescribeCloudBaseRunAllVpcs(request)
body = send_request('DescribeCloudBaseRunAllVpcs', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunAllVpcsResponse.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
# 独立网关中拉取云托管服务对应的配置信息
# @param request: Request instance for DescribeCloudBaseRunConfForGateWay.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunConfForGateWayRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunConfForGateWayResponse`
def DescribeCloudBaseRunConfForGateWay(request)
body = send_request('DescribeCloudBaseRunConfForGateWay', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunConfForGateWayResponse.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
# 查询一键部署任务 (特定接口:外部查询使用)
# @param request: Request instance for DescribeCloudBaseRunOneClickTaskExternal.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunOneClickTaskExternalRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunOneClickTaskExternalResponse`
def DescribeCloudBaseRunOneClickTaskExternal(request)
body = send_request('DescribeCloudBaseRunOneClickTaskExternal', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunOneClickTaskExternalResponse.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
# 查询服务、版本和操作类型
# @param request: Request instance for DescribeCloudBaseRunOperationTypes.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunOperationTypesRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunOperationTypesResponse`
def DescribeCloudBaseRunOperationTypes(request)
body = send_request('DescribeCloudBaseRunOperationTypes', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunOperationTypesResponse.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
# 查询云应用服务版本容器列表
# @param request: Request instance for DescribeCloudBaseRunPodList.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunPodListRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunPodListResponse`
def DescribeCloudBaseRunPodList(request)
body = send_request('DescribeCloudBaseRunPodList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunPodListResponse.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
# 查看容器托管的集群状态
# @param request: Request instance for DescribeCloudBaseRunResource.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunResourceRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunResourceResponse`
def DescribeCloudBaseRunResource(request)
body = send_request('DescribeCloudBaseRunResource', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunResourceResponse.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
# 查看容器托管的集群状态扩展使用
# @param request: Request instance for DescribeCloudBaseRunResourceForExtend.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunResourceForExtendRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunResourceForExtendResponse`
def DescribeCloudBaseRunResourceForExtend(request)
body = send_request('DescribeCloudBaseRunResourceForExtend', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunResourceForExtendResponse.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
# 查询单个服务的详情,版本以及详情
# @param request: Request instance for DescribeCloudBaseRunServer.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunServerRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunServerResponse`
def DescribeCloudBaseRunServer(request)
body = send_request('DescribeCloudBaseRunServer', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunServerResponse.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
# 查询微信云托管服务域名
# @param request: Request instance for DescribeCloudBaseRunServerDomainName.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunServerDomainNameRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunServerDomainNameResponse`
def DescribeCloudBaseRunServerDomainName(request)
body = send_request('DescribeCloudBaseRunServerDomainName', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunServerDomainNameResponse.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
# 查询服务版本的详情,CPU和MEM 请使用CPUSize和MemSize
# @param request: Request instance for DescribeCloudBaseRunServerVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunServerVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunServerVersionResponse`
def DescribeCloudBaseRunServerVersion(request)
body = send_request('DescribeCloudBaseRunServerVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunServerVersionResponse.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
# 查询服务版本详情(新)
# @param request: Request instance for DescribeCloudBaseRunVersion.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunVersionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunVersionResponse`
def DescribeCloudBaseRunVersion(request)
body = send_request('DescribeCloudBaseRunVersion', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunVersionResponse.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
# DescribeCloudBaseRunVersionRsByCondition 获取云托管详情
# @param request: Request instance for DescribeCloudBaseRunVersionRsByCondition.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunVersionRsByConditionRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunVersionRsByConditionResponse`
def DescribeCloudBaseRunVersionRsByCondition(request)
body = send_request('DescribeCloudBaseRunVersionRsByCondition', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunVersionRsByConditionResponse.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
# 查询版本历史
# @param request: Request instance for DescribeCloudBaseRunVersionSnapshot.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunVersionSnapshotRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCloudBaseRunVersionSnapshotResponse`
def DescribeCloudBaseRunVersionSnapshot(request)
body = send_request('DescribeCloudBaseRunVersionSnapshot', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeCloudBaseRunVersionSnapshotResponse.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
# 根据用户传入的指标, 拉取一段时间内的监控数据。
# @param request: Request instance for DescribeCurveData.
# @type request: :class:`Tencentcloud::tcb::V20180608::DescribeCurveDataRequest`
# @rtype: :class:`Tencentcloud::tcb::V20180608::DescribeCurveDataResponse`
def DescribeCurveData(request)
body = send_request('DescribeCurveData', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false