-
Notifications
You must be signed in to change notification settings - Fork 251
/
cynosdb_client.py
3453 lines (2853 loc) · 140 KB
/
cynosdb_client.py
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
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 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.
import json
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.common.abstract_client import AbstractClient
from tencentcloud.cynosdb.v20190107 import models
class CynosdbClient(AbstractClient):
_apiVersion = '2019-01-07'
_endpoint = 'cynosdb.tencentcloudapi.com'
_service = 'cynosdb'
def ActivateInstance(self, request):
"""本接口(ActivateInstance)用于恢复已隔离的实例访问。
:param request: Request instance for ActivateInstance.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.ActivateInstanceRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.ActivateInstanceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ActivateInstance", params, headers=headers)
response = json.loads(body)
model = models.ActivateInstanceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def AddClusterSlaveZone(self, request):
"""本接口(AddClusterSlaveZone)用于对集群开启多可用区部署。
:param request: Request instance for AddClusterSlaveZone.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.AddClusterSlaveZoneRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.AddClusterSlaveZoneResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("AddClusterSlaveZone", params, headers=headers)
response = json.loads(body)
model = models.AddClusterSlaveZoneResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def AddInstances(self, request):
"""本接口(AddInstances)用于集群添加实例。
:param request: Request instance for AddInstances.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.AddInstancesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.AddInstancesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("AddInstances", params, headers=headers)
response = json.loads(body)
model = models.AddInstancesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def AssociateSecurityGroups(self, request):
"""本接口(AssociateSecurityGroups)用于安全组批量绑定云资源。
:param request: Request instance for AssociateSecurityGroups.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.AssociateSecurityGroupsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.AssociateSecurityGroupsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("AssociateSecurityGroups", params, headers=headers)
response = json.loads(body)
model = models.AssociateSecurityGroupsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def BindClusterResourcePackages(self, request):
"""本接口(BindClusterResourcePackages)用于为集群绑定资源包。
:param request: Request instance for BindClusterResourcePackages.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.BindClusterResourcePackagesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.BindClusterResourcePackagesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("BindClusterResourcePackages", params, headers=headers)
response = json.loads(body)
model = models.BindClusterResourcePackagesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CloseAuditService(self, request):
"""本接口(CloseAuditService)用于关闭 TDSQL-C MySQL 实例的数据库审计服务。
:param request: Request instance for CloseAuditService.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CloseAuditServiceRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CloseAuditServiceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CloseAuditService", params, headers=headers)
response = json.loads(body)
model = models.CloseAuditServiceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CloseClusterPasswordComplexity(self, request):
"""本接口(CloseClusterPasswordComplexity)用于关闭集群密码复杂度。
:param request: Request instance for CloseClusterPasswordComplexity.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CloseClusterPasswordComplexityRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CloseClusterPasswordComplexityResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CloseClusterPasswordComplexity", params, headers=headers)
response = json.loads(body)
model = models.CloseClusterPasswordComplexityResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CloseProxy(self, request):
"""本接口(CloseProxy)用于关闭集群的数据库代理服务。
:param request: Request instance for CloseProxy.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CloseProxyRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CloseProxyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CloseProxy", params, headers=headers)
response = json.loads(body)
model = models.CloseProxyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CloseWan(self, request):
"""本接口(CloseWan)用于关闭外网。
:param request: Request instance for CloseWan.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CloseWanRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CloseWanResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CloseWan", params, headers=headers)
response = json.loads(body)
model = models.CloseWanResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CopyClusterPasswordComplexity(self, request):
"""本接口(CopyClusterPasswordComplexity)用于复制集群密码复杂度。
:param request: Request instance for CopyClusterPasswordComplexity.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CopyClusterPasswordComplexityRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CopyClusterPasswordComplexityResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CopyClusterPasswordComplexity", params, headers=headers)
response = json.loads(body)
model = models.CopyClusterPasswordComplexityResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAccounts(self, request):
"""本接口(CreateAccounts)用于创建用户账号。
:param request: Request instance for CreateAccounts.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateAccountsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateAccountsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAccounts", params, headers=headers)
response = json.loads(body)
model = models.CreateAccountsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAuditLogFile(self, request):
"""本接口(CreateAuditLogFile)用于创建云数据库实例的审计日志文件。
:param request: Request instance for CreateAuditLogFile.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateAuditLogFileRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateAuditLogFileResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAuditLogFile", params, headers=headers)
response = json.loads(body)
model = models.CreateAuditLogFileResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAuditRuleTemplate(self, request):
"""本接口(CreateAuditRuleTemplate)用于创建审计规则模板。
:param request: Request instance for CreateAuditRuleTemplate.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateAuditRuleTemplateRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateAuditRuleTemplateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAuditRuleTemplate", params, headers=headers)
response = json.loads(body)
model = models.CreateAuditRuleTemplateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateBackup(self, request):
"""本接口(CreateBackup)用于为集群创建手动备份。
:param request: Request instance for CreateBackup.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateBackupRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateBackupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateBackup", params, headers=headers)
response = json.loads(body)
model = models.CreateBackupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCLSDelivery(self, request):
"""本接口(CreateCLSDelivery)用于创建日志投递。
:param request: Request instance for CreateCLSDelivery.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateCLSDeliveryRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateCLSDeliveryResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCLSDelivery", params, headers=headers)
response = json.loads(body)
model = models.CreateCLSDeliveryResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateClusterDatabase(self, request):
"""本接口(CreateClusterDatabase)用于创建数据库。
:param request: Request instance for CreateClusterDatabase.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateClusterDatabaseRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateClusterDatabaseResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateClusterDatabase", params, headers=headers)
response = json.loads(body)
model = models.CreateClusterDatabaseResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateClusters(self, request):
"""本接口(CreateClusters)用于新购集群。
:param request: Request instance for CreateClusters.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateClustersRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateClustersResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateClusters", params, headers=headers)
response = json.loads(body)
model = models.CreateClustersResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateParamTemplate(self, request):
"""本接口(CreateParamTemplate)用于创建参数模板。
:param request: Request instance for CreateParamTemplate.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateParamTemplateRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateParamTemplateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateParamTemplate", params, headers=headers)
response = json.loads(body)
model = models.CreateParamTemplateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateProxy(self, request):
"""本接口(CreateProxy)用于开启集群的数据库代理。
:param request: Request instance for CreateProxy.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateProxyRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateProxyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateProxy", params, headers=headers)
response = json.loads(body)
model = models.CreateProxyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateProxyEndPoint(self, request):
"""本接口(CreateProxyEndPoint)用于创建数据库代理连接点。
:param request: Request instance for CreateProxyEndPoint.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateProxyEndPointRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateProxyEndPointResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateProxyEndPoint", params, headers=headers)
response = json.loads(body)
model = models.CreateProxyEndPointResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateResourcePackage(self, request):
"""本接口(CreateResourcePackage)用于新购资源包。
:param request: Request instance for CreateResourcePackage.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.CreateResourcePackageRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.CreateResourcePackageResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateResourcePackage", params, headers=headers)
response = json.loads(body)
model = models.CreateResourcePackageResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAccounts(self, request):
"""本接口(DeleteAccounts)用于删除用户账号。
:param request: Request instance for DeleteAccounts.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteAccountsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteAccountsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAccounts", params, headers=headers)
response = json.loads(body)
model = models.DeleteAccountsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAuditLogFile(self, request):
"""本接口(DeleteAuditLogFile)用于删除云数据库实例的审计日志文件。
:param request: Request instance for DeleteAuditLogFile.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteAuditLogFileRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteAuditLogFileResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAuditLogFile", params, headers=headers)
response = json.loads(body)
model = models.DeleteAuditLogFileResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAuditRuleTemplates(self, request):
"""本接口(DeleteAuditRuleTemplates)用于删除审计规则模板。
:param request: Request instance for DeleteAuditRuleTemplates.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteAuditRuleTemplatesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteAuditRuleTemplatesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAuditRuleTemplates", params, headers=headers)
response = json.loads(body)
model = models.DeleteAuditRuleTemplatesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteBackup(self, request):
"""本接口(DeleteBackup)用于为集群删除手动备份,无法删除自动备份。
:param request: Request instance for DeleteBackup.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteBackupRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteBackupResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteBackup", params, headers=headers)
response = json.loads(body)
model = models.DeleteBackupResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteCLSDelivery(self, request):
"""本接口(DeleteCLSDelivery)用于删除日志投递。
:param request: Request instance for DeleteCLSDelivery.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteCLSDeliveryRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteCLSDeliveryResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteCLSDelivery", params, headers=headers)
response = json.loads(body)
model = models.DeleteCLSDeliveryResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteClusterDatabase(self, request):
"""本接口(DeleteClusterDatabase)用于删除数据库。
:param request: Request instance for DeleteClusterDatabase.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteClusterDatabaseRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteClusterDatabaseResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteClusterDatabase", params, headers=headers)
response = json.loads(body)
model = models.DeleteClusterDatabaseResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteParamTemplate(self, request):
"""本接口(DeleteParamTemplate)用于删除用户创建的参数模板。
:param request: Request instance for DeleteParamTemplate.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DeleteParamTemplateRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DeleteParamTemplateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteParamTemplate", params, headers=headers)
response = json.loads(body)
model = models.DeleteParamTemplateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAccountAllGrantPrivileges(self, request):
"""本接口(DescribeAccountAllGrantPrivileges)用于查询账号所有可授予的权限。
:param request: Request instance for DescribeAccountAllGrantPrivileges.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAccountAllGrantPrivilegesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAccountAllGrantPrivilegesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAccountAllGrantPrivileges", params, headers=headers)
response = json.loads(body)
model = models.DescribeAccountAllGrantPrivilegesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAccountPrivileges(self, request):
"""本接口(DescribeAccountPrivileges)用于查询账号已有权限。
:param request: Request instance for DescribeAccountPrivileges.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAccountPrivilegesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAccountPrivilegesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAccountPrivileges", params, headers=headers)
response = json.loads(body)
model = models.DescribeAccountPrivilegesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAccounts(self, request):
"""本接口(DescribeAccounts)用于查询数据库账号列表。
:param request: Request instance for DescribeAccounts.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAccountsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAccountsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAccounts", params, headers=headers)
response = json.loads(body)
model = models.DescribeAccountsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAuditInstanceList(self, request):
"""本接口(DescribeAuditInstanceList)用于获取数据库审计的实例列表。
:param request: Request instance for DescribeAuditInstanceList.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditInstanceListRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditInstanceListResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAuditInstanceList", params, headers=headers)
response = json.loads(body)
model = models.DescribeAuditInstanceListResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAuditLogFiles(self, request):
"""本接口(DescribeAuditLogFiles)用于查询云数据库实例的审计日志文件。
:param request: Request instance for DescribeAuditLogFiles.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditLogFilesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditLogFilesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAuditLogFiles", params, headers=headers)
response = json.loads(body)
model = models.DescribeAuditLogFilesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAuditLogs(self, request):
"""本接口(DescribeAuditLogs)用于查询数据库审计日志。
:param request: Request instance for DescribeAuditLogs.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditLogsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditLogsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAuditLogs", params, headers=headers)
response = json.loads(body)
model = models.DescribeAuditLogsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAuditRuleTemplates(self, request):
"""本接口(DescribeAuditRuleTemplates)用于查询审计规则模板信息。
:param request: Request instance for DescribeAuditRuleTemplates.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditRuleTemplatesRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditRuleTemplatesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAuditRuleTemplates", params, headers=headers)
response = json.loads(body)
model = models.DescribeAuditRuleTemplatesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAuditRuleWithInstanceIds(self, request):
"""获取实例的审计规则
:param request: Request instance for DescribeAuditRuleWithInstanceIds.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditRuleWithInstanceIdsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeAuditRuleWithInstanceIdsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAuditRuleWithInstanceIds", params, headers=headers)
response = json.loads(body)
model = models.DescribeAuditRuleWithInstanceIdsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBackupConfig(self, request):
"""本接口(DescribeBackupConfig)用于获取指定集群的备份配置信息,包括全量备份时间段、备份文件保留时间。
:param request: Request instance for DescribeBackupConfig.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBackupConfigRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBackupConfigResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBackupConfig", params, headers=headers)
response = json.loads(body)
model = models.DescribeBackupConfigResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBackupDownloadUrl(self, request):
"""本接口(DescribeBackupDownloadUrl)用于查询集群备份文件下载地址。
:param request: Request instance for DescribeBackupDownloadUrl.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBackupDownloadUrlRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBackupDownloadUrlResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBackupDownloadUrl", params, headers=headers)
response = json.loads(body)
model = models.DescribeBackupDownloadUrlResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBackupList(self, request):
"""本接口(DescribeBackupList)用于查询集群的备份文件列表。
:param request: Request instance for DescribeBackupList.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBackupListRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBackupListResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBackupList", params, headers=headers)
response = json.loads(body)
model = models.DescribeBackupListResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBinlogConfig(self, request):
"""该接口(DescribeBinlogConfig)用于查询binlog配置
:param request: Request instance for DescribeBinlogConfig.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogConfigRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogConfigResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBinlogConfig", params, headers=headers)
response = json.loads(body)
model = models.DescribeBinlogConfigResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBinlogDownloadUrl(self, request):
"""本接口(DescribeBinlogDownloadUrl)用于查询 Binlog 的下载地址。
:param request: Request instance for DescribeBinlogDownloadUrl.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogDownloadUrlRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogDownloadUrlResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBinlogDownloadUrl", params, headers=headers)
response = json.loads(body)
model = models.DescribeBinlogDownloadUrlResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBinlogSaveDays(self, request):
"""此接口(DescribeBinlogSaveDays)用于查询集群的Binlog保留天数。
:param request: Request instance for DescribeBinlogSaveDays.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogSaveDaysRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogSaveDaysResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeBinlogSaveDays", params, headers=headers)
response = json.loads(body)
model = models.DescribeBinlogSaveDaysResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeBinlogs(self, request):
"""本接口(DescribeBinlogs)用来查询集群 Binlog 日志列表。
:param request: Request instance for DescribeBinlogs.
:type request: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogsRequest`
:rtype: :class:`tencentcloud.cynosdb.v20190107.models.DescribeBinlogsResponse`