tencentcloud-sdk-python-postgres 3.0.1206__tar.gz → 3.0.1238__tar.gz

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.

Potentially problematic release.


This version of tencentcloud-sdk-python-postgres might be problematic. Click here for more details.

Files changed (16) hide show
  1. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/PKG-INFO +1 -1
  2. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/setup.py +1 -1
  3. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud/postgres/v20170312/errorcodes.py +15 -0
  5. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud/postgres/v20170312/models.py +356 -13
  6. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud/postgres/v20170312/postgres_client.py +46 -0
  7. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud_sdk_python_postgres.egg-info/PKG-INFO +1 -1
  8. tencentcloud-sdk-python-postgres-3.0.1238/tencentcloud_sdk_python_postgres.egg-info/requires.txt +1 -0
  9. tencentcloud-sdk-python-postgres-3.0.1206/tencentcloud_sdk_python_postgres.egg-info/requires.txt +0 -1
  10. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/README.rst +0 -0
  11. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/setup.cfg +0 -0
  12. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud/postgres/__init__.py +0 -0
  13. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud/postgres/v20170312/__init__.py +0 -0
  14. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud_sdk_python_postgres.egg-info/SOURCES.txt +0 -0
  15. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud_sdk_python_postgres.egg-info/dependency_links.txt +0 -0
  16. {tencentcloud-sdk-python-postgres-3.0.1206 → tencentcloud-sdk-python-postgres-3.0.1238}/tencentcloud_sdk_python_postgres.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-postgres
3
- Version: 3.0.1206
3
+ Version: 3.0.1238
4
4
  Summary: Tencent Cloud Postgres SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-postgres',
11
- install_requires=["tencentcloud-sdk-python-common==3.0.1206"],
11
+ install_requires=["tencentcloud-sdk-python-common==3.0.1238"],
12
12
  version=tencentcloud.__version__,
13
13
  description='Tencent Cloud Postgres SDK for Python',
14
14
  long_description=open('README.rst').read(),
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1206'
17
+ __version__ = '3.0.1238'
@@ -257,6 +257,9 @@ INTERNALERROR_INSTANCEDATAERROR = 'InternalError.InstanceDataError'
257
257
  # 请求执行异常。
258
258
  INTERNALERROR_INTERNALHTTPSERVERERROR = 'InternalError.InternalHttpServerError'
259
259
 
260
+ # Json数据解析失败,请联系客服进行处理。
261
+ INTERNALERROR_JSONPARSEERROR = 'InternalError.JsonParseError'
262
+
260
263
  # 后台数据解析失败,请联系客服进行处理。
261
264
  INTERNALERROR_MARSHALERROR = 'InternalError.MarshalError'
262
265
 
@@ -320,6 +323,9 @@ INVALIDPARAMETERVALUE_CHARSETNOTFOUNDERROR = 'InvalidParameterValue.CharsetNotFo
320
323
  # 数据格式转换失败,请联系客服处理。
321
324
  INVALIDPARAMETERVALUE_DATACONVERTERROR = 'InvalidParameterValue.DataConvertError'
322
325
 
326
+ # 解密密码失败,请确认密码加密是否正确。
327
+ INVALIDPARAMETERVALUE_DECRYPTPASSWORDFAILED = 'InvalidParameterValue.DecryptPasswordFailed'
328
+
323
329
  # 不支持的计费类型。
324
330
  INVALIDPARAMETERVALUE_ILLEGALCHARGETYPE = 'InvalidParameterValue.IllegalChargeType'
325
331
 
@@ -356,9 +362,15 @@ INVALIDPARAMETERVALUE_INVALIDACCOUNTNAME = 'InvalidParameterValue.InvalidAccount
356
362
  # 账号设置无效,请遵循账号命名规则:账号名需要1-16个字符,只能由字母、数字或下划线组成;不能为postgres;不能由数字、pg_及tencentdb_开头;所有规则均不区分大小写。
357
363
  INVALIDPARAMETERVALUE_INVALIDACCOUNTNAMEERROR = 'InvalidParameterValue.InvalidAccountNameError'
358
364
 
