tencentcloud-sdk-python 3.0.1362__py2.py3-none-any.whl → 3.0.1363__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 +12 -18
- tencentcloud/ccc/v20200210/ccc_client.py +23 -0
- tencentcloud/ccc/v20200210/errorcodes.py +3 -0
- tencentcloud/ccc/v20200210/models.py +91 -4
- tencentcloud/cdwch/v20200915/models.py +0 -12
- tencentcloud/cfw/v20190904/models.py +115 -12
- tencentcloud/chc/v20230418/models.py +15 -0
- tencentcloud/cme/v20191029/errorcodes.py +3 -0
- tencentcloud/common/abstract_client.py +29 -24
- tencentcloud/common/abstract_model.py +5 -1
- tencentcloud/common/common_client.py +14 -15
- tencentcloud/common/credential.py +68 -65
- tencentcloud/common/exception/tencent_cloud_sdk_exception.py +1 -1
- tencentcloud/common/profile/client_profile.py +32 -30
- tencentcloud/common/profile/http_profile.py +20 -12
- tencentcloud/common/retry.py +18 -0
- tencentcloud/cvm/v20170312/cvm_client.py +7 -1
- tencentcloud/cvm/v20170312/models.py +88 -68
- tencentcloud/cynosdb/v20190107/cynosdb_client.py +69 -0
- tencentcloud/cynosdb/v20190107/models.py +318 -0
- tencentcloud/dc/v20180410/models.py +2 -2
- tencentcloud/dlc/v20210125/models.py +0 -16
- tencentcloud/dts/v20211206/models.py +10 -6
- tencentcloud/es/v20250101/models.py +2 -6
- tencentcloud/ess/v20201111/models.py +15 -0
- tencentcloud/lcic/v20220817/models.py +30 -0
- tencentcloud/lkeap/v20240522/models.py +2 -2
- tencentcloud/monitor/v20180724/models.py +169 -0
- tencentcloud/monitor/v20180724/monitor_client.py +23 -0
- tencentcloud/mps/v20190612/models.py +20 -20
- tencentcloud/tcbr/v20220217/models.py +30 -0
- tencentcloud/tts/v20190823/models.py +15 -15
- tencentcloud/tts/v20190823/tts_client.py +4 -3
- tencentcloud/vpc/v20170312/vpc_client.py +1 -1
- tencentcloud/vrs/v20200824/models.py +17 -0
- tencentcloud/waf/v20180125/errorcodes.py +9 -0
- tencentcloud/waf/v20180125/models.py +3041 -114
- tencentcloud/waf/v20180125/waf_client.py +138 -0
- tencentcloud/wedata/v20210820/models.py +55 -0
- {tencentcloud_sdk_python-3.0.1362.dist-info → tencentcloud_sdk_python-3.0.1363.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1362.dist-info → tencentcloud_sdk_python-3.0.1363.dist-info}/RECORD +45 -45
- {tencentcloud_sdk_python-3.0.1362.dist-info → tencentcloud_sdk_python-3.0.1363.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1362.dist-info → tencentcloud_sdk_python-3.0.1363.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1362.dist-info → tencentcloud_sdk_python-3.0.1363.dist-info}/top_level.txt +0 -0
@@ -1743,22 +1743,17 @@ class CfwInsStatus(AbstractModel):
|
|
1743
1743
|
:param _FwType: 防火墙类型,nat:nat防火墙;ew:vpc间防火墙
|
1744
1744
|
:type FwType: str
|
1745
1745
|
:param _Region: 实例所属地域
|
1746
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1747
1746
|
:type Region: str
|
1748
1747
|
:param _Status: 实例运行状态,Running:正常运行;BypassAutoFix:bypass修复;Updating:升级中;Expand:扩容中;BypassManual:手动触发bypass中;BypassAuto:自动触发bypass中
|
1749
1748
|
:type Status: str
|
1750
1749
|
:param _EventTime: 事件时间
|
1751
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1752
1750
|
:type EventTime: str
|
1753
1751
|
:param _RecoverTime: 恢复时间
|
1754
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1755
1752
|
:type RecoverTime: str
|
1756
1753
|
:param _CfwInsName: 实例名称
|
1757
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1758
1754
|
:type CfwInsName: str
|
1759
1755
|
:param _TrafficMode: Normal: 正常模式
|
1760
1756
|
OnlyRoute: 透明模式
|
1761
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1762
1757
|
:type TrafficMode: str
|
1763
1758
|
"""
|
1764
1759
|
self._CfwInsId = None
|
@@ -1795,7 +1790,6 @@ OnlyRoute: 透明模式
|
|
1795
1790
|
@property
|
1796
1791
|
def Region(self):
|
1797
1792
|
"""实例所属地域
|
1798
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1799
1793
|
:rtype: str
|
1800
1794
|
"""
|
1801
1795
|
return self._Region
|
@@ -1818,7 +1812,6 @@ OnlyRoute: 透明模式
|
|
1818
1812
|
@property
|
1819
1813
|
def EventTime(self):
|
1820
1814
|
"""事件时间
|
1821
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1822
1815
|
:rtype: str
|
1823
1816
|
"""
|
1824
1817
|
return self._EventTime
|
@@ -1830,7 +1823,6 @@ OnlyRoute: 透明模式
|
|
1830
1823
|
@property
|
1831
1824
|
def RecoverTime(self):
|
1832
1825
|
"""恢复时间
|
1833
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1834
1826
|
:rtype: str
|
1835
1827
|
"""
|
1836
1828
|
return self._RecoverTime
|
@@ -1842,7 +1834,6 @@ OnlyRoute: 透明模式
|
|
1842
1834
|
@property
|
1843
1835
|
def CfwInsName(self):
|
1844
1836
|
"""实例名称
|
1845
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1846
1837
|
:rtype: str
|
1847
1838
|
"""
|
1848
1839
|
return self._CfwInsName
|
@@ -1855,7 +1846,6 @@ OnlyRoute: 透明模式
|
|
1855
1846
|
def TrafficMode(self):
|
1856
1847
|
"""Normal: 正常模式
|
1857
1848
|
OnlyRoute: 透明模式
|
1858
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1859
1849
|
:rtype: str
|
1860
1850
|
"""
|
1861
1851
|
return self._TrafficMode
|
@@ -6418,6 +6408,10 @@ class DescAcItem(AbstractModel):
|
|
6418
6408
|
:type TargetName: str
|
6419
6409
|
:param _LastHitTime: 规则最近命中时间
|
6420
6410
|
:type LastHitTime: str
|
6411
|
+
:param _CountryKey: 地区简称
|
6412
|
+
:type CountryKey: str
|
6413
|
+
:param _CityKey: 省份、城市简称
|
6414
|
+
:type CityKey: str
|
6421
6415
|
"""
|
6422
6416
|
self._SourceContent = None
|
6423
6417
|
self._TargetContent = None
|
@@ -6452,6 +6446,8 @@ class DescAcItem(AbstractModel):
|
|
6452
6446
|
self._SourceName = None
|
6453
6447
|
self._TargetName = None
|
6454
6448
|
self._LastHitTime = None
|
6449
|
+
self._CountryKey = None
|
6450
|
+
self._CityKey = None
|
6455
6451
|
|
6456
6452
|
@property
|
6457
6453
|
def SourceContent(self):
|
@@ -6817,6 +6813,28 @@ class DescAcItem(AbstractModel):
|
|
6817
6813
|
def LastHitTime(self, LastHitTime):
|
6818
6814
|
self._LastHitTime = LastHitTime
|
6819
6815
|
|
6816
|
+
@property
|
6817
|
+
def CountryKey(self):
|
6818
|
+
"""地区简称
|
6819
|
+
:rtype: str
|
6820
|
+
"""
|
6821
|
+
return self._CountryKey
|
6822
|
+
|
6823
|
+
@CountryKey.setter
|
6824
|
+
def CountryKey(self, CountryKey):
|
6825
|
+
self._CountryKey = CountryKey
|
6826
|
+
|
6827
|
+
@property
|
6828
|
+
def CityKey(self):
|
6829
|
+
"""省份、城市简称
|
6830
|
+
:rtype: str
|
6831
|
+
"""
|
6832
|
+
return self._CityKey
|
6833
|
+
|
6834
|
+
@CityKey.setter
|
6835
|
+
def CityKey(self, CityKey):
|
6836
|
+
self._CityKey = CityKey
|
6837
|
+
|
6820
6838
|
|
6821
6839
|
def _deserialize(self, params):
|
6822
6840
|
self._SourceContent = params.get("SourceContent")
|
@@ -6857,6 +6875,8 @@ class DescAcItem(AbstractModel):
|
|
6857
6875
|
self._SourceName = params.get("SourceName")
|
6858
6876
|
self._TargetName = params.get("TargetName")
|
6859
6877
|
self._LastHitTime = params.get("LastHitTime")
|
6878
|
+
self._CountryKey = params.get("CountryKey")
|
6879
|
+
self._CityKey = params.get("CityKey")
|
6860
6880
|
memeber_set = set(params.keys())
|
6861
6881
|
for name, value in vars(self).items():
|
6862
6882
|
property_name = name[1:]
|
@@ -9805,6 +9825,8 @@ class DescribeFwEdgeIpsResponse(AbstractModel):
|
|
9805
9825
|
:type RegionLst: list of str
|
9806
9826
|
:param _InstanceTypeLst: 实例类型列表
|
9807
9827
|
:type InstanceTypeLst: list of str
|
9828
|
+
:param _SerilCount: 串行模式开关个数
|
9829
|
+
:type SerilCount: int
|
9808
9830
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
9809
9831
|
:type RequestId: str
|
9810
9832
|
"""
|
@@ -9812,6 +9834,7 @@ class DescribeFwEdgeIpsResponse(AbstractModel):
|
|
9812
9834
|
self._Total = None
|
9813
9835
|
self._RegionLst = None
|
9814
9836
|
self._InstanceTypeLst = None
|
9837
|
+
self._SerilCount = None
|
9815
9838
|
self._RequestId = None
|
9816
9839
|
|
9817
9840
|
@property
|
@@ -9858,6 +9881,17 @@ class DescribeFwEdgeIpsResponse(AbstractModel):
|
|
9858
9881
|
def InstanceTypeLst(self, InstanceTypeLst):
|
9859
9882
|
self._InstanceTypeLst = InstanceTypeLst
|
9860
9883
|
|
9884
|
+
@property
|
9885
|
+
def SerilCount(self):
|
9886
|
+
"""串行模式开关个数
|
9887
|
+
:rtype: int
|
9888
|
+
"""
|
9889
|
+
return self._SerilCount
|
9890
|
+
|
9891
|
+
@SerilCount.setter
|
9892
|
+
def SerilCount(self, SerilCount):
|
9893
|
+
self._SerilCount = SerilCount
|
9894
|
+
|
9861
9895
|
@property
|
9862
9896
|
def RequestId(self):
|
9863
9897
|
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
@@ -9880,6 +9914,7 @@ class DescribeFwEdgeIpsResponse(AbstractModel):
|
|
9880
9914
|
self._Total = params.get("Total")
|
9881
9915
|
self._RegionLst = params.get("RegionLst")
|
9882
9916
|
self._InstanceTypeLst = params.get("InstanceTypeLst")
|
9917
|
+
self._SerilCount = params.get("SerilCount")
|
9883
9918
|
self._RequestId = params.get("RequestId")
|
9884
9919
|
|
9885
9920
|
|
@@ -14381,6 +14416,8 @@ ANY:表示所有
|
|
14381
14416
|
:type BetaList: list of EnterpriseSecurityGroupRuleBetaInfo
|
14382
14417
|
:param _Id: 规则id 等同RuleUuid
|
14383
14418
|
:type Id: int
|
14419
|
+
:param _DnsParseCount: 域名解析的IP统计
|
14420
|
+
:type DnsParseCount: :class:`tencentcloud.cfw.v20190904.models.SgDnsParseCount`
|
14384
14421
|
"""
|
14385
14422
|
self._OrderIndex = None
|
14386
14423
|
self._RuleUuid = None
|
@@ -14412,6 +14449,7 @@ ANY:表示所有
|
|
14412
14449
|
self._ProtocolPortName = None
|
14413
14450
|
self._BetaList = None
|
14414
14451
|
self._Id = None
|
14452
|
+
self._DnsParseCount = None
|
14415
14453
|
|
14416
14454
|
@property
|
14417
14455
|
def OrderIndex(self):
|
@@ -14781,6 +14819,17 @@ ANY:表示所有
|
|
14781
14819
|
def Id(self, Id):
|
14782
14820
|
self._Id = Id
|
14783
14821
|
|
14822
|
+
@property
|
14823
|
+
def DnsParseCount(self):
|
14824
|
+
"""域名解析的IP统计
|
14825
|
+
:rtype: :class:`tencentcloud.cfw.v20190904.models.SgDnsParseCount`
|
14826
|
+
"""
|
14827
|
+
return self._DnsParseCount
|
14828
|
+
|
14829
|
+
@DnsParseCount.setter
|
14830
|
+
def DnsParseCount(self, DnsParseCount):
|
14831
|
+
self._DnsParseCount = DnsParseCount
|
14832
|
+
|
14784
14833
|
|
14785
14834
|
def _deserialize(self, params):
|
14786
14835
|
self._OrderIndex = params.get("OrderIndex")
|
@@ -14818,6 +14867,9 @@ ANY:表示所有
|
|
14818
14867
|
obj._deserialize(item)
|
14819
14868
|
self._BetaList.append(obj)
|
14820
14869
|
self._Id = params.get("Id")
|
14870
|
+
if params.get("DnsParseCount") is not None:
|
14871
|
+
self._DnsParseCount = SgDnsParseCount()
|
14872
|
+
self._DnsParseCount._deserialize(params.get("DnsParseCount"))
|
14821
14873
|
memeber_set = set(params.keys())
|
14822
14874
|
for name, value in vars(self).items():
|
14823
14875
|
property_name = name[1:]
|
@@ -22803,7 +22855,7 @@ region:地域(ap-gaungzhou)
|
|
22803
22855
|
accept:放行
|
22804
22856
|
drop:拒绝
|
22805
22857
|
:type RuleAction: str
|
22806
|
-
:param _Description:
|
22858
|
+
:param _Description: 规则描述 用于规则使用或者场景的描述,最多支持50个字符
|
22807
22859
|
:type Description: str
|
22808
22860
|
:param _OrderIndex: 规则顺序,-1表示最低,1表示最高,请勿和外层Type冲突(和外层的Type配合使用,当中间插入时,指定添加位置)
|
22809
22861
|
:type OrderIndex: str
|
@@ -22908,7 +22960,7 @@ drop:拒绝
|
|
22908
22960
|
|
22909
22961
|
@property
|
22910
22962
|
def Description(self):
|
22911
|
-
"""
|
22963
|
+
"""规则描述 用于规则使用或者场景的描述,最多支持50个字符
|
22912
22964
|
:rtype: str
|
22913
22965
|
"""
|
22914
22966
|
return self._Description
|
@@ -23465,6 +23517,57 @@ class SetNatFwEipResponse(AbstractModel):
|
|
23465
23517
|
self._RequestId = params.get("RequestId")
|
23466
23518
|
|
23467
23519
|
|
23520
|
+
class SgDnsParseCount(AbstractModel):
|
23521
|
+
"""企业安全组域名解析的IP统计
|
23522
|
+
|
23523
|
+
"""
|
23524
|
+
|
23525
|
+
def __init__(self):
|
23526
|
+
r"""
|
23527
|
+
:param _ValidCount: 有效下发的IP个数,离散数据
|
23528
|
+
:type ValidCount: int
|
23529
|
+
:param _InvalidCount: 未下发的IP个数,离散数据
|
23530
|
+
:type InvalidCount: int
|
23531
|
+
"""
|
23532
|
+
self._ValidCount = None
|
23533
|
+
self._InvalidCount = None
|
23534
|
+
|
23535
|
+
@property
|
23536
|
+
def ValidCount(self):
|
23537
|
+
"""有效下发的IP个数,离散数据
|
23538
|
+
:rtype: int
|
23539
|
+
"""
|
23540
|
+
return self._ValidCount
|
23541
|
+
|
23542
|
+
@ValidCount.setter
|
23543
|
+
def ValidCount(self, ValidCount):
|
23544
|
+
self._ValidCount = ValidCount
|
23545
|
+
|
23546
|
+
@property
|
23547
|
+
def InvalidCount(self):
|
23548
|
+
"""未下发的IP个数,离散数据
|
23549
|
+
:rtype: int
|
23550
|
+
"""
|
23551
|
+
return self._InvalidCount
|
23552
|
+
|
23553
|
+
@InvalidCount.setter
|
23554
|
+
def InvalidCount(self, InvalidCount):
|
23555
|
+
self._InvalidCount = InvalidCount
|
23556
|
+
|
23557
|
+
|
23558
|
+
def _deserialize(self, params):
|
23559
|
+
self._ValidCount = params.get("ValidCount")
|
23560
|
+
self._InvalidCount = params.get("InvalidCount")
|
23561
|
+
memeber_set = set(params.keys())
|
23562
|
+
for name, value in vars(self).items():
|
23563
|
+
property_name = name[1:]
|
23564
|
+
if property_name in memeber_set:
|
23565
|
+
memeber_set.remove(property_name)
|
23566
|
+
if len(memeber_set) > 0:
|
23567
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
23568
|
+
|
23569
|
+
|
23570
|
+
|
23468
23571
|
class StaticInfo(AbstractModel):
|
23469
23572
|
"""StaticInfo 告警柱形图统计信息
|
23470
23573
|
|
@@ -3994,11 +3994,14 @@ class DescribeModelVersionListRequest(AbstractModel):
|
|
3994
3994
|
:type Checked: bool
|
3995
3995
|
:param _CampusId: 园区ID,当 Checked 参数传 True 时,该参数必须传值
|
3996
3996
|
:type CampusId: int
|
3997
|
+
:param _ModelName: 型号关键字,可以实现模糊匹配搜索功能
|
3998
|
+
:type ModelName: str
|
3997
3999
|
"""
|
3998
4000
|
self._DeviceType = None
|
3999
4001
|
self._Filters = None
|
4000
4002
|
self._Checked = None
|
4001
4003
|
self._CampusId = None
|
4004
|
+
self._ModelName = None
|
4002
4005
|
|
4003
4006
|
@property
|
4004
4007
|
def DeviceType(self):
|
@@ -4044,6 +4047,17 @@ class DescribeModelVersionListRequest(AbstractModel):
|
|
4044
4047
|
def CampusId(self, CampusId):
|
4045
4048
|
self._CampusId = CampusId
|
4046
4049
|
|
4050
|
+
@property
|
4051
|
+
def ModelName(self):
|
4052
|
+
"""型号关键字,可以实现模糊匹配搜索功能
|
4053
|
+
:rtype: str
|
4054
|
+
"""
|
4055
|
+
return self._ModelName
|
4056
|
+
|
4057
|
+
@ModelName.setter
|
4058
|
+
def ModelName(self, ModelName):
|
4059
|
+
self._ModelName = ModelName
|
4060
|
+
|
4047
4061
|
|
4048
4062
|
def _deserialize(self, params):
|
4049
4063
|
self._DeviceType = params.get("DeviceType")
|
@@ -4055,6 +4069,7 @@ class DescribeModelVersionListRequest(AbstractModel):
|
|
4055
4069
|
self._Filters.append(obj)
|
4056
4070
|
self._Checked = params.get("Checked")
|
4057
4071
|
self._CampusId = params.get("CampusId")
|
4072
|
+
self._ModelName = params.get("ModelName")
|
4058
4073
|
memeber_set = set(params.keys())
|
4059
4074
|
for name, value in vars(self).items():
|
4060
4075
|
property_name = name[1:]
|
@@ -83,6 +83,9 @@ INVALIDPARAMETERVALUE_DEFINITION = 'InvalidParameterValue.Definition'
|
|
83
83
|
# 目标分类不存在。
|
84
84
|
INVALIDPARAMETERVALUE_DSTCLASSPATHNOTEXIST = 'InvalidParameterValue.DstClassPathNotExist'
|
85
85
|
|
86
|
+
# 结束时间参数不合法。
|
87
|
+
INVALIDPARAMETERVALUE_ENDTIME = 'InvalidParameterValue.EndTime'
|
88
|
+
|
86
89
|
# 导出目标不合法。
|
87
90
|
INVALIDPARAMETERVALUE_EXPORTDESTINATION = 'InvalidParameterValue.ExportDestination'
|
88
91
|
|
@@ -471,20 +471,19 @@ class AbstractClient(object):
|
|
471
471
|
return resp.content
|
472
472
|
|
473
473
|
def call_octet_stream(self, action, headers, body):
|
474
|
-
"""
|
475
|
-
Invoke API with application/ocet-stream content-type.
|
474
|
+
"""Invoke API with application/ocet-stream content-type.
|
476
475
|
|
477
476
|
Note:
|
478
477
|
1. only specific API can be invoked in such manner.
|
479
478
|
2. only TC3-HMAC-SHA256 signature method can be specified.
|
480
479
|
3. only POST request method can be specified
|
481
480
|
|
482
|
-
:type action: str
|
483
481
|
:param action: Specific API action name.
|
484
|
-
:type
|
482
|
+
:type action: str
|
485
483
|
:param headers: Header parameters for this API.
|
486
|
-
:type
|
484
|
+
:type headers: dict
|
487
485
|
:param body: Bytes of requested body
|
486
|
+
:type body: bytes
|
488
487
|
"""
|
489
488
|
if self.profile.signMethod != "TC3-HMAC-SHA256":
|
490
489
|
raise SDKError("ClientError", "Invalid signature method.")
|
@@ -505,17 +504,16 @@ class AbstractClient(object):
|
|
505
504
|
return json.loads(resp.content)
|
506
505
|
|
507
506
|
def call_json(self, action, params, headers=None, options=None):
|
508
|
-
"""
|
509
|
-
Call api with json object and return with json object.
|
507
|
+
"""Call api with json object and return with json object.
|
510
508
|
|
511
|
-
:type action: str
|
512
509
|
:param action: api name e.g. ``DescribeInstances``
|
510
|
+
:type action: str
|
511
|
+
:param params: Request parameters of this action
|
513
512
|
:type params: dict
|
514
|
-
:param
|
513
|
+
:param headers: Request headers, like {"X-TC-TraceId": "ffe0c072-8a5d-4e17-8887-a8a60252abca"}
|
515
514
|
:type headers: dict
|
516
|
-
:param
|
515
|
+
:param options: Request options, like {"SkipSign": False, "IsMultipart": False, "IsOctetStream": False, "BinaryParams": []}
|
517
516
|
:type options: dict
|
518
|
-
:param options: request options, like {"SkipSign": False, "IsMultipart": False, "IsOctetStream": False, "BinaryParams": []}
|
519
517
|
"""
|
520
518
|
|
521
519
|
def _call_once():
|
@@ -529,6 +527,17 @@ class AbstractClient(object):
|
|
529
527
|
return json.loads(retryer.send_request(_call_once).content)
|
530
528
|
|
531
529
|
def call_sse(self, action, params, headers=None, options=None):
|
530
|
+
"""Call api with json object and return with sse event.
|
531
|
+
|
532
|
+
:param action: api name e.g. ``ChatCompletions``
|
533
|
+
:type action: str
|
534
|
+
:param params: Request parameters of this action
|
535
|
+
:type params: dict
|
536
|
+
:param headers: Request headers, like {"X-TC-TraceId": "ffe0c072-8a5d-4e17-8887-a8a60252abca"}
|
537
|
+
:type headers: dict
|
538
|
+
:param options: Request options, like {"SkipSign": False, "IsMultipart": False, "IsOctetStream": False, "BinaryParams": []}
|
539
|
+
:type options: dict
|
540
|
+
"""
|
532
541
|
def _call_once():
|
533
542
|
resp = self._call(action, params, options, headers)
|
534
543
|
self._check_status(resp)
|
@@ -557,15 +566,14 @@ class AbstractClient(object):
|
|
557
566
|
return self._process_response_json(resp, resp_type)
|
558
567
|
|
559
568
|
def set_stream_logger(self, stream=None, level=logging.DEBUG, log_format=None):
|
560
|
-
"""
|
561
|
-
Add a stream handler
|
569
|
+
"""Add a stream handler
|
562
570
|
|
563
|
-
:type stream: IO[str]
|
564
571
|
:param stream: e.g. ``sys.stdout`` ``sys.stdin`` ``sys.stderr``
|
565
|
-
:type
|
572
|
+
:type stream: IO[str]
|
566
573
|
:param level: Logging level, e.g. ``logging.INFO``
|
567
|
-
:type
|
574
|
+
:type level: int
|
568
575
|
:param log_format: Log message format
|
576
|
+
:type log_format: str
|
569
577
|
"""
|
570
578
|
log = logging.getLogger(LOGGER_NAME)
|
571
579
|
log.setLevel(level)
|
@@ -578,15 +586,14 @@ class AbstractClient(object):
|
|
578
586
|
log.addHandler(sh)
|
579
587
|
|
580
588
|
def set_file_logger(self, file_path, level=logging.DEBUG, log_format=None):
|
581
|
-
"""
|
582
|
-
Add a file handler
|
589
|
+
"""Add a file handler
|
583
590
|
|
584
|
-
:type file_path: str
|
585
591
|
:param file_path: path of log file
|
586
|
-
:type
|
592
|
+
:type file_path: str
|
587
593
|
:param level: Logging level, e.g. ``logging.INFO``
|
588
|
-
:type
|
594
|
+
:type level: int
|
589
595
|
:param log_format: Log message format
|
596
|
+
:type log_format: str
|
590
597
|
"""
|
591
598
|
log = logging.getLogger(LOGGER_NAME)
|
592
599
|
log.setLevel(level)
|
@@ -600,9 +607,7 @@ class AbstractClient(object):
|
|
600
607
|
log.addHandler(fh)
|
601
608
|
|
602
609
|
def set_default_logger(self):
|
603
|
-
"""
|
604
|
-
Set default log handler
|
605
|
-
"""
|
610
|
+
"""Set default log handler"""
|
606
611
|
log = logging.getLogger(LOGGER_NAME)
|
607
612
|
log.handlers = []
|
608
613
|
logger.addHandler(EmptyHandler())
|
@@ -61,7 +61,11 @@ class AbstractModel(object):
|
|
61
61
|
return json.dumps(self._serialize(allow_none=True), *args, **kwargs)
|
62
62
|
|
63
63
|
def from_json_string(self, jsonStr):
|
64
|
-
"""Deserialize a JSON formatted str to a Python object
|
64
|
+
"""Deserialize a JSON formatted str to a Python object
|
65
|
+
|
66
|
+
:param jsonStr: JSON formatted string
|
67
|
+
:type jsonStr: str
|
68
|
+
"""
|
65
69
|
params = json.loads(jsonStr)
|
66
70
|
self._deserialize(params)
|
67
71
|
|
@@ -21,25 +21,24 @@ from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentClo
|
|
21
21
|
|
22
22
|
|
23
23
|
class CommonClient(AbstractClient):
|
24
|
-
"""
|
25
|
-
|
26
|
-
|
24
|
+
"""General client for all products.
|
25
|
+
|
26
|
+
With CommonClient, you only need to install the tencentcloud-sdk-python-common package to access APIs of all products.
|
27
|
+
See GitHub examples for usage details: https://github.com/TencentCloud/tencentcloud-sdk-python/tree/master/examples/common_client
|
27
28
|
|
29
|
+
:param service: Product name
|
30
|
+
:type service: str
|
31
|
+
:param version: Version of API
|
32
|
+
:type version: str
|
33
|
+
:param credential: Request credential
|
34
|
+
:type credential: tencentcloud.common.credential.Credential or tencentcloud.common.credential.STSAssumeRoleCredential or None
|
35
|
+
:param region: Request region
|
36
|
+
:type region: str
|
37
|
+
:param profile: Request SDK profile
|
38
|
+
:type profile: tencentcloud.common.profile.client_profile.ClientProfile
|
28
39
|
"""
|
29
40
|
|
30
41
|
def __init__(self, service, version, credential, region, profile=None):
|
31
|
-
"""
|
32
|
-
:param credential: 接口调用凭证
|
33
|
-
:type credential: tencentcloud.common.credential.Credential or tencentcloud.common.credential.STSAssumeRoleCredential or None
|
34
|
-
:param region: 接口调用地域
|
35
|
-
:type region: str
|
36
|
-
:param version: 接口版本
|
37
|
-
:type version: str
|
38
|
-
:param service: 接口产品
|
39
|
-
:type service: str
|
40
|
-
:param profile: 请求网络信息
|
41
|
-
:type profile: tencentcloud.common.profile.client_profile.ClientProfile
|
42
|
-
"""
|
43
42
|
if region is None or version is None or service is None:
|
44
43
|
raise TencentCloudSDKException("CommonClient Parameter Error, "
|
45
44
|
"credential region version service all required.")
|