tencentcloud-sdk-python-postgres 3.0.935__py2.py3-none-any.whl → 3.0.952__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tencentcloud/__init__.py +1 -1
- tencentcloud/postgres/v20170312/errorcodes.py +12 -0
- tencentcloud/postgres/v20170312/models.py +825 -339
- tencentcloud/postgres/v20170312/postgres_client.py +164 -86
- {tencentcloud_sdk_python_postgres-3.0.935.dist-info → tencentcloud_sdk_python_postgres-3.0.952.dist-info}/METADATA +2 -1
- tencentcloud_sdk_python_postgres-3.0.952.dist-info/RECORD +10 -0
- tencentcloud_sdk_python_postgres-3.0.935.dist-info/RECORD +0 -10
- {tencentcloud_sdk_python_postgres-3.0.935.dist-info → tencentcloud_sdk_python_postgres-3.0.952.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python_postgres-3.0.935.dist-info → tencentcloud_sdk_python_postgres-3.0.952.dist-info}/top_level.txt +0 -0
|
@@ -46,7 +46,7 @@ class PostgresClient(AbstractClient):
|
|
|
46
46
|
if isinstance(e, TencentCloudSDKException):
|
|
47
47
|
raise
|
|
48
48
|
else:
|
|
49
|
-
raise TencentCloudSDKException(e.
|
|
49
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
def CloneDBInstance(self, request):
|
|
@@ -69,7 +69,7 @@ class PostgresClient(AbstractClient):
|
|
|
69
69
|
if isinstance(e, TencentCloudSDKException):
|
|
70
70
|
raise
|
|
71
71
|
else:
|
|
72
|
-
raise TencentCloudSDKException(e.
|
|
72
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
def CloseDBExtranetAccess(self, request):
|
|
@@ -92,7 +92,7 @@ class PostgresClient(AbstractClient):
|
|
|
92
92
|
if isinstance(e, TencentCloudSDKException):
|
|
93
93
|
raise
|
|
94
94
|
else:
|
|
95
|
-
raise TencentCloudSDKException(e.
|
|
95
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
def CloseServerlessDBExtranetAccess(self, request):
|
|
@@ -115,7 +115,7 @@ class PostgresClient(AbstractClient):
|
|
|
115
115
|
if isinstance(e, TencentCloudSDKException):
|
|
116
116
|
raise
|
|
117
117
|
else:
|
|
118
|
-
raise TencentCloudSDKException(e.
|
|
118
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
def CreateBaseBackup(self, request):
|
|
@@ -138,7 +138,7 @@ class PostgresClient(AbstractClient):
|
|
|
138
138
|
if isinstance(e, TencentCloudSDKException):
|
|
139
139
|
raise
|
|
140
140
|
else:
|
|
141
|
-
raise TencentCloudSDKException(e.
|
|
141
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
def CreateDBInstanceNetworkAccess(self, request):
|
|
@@ -161,7 +161,7 @@ class PostgresClient(AbstractClient):
|
|
|
161
161
|
if isinstance(e, TencentCloudSDKException):
|
|
162
162
|
raise
|
|
163
163
|
else:
|
|
164
|
-
raise TencentCloudSDKException(e.
|
|
164
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
def CreateDBInstances(self, request):
|
|
@@ -184,11 +184,13 @@ class PostgresClient(AbstractClient):
|
|
|
184
184
|
if isinstance(e, TencentCloudSDKException):
|
|
185
185
|
raise
|
|
186
186
|
else:
|
|
187
|
-
raise TencentCloudSDKException(e.
|
|
187
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
188
188
|
|
|
189
189
|
|
|
190
190
|
def CreateInstances(self, request):
|
|
191
191
|
"""本接口 (CreateInstances) 用于创建一个或者多个PostgreSQL实例,通过此接口创建的实例无需进行初始化,可直接使用。
|
|
192
|
+
<li>实例创建成功后将自动开机启动,实例状态变为“运行中”。
|
|
193
|
+
<li>预付费实例的购买会预先扣除本次实例购买所需金额,按小时后付费实例购买会预先冻结本次实例购买一小时内所需金额,在调用本接口前请确保账户余额充足。
|
|
192
194
|
|
|
193
195
|
:param request: Request instance for CreateInstances.
|
|
194
196
|
:type request: :class:`tencentcloud.postgres.v20170312.models.CreateInstancesRequest`
|
|
@@ -207,7 +209,7 @@ class PostgresClient(AbstractClient):
|
|
|
207
209
|
if isinstance(e, TencentCloudSDKException):
|
|
208
210
|
raise
|
|
209
211
|
else:
|
|
210
|
-
raise TencentCloudSDKException(e.
|
|
212
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
211
213
|
|
|
212
214
|
|
|
213
215
|
def CreateParameterTemplate(self, request):
|
|
@@ -230,7 +232,7 @@ class PostgresClient(AbstractClient):
|
|
|
230
232
|
if isinstance(e, TencentCloudSDKException):
|
|
231
233
|
raise
|
|
232
234
|
else:
|
|
233
|
-
raise TencentCloudSDKException(e.
|
|
235
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
234
236
|
|
|
235
237
|
|
|
236
238
|
def CreateReadOnlyDBInstance(self, request):
|
|
@@ -253,7 +255,7 @@ class PostgresClient(AbstractClient):
|
|
|
253
255
|
if isinstance(e, TencentCloudSDKException):
|
|
254
256
|
raise
|
|
255
257
|
else:
|
|
256
|
-
raise TencentCloudSDKException(e.
|
|
258
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
257
259
|
|
|
258
260
|
|
|
259
261
|
def CreateReadOnlyGroup(self, request):
|
|
@@ -276,7 +278,7 @@ class PostgresClient(AbstractClient):
|
|
|
276
278
|
if isinstance(e, TencentCloudSDKException):
|
|
277
279
|
raise
|
|
278
280
|
else:
|
|
279
|
-
raise TencentCloudSDKException(e.
|
|
281
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
280
282
|
|
|
281
283
|
|
|
282
284
|
def CreateReadOnlyGroupNetworkAccess(self, request):
|
|
@@ -299,7 +301,7 @@ class PostgresClient(AbstractClient):
|
|
|
299
301
|
if isinstance(e, TencentCloudSDKException):
|
|
300
302
|
raise
|
|
301
303
|
else:
|
|
302
|
-
raise TencentCloudSDKException(e.
|
|
304
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
303
305
|
|
|
304
306
|
|
|
305
307
|
def CreateServerlessDBInstance(self, request):
|
|
@@ -322,7 +324,7 @@ class PostgresClient(AbstractClient):
|
|
|
322
324
|
if isinstance(e, TencentCloudSDKException):
|
|
323
325
|
raise
|
|
324
326
|
else:
|
|
325
|
-
raise TencentCloudSDKException(e.
|
|
327
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
326
328
|
|
|
327
329
|
|
|
328
330
|
def DeleteBaseBackup(self, request):
|
|
@@ -345,7 +347,7 @@ class PostgresClient(AbstractClient):
|
|
|
345
347
|
if isinstance(e, TencentCloudSDKException):
|
|
346
348
|
raise
|
|
347
349
|
else:
|
|
348
|
-
raise TencentCloudSDKException(e.
|
|
350
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
349
351
|
|
|
350
352
|
|
|
351
353
|
def DeleteDBInstanceNetworkAccess(self, request):
|
|
@@ -368,7 +370,7 @@ class PostgresClient(AbstractClient):
|
|
|
368
370
|
if isinstance(e, TencentCloudSDKException):
|
|
369
371
|
raise
|
|
370
372
|
else:
|
|
371
|
-
raise TencentCloudSDKException(e.
|
|
373
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
372
374
|
|
|
373
375
|
|
|
374
376
|
def DeleteLogBackup(self, request):
|
|
@@ -391,7 +393,7 @@ class PostgresClient(AbstractClient):
|
|
|
391
393
|
if isinstance(e, TencentCloudSDKException):
|
|
392
394
|
raise
|
|
393
395
|
else:
|
|
394
|
-
raise TencentCloudSDKException(e.
|
|
396
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
395
397
|
|
|
396
398
|
|
|
397
399
|
def DeleteParameterTemplate(self, request):
|
|
@@ -414,7 +416,7 @@ class PostgresClient(AbstractClient):
|
|
|
414
416
|
if isinstance(e, TencentCloudSDKException):
|
|
415
417
|
raise
|
|
416
418
|
else:
|
|
417
|
-
raise TencentCloudSDKException(e.
|
|
419
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
418
420
|
|
|
419
421
|
|
|
420
422
|
def DeleteReadOnlyGroup(self, request):
|
|
@@ -437,7 +439,7 @@ class PostgresClient(AbstractClient):
|
|
|
437
439
|
if isinstance(e, TencentCloudSDKException):
|
|
438
440
|
raise
|
|
439
441
|
else:
|
|
440
|
-
raise TencentCloudSDKException(e.
|
|
442
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
441
443
|
|
|
442
444
|
|
|
443
445
|
def DeleteReadOnlyGroupNetworkAccess(self, request):
|
|
@@ -460,7 +462,7 @@ class PostgresClient(AbstractClient):
|
|
|
460
462
|
if isinstance(e, TencentCloudSDKException):
|
|
461
463
|
raise
|
|
462
464
|
else:
|
|
463
|
-
raise TencentCloudSDKException(e.
|
|
465
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
464
466
|
|
|
465
467
|
|
|
466
468
|
def DeleteServerlessDBInstance(self, request):
|
|
@@ -483,7 +485,7 @@ class PostgresClient(AbstractClient):
|
|
|
483
485
|
if isinstance(e, TencentCloudSDKException):
|
|
484
486
|
raise
|
|
485
487
|
else:
|
|
486
|
-
raise TencentCloudSDKException(e.
|
|
488
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
487
489
|
|
|
488
490
|
|
|
489
491
|
def DescribeAccounts(self, request):
|
|
@@ -506,7 +508,7 @@ class PostgresClient(AbstractClient):
|
|
|
506
508
|
if isinstance(e, TencentCloudSDKException):
|
|
507
509
|
raise
|
|
508
510
|
else:
|
|
509
|
-
raise TencentCloudSDKException(e.
|
|
511
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
510
512
|
|
|
511
513
|
|
|
512
514
|
def DescribeAvailableRecoveryTime(self, request):
|
|
@@ -529,7 +531,7 @@ class PostgresClient(AbstractClient):
|
|
|
529
531
|
if isinstance(e, TencentCloudSDKException):
|
|
530
532
|
raise
|
|
531
533
|
else:
|
|
532
|
-
raise TencentCloudSDKException(e.
|
|
534
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
533
535
|
|
|
534
536
|
|
|
535
537
|
def DescribeBackupDownloadRestriction(self, request):
|
|
@@ -552,7 +554,7 @@ class PostgresClient(AbstractClient):
|
|
|
552
554
|
if isinstance(e, TencentCloudSDKException):
|
|
553
555
|
raise
|
|
554
556
|
else:
|
|
555
|
-
raise TencentCloudSDKException(e.
|
|
557
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
556
558
|
|
|
557
559
|
|
|
558
560
|
def DescribeBackupDownloadURL(self, request):
|
|
@@ -575,7 +577,7 @@ class PostgresClient(AbstractClient):
|
|
|
575
577
|
if isinstance(e, TencentCloudSDKException):
|
|
576
578
|
raise
|
|
577
579
|
else:
|
|
578
|
-
raise TencentCloudSDKException(e.
|
|
580
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
579
581
|
|
|
580
582
|
|
|
581
583
|
def DescribeBackupOverview(self, request):
|
|
@@ -598,7 +600,7 @@ class PostgresClient(AbstractClient):
|
|
|
598
600
|
if isinstance(e, TencentCloudSDKException):
|
|
599
601
|
raise
|
|
600
602
|
else:
|
|
601
|
-
raise TencentCloudSDKException(e.
|
|
603
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
602
604
|
|
|
603
605
|
|
|
604
606
|
def DescribeBackupPlans(self, request):
|
|
@@ -621,7 +623,7 @@ class PostgresClient(AbstractClient):
|
|
|
621
623
|
if isinstance(e, TencentCloudSDKException):
|
|
622
624
|
raise
|
|
623
625
|
else:
|
|
624
|
-
raise TencentCloudSDKException(e.
|
|
626
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
625
627
|
|
|
626
628
|
|
|
627
629
|
def DescribeBackupSummaries(self, request):
|
|
@@ -644,7 +646,7 @@ class PostgresClient(AbstractClient):
|
|
|
644
646
|
if isinstance(e, TencentCloudSDKException):
|
|
645
647
|
raise
|
|
646
648
|
else:
|
|
647
|
-
raise TencentCloudSDKException(e.
|
|
649
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
648
650
|
|
|
649
651
|
|
|
650
652
|
def DescribeBaseBackups(self, request):
|
|
@@ -667,7 +669,7 @@ class PostgresClient(AbstractClient):
|
|
|
667
669
|
if isinstance(e, TencentCloudSDKException):
|
|
668
670
|
raise
|
|
669
671
|
else:
|
|
670
|
-
raise TencentCloudSDKException(e.
|
|
672
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
671
673
|
|
|
672
674
|
|
|
673
675
|
def DescribeClasses(self, request):
|
|
@@ -690,7 +692,7 @@ class PostgresClient(AbstractClient):
|
|
|
690
692
|
if isinstance(e, TencentCloudSDKException):
|
|
691
693
|
raise
|
|
692
694
|
else:
|
|
693
|
-
raise TencentCloudSDKException(e.
|
|
695
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
694
696
|
|
|
695
697
|
|
|
696
698
|
def DescribeCloneDBInstanceSpec(self, request):
|
|
@@ -713,7 +715,7 @@ class PostgresClient(AbstractClient):
|
|
|
713
715
|
if isinstance(e, TencentCloudSDKException):
|
|
714
716
|
raise
|
|
715
717
|
else:
|
|
716
|
-
raise TencentCloudSDKException(e.
|
|
718
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
717
719
|
|
|
718
720
|
|
|
719
721
|
def DescribeDBBackups(self, request):
|
|
@@ -736,7 +738,7 @@ class PostgresClient(AbstractClient):
|
|
|
736
738
|
if isinstance(e, TencentCloudSDKException):
|
|
737
739
|
raise
|
|
738
740
|
else:
|
|
739
|
-
raise TencentCloudSDKException(e.
|
|
741
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
740
742
|
|
|
741
743
|
|
|
742
744
|
def DescribeDBErrlogs(self, request):
|
|
@@ -759,7 +761,7 @@ class PostgresClient(AbstractClient):
|
|
|
759
761
|
if isinstance(e, TencentCloudSDKException):
|
|
760
762
|
raise
|
|
761
763
|
else:
|
|
762
|
-
raise TencentCloudSDKException(e.
|
|
764
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
763
765
|
|
|
764
766
|
|
|
765
767
|
def DescribeDBInstanceAttribute(self, request):
|
|
@@ -782,7 +784,32 @@ class PostgresClient(AbstractClient):
|
|
|
782
784
|
if isinstance(e, TencentCloudSDKException):
|
|
783
785
|
raise
|
|
784
786
|
else:
|
|
785
|
-
raise TencentCloudSDKException(e.
|
|
787
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
def DescribeDBInstanceHAConfig(self, request):
|
|
791
|
+
"""本接口(DescribeDBInstanceHAConfig)用于查询实例HA配置信息。其中HA配置信息包括:
|
|
792
|
+
<li>允许备节点切换为主节点的条件配置
|
|
793
|
+
<li>半同步实例使用同步复制或异步复制的条件配置
|
|
794
|
+
|
|
795
|
+
:param request: Request instance for DescribeDBInstanceHAConfig.
|
|
796
|
+
:type request: :class:`tencentcloud.postgres.v20170312.models.DescribeDBInstanceHAConfigRequest`
|
|
797
|
+
:rtype: :class:`tencentcloud.postgres.v20170312.models.DescribeDBInstanceHAConfigResponse`
|
|
798
|
+
|
|
799
|
+
"""
|
|
800
|
+
try:
|
|
801
|
+
params = request._serialize()
|
|
802
|
+
headers = request.headers
|
|
803
|
+
body = self.call("DescribeDBInstanceHAConfig", params, headers=headers)
|
|
804
|
+
response = json.loads(body)
|
|
805
|
+
model = models.DescribeDBInstanceHAConfigResponse()
|
|
806
|
+
model._deserialize(response["Response"])
|
|
807
|
+
return model
|
|
808
|
+
except Exception as e:
|
|
809
|
+
if isinstance(e, TencentCloudSDKException):
|
|
810
|
+
raise
|
|
811
|
+
else:
|
|
812
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
786
813
|
|
|
787
814
|
|
|
788
815
|
def DescribeDBInstanceParameters(self, request):
|
|
@@ -805,7 +832,7 @@ class PostgresClient(AbstractClient):
|
|
|
805
832
|
if isinstance(e, TencentCloudSDKException):
|
|
806
833
|
raise
|
|
807
834
|
else:
|
|
808
|
-
raise TencentCloudSDKException(e.
|
|
835
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
809
836
|
|
|
810
837
|
|
|
811
838
|
def DescribeDBInstanceSecurityGroups(self, request):
|
|
@@ -828,7 +855,7 @@ class PostgresClient(AbstractClient):
|
|
|
828
855
|
if isinstance(e, TencentCloudSDKException):
|
|
829
856
|
raise
|
|
830
857
|
else:
|
|
831
|
-
raise TencentCloudSDKException(e.
|
|
858
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
832
859
|
|
|
833
860
|
|
|
834
861
|
def DescribeDBInstances(self, request):
|
|
@@ -851,7 +878,7 @@ class PostgresClient(AbstractClient):
|
|
|
851
878
|
if isinstance(e, TencentCloudSDKException):
|
|
852
879
|
raise
|
|
853
880
|
else:
|
|
854
|
-
raise TencentCloudSDKException(e.
|
|
881
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
855
882
|
|
|
856
883
|
|
|
857
884
|
def DescribeDBSlowlogs(self, request):
|
|
@@ -874,7 +901,7 @@ class PostgresClient(AbstractClient):
|
|
|
874
901
|
if isinstance(e, TencentCloudSDKException):
|
|
875
902
|
raise
|
|
876
903
|
else:
|
|
877
|
-
raise TencentCloudSDKException(e.
|
|
904
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
878
905
|
|
|
879
906
|
|
|
880
907
|
def DescribeDBVersions(self, request):
|
|
@@ -897,7 +924,7 @@ class PostgresClient(AbstractClient):
|
|
|
897
924
|
if isinstance(e, TencentCloudSDKException):
|
|
898
925
|
raise
|
|
899
926
|
else:
|
|
900
|
-
raise TencentCloudSDKException(e.
|
|
927
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
901
928
|
|
|
902
929
|
|
|
903
930
|
def DescribeDBXlogs(self, request):
|
|
@@ -920,7 +947,7 @@ class PostgresClient(AbstractClient):
|
|
|
920
947
|
if isinstance(e, TencentCloudSDKException):
|
|
921
948
|
raise
|
|
922
949
|
else:
|
|
923
|
-
raise TencentCloudSDKException(e.
|
|
950
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
924
951
|
|
|
925
952
|
|
|
926
953
|
def DescribeDatabases(self, request):
|
|
@@ -943,7 +970,7 @@ class PostgresClient(AbstractClient):
|
|
|
943
970
|
if isinstance(e, TencentCloudSDKException):
|
|
944
971
|
raise
|
|
945
972
|
else:
|
|
946
|
-
raise TencentCloudSDKException(e.
|
|
973
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
947
974
|
|
|
948
975
|
|
|
949
976
|
def DescribeDefaultParameters(self, request):
|
|
@@ -966,7 +993,7 @@ class PostgresClient(AbstractClient):
|
|
|
966
993
|
if isinstance(e, TencentCloudSDKException):
|
|
967
994
|
raise
|
|
968
995
|
else:
|
|
969
|
-
raise TencentCloudSDKException(e.
|
|
996
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
970
997
|
|
|
971
998
|
|
|
972
999
|
def DescribeEncryptionKeys(self, request):
|
|
@@ -989,7 +1016,7 @@ class PostgresClient(AbstractClient):
|
|
|
989
1016
|
if isinstance(e, TencentCloudSDKException):
|
|
990
1017
|
raise
|
|
991
1018
|
else:
|
|
992
|
-
raise TencentCloudSDKException(e.
|
|
1019
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
993
1020
|
|
|
994
1021
|
|
|
995
1022
|
def DescribeLogBackups(self, request):
|
|
@@ -1012,7 +1039,7 @@ class PostgresClient(AbstractClient):
|
|
|
1012
1039
|
if isinstance(e, TencentCloudSDKException):
|
|
1013
1040
|
raise
|
|
1014
1041
|
else:
|
|
1015
|
-
raise TencentCloudSDKException(e.
|
|
1042
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1016
1043
|
|
|
1017
1044
|
|
|
1018
1045
|
def DescribeOrders(self, request):
|
|
@@ -1035,7 +1062,7 @@ class PostgresClient(AbstractClient):
|
|
|
1035
1062
|
if isinstance(e, TencentCloudSDKException):
|
|
1036
1063
|
raise
|
|
1037
1064
|
else:
|
|
1038
|
-
raise TencentCloudSDKException(e.
|
|
1065
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1039
1066
|
|
|
1040
1067
|
|
|
1041
1068
|
def DescribeParameterTemplateAttributes(self, request):
|
|
@@ -1058,7 +1085,7 @@ class PostgresClient(AbstractClient):
|
|
|
1058
1085
|
if isinstance(e, TencentCloudSDKException):
|
|
1059
1086
|
raise
|
|
1060
1087
|
else:
|
|
1061
|
-
raise TencentCloudSDKException(e.
|
|
1088
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1062
1089
|
|
|
1063
1090
|
|
|
1064
1091
|
def DescribeParameterTemplates(self, request):
|
|
@@ -1081,7 +1108,7 @@ class PostgresClient(AbstractClient):
|
|
|
1081
1108
|
if isinstance(e, TencentCloudSDKException):
|
|
1082
1109
|
raise
|
|
1083
1110
|
else:
|
|
1084
|
-
raise TencentCloudSDKException(e.
|
|
1111
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1085
1112
|
|
|
1086
1113
|
|
|
1087
1114
|
def DescribeParamsEvent(self, request):
|
|
@@ -1104,7 +1131,7 @@ class PostgresClient(AbstractClient):
|
|
|
1104
1131
|
if isinstance(e, TencentCloudSDKException):
|
|
1105
1132
|
raise
|
|
1106
1133
|
else:
|
|
1107
|
-
raise TencentCloudSDKException(e.
|
|
1134
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1108
1135
|
|
|
1109
1136
|
|
|
1110
1137
|
def DescribeProductConfig(self, request):
|
|
@@ -1127,7 +1154,7 @@ class PostgresClient(AbstractClient):
|
|
|
1127
1154
|
if isinstance(e, TencentCloudSDKException):
|
|
1128
1155
|
raise
|
|
1129
1156
|
else:
|
|
1130
|
-
raise TencentCloudSDKException(e.
|
|
1157
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1131
1158
|
|
|
1132
1159
|
|
|
1133
1160
|
def DescribeReadOnlyGroups(self, request):
|
|
@@ -1150,7 +1177,7 @@ class PostgresClient(AbstractClient):
|
|
|
1150
1177
|
if isinstance(e, TencentCloudSDKException):
|
|
1151
1178
|
raise
|
|
1152
1179
|
else:
|
|
1153
|
-
raise TencentCloudSDKException(e.
|
|
1180
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1154
1181
|
|
|
1155
1182
|
|
|
1156
1183
|
def DescribeRegions(self, request):
|
|
@@ -1173,7 +1200,7 @@ class PostgresClient(AbstractClient):
|
|
|
1173
1200
|
if isinstance(e, TencentCloudSDKException):
|
|
1174
1201
|
raise
|
|
1175
1202
|
else:
|
|
1176
|
-
raise TencentCloudSDKException(e.
|
|
1203
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1177
1204
|
|
|
1178
1205
|
|
|
1179
1206
|
def DescribeServerlessDBInstances(self, request):
|
|
@@ -1196,7 +1223,7 @@ class PostgresClient(AbstractClient):
|
|
|
1196
1223
|
if isinstance(e, TencentCloudSDKException):
|
|
1197
1224
|
raise
|
|
1198
1225
|
else:
|
|
1199
|
-
raise TencentCloudSDKException(e.
|
|
1226
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1200
1227
|
|
|
1201
1228
|
|
|
1202
1229
|
def DescribeSlowQueryAnalysis(self, request):
|
|
@@ -1219,7 +1246,7 @@ class PostgresClient(AbstractClient):
|
|
|
1219
1246
|
if isinstance(e, TencentCloudSDKException):
|
|
1220
1247
|
raise
|
|
1221
1248
|
else:
|
|
1222
|
-
raise TencentCloudSDKException(e.
|
|
1249
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1223
1250
|
|
|
1224
1251
|
|
|
1225
1252
|
def DescribeSlowQueryList(self, request):
|
|
@@ -1242,7 +1269,7 @@ class PostgresClient(AbstractClient):
|
|
|
1242
1269
|
if isinstance(e, TencentCloudSDKException):
|
|
1243
1270
|
raise
|
|
1244
1271
|
else:
|
|
1245
|
-
raise TencentCloudSDKException(e.
|
|
1272
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1246
1273
|
|
|
1247
1274
|
|
|
1248
1275
|
def DescribeZones(self, request):
|
|
@@ -1265,7 +1292,7 @@ class PostgresClient(AbstractClient):
|
|
|
1265
1292
|
if isinstance(e, TencentCloudSDKException):
|
|
1266
1293
|
raise
|
|
1267
1294
|
else:
|
|
1268
|
-
raise TencentCloudSDKException(e.
|
|
1295
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1269
1296
|
|
|
1270
1297
|
|
|
1271
1298
|
def DestroyDBInstance(self, request):
|
|
@@ -1288,7 +1315,7 @@ class PostgresClient(AbstractClient):
|
|
|
1288
1315
|
if isinstance(e, TencentCloudSDKException):
|
|
1289
1316
|
raise
|
|
1290
1317
|
else:
|
|
1291
|
-
raise TencentCloudSDKException(e.
|
|
1318
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1292
1319
|
|
|
1293
1320
|
|
|
1294
1321
|
def DisIsolateDBInstances(self, request):
|
|
@@ -1311,7 +1338,7 @@ class PostgresClient(AbstractClient):
|
|
|
1311
1338
|
if isinstance(e, TencentCloudSDKException):
|
|
1312
1339
|
raise
|
|
1313
1340
|
else:
|
|
1314
|
-
raise TencentCloudSDKException(e.
|
|
1341
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1315
1342
|
|
|
1316
1343
|
|
|
1317
1344
|
def InitDBInstances(self, request):
|
|
@@ -1334,7 +1361,7 @@ class PostgresClient(AbstractClient):
|
|
|
1334
1361
|
if isinstance(e, TencentCloudSDKException):
|
|
1335
1362
|
raise
|
|
1336
1363
|
else:
|
|
1337
|
-
raise TencentCloudSDKException(e.
|
|
1364
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1338
1365
|
|
|
1339
1366
|
|
|
1340
1367
|
def InquiryPriceCreateDBInstances(self, request):
|
|
@@ -1357,7 +1384,7 @@ class PostgresClient(AbstractClient):
|
|
|
1357
1384
|
if isinstance(e, TencentCloudSDKException):
|
|
1358
1385
|
raise
|
|
1359
1386
|
else:
|
|
1360
|
-
raise TencentCloudSDKException(e.
|
|
1387
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1361
1388
|
|
|
1362
1389
|
|
|
1363
1390
|
def InquiryPriceRenewDBInstance(self, request):
|
|
@@ -1380,7 +1407,7 @@ class PostgresClient(AbstractClient):
|
|
|
1380
1407
|
if isinstance(e, TencentCloudSDKException):
|
|
1381
1408
|
raise
|
|
1382
1409
|
else:
|
|
1383
|
-
raise TencentCloudSDKException(e.
|
|
1410
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1384
1411
|
|
|
1385
1412
|
|
|
1386
1413
|
def InquiryPriceUpgradeDBInstance(self, request):
|
|
@@ -1403,7 +1430,7 @@ class PostgresClient(AbstractClient):
|
|
|
1403
1430
|
if isinstance(e, TencentCloudSDKException):
|
|
1404
1431
|
raise
|
|
1405
1432
|
else:
|
|
1406
|
-
raise TencentCloudSDKException(e.
|
|
1433
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1407
1434
|
|
|
1408
1435
|
|
|
1409
1436
|
def IsolateDBInstances(self, request):
|
|
@@ -1426,7 +1453,7 @@ class PostgresClient(AbstractClient):
|
|
|
1426
1453
|
if isinstance(e, TencentCloudSDKException):
|
|
1427
1454
|
raise
|
|
1428
1455
|
else:
|
|
1429
|
-
raise TencentCloudSDKException(e.
|
|
1456
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1430
1457
|
|
|
1431
1458
|
|
|
1432
1459
|
def ModifyAccountRemark(self, request):
|
|
@@ -1449,7 +1476,7 @@ class PostgresClient(AbstractClient):
|
|
|
1449
1476
|
if isinstance(e, TencentCloudSDKException):
|
|
1450
1477
|
raise
|
|
1451
1478
|
else:
|
|
1452
|
-
raise TencentCloudSDKException(e.
|
|
1479
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1453
1480
|
|
|
1454
1481
|
|
|
1455
1482
|
def ModifyBackupDownloadRestriction(self, request):
|
|
@@ -1472,7 +1499,7 @@ class PostgresClient(AbstractClient):
|
|
|
1472
1499
|
if isinstance(e, TencentCloudSDKException):
|
|
1473
1500
|
raise
|
|
1474
1501
|
else:
|
|
1475
|
-
raise TencentCloudSDKException(e.
|
|
1502
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1476
1503
|
|
|
1477
1504
|
|
|
1478
1505
|
def ModifyBackupPlan(self, request):
|
|
@@ -1495,7 +1522,7 @@ class PostgresClient(AbstractClient):
|
|
|
1495
1522
|
if isinstance(e, TencentCloudSDKException):
|
|
1496
1523
|
raise
|
|
1497
1524
|
else:
|
|
1498
|
-
raise TencentCloudSDKException(e.
|
|
1525
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1499
1526
|
|
|
1500
1527
|
|
|
1501
1528
|
def ModifyBaseBackupExpireTime(self, request):
|
|
@@ -1518,7 +1545,7 @@ class PostgresClient(AbstractClient):
|
|
|
1518
1545
|
if isinstance(e, TencentCloudSDKException):
|
|
1519
1546
|
raise
|
|
1520
1547
|
else:
|
|
1521
|
-
raise TencentCloudSDKException(e.
|
|
1548
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1522
1549
|
|
|
1523
1550
|
|
|
1524
1551
|
def ModifyDBInstanceChargeType(self, request):
|
|
@@ -1541,7 +1568,7 @@ class PostgresClient(AbstractClient):
|
|
|
1541
1568
|
if isinstance(e, TencentCloudSDKException):
|
|
1542
1569
|
raise
|
|
1543
1570
|
else:
|
|
1544
|
-
raise TencentCloudSDKException(e.
|
|
1571
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1545
1572
|
|
|
1546
1573
|
|
|
1547
1574
|
def ModifyDBInstanceDeployment(self, request):
|
|
@@ -1564,7 +1591,32 @@ class PostgresClient(AbstractClient):
|
|
|
1564
1591
|
if isinstance(e, TencentCloudSDKException):
|
|
1565
1592
|
raise
|
|
1566
1593
|
else:
|
|
1567
|
-
raise TencentCloudSDKException(e.
|
|
1594
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
def ModifyDBInstanceHAConfig(self, request):
|
|
1598
|
+
"""本接口(ModifyDBInstanceHAConfig)用于修改实例HA配置信息。其中HA配置信息包括:
|
|
1599
|
+
<li>允许备节点切换为主节点的条件配置
|
|
1600
|
+
<li>半同步实例使用同步复制或异步复制的条件配置
|
|
1601
|
+
|
|
1602
|
+
:param request: Request instance for ModifyDBInstanceHAConfig.
|
|
1603
|
+
:type request: :class:`tencentcloud.postgres.v20170312.models.ModifyDBInstanceHAConfigRequest`
|
|
1604
|
+
:rtype: :class:`tencentcloud.postgres.v20170312.models.ModifyDBInstanceHAConfigResponse`
|
|
1605
|
+
|
|
1606
|
+
"""
|
|
1607
|
+
try:
|
|
1608
|
+
params = request._serialize()
|
|
1609
|
+
headers = request.headers
|
|
1610
|
+
body = self.call("ModifyDBInstanceHAConfig", params, headers=headers)
|
|
1611
|
+
response = json.loads(body)
|
|
1612
|
+
model = models.ModifyDBInstanceHAConfigResponse()
|
|
1613
|
+
model._deserialize(response["Response"])
|
|
1614
|
+
return model
|
|
1615
|
+
except Exception as e:
|
|
1616
|
+
if isinstance(e, TencentCloudSDKException):
|
|
1617
|
+
raise
|
|
1618
|
+
else:
|
|
1619
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1568
1620
|
|
|
1569
1621
|
|
|
1570
1622
|
def ModifyDBInstanceName(self, request):
|
|
@@ -1587,7 +1639,7 @@ class PostgresClient(AbstractClient):
|
|
|
1587
1639
|
if isinstance(e, TencentCloudSDKException):
|
|
1588
1640
|
raise
|
|
1589
1641
|
else:
|
|
1590
|
-
raise TencentCloudSDKException(e.
|
|
1642
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1591
1643
|
|
|
1592
1644
|
|
|
1593
1645
|
def ModifyDBInstanceParameters(self, request):
|
|
@@ -1610,7 +1662,7 @@ class PostgresClient(AbstractClient):
|
|
|
1610
1662
|
if isinstance(e, TencentCloudSDKException):
|
|
1611
1663
|
raise
|
|
1612
1664
|
else:
|
|
1613
|
-
raise TencentCloudSDKException(e.
|
|
1665
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1614
1666
|
|
|
1615
1667
|
|
|
1616
1668
|
def ModifyDBInstanceReadOnlyGroup(self, request):
|
|
@@ -1633,7 +1685,7 @@ class PostgresClient(AbstractClient):
|
|
|
1633
1685
|
if isinstance(e, TencentCloudSDKException):
|
|
1634
1686
|
raise
|
|
1635
1687
|
else:
|
|
1636
|
-
raise TencentCloudSDKException(e.
|
|
1688
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1637
1689
|
|
|
1638
1690
|
|
|
1639
1691
|
def ModifyDBInstanceSecurityGroups(self, request):
|
|
@@ -1656,7 +1708,7 @@ class PostgresClient(AbstractClient):
|
|
|
1656
1708
|
if isinstance(e, TencentCloudSDKException):
|
|
1657
1709
|
raise
|
|
1658
1710
|
else:
|
|
1659
|
-
raise TencentCloudSDKException(e.
|
|
1711
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1660
1712
|
|
|
1661
1713
|
|
|
1662
1714
|
def ModifyDBInstanceSpec(self, request):
|
|
@@ -1679,7 +1731,7 @@ class PostgresClient(AbstractClient):
|
|
|
1679
1731
|
if isinstance(e, TencentCloudSDKException):
|
|
1680
1732
|
raise
|
|
1681
1733
|
else:
|
|
1682
|
-
raise TencentCloudSDKException(e.
|
|
1734
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1683
1735
|
|
|
1684
1736
|
|
|
1685
1737
|
def ModifyDBInstancesProject(self, request):
|
|
@@ -1702,7 +1754,7 @@ class PostgresClient(AbstractClient):
|
|
|
1702
1754
|
if isinstance(e, TencentCloudSDKException):
|
|
1703
1755
|
raise
|
|
1704
1756
|
else:
|
|
1705
|
-
raise TencentCloudSDKException(e.
|
|
1757
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1706
1758
|
|
|
1707
1759
|
|
|
1708
1760
|
def ModifyParameterTemplate(self, request):
|
|
@@ -1725,7 +1777,7 @@ class PostgresClient(AbstractClient):
|
|
|
1725
1777
|
if isinstance(e, TencentCloudSDKException):
|
|
1726
1778
|
raise
|
|
1727
1779
|
else:
|
|
1728
|
-
raise TencentCloudSDKException(e.
|
|
1780
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1729
1781
|
|
|
1730
1782
|
|
|
1731
1783
|
def ModifyReadOnlyGroupConfig(self, request):
|
|
@@ -1748,7 +1800,7 @@ class PostgresClient(AbstractClient):
|
|
|
1748
1800
|
if isinstance(e, TencentCloudSDKException):
|
|
1749
1801
|
raise
|
|
1750
1802
|
else:
|
|
1751
|
-
raise TencentCloudSDKException(e.
|
|
1803
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1752
1804
|
|
|
1753
1805
|
|
|
1754
1806
|
def ModifySwitchTimePeriod(self, request):
|
|
@@ -1771,7 +1823,7 @@ class PostgresClient(AbstractClient):
|
|
|
1771
1823
|
if isinstance(e, TencentCloudSDKException):
|
|
1772
1824
|
raise
|
|
1773
1825
|
else:
|
|
1774
|
-
raise TencentCloudSDKException(e.
|
|
1826
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1775
1827
|
|
|
1776
1828
|
|
|
1777
1829
|
def OpenDBExtranetAccess(self, request):
|
|
@@ -1794,7 +1846,7 @@ class PostgresClient(AbstractClient):
|
|
|
1794
1846
|
if isinstance(e, TencentCloudSDKException):
|
|
1795
1847
|
raise
|
|
1796
1848
|
else:
|
|
1797
|
-
raise TencentCloudSDKException(e.
|
|
1849
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1798
1850
|
|
|
1799
1851
|
|
|
1800
1852
|
def OpenServerlessDBExtranetAccess(self, request):
|
|
@@ -1817,7 +1869,7 @@ class PostgresClient(AbstractClient):
|
|
|
1817
1869
|
if isinstance(e, TencentCloudSDKException):
|
|
1818
1870
|
raise
|
|
1819
1871
|
else:
|
|
1820
|
-
raise TencentCloudSDKException(e.
|
|
1872
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1821
1873
|
|
|
1822
1874
|
|
|
1823
1875
|
def RebalanceReadOnlyGroup(self, request):
|
|
@@ -1840,7 +1892,7 @@ class PostgresClient(AbstractClient):
|
|
|
1840
1892
|
if isinstance(e, TencentCloudSDKException):
|
|
1841
1893
|
raise
|
|
1842
1894
|
else:
|
|
1843
|
-
raise TencentCloudSDKException(e.
|
|
1895
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1844
1896
|
|
|
1845
1897
|
|
|
1846
1898
|
def RemoveDBInstanceFromReadOnlyGroup(self, request):
|
|
@@ -1863,7 +1915,7 @@ class PostgresClient(AbstractClient):
|
|
|
1863
1915
|
if isinstance(e, TencentCloudSDKException):
|
|
1864
1916
|
raise
|
|
1865
1917
|
else:
|
|
1866
|
-
raise TencentCloudSDKException(e.
|
|
1918
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1867
1919
|
|
|
1868
1920
|
|
|
1869
1921
|
def RenewInstance(self, request):
|
|
@@ -1886,7 +1938,7 @@ class PostgresClient(AbstractClient):
|
|
|
1886
1938
|
if isinstance(e, TencentCloudSDKException):
|
|
1887
1939
|
raise
|
|
1888
1940
|
else:
|
|
1889
|
-
raise TencentCloudSDKException(e.
|
|
1941
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1890
1942
|
|
|
1891
1943
|
|
|
1892
1944
|
def ResetAccountPassword(self, request):
|
|
@@ -1909,7 +1961,7 @@ class PostgresClient(AbstractClient):
|
|
|
1909
1961
|
if isinstance(e, TencentCloudSDKException):
|
|
1910
1962
|
raise
|
|
1911
1963
|
else:
|
|
1912
|
-
raise TencentCloudSDKException(e.
|
|
1964
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1913
1965
|
|
|
1914
1966
|
|
|
1915
1967
|
def RestartDBInstance(self, request):
|
|
@@ -1932,7 +1984,7 @@ class PostgresClient(AbstractClient):
|
|
|
1932
1984
|
if isinstance(e, TencentCloudSDKException):
|
|
1933
1985
|
raise
|
|
1934
1986
|
else:
|
|
1935
|
-
raise TencentCloudSDKException(e.
|
|
1987
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1936
1988
|
|
|
1937
1989
|
|
|
1938
1990
|
def SetAutoRenewFlag(self, request):
|
|
@@ -1955,7 +2007,33 @@ class PostgresClient(AbstractClient):
|
|
|
1955
2007
|
if isinstance(e, TencentCloudSDKException):
|
|
1956
2008
|
raise
|
|
1957
2009
|
else:
|
|
1958
|
-
raise TencentCloudSDKException(e.
|
|
2010
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
def SwitchDBInstancePrimary(self, request):
|
|
2014
|
+
"""本接口(SwitchDBInstancePrimary)用于切换实例主备关系。
|
|
2015
|
+
<li>通过主动发起切换,可以验证业务能否正确处理实例主备切换的场景
|
|
2016
|
+
<li>通过使用强制切换,可以在备节点延迟不满足切换条件时,强制发起主从切换
|
|
2017
|
+
<li>只有主实例可以执行该操作
|
|
2018
|
+
|
|
2019
|
+
:param request: Request instance for SwitchDBInstancePrimary.
|
|
2020
|
+
:type request: :class:`tencentcloud.postgres.v20170312.models.SwitchDBInstancePrimaryRequest`
|
|
2021
|
+
:rtype: :class:`tencentcloud.postgres.v20170312.models.SwitchDBInstancePrimaryResponse`
|
|
2022
|
+
|
|
2023
|
+
"""
|
|
2024
|
+
try:
|
|
2025
|
+
params = request._serialize()
|
|
2026
|
+
headers = request.headers
|
|
2027
|
+
body = self.call("SwitchDBInstancePrimary", params, headers=headers)
|
|
2028
|
+
response = json.loads(body)
|
|
2029
|
+
model = models.SwitchDBInstancePrimaryResponse()
|
|
2030
|
+
model._deserialize(response["Response"])
|
|
2031
|
+
return model
|
|
2032
|
+
except Exception as e:
|
|
2033
|
+
if isinstance(e, TencentCloudSDKException):
|
|
2034
|
+
raise
|
|
2035
|
+
else:
|
|
2036
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1959
2037
|
|
|
1960
2038
|
|
|
1961
2039
|
def UpgradeDBInstance(self, request):
|
|
@@ -1978,7 +2056,7 @@ class PostgresClient(AbstractClient):
|
|
|
1978
2056
|
if isinstance(e, TencentCloudSDKException):
|
|
1979
2057
|
raise
|
|
1980
2058
|
else:
|
|
1981
|
-
raise TencentCloudSDKException(e.
|
|
2059
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1982
2060
|
|
|
1983
2061
|
|
|
1984
2062
|
def UpgradeDBInstanceKernelVersion(self, request):
|
|
@@ -2001,4 +2079,4 @@ class PostgresClient(AbstractClient):
|
|
|
2001
2079
|
if isinstance(e, TencentCloudSDKException):
|
|
2002
2080
|
raise
|
|
2003
2081
|
else:
|
|
2004
|
-
raise TencentCloudSDKException(e.
|
|
2082
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|