365
+ # 账号无效,请遵循账号命名规则:由字母(a-z, A-Z)、数字(0-9)、下划线(_)组成,以字母或(_)开头,最多63个字符。不能使用系统保留关键字,不能为postgres,且不能由pg_或tencentdb_开头。
366
+ INVALIDPARAMETERVALUE_INVALIDACCOUNTNAMEFORMATERROR = 'InvalidParameterValue.InvalidAccountNameFormatError'
367
+
359
368
  # 数据库字符集错误,当前只支持UTF8、LATIN1。
360
369
  INVALIDPARAMETERVALUE_INVALIDCHARSET = 'InvalidParameterValue.InvalidCharset'
361
370
 
371
+ # 数据库名称无效,请遵循命名规则:由字母(a-z, A-Z)、数字(0-9)、下划线(_)组成,以字母或(_)开头,最多63个字符。不能使用系统保留关键字。
372
+ INVALIDPARAMETERVALUE_INVALIDDATABASENAMEFORMATERROR = 'InvalidParameterValue.InvalidDatabaseNameFormatError'
373
+
362
374
  # 当前仅支持操作名称为英文、下划线、数字及特殊符号[]组成的数据库对象,函数及存储过程额外支持三个特殊符号(,)
363
375
  INVALIDPARAMETERVALUE_INVALIDDATABASEOBJECTNAME = 'InvalidParameterValue.InvalidDatabaseObjectName'
364
376
 
@@ -470,6 +482,9 @@ OPERATIONDENIED_INSTANCESTATUSLIMITOPERROR = 'OperationDenied.InstanceStatusLimi
470
482
  # 实例类型错误
471
483
  OPERATIONDENIED_INSTANCETYPEDENIED = 'OperationDenied.InstanceTypeDenied'
472
484
 
485
+ # 内核版本过低,导致实例无法创建tencentDBSuper账号。如果您想使用此功能,请升级内核版本。
486
+ OPERATIONDENIED_KERNELVERSIONERROR = 'OperationDenied.KernelVersionError'
487
+
473
488
  # Serverless不支持当前可用区。
474
489
  OPERATIONDENIED_NOTSUPPORTZONEERROR = 'OperationDenied.NotSupportZoneError'
475
490
 
@@ -2020,6 +2020,124 @@ class CreateDBInstancesResponse(AbstractModel):
2020
2020
  self._RequestId = params.get("RequestId")
2021
2021
 
2022
2022
 
