tencentcloud-sdk-python 3.0.1315__py2.py3-none-any.whl → 3.0.1317__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/batch/v20170312/models.py +2 -2
- tencentcloud/bh/v20230418/models.py +783 -2
- tencentcloud/cbs/v20170312/models.py +21 -4
- tencentcloud/cdn/v20180606/errorcodes.py +3 -0
- tencentcloud/cdn/v20180606/models.py +10 -10
- tencentcloud/chdfs/v20201112/models.py +0 -6
- tencentcloud/cls/v20201016/models.py +27 -6
- tencentcloud/common/abstract_client.py +37 -18
- tencentcloud/common/profile/client_profile.py +4 -3
- tencentcloud/common/retry.py +62 -0
- tencentcloud/cvm/v20170312/models.py +17 -2
- tencentcloud/ess/v20201111/models.py +0 -12
- tencentcloud/facefusion/v20220927/models.py +4 -4
- tencentcloud/lcic/v20220817/models.py +0 -8
- tencentcloud/lighthouse/v20200324/models.py +0 -6
- tencentcloud/lkeap/v20240522/models.py +824 -37
- tencentcloud/mna/v20210119/models.py +0 -16
- tencentcloud/mongodb/v20190725/models.py +155 -0
- tencentcloud/mongodb/v20190725/mongodb_client.py +23 -0
- tencentcloud/mps/v20190612/models.py +136 -0
- tencentcloud/mqtt/v20240516/errorcodes.py +6 -0
- tencentcloud/mqtt/v20240516/models.py +2003 -195
- tencentcloud/mqtt/v20240516/mqtt_client.py +255 -0
- tencentcloud/ocr/v20181119/models.py +45 -0
- tencentcloud/rum/v20210622/models.py +16 -0
- tencentcloud/ssl/v20191205/errorcodes.py +3 -0
- tencentcloud/ssl/v20191205/models.py +791 -21
- tencentcloud/ssl/v20191205/ssl_client.py +46 -0
- tencentcloud/tcr/v20190924/models.py +4 -0
- tencentcloud/teo/v20220901/models.py +2 -4
- tencentcloud/tke/v20180525/models.py +30 -0
- tencentcloud/tmt/v20180321/models.py +4 -0
- tencentcloud/trtc/v20190722/models.py +0 -4
- tencentcloud/vpc/v20170312/models.py +7 -4
- tencentcloud/vpc/v20170312/vpc_client.py +1 -1
- tencentcloud/waf/v20180125/models.py +30 -0
- tencentcloud/wedata/v20210820/models.py +189 -0
- tencentcloud/wedata/v20210820/wedata_client.py +23 -0
- {tencentcloud_sdk_python-3.0.1315.dist-info → tencentcloud_sdk_python-3.0.1317.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1315.dist-info → tencentcloud_sdk_python-3.0.1317.dist-info}/RECORD +44 -43
- {tencentcloud_sdk_python-3.0.1315.dist-info → tencentcloud_sdk_python-3.0.1317.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1315.dist-info → tencentcloud_sdk_python-3.0.1317.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1315.dist-info → tencentcloud_sdk_python-3.0.1317.dist-info}/top_level.txt +0 -0
@@ -1579,7 +1579,7 @@ class CreateDisksRequest(AbstractModel):
|
|
1579
1579
|
:type DiskCount: int
|
1580
1580
|
:param _ThroughputPerformance: 可选参数。使用此参数可给云硬盘购买额外的性能。<br>当前仅支持极速型云盘(CLOUD_TSSD)和增强型SSD云硬盘(CLOUD_HSSD)
|
1581
1581
|
:type ThroughputPerformance: int
|
1582
|
-
:param _DiskSize: 云硬盘大小,单位为
|
1582
|
+
:param _DiskSize: 云硬盘大小,单位为GiB。<br><li>如果传入`SnapshotId`则可不传`DiskSize`,此时新建云盘的大小为快照大小</li><br><li>如果传入`SnapshotId`同时传入`DiskSize`,则云盘大小必须大于或等于快照大小</li><br><li>云盘大小取值范围参见云硬盘[产品分类](/document/product/362/2353)的说明。</li>
|
1583
1583
|
:type DiskSize: int
|
1584
1584
|
:param _Shareable: 可选参数,默认为False。传入True时,云盘将创建为共享型云盘。
|
1585
1585
|
:type Shareable: bool
|
@@ -1709,7 +1709,7 @@ class CreateDisksRequest(AbstractModel):
|
|
1709
1709
|
|
1710
1710
|
@property
|
1711
1711
|
def DiskSize(self):
|
1712
|
-
"""云硬盘大小,单位为
|
1712
|
+
"""云硬盘大小,单位为GiB。<br><li>如果传入`SnapshotId`则可不传`DiskSize`,此时新建云盘的大小为快照大小</li><br><li>如果传入`SnapshotId`同时传入`DiskSize`,则云盘大小必须大于或等于快照大小</li><br><li>云盘大小取值范围参见云硬盘[产品分类](/document/product/362/2353)的说明。</li>
|
1713
1713
|
:rtype: int
|
1714
1714
|
"""
|
1715
1715
|
return self._DiskSize
|
@@ -4072,7 +4072,7 @@ class Disk(AbstractModel):
|
|
4072
4072
|
:type DeadlineTime: str
|
4073
4073
|
:param _Attached: 云盘是否挂载到云主机上。取值范围:<br><li>false:表示未挂载</li><li>true:表示已挂载。</li>
|
4074
4074
|
:type Attached: bool
|
4075
|
-
:param _DiskSize: 云硬盘大小,单位
|
4075
|
+
:param _DiskSize: 云硬盘大小,单位GiB。
|
4076
4076
|
:type DiskSize: int
|
4077
4077
|
:param _MigratePercent: 云盘类型变更的迁移进度,取值0到100。
|
4078
4078
|
注意:此字段可能返回 null,表示取不到有效值。
|
@@ -4117,6 +4117,9 @@ class Disk(AbstractModel):
|
|
4117
4117
|
:param _BurstPerformance: 云盘是否开启性能突发
|
4118
4118
|
注意:此字段可能返回 null,表示取不到有效值。
|
4119
4119
|
:type BurstPerformance: bool
|
4120
|
+
:param _EncryptType: 云硬盘加密类型,值为ENCRYPT_V1和ENCRYPT_V2,分别表示第一代和第二代加密技术,两种加密技术互不兼容
|
4121
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
4122
|
+
:type EncryptType: str
|
4120
4123
|
"""
|
4121
4124
|
self._DeleteWithInstance = None
|
4122
4125
|
self._RenewFlag = None
|
@@ -4160,6 +4163,7 @@ class Disk(AbstractModel):
|
|
4160
4163
|
self._LastAttachInsId = None
|
4161
4164
|
self._ErrorPrompt = None
|
4162
4165
|
self._BurstPerformance = None
|
4166
|
+
self._EncryptType = None
|
4163
4167
|
|
4164
4168
|
@property
|
4165
4169
|
def DeleteWithInstance(self):
|
@@ -4425,7 +4429,7 @@ class Disk(AbstractModel):
|
|
4425
4429
|
|
4426
4430
|
@property
|
4427
4431
|
def DiskSize(self):
|
4428
|
-
"""云硬盘大小,单位
|
4432
|
+
"""云硬盘大小,单位GiB。
|
4429
4433
|
:rtype: int
|
4430
4434
|
"""
|
4431
4435
|
return self._DiskSize
|
@@ -4639,6 +4643,18 @@ class Disk(AbstractModel):
|
|
4639
4643
|
def BurstPerformance(self, BurstPerformance):
|
4640
4644
|
self._BurstPerformance = BurstPerformance
|
4641
4645
|
|
4646
|
+
@property
|
4647
|
+
def EncryptType(self):
|
4648
|
+
"""云硬盘加密类型,值为ENCRYPT_V1和ENCRYPT_V2,分别表示第一代和第二代加密技术,两种加密技术互不兼容
|
4649
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
4650
|
+
:rtype: str
|
4651
|
+
"""
|
4652
|
+
return self._EncryptType
|
4653
|
+
|
4654
|
+
@EncryptType.setter
|
4655
|
+
def EncryptType(self, EncryptType):
|
4656
|
+
self._EncryptType = EncryptType
|
4657
|
+
|
4642
4658
|
|
4643
4659
|
def _deserialize(self, params):
|
4644
4660
|
self._DeleteWithInstance = params.get("DeleteWithInstance")
|
@@ -4690,6 +4706,7 @@ class Disk(AbstractModel):
|
|
4690
4706
|
self._LastAttachInsId = params.get("LastAttachInsId")
|
4691
4707
|
self._ErrorPrompt = params.get("ErrorPrompt")
|
4692
4708
|
self._BurstPerformance = params.get("BurstPerformance")
|
4709
|
+
self._EncryptType = params.get("EncryptType")
|
4693
4710
|
memeber_set = set(params.keys())
|
4694
4711
|
for name, value in vars(self).items():
|
4695
4712
|
property_name = name[1:]
|
@@ -26,6 +26,9 @@ FAILEDOPERATION = 'FailedOperation'
|
|
26
26
|
# 域名配置更新操作失败,请重试或联系客服人员解决。
|
27
27
|
FAILEDOPERATION_CDNCONFIGERROR = 'FailedOperation.CdnConfigError'
|
28
28
|
|
29
|
+
# 证书不存在
|
30
|
+
FAILEDOPERATION_SSLCERTNOTFOUND = 'FailedOperation.SslCertNotFound'
|
31
|
+
|
29
32
|
# 内部错误。
|
30
33
|
INTERNALERROR = 'InternalError'
|
31
34
|
|
@@ -3959,7 +3959,7 @@ off:关闭
|
|
3959
3959
|
:param _AccessKey: 访问ID。
|
3960
3960
|
注意:此字段可能返回 null,表示取不到有效值。
|
3961
3961
|
:type AccessKey: str
|
3962
|
-
:param _SecretKey:
|
3962
|
+
:param _SecretKey: 密钥,字段为脱敏返回。
|
3963
3963
|
注意:此字段可能返回 null,表示取不到有效值。
|
3964
3964
|
:type SecretKey: str
|
3965
3965
|
:param _Region: 地域
|
@@ -4002,7 +4002,7 @@ off:关闭
|
|
4002
4002
|
|
4003
4003
|
@property
|
4004
4004
|
def SecretKey(self):
|
4005
|
-
"""
|
4005
|
+
"""密钥,字段为脱敏返回。
|
4006
4006
|
注意:此字段可能返回 null,表示取不到有效值。
|
4007
4007
|
:rtype: str
|
4008
4008
|
"""
|
@@ -20416,7 +20416,7 @@ off:关闭
|
|
20416
20416
|
:param _AccessKey: 访问 ID
|
20417
20417
|
注意:此字段可能返回 null,表示取不到有效值。
|
20418
20418
|
:type AccessKey: str
|
20419
|
-
:param _SecretKey:
|
20419
|
+
:param _SecretKey: 密钥,字段为脱敏返回。
|
20420
20420
|
注意:此字段可能返回 null,表示取不到有效值。
|
20421
20421
|
:type SecretKey: str
|
20422
20422
|
:param _Bucket: bucketname
|
@@ -20455,7 +20455,7 @@ off:关闭
|
|
20455
20455
|
|
20456
20456
|
@property
|
20457
20457
|
def SecretKey(self):
|
20458
|
-
"""
|
20458
|
+
"""密钥,字段为脱敏返回。
|
20459
20459
|
注意:此字段可能返回 null,表示取不到有效值。
|
20460
20460
|
:rtype: str
|
20461
20461
|
"""
|
@@ -25597,7 +25597,7 @@ off:关闭
|
|
25597
25597
|
:param _AccessKey: 访问ID。
|
25598
25598
|
注意:此字段可能返回 null,表示取不到有效值。
|
25599
25599
|
:type AccessKey: str
|
25600
|
-
:param _SecretKey:
|
25600
|
+
:param _SecretKey: 密钥,字段为脱敏返回。
|
25601
25601
|
注意:此字段可能返回 null,表示取不到有效值。
|
25602
25602
|
:type SecretKey: str
|
25603
25603
|
:param _Region: 地域
|
@@ -25640,7 +25640,7 @@ off:关闭
|
|
25640
25640
|
|
25641
25641
|
@property
|
25642
25642
|
def SecretKey(self):
|
25643
|
-
"""
|
25643
|
+
"""密钥,字段为脱敏返回。
|
25644
25644
|
注意:此字段可能返回 null,表示取不到有效值。
|
25645
25645
|
:rtype: str
|
25646
25646
|
"""
|
@@ -25705,7 +25705,7 @@ off:关闭
|
|
25705
25705
|
:param _AccessKey: 访问ID。
|
25706
25706
|
注意:此字段可能返回 null,表示取不到有效值。
|
25707
25707
|
:type AccessKey: str
|
25708
|
-
:param _SecretKey:
|
25708
|
+
:param _SecretKey: 密钥,字段位脱敏返回。
|
25709
25709
|
注意:此字段可能返回 null,表示取不到有效值。
|
25710
25710
|
:type SecretKey: str
|
25711
25711
|
:param _Region: 地域。
|
@@ -25748,7 +25748,7 @@ off:关闭
|
|
25748
25748
|
|
25749
25749
|
@property
|
25750
25750
|
def SecretKey(self):
|
25751
|
-
"""
|
25751
|
+
"""密钥,字段位脱敏返回。
|
25752
25752
|
注意:此字段可能返回 null,表示取不到有效值。
|
25753
25753
|
:rtype: str
|
25754
25754
|
"""
|
@@ -27550,7 +27550,7 @@ off:关闭
|
|
27550
27550
|
:param _AccessKey: 访问 ID
|
27551
27551
|
注意:此字段可能返回 null,表示取不到有效值。
|
27552
27552
|
:type AccessKey: str
|
27553
|
-
:param _SecretKey:
|
27553
|
+
:param _SecretKey: 密钥,字段为脱敏返回。
|
27554
27554
|
:type SecretKey: str
|
27555
27555
|
"""
|
27556
27556
|
self._Switch = None
|
@@ -27584,7 +27584,7 @@ off:关闭
|
|
27584
27584
|
|
27585
27585
|
@property
|
27586
27586
|
def SecretKey(self):
|
27587
|
-
"""
|
27587
|
+
"""密钥,字段为脱敏返回。
|
27588
27588
|
:rtype: str
|
27589
27589
|
"""
|
27590
27590
|
return self._SecretKey
|
@@ -494,7 +494,6 @@ class CreateAccessRulesResponse(AbstractModel):
|
|
494
494
|
def __init__(self):
|
495
495
|
r"""
|
496
496
|
:param _AccessRules: 权限规则列表
|
497
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
498
497
|
:type AccessRules: list of AccessRule
|
499
498
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
500
499
|
:type RequestId: str
|
@@ -505,7 +504,6 @@ class CreateAccessRulesResponse(AbstractModel):
|
|
505
504
|
@property
|
506
505
|
def AccessRules(self):
|
507
506
|
"""权限规则列表
|
508
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
509
507
|
:rtype: list of AccessRule
|
510
508
|
"""
|
511
509
|
return self._AccessRules
|
@@ -2417,10 +2415,8 @@ class FileSystem(AbstractModel):
|
|
2417
2415
|
:param _PosixAcl: POSIX权限控制
|
2418
2416
|
:type PosixAcl: bool
|
2419
2417
|
:param _EnableRanger: 是否打开Ranger地址校验
|
2420
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
2421
2418
|
:type EnableRanger: bool
|
2422
2419
|
:param _RangerServiceAddresses: Ranger地址列表
|
2423
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
2424
2420
|
:type RangerServiceAddresses: list of str
|
2425
2421
|
"""
|
2426
2422
|
self._AppId = None
|
@@ -2561,7 +2557,6 @@ class FileSystem(AbstractModel):
|
|
2561
2557
|
@property
|
2562
2558
|
def EnableRanger(self):
|
2563
2559
|
"""是否打开Ranger地址校验
|
2564
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
2565
2560
|
:rtype: bool
|
2566
2561
|
"""
|
2567
2562
|
return self._EnableRanger
|
@@ -2573,7 +2568,6 @@ class FileSystem(AbstractModel):
|
|
2573
2568
|
@property
|
2574
2569
|
def RangerServiceAddresses(self):
|
2575
2570
|
"""Ranger地址列表
|
2576
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
2577
2571
|
:rtype: list of str
|
2578
2572
|
"""
|
2579
2573
|
return self._RangerServiceAddresses
|
@@ -9266,8 +9266,9 @@ class CreateTopicRequest(AbstractModel):
|
|
9266
9266
|
:type MaxSplitPartitions: int
|
9267
9267
|
:param _StorageType: 日志主题的存储类型,可选值 hot(标准存储),cold(低频存储);默认为hot。
|
9268
9268
|
:type StorageType: str
|
9269
|
-
:param _Period:
|
9270
|
-
|
9269
|
+
:param _Period: 存储时间,单位天。
|
9270
|
+
- 日志接入标准存储时,支持1至3600天,值为3640时代表永久保存。
|
9271
|
+
- 日志接入低频存储时,支持7至3600天,值为3640时代表永久保存。
|
9271
9272
|
:type Period: int
|
9272
9273
|
:param _Describes: 日志主题描述
|
9273
9274
|
:type Describes: str
|
@@ -9275,6 +9276,10 @@ class CreateTopicRequest(AbstractModel):
|
|
9275
9276
|
非0:开启日志沉降后标准存储的天数,HotPeriod需要大于等于7,且小于Period。
|
9276
9277
|
仅在StorageType为 hot 时生效。
|
9277
9278
|
:type HotPeriod: int
|
9279
|
+
:param _TopicId: 主题自定义ID,格式为:用户自定义部分-APPID。未填写该参数时将自动生成ID。
|
9280
|
+
- 用户自定义部分仅支持小写字母、数字和-,且不能以-开头和结尾,长度为3至40字符
|
9281
|
+
- APPID可在https://console.cloud.tencent.com/developer页面查询
|
9282
|
+
:type TopicId: str
|
9278
9283
|
:param _IsWebTracking: 免鉴权开关。 false:关闭; true:开启。默认为false。
|
9279
9284
|
开启后将支持指定操作匿名访问该日志主题。详情请参见[日志主题](https://cloud.tencent.com/document/product/614/41035)。
|
9280
9285
|
:type IsWebTracking: bool
|
@@ -9291,6 +9296,7 @@ class CreateTopicRequest(AbstractModel):
|
|
9291
9296
|
self._Period = None
|
9292
9297
|
self._Describes = None
|
9293
9298
|
self._HotPeriod = None
|
9299
|
+
self._TopicId = None
|
9294
9300
|
self._IsWebTracking = None
|
9295
9301
|
self._Extends = None
|
9296
9302
|
|
@@ -9373,8 +9379,9 @@ class CreateTopicRequest(AbstractModel):
|
|
9373
9379
|
|
9374
9380
|
@property
|
9375
9381
|
def Period(self):
|
9376
|
-
"""
|
9377
|
-
|
9382
|
+
"""存储时间,单位天。
|
9383
|
+
- 日志接入标准存储时,支持1至3600天,值为3640时代表永久保存。
|
9384
|
+
- 日志接入低频存储时,支持7至3600天,值为3640时代表永久保存。
|
9378
9385
|
:rtype: int
|
9379
9386
|
"""
|
9380
9387
|
return self._Period
|
@@ -9407,6 +9414,19 @@ class CreateTopicRequest(AbstractModel):
|
|
9407
9414
|
def HotPeriod(self, HotPeriod):
|
9408
9415
|
self._HotPeriod = HotPeriod
|
9409
9416
|
|
9417
|
+
@property
|
9418
|
+
def TopicId(self):
|
9419
|
+
"""主题自定义ID,格式为:用户自定义部分-APPID。未填写该参数时将自动生成ID。
|
9420
|
+
- 用户自定义部分仅支持小写字母、数字和-,且不能以-开头和结尾,长度为3至40字符
|
9421
|
+
- APPID可在https://console.cloud.tencent.com/developer页面查询
|
9422
|
+
:rtype: str
|
9423
|
+
"""
|
9424
|
+
return self._TopicId
|
9425
|
+
|
9426
|
+
@TopicId.setter
|
9427
|
+
def TopicId(self, TopicId):
|
9428
|
+
self._TopicId = TopicId
|
9429
|
+
|
9410
9430
|
@property
|
9411
9431
|
def IsWebTracking(self):
|
9412
9432
|
"""免鉴权开关。 false:关闭; true:开启。默认为false。
|
@@ -9447,6 +9467,7 @@ class CreateTopicRequest(AbstractModel):
|
|
9447
9467
|
self._Period = params.get("Period")
|
9448
9468
|
self._Describes = params.get("Describes")
|
9449
9469
|
self._HotPeriod = params.get("HotPeriod")
|
9470
|
+
self._TopicId = params.get("TopicId")
|
9450
9471
|
self._IsWebTracking = params.get("IsWebTracking")
|
9451
9472
|
if params.get("Extends") is not None:
|
9452
9473
|
self._Extends = TopicExtendInfo()
|
@@ -25833,7 +25854,7 @@ class NoticeReceiver(AbstractModel):
|
|
25833
25854
|
:type ReceiverType: str
|
25834
25855
|
:param _ReceiverIds: 接收者。
|
25835
25856
|
当ReceiverType为Uin时,ReceiverIds的值为用户uid。[子用户信息查询](https://cloud.tencent.com/document/api/598/53486)
|
25836
|
-
当ReceiverType为Group时,ReceiverIds的值为用户组id。[CAM用户组](https://cloud.tencent.com/document/product/598/
|
25857
|
+
当ReceiverType为Group时,ReceiverIds的值为用户组id。[CAM用户组](https://cloud.tencent.com/document/product/598/34589)
|
25837
25858
|
:type ReceiverIds: list of int
|
25838
25859
|
:param _ReceiverChannels: 通知接收渠道。
|
25839
25860
|
- Email - 邮件
|
@@ -25880,7 +25901,7 @@ class NoticeReceiver(AbstractModel):
|
|
25880
25901
|
def ReceiverIds(self):
|
25881
25902
|
"""接收者。
|
25882
25903
|
当ReceiverType为Uin时,ReceiverIds的值为用户uid。[子用户信息查询](https://cloud.tencent.com/document/api/598/53486)
|
25883
|
-
当ReceiverType为Group时,ReceiverIds的值为用户组id。[CAM用户组](https://cloud.tencent.com/document/product/598/
|
25904
|
+
当ReceiverType为Group时,ReceiverIds的值为用户组id。[CAM用户组](https://cloud.tencent.com/document/product/598/34589)
|
25884
25905
|
:rtype: list of int
|
25885
25906
|
"""
|
25886
25907
|
return self._ReceiverIds
|
@@ -39,6 +39,7 @@ from tencentcloud.common.http.request import RequestInternal
|
|
39
39
|
from tencentcloud.common.profile.client_profile import ClientProfile, RegionBreakerProfile
|
40
40
|
from tencentcloud.common.sign import Sign
|
41
41
|
from tencentcloud.common.circuit_breaker import CircuitBreaker
|
42
|
+
from tencentcloud.common.retry import NoopRetryer
|
42
43
|
|
43
44
|
warnings.filterwarnings("ignore", module="tencentcloud", category=UserWarning)
|
44
45
|
|
@@ -428,11 +429,16 @@ class AbstractClient(object):
|
|
428
429
|
return self.request.send_request(req)
|
429
430
|
|
430
431
|
def call(self, action, params, options=None, headers=None):
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
432
|
+
|
433
|
+
def _call_once():
|
434
|
+
resp = self._call(action, params, options, headers)
|
435
|
+
self._check_status(resp)
|
436
|
+
self._check_error(resp)
|
437
|
+
logger.debug("GetResponse: %s", ResponsePrettyFormatter(resp))
|
438
|
+
return resp
|
439
|
+
|
440
|
+
retryer = self.profile.retryer or NoopRetryer()
|
441
|
+
return retryer.send_request(_call_once).content
|
436
442
|
|
437
443
|
def _call_with_region_breaker(self, action, params, options=None, headers=None):
|
438
444
|
endpoint = self._get_endpoint()
|
@@ -508,23 +514,36 @@ class AbstractClient(object):
|
|
508
514
|
:type options: dict
|
509
515
|
:param options: request options, like {"SkipSign": False, "IsMultipart": False, "IsOctetStream": False, "BinaryParams": []}
|
510
516
|
"""
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
517
|
+
|
518
|
+
def _call_once():
|
519
|
+
resp = self._call(action, params, options, headers)
|
520
|
+
self._check_status(resp)
|
521
|
+
self._check_error(resp)
|
522
|
+
logger.debug("GetResponse: %s", ResponsePrettyFormatter(resp))
|
523
|
+
return resp
|
524
|
+
|
525
|
+
retryer = self.profile.retryer or NoopRetryer()
|
526
|
+
return json.loads(retryer.send_request(_call_once).content)
|
516
527
|
|
517
528
|
def call_sse(self, action, params, headers=None, options=None):
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
529
|
+
def _call_once():
|
530
|
+
resp = self._call(action, params, options, headers)
|
531
|
+
self._check_status(resp)
|
532
|
+
self._check_error(resp)
|
533
|
+
return resp
|
534
|
+
|
535
|
+
retryer = self.profile.retryer or NoopRetryer()
|
536
|
+
return self._process_response_sse(retryer.send_request(_call_once))
|
522
537
|
|
523
538
|
def _call_and_deserialize(self, action, params, resp_type, headers=None, options=None):
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
539
|
+
def _call_once():
|
540
|
+
resp = self._call(action, params, options, headers)
|
541
|
+
self._check_status(resp)
|
542
|
+
self._check_error(resp)
|
543
|
+
return resp
|
544
|
+
|
545
|
+
retryer = self.profile.retryer or NoopRetryer()
|
546
|
+
return self._process_response(retryer.send_request(_call_once), resp_type)
|
528
547
|
|
529
548
|
def _process_response(self, resp, resp_type):
|
530
549
|
if resp.headers.get('Content-Type') == "text/event-stream":
|
@@ -21,7 +21,7 @@ class ClientProfile(object):
|
|
21
21
|
unsignedPayload = False
|
22
22
|
|
23
23
|
def __init__(self, signMethod=None, httpProfile=None, language="zh-CN",
|
24
|
-
disable_region_breaker=True, region_breaker_profile=None, request_client=None):
|
24
|
+
disable_region_breaker=True, region_breaker_profile=None, request_client=None, retryer=None):
|
25
25
|
"""SDK profile.
|
26
26
|
|
27
27
|
:param signMethod: The signature method, valid choice: HmacSHA1, HmacSHA256, TC3-HMAC-SHA256
|
@@ -55,13 +55,15 @@ class ClientProfile(object):
|
|
55
55
|
elif request_client is not None:
|
56
56
|
warnings.warn("RequestClient not match the regexp: ^[0-9a-zA-Z-_,;.]+$, ignored")
|
57
57
|
|
58
|
+
self.retryer = retryer
|
59
|
+
|
58
60
|
|
59
61
|
class RegionBreakerProfile(object):
|
60
62
|
|
61
63
|
def __init__(self, backup_endpoint="ap-guangzhou.tencentcloudapi.com",
|
62
64
|
max_fail_num=5,
|
63
65
|
max_fail_percent=0.75,
|
64
|
-
window_interval=60*5,
|
66
|
+
window_interval=60 * 5,
|
65
67
|
timeout=60,
|
66
68
|
max_requests=5):
|
67
69
|
"""RegionBreaker profile.
|
@@ -102,4 +104,3 @@ class RegionBreakerProfile(object):
|
|
102
104
|
if len(region.split("-")) != 2:
|
103
105
|
return False
|
104
106
|
return True
|
105
|
-
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import logging
|
2
|
+
import time
|
3
|
+
|
4
|
+
from tencentcloud.common.exception import TencentCloudSDKException
|
5
|
+
|
6
|
+
|
7
|
+
class NoopRetryer(object):
|
8
|
+
def send_request(self, fn):
|
9
|
+
return fn()
|
10
|
+
|
11
|
+
|
12
|
+
class StandardRetryer(object):
|
13
|
+
def __init__(self, max_attempts=3, backoff_fn=None, logger=None):
|
14
|
+
self._max_attempts = max_attempts
|
15
|
+
self._backoff_fn = backoff_fn or self.backoff
|
16
|
+
self._logger = logger
|
17
|
+
|
18
|
+
def send_request(self, fn):
|
19
|
+
resp = None
|
20
|
+
err = None
|
21
|
+
|
22
|
+
for n in range(self._max_attempts):
|
23
|
+
try:
|
24
|
+
resp = fn()
|
25
|
+
except TencentCloudSDKException as e:
|
26
|
+
err = e
|
27
|
+
|
28
|
+
if not self.should_retry(resp, err):
|
29
|
+
if err:
|
30
|
+
raise err
|
31
|
+
return resp
|
32
|
+
|
33
|
+
sleep = self._backoff_fn(n)
|
34
|
+
self.on_retry(n, sleep, resp, err)
|
35
|
+
time.sleep(sleep)
|
36
|
+
|
37
|
+
raise err
|
38
|
+
|
39
|
+
@staticmethod
|
40
|
+
def should_retry(resp, err):
|
41
|
+
if not err:
|
42
|
+
return False
|
43
|
+
|
44
|
+
if not isinstance(err, TencentCloudSDKException):
|
45
|
+
return False
|
46
|
+
|
47
|
+
ec = err.get_code()
|
48
|
+
if ec in (
|
49
|
+
"ClientNetworkError", "ServerNetworkError", "RequestLimitExceeded",
|
50
|
+
"RequestLimitExceeded.UinLimitExceeded", "RequestLimitExceeded.GlobalRegionUinLimitExceeded"
|
51
|
+
):
|
52
|
+
return True
|
53
|
+
|
54
|
+
return False
|
55
|
+
|
56
|
+
@staticmethod
|
57
|
+
def backoff(n):
|
58
|
+
return 2 ** n
|
59
|
+
|
60
|
+
def on_retry(self, n, sleep, resp, err):
|
61
|
+
if self._logger:
|
62
|
+
self._logger.debug("retry: n=%d sleep=%ss err=%s", n, sleep, err)
|
@@ -3751,7 +3751,7 @@ class DataDisk(AbstractModel):
|
|
3751
3751
|
:type DiskSize: int
|
3752
3752
|
:param _DiskType: 数据盘类型。数据盘类型限制详见[存储概述](https://cloud.tencent.com/document/product/213/4952)。取值范围:<br /><li>LOCAL_BASIC:本地硬盘<br /> <li>LOCAL_SSD:本地SSD硬盘<br /><li>LOCAL_NVME:本地NVME硬盘,与InstanceType强相关,不支持指定<br /><li>LOCAL_PRO:本地HDD硬盘,与InstanceType强相关,不支持指定<br /><li>CLOUD_BASIC:普通云硬盘<br /><li> CLOUD_PREMIUM:高性能云硬盘<br /><li>CLOUD_SSD:SSD云硬盘<br /><li> CLOUD_HSSD:增强型SSD云硬盘<br /> <li>CLOUD_TSSD:极速型SSD云硬盘<br /><li>CLOUD_BSSD:通用型SSD云硬盘<br /><br />默认取值:LOCAL_BASIC。<br /><br />该参数对`ResizeInstanceDisk`接口无效。</li></li></li> </li> </li></li></li></li></li></li>
|
3753
3753
|
:type DiskType: str
|
3754
|
-
:param _DiskId: 数据盘ID。
|
3754
|
+
:param _DiskId: 数据盘ID。
|
3755
3755
|
该参数目前仅用于`DescribeInstances`等查询类接口的返回参数,不可用于`RunInstances`等写接口的入参。
|
3756
3756
|
:type DiskId: str
|
3757
3757
|
:param _DeleteWithInstance: 数据盘是否随子机销毁。取值范围:
|
@@ -3832,7 +3832,7 @@ class DataDisk(AbstractModel):
|
|
3832
3832
|
|
3833
3833
|
@property
|
3834
3834
|
def DiskId(self):
|
3835
|
-
"""数据盘ID。
|
3835
|
+
"""数据盘ID。
|
3836
3836
|
该参数目前仅用于`DescribeInstances`等查询类接口的返回参数,不可用于`RunInstances`等写接口的入参。
|
3837
3837
|
:rtype: str
|
3838
3838
|
"""
|
@@ -10528,11 +10528,25 @@ class ImportImageResponse(AbstractModel):
|
|
10528
10528
|
|
10529
10529
|
def __init__(self):
|
10530
10530
|
r"""
|
10531
|
+
:param _ImageId: 镜像 ID
|
10532
|
+
:type ImageId: str
|
10531
10533
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
10532
10534
|
:type RequestId: str
|
10533
10535
|
"""
|
10536
|
+
self._ImageId = None
|
10534
10537
|
self._RequestId = None
|
10535
10538
|
|
10539
|
+
@property
|
10540
|
+
def ImageId(self):
|
10541
|
+
"""镜像 ID
|
10542
|
+
:rtype: str
|
10543
|
+
"""
|
10544
|
+
return self._ImageId
|
10545
|
+
|
10546
|
+
@ImageId.setter
|
10547
|
+
def ImageId(self, ImageId):
|
10548
|
+
self._ImageId = ImageId
|
10549
|
+
|
10536
10550
|
@property
|
10537
10551
|
def RequestId(self):
|
10538
10552
|
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
@@ -10546,6 +10560,7 @@ class ImportImageResponse(AbstractModel):
|
|
10546
10560
|
|
10547
10561
|
|
10548
10562
|
def _deserialize(self, params):
|
10563
|
+
self._ImageId = params.get("ImageId")
|
10549
10564
|
self._RequestId = params.get("RequestId")
|
10550
10565
|
|
10551
10566
|
|
@@ -20152,22 +20152,16 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20152
20152
|
def __init__(self):
|
20153
20153
|
r"""
|
20154
20154
|
:param _Total: 符合查询条件的资源实例总数量。
|
20155
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20156
20155
|
:type Total: int
|
20157
20156
|
:param _JoinedTotal: 已授权待激活的子企业总数量
|
20158
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20159
20157
|
:type JoinedTotal: int
|
20160
20158
|
:param _ActivedTotal: 已加入的企业数量(废弃,请使用ActivatedTotal)
|
20161
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20162
20159
|
:type ActivedTotal: int
|
20163
20160
|
:param _ExportUrl: 如果入参Export为 true 时使用,表示导出Excel的url
|
20164
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20165
20161
|
:type ExportUrl: str
|
20166
20162
|
:param _List: 成员企业信息列表
|
20167
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20168
20163
|
:type List: list of GroupOrganization
|
20169
20164
|
:param _ActivatedTotal: 已加入的子企业总数量
|
20170
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20171
20165
|
:type ActivatedTotal: int
|
20172
20166
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
20173
20167
|
:type RequestId: str
|
@@ -20183,7 +20177,6 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20183
20177
|
@property
|
20184
20178
|
def Total(self):
|
20185
20179
|
"""符合查询条件的资源实例总数量。
|
20186
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20187
20180
|
:rtype: int
|
20188
20181
|
"""
|
20189
20182
|
return self._Total
|
@@ -20195,7 +20188,6 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20195
20188
|
@property
|
20196
20189
|
def JoinedTotal(self):
|
20197
20190
|
"""已授权待激活的子企业总数量
|
20198
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20199
20191
|
:rtype: int
|
20200
20192
|
"""
|
20201
20193
|
return self._JoinedTotal
|
@@ -20209,7 +20201,6 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20209
20201
|
warnings.warn("parameter `ActivedTotal` is deprecated", DeprecationWarning)
|
20210
20202
|
|
20211
20203
|
"""已加入的企业数量(废弃,请使用ActivatedTotal)
|
20212
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20213
20204
|
:rtype: int
|
20214
20205
|
"""
|
20215
20206
|
return self._ActivedTotal
|
@@ -20223,7 +20214,6 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20223
20214
|
@property
|
20224
20215
|
def ExportUrl(self):
|
20225
20216
|
"""如果入参Export为 true 时使用,表示导出Excel的url
|
20226
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20227
20217
|
:rtype: str
|
20228
20218
|
"""
|
20229
20219
|
return self._ExportUrl
|
@@ -20235,7 +20225,6 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20235
20225
|
@property
|
20236
20226
|
def List(self):
|
20237
20227
|
"""成员企业信息列表
|
20238
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20239
20228
|
:rtype: list of GroupOrganization
|
20240
20229
|
"""
|
20241
20230
|
return self._List
|
@@ -20247,7 +20236,6 @@ class DescribeOrganizationGroupOrganizationsResponse(AbstractModel):
|
|
20247
20236
|
@property
|
20248
20237
|
def ActivatedTotal(self):
|
20249
20238
|
"""已加入的子企业总数量
|
20250
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
20251
20239
|
:rtype: int
|
20252
20240
|
"""
|
20253
20241
|
return self._ActivatedTotal
|
@@ -826,12 +826,12 @@ class FusionUltraParam(AbstractModel):
|
|
826
826
|
该参数仅对SwapModelType(模型类型)取值1-5生效
|
827
827
|
:type WarpRadio: float
|
828
828
|
:param _EnhanceRadio: 人脸增强强度。对整个人脸进行增强,增加清晰度,改善质量。当生成的人脸不够清晰,质感不够好的时候可以设置。取值越大增强强度越大。
|
829
|
-
取值范围:0-1之间。默认取值
|
829
|
+
取值范围:0-1之间。默认取值0.5。
|
830
830
|
|
831
831
|
该参数仅对SwapModelType(模型类型)取值1-5生效
|
832
832
|
:type EnhanceRadio: float
|
833
833
|
:param _MpRadio: 磨皮强度。当生成脸的图像面部显脏时,可进行设置。
|
834
|
-
取值范围:0-1之间。默认取值
|
834
|
+
取值范围:0-1之间。默认取值0.5。
|
835
835
|
|
836
836
|
该参数仅对SwapModelType(模型类型)取值1-5生效
|
837
837
|
:type MpRadio: float
|
@@ -877,7 +877,7 @@ class FusionUltraParam(AbstractModel):
|
|
877
877
|
@property
|
878
878
|
def EnhanceRadio(self):
|
879
879
|
"""人脸增强强度。对整个人脸进行增强,增加清晰度,改善质量。当生成的人脸不够清晰,质感不够好的时候可以设置。取值越大增强强度越大。
|
880
|
-
取值范围:0-1之间。默认取值
|
880
|
+
取值范围:0-1之间。默认取值0.5。
|
881
881
|
|
882
882
|
该参数仅对SwapModelType(模型类型)取值1-5生效
|
883
883
|
:rtype: float
|
@@ -891,7 +891,7 @@ class FusionUltraParam(AbstractModel):
|
|
891
891
|
@property
|
892
892
|
def MpRadio(self):
|
893
893
|
"""磨皮强度。当生成脸的图像面部显脏时,可进行设置。
|
894
|
-
取值范围:0-1之间。默认取值
|
894
|
+
取值范围:0-1之间。默认取值0.5。
|
895
895
|
|
896
896
|
该参数仅对SwapModelType(模型类型)取值1-5生效
|
897
897
|
:rtype: float
|