2023
+ class CreateDatabaseRequest(AbstractModel):
2024
+ """CreateDatabase请求参数结构体
2025
+
2026
+ """
2027
+
2028
+ def __init__(self):
2029
+ r"""
2030
+ :param _DBInstanceId: 实例ID,形如postgres-6fego161
2031
+ :type DBInstanceId: str
2032
+ :param _DatabaseName: 创建的数据库名
2033
+ :type DatabaseName: str
2034
+ :param _DatabaseOwner: 数据库的所有者
2035
+ :type DatabaseOwner: str
2036
+ :param _Encoding: 数据库的字符编码
2037
+ :type Encoding: str
2038
+ :param _Collate: 数据库的排序规则
2039
+ :type Collate: str
2040
+ :param _Ctype: 数据库的字符分类
2041
+ :type Ctype: str
2042
+ """
2043
+ self._DBInstanceId = None
2044
+ self._DatabaseName = None
2045
+ self._DatabaseOwner = None
2046
+ self._Encoding = None
2047
+ self._Collate = None
2048
+ self._Ctype = None
2049
+
2050
+ @property
2051
+ def DBInstanceId(self):
2052
+ return self._DBInstanceId
2053
+
2054
+ @DBInstanceId.setter
2055
+ def DBInstanceId(self, DBInstanceId):
2056
+ self._DBInstanceId = DBInstanceId
2057
+
2058
+ @property
2059
+ def DatabaseName(self):
2060
+ return self._DatabaseName
2061
+
2062
+ @DatabaseName.setter
2063
+ def DatabaseName(self, DatabaseName):
2064
+ self._DatabaseName = DatabaseName
2065
+
2066
+ @property
2067
+ def DatabaseOwner(self):
2068
+ return self._DatabaseOwner
2069
+
2070
+ @DatabaseOwner.setter
2071
+ def DatabaseOwner(self, DatabaseOwner):
2072
+ self._DatabaseOwner = DatabaseOwner
2073
+
2074
+ @property
2075
+ def Encoding(self):
2076
+ return self._Encoding
2077
+
2078
+ @Encoding.setter
2079
+ def Encoding(self, Encoding):
2080
+ self._Encoding = Encoding
2081
+
2082
+ @property
2083
+ def Collate(self):
2084
+ return self._Collate
2085
+
2086
+ @Collate.setter
2087
+ def Collate(self, Collate):
2088
+ self._Collate = Collate
2089
+
2090
+ @property
2091
+ def Ctype(self):
2092
+ return self._Ctype
2093
+
2094
+ @Ctype.setter
2095
+ def Ctype(self, Ctype):
2096
+ self._Ctype = Ctype
2097
+
2098
+
2099
+ def _deserialize(self, params):
2100
+ self._DBInstanceId = params.get("DBInstanceId")
2101
+ self._DatabaseName = params.get("DatabaseName")
2102
+ self._DatabaseOwner = params.get("DatabaseOwner")
2103
+ self._Encoding = params.get("Encoding")
2104
+ self._Collate = params.get("Collate")
2105
+ self._Ctype = params.get("Ctype")
2106
+ memeber_set = set(params.keys())
2107
+ for name, value in vars(self).items():
2108
+ property_name = name[1:]
2109
+ if property_name in memeber_set:
2110
+ memeber_set.remove(property_name)
2111
+ if len(memeber_set) > 0:
2112
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
2113
+
2114
+
2115
+
2116
+ class CreateDatabaseResponse(AbstractModel):
2117
+ """CreateDatabase返回参数结构体
2118
+
2119
+ """
2120
+
2121
+ def __init__(self):
2122
+ r"""
2123
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
2124
+ :type RequestId: str
2125
+ """
2126
+ self._RequestId = None
2127
+
2128
+ @property
2129
+ def RequestId(self):
2130
+ return self._RequestId
2131
+
2132
+ @RequestId.setter
2133
+ def RequestId(self, RequestId):
2134
+ self._RequestId = RequestId
2135
+
2136
+
2137
+ def _deserialize(self, params):
2138
+ self._RequestId = params.get("RequestId")
2139
+
2140
+
2023
2141
  class CreateInstancesRequest(AbstractModel):
2024
2142
  """CreateInstances请求参数结构体
2025
2143
 
@@ -2649,28 +2767,28 @@ class CreateReadOnlyDBInstanceRequest(AbstractModel):
2649
2767
  :param _InstanceCount: 购买实例数量,取值范围:[1-10]。一次性购买支持最大数量10个,若超过该数量,可进行多次调用进行购买。
2650
2768
  :type InstanceCount: int
2651
2769
  :param _Period: 购买时长,单位:月。
2652
- <li>预付费:支持1,2,3,4,5,6,7,8,9,10,11,12,24,36
2653
- <li>后付费:只支持1
2770
+ <li>预付费:支持1,2,3,4,5,6,7,8,9,10,11,12,24,36</li>
2771
+ <li>后付费:只支持1</li>
2654
2772
  :type Period: int
2655
- :param _VpcId: 私有网络ID,形如vpc-xxxxxxxx。有效的VpcId可通过登录控制台查询;也可以调用接口 [DescribeVpcEx](https://cloud.tencent.com/document/api/215/1372) ,从接口返回中的unVpcId字段获取。
2773
+ :param _VpcId: 私有网络ID,形如vpc-xxxxxxxx(该参数当前必传)。有效的VpcId可通过登录控制台查询;也可以调用接口 [DescribeVpcEx](https://cloud.tencent.com/document/api/215/1372) ,从接口返回中的unVpcId字段获取。
2656
2774
  :type VpcId: str
2657
- :param _SubnetId: 私有网络子网ID,形如subnet-xxxxxxxx。有效的私有网络子网ID可通过登录控制台查询;也可以调用接口 [DescribeSubnets ](https://cloud.tencent.com/document/api/215/15784),从接口返回中的unSubnetId字段获取。
2775
+ :param _SubnetId: 私有网络子网ID,形如subnet-xxxxxxxx(该参数当前必传)。有效的私有网络子网ID可通过登录控制台查询;也可以调用接口 [DescribeSubnets ](https://cloud.tencent.com/document/api/215/15784),从接口返回中的unSubnetId字段获取。
2658
2776
  :type SubnetId: str
2659
2777
  :param _InstanceChargeType: 实例计费类型,目前支持:
2660
- <li>PREPAID:预付费,即包年包月。
2661
- <li>POSTPAID_BY_HOUR:后付费,即按量计费。
2778
+ <li>PREPAID:预付费,即包年包月。</li>
2779
+ <li>POSTPAID_BY_HOUR:后付费,即按量计费。</li>
2662
2780
  默认值:PREPAID。如果主实例为后付费,只读实例必须也为后付费。
2663
2781
  :type InstanceChargeType: str
2664
2782
  :param _AutoVoucher: 是否自动使用代金券:
2665
- <li>0:否
2666
- <li>1:是
2783
+ <li>0:否</li>
2784
+ <li>1:是</li>
2667
2785
  默认值:0
2668
2786
  :type AutoVoucher: int
2669
2787
  :param _VoucherIds: 代金券ID列表,目前仅支持指定一张代金券。
2670
2788
  :type VoucherIds: list of str
2671
2789
  :param _AutoRenewFlag: 续费标记:
2672
- <li>0:手动续费
2673
- <li>1:自动续费
2790
+ <li>0:手动续费</li>
2791
+ <li>1:自动续费</li>
2674
2792
  默认值:0
2675
2793
  :type AutoRenewFlag: int
2676
2794
  :param _ProjectId: 项目ID。
@@ -2685,8 +2803,8 @@ class CreateReadOnlyDBInstanceRequest(AbstractModel):
2685
2803
 
2686
2804
  :type SecurityGroupIds: list of str
2687
2805
  :param _NeedSupportIpv6: 是否需要支持Ipv6:
2688
- <li>0:否
2689
- <li>1:是
2806
+ <li>0:否</li>
2807
+ <li>1:是</li>
2690
2808
  默认值:0
2691
2809
  :type NeedSupportIpv6: int
2692
2810
  :param _Name: 实例名(后续支持)
@@ -4287,7 +4405,7 @@ class DBInstanceNetInfo(AbstractModel):
4287
4405
 
4288
4406
 
4289
4407
  class DBNode(AbstractModel):
4290
- """描述实例节点信息,包括节点类型、节点所在可用区。
4408
+ """描述实例节点信息,包括节点类型、节点所在可用区、节点所在专属集群。
4291
4409
 
4292
4410
  """
4293
4411
 
@@ -4333,6 +4451,131 @@ Standby,代表备节点。
4333
4451
 
4334
4452
 
4335
4453
 
4454
+ class Database(AbstractModel):
4455
+ """描述数据库详细信息,包括所有者、字符编码等
4456
+
4457
+ """
4458
+
4459
+ def __init__(self):
4460
+ r"""
4461
+ :param _DatabaseName: 数据库名
4462
+ 注意:此字段可能返回 null,表示取不到有效值。
4463
+ :type DatabaseName: str
4464
+ :param _DatabaseOwner: 数据库所有者
4465
+ 注意:此字段可能返回 null,表示取不到有效值。
4466
+ :type DatabaseOwner: str
4467
+ :param _Encoding: 数据库字符编码
4468
+ 注意:此字段可能返回 null,表示取不到有效值。
4469
+ :type Encoding: str
4470
+ :param _Collate: 数据库排序规则
4471
+ 注意:此字段可能返回 null,表示取不到有效值。
4472
+ :type Collate: str
4473
+ :param _Ctype: 数据库字符分类
4474
+ 注意:此字段可能返回 null,表示取不到有效值。
4475
+ :type Ctype: str
4476
+ :param _AllowConn: 数据库是否允许连接
4477
+ 注意:此字段可能返回 null,表示取不到有效值。
4478
+ :type AllowConn: bool
4479
+ :param _ConnLimit: 数据库最大连接数,-1表示无限制
4480
+ 注意:此字段可能返回 null,表示取不到有效值。
4481
+ :type ConnLimit: int
4482
+ :param _Privileges: 数据库权限列表
4483
+ 注意:此字段可能返回 null,表示取不到有效值。
4484
+ :type Privileges: str
4485
+ """
4486
+ self._DatabaseName = None
4487
+ self._DatabaseOwner = None
4488
+ self._Encoding = None
4489
+ self._Collate = None
4490
+ self._Ctype = None
4491
+ self._AllowConn = None
4492
+ self._ConnLimit = None
4493
+ self._Privileges = None
4494
+
4495
+ @property
4496
+ def DatabaseName(self):
4497
+ return self._DatabaseName
4498
+
4499
+ @DatabaseName.setter
4500
+ def DatabaseName(self, DatabaseName):
4501
+ self._DatabaseName = DatabaseName
4502
+
4503
+ @property
4504
+ def DatabaseOwner(self):
4505
+ return self._DatabaseOwner
4506
+
4507
+ @DatabaseOwner.setter
4508
+ def DatabaseOwner(self, DatabaseOwner):
4509
+ self._DatabaseOwner = DatabaseOwner
4510
+
4511
+ @property
4512
+ def Encoding(self):
4513
+ return self._Encoding
4514
+
4515
+ @Encoding.setter
4516
+ def Encoding(self, Encoding):
4517
+ self._Encoding = Encoding
4518
+
4519
+ @property
4520
+ def Collate(self):
4521
+ return self._Collate
4522
+
4523
+ @Collate.setter
4524
+ def Collate(self, Collate):
4525
+ self._Collate = Collate
4526
+
4527
+ @property
4528
+ def Ctype(self):
4529
+ return self._Ctype
4530
+
4531
+ @Ctype.setter
4532
+ def Ctype(self, Ctype):
4533
+ self._Ctype = Ctype
4534
+
4535
+ @property
4536
+ def AllowConn(self):
4537
+ return self._AllowConn
4538
+
4539
+ @AllowConn.setter
4540
+ def AllowConn(self, AllowConn):
4541
+ self._AllowConn = AllowConn
4542
+
4543
+ @property
4544
+ def ConnLimit(self):
4545
+ return self._ConnLimit
4546
+
4547
+ @ConnLimit.setter
4548
+ def ConnLimit(self, ConnLimit):
4549
+ self._ConnLimit = ConnLimit
4550
+
4551
+ @property
4552
+ def Privileges(self):
4553
+ return self._Privileges
4554
+
4555
+ @Privileges.setter
4556
+ def Privileges(self, Privileges):
4557
+ self._Privileges = Privileges
4558
+
4559
+
4560
+ def _deserialize(self, params):
4561
+ self._DatabaseName = params.get("DatabaseName")
4562
+ self._DatabaseOwner = params.get("DatabaseOwner")
4563
+ self._Encoding = params.get("Encoding")
4564
+ self._Collate = params.get("Collate")
4565
+ self._Ctype = params.get("Ctype")
4566
+ self._AllowConn = params.get("AllowConn")
4567
+ self._ConnLimit = params.get("ConnLimit")
4568
+ self._Privileges = params.get("Privileges")
4569
+ memeber_set = set(params.keys())
4570
+ for name, value in vars(self).items():
4571
+ property_name = name[1:]
4572
+ if property_name in memeber_set:
4573
+ memeber_set.remove(property_name)
4574
+ if len(memeber_set) > 0:
4575
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4576
+
4577
+
4578
+
4336
4579
  class DatabaseObject(AbstractModel):
4337
4580
  """描述数据库中某个对象所属的类型、是在哪个数据库、模式、表中的对象。
4338
4581
 
@@ -7070,6 +7313,7 @@ db-pay-mode:按照实例付费模式过滤,类型为string
7070
7313
  db-tag-key:按照标签键过滤,类型为string
7071
7314
  db-private-ip: 按照实例私有网络IP过滤,类型为string
7072
7315
  db-public-address: 按照实例外网地址过滤,类型为string
7316
+ db-dedicated-cluster-id: 按照私有集群Id过滤,类型为string
7073
7317
  :type Filters: list of Filter
7074
7318
  :param _Limit: 每页显示数量,取值范围为1-100,默认为返回10条。
7075
7319
  :type Limit: int
@@ -7794,11 +8038,14 @@ class DescribeDatabasesResponse(AbstractModel):
7794
8038
  :type Items: list of str
7795
8039
  :param _TotalCount: 数据库总数
7796
8040
  :type TotalCount: int
8041
+ :param _Databases: 数据库详情列表
8042
+ :type Databases: list of Database
7797
8043
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
7798
8044
  :type RequestId: str
7799
8045
  """
7800
8046
  self._Items = None
7801
8047
  self._TotalCount = None
8048
+ self._Databases = None
7802
8049
  self._RequestId = None
7803
8050
 
7804
8051
  @property
@@ -7817,6 +8064,14 @@ class DescribeDatabasesResponse(AbstractModel):
7817
8064
  def TotalCount(self, TotalCount):
7818
8065
  self._TotalCount = TotalCount
7819
8066
 
8067
+ @property
8068
+ def Databases(self):
8069
+ return self._Databases
8070
+
8071
+ @Databases.setter
8072
+ def Databases(self, Databases):
8073
+ self._Databases = Databases
8074
+
7820
8075
  @property
7821
8076
  def RequestId(self):
7822
8077
  return self._RequestId
@@ -7829,6 +8084,12 @@ class DescribeDatabasesResponse(AbstractModel):
7829
8084
  def _deserialize(self, params):
7830
8085
  self._Items = params.get("Items")
7831
8086
  self._TotalCount = params.get("TotalCount")
8087
+ if params.get("Databases") is not None:
8088
+ self._Databases = []
8089
+ for item in params.get("Databases"):
8090
+ obj = Database()
8091
+ obj._deserialize(item)
8092
+ self._Databases.append(obj)
7832
8093
  self._RequestId = params.get("RequestId")
7833
8094
 
7834
8095
 
@@ -12429,6 +12690,88 @@ class ModifyDBInstancesProjectResponse(AbstractModel):
12429
12690
  self._RequestId = params.get("RequestId")
12430
12691
 
12431
12692
 
12693
+ class ModifyDatabaseOwnerRequest(AbstractModel):
12694
+ """ModifyDatabaseOwner请求参数结构体
12695
+
12696
+ """
12697
+
12698
+ def __init__(self):
12699
+ r"""
12700
+ :param _DBInstanceId: 实例ID
12701
+ :type DBInstanceId: str
12702
+ :param _DatabaseName: 数据库名称
12703
+ :type DatabaseName: str
12704
+ :param _DatabaseOwner: 数据库新所有者
12705
+ :type DatabaseOwner: str
12706
+ """
12707
+ self._DBInstanceId = None
12708
+ self._DatabaseName = None
12709
+ self._DatabaseOwner = None
12710
+
12711
+ @property
12712
+ def DBInstanceId(self):
12713
+ return self._DBInstanceId
12714
+
12715
+ @DBInstanceId.setter
12716
+ def DBInstanceId(self, DBInstanceId):
12717
+ self._DBInstanceId = DBInstanceId
12718
+
12719
+ @property
12720
+ def DatabaseName(self):
12721
+ return self._DatabaseName
12722
+
12723
+ @DatabaseName.setter
12724
+ def DatabaseName(self, DatabaseName):
12725
+ self._DatabaseName = DatabaseName
12726
+
12727
+ @property
12728
+ def DatabaseOwner(self):
12729
+ return self._DatabaseOwner
12730
+
12731
+ @DatabaseOwner.setter
12732
+ def DatabaseOwner(self, DatabaseOwner):
12733
+ self._DatabaseOwner = DatabaseOwner
12734
+
12735
+
12736
+ def _deserialize(self, params):
12737
+ self._DBInstanceId = params.get("DBInstanceId")
12738
+ self._DatabaseName = params.get("DatabaseName")
12739
+ self._DatabaseOwner = params.get("DatabaseOwner")
12740
+ memeber_set = set(params.keys())
12741
+ for name, value in vars(self).items():
12742
+ property_name = name[1:]
12743
+ if property_name in memeber_set:
12744
+ memeber_set.remove(property_name)
12745
+ if len(memeber_set) > 0:
12746
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
12747
+
12748
+
12749
+
12750
+ class ModifyDatabaseOwnerResponse(AbstractModel):
12751
+ """ModifyDatabaseOwner返回参数结构体
12752
+
12753
+ """
12754
+
12755
+ def __init__(self):
12756
+ r"""
12757
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
12758
+ :type RequestId: str
12759
+ """
12760
+ self._RequestId = None
12761
+
12762
+ @property
12763
+ def RequestId(self):
12764
+ return self._RequestId
12765
+
12766
+ @RequestId.setter
12767
+ def RequestId(self, RequestId):
12768
+ self._RequestId = RequestId
12769
+
12770
+
12771
+ def _deserialize(self, params):
12772
+ self._RequestId = params.get("RequestId")
12773
+
12774
+
12432
12775
  class ModifyParameterTemplateRequest(AbstractModel):
12433
12776
  """ModifyParameterTemplate请求参数结构体
12434
12777
 
@@ -210,6 +210,29 @@ class PostgresClient(AbstractClient):
210
210
  raise TencentCloudSDKException(type(e).__name__, str(e))
211
211
 
212
212
 
213
+ def CreateDatabase(self, request):
214
+ """此接口用于创建数据库,需指定数据库名及所有者。
215
+
216
+ :param request: Request instance for CreateDatabase.
217
+ :type request: :class:`tencentcloud.postgres.v20170312.models.CreateDatabaseRequest`
218
+ :rtype: :class:`tencentcloud.postgres.v20170312.models.CreateDatabaseResponse`
219
+
220
+ """
221
+ try:
222
+ params = request._serialize()
223
+ headers = request.headers
224
+ body = self.call("CreateDatabase", params, headers=headers)
225
+ response = json.loads(body)
226
+ model = models.CreateDatabaseResponse()
227
+ model._deserialize(response["Response"])
228
+ return model
229
+ except Exception as e:
230
+ if isinstance(e, TencentCloudSDKException):
231
+ raise
232
+ else:
233
+ raise TencentCloudSDKException(type(e).__name__, str(e))
234
+
235
+
213
236
  def CreateInstances(self, request):
214
237
  """本接口 (CreateInstances) 用于创建一个或者多个PostgreSQL实例,通过此接口创建的实例无需进行初始化,可直接使用。
215
238
  <li>实例创建成功后将自动开机启动,实例状态变为“运行中”。</li>
@@ -1895,6 +1918,29 @@ class PostgresClient(AbstractClient):
1895
1918
  raise TencentCloudSDKException(type(e).__name__, str(e))
1896
1919
 
1897
1920
 
1921
+ def ModifyDatabaseOwner(self, request):
1922
+ """修改数据库所有者
1923
+
1924
+ :param request: Request instance for ModifyDatabaseOwner.
1925
+ :type request: :class:`tencentcloud.postgres.v20170312.models.ModifyDatabaseOwnerRequest`
1926
+ :rtype: :class:`tencentcloud.postgres.v20170312.models.ModifyDatabaseOwnerResponse`
1927
+
1928
+ """
1929
+ try:
1930
+ params = request._serialize()
1931
+ headers = request.headers
1932
+ body = self.call("ModifyDatabaseOwner", params, headers=headers)
1933
+ response = json.loads(body)
1934
+ model = models.ModifyDatabaseOwnerResponse()
1935
+ model._deserialize(response["Response"])
1936
+ return model
1937
+ except Exception as e:
1938
+ if isinstance(e, TencentCloudSDKException):
1939
+ raise
1940
+ else:
1941
+ raise TencentCloudSDKException(type(e).__name__, str(e))
1942
+
1943
+
1898
1944
  def ModifyParameterTemplate(self, request):
1899
1945
  """本接口(ModifyParameterTemplate)主要用于修改参数模板名称,描述等配置,也可用于管理参数模板中的参数列表。
1900
1946
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-postgres
3
- Version: 3.0.1206
3
+ Version: 3.0.1238
4
4
  Summary: Tencent Cloud Postgres SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common==3.0.1238
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common==3.0.1206