tencentcloud-sdk-python 3.0.1394__py2.py3-none-any.whl → 3.0.1396__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/apm/v20210622/models.py +17 -2
- tencentcloud/bh/v20230418/models.py +15 -0
- tencentcloud/cbs/v20170312/cbs_client.py +3 -1
- tencentcloud/cdb/v20170320/models.py +36 -6
- tencentcloud/cfs/v20190719/models.py +2 -2
- tencentcloud/chc/v20230418/chc_client.py +23 -0
- tencentcloud/chc/v20230418/errorcodes.py +9 -0
- tencentcloud/chc/v20230418/models.py +109 -0
- tencentcloud/cvm/v20170312/models.py +8 -0
- tencentcloud/cwp/v20180228/models.py +137 -2
- tencentcloud/dbbrain/v20210527/dbbrain_client.py +1 -1
- tencentcloud/dbbrain/v20210527/models.py +4 -4
- tencentcloud/dts/v20211206/models.py +6 -6
- tencentcloud/emr/v20190103/models.py +304 -4
- tencentcloud/ess/v20201111/ess_client.py +56 -0
- tencentcloud/ess/v20201111/models.py +255 -0
- tencentcloud/essbasic/v20210526/models.py +2 -2
- tencentcloud/gs/v20191118/gs_client.py +233 -3
- tencentcloud/gs/v20191118/models.py +1310 -55
- tencentcloud/iotexplorer/v20190423/iotexplorer_client.py +2 -2
- tencentcloud/mariadb/v20170312/models.py +30 -10
- tencentcloud/ocr/v20181119/models.py +131 -18
- tencentcloud/ocr/v20181119/ocr_client.py +1 -1
- tencentcloud/tcss/v20201101/models.py +94 -4
- tencentcloud/tem/v20210701/errorcodes.py +6 -0
- tencentcloud/tem/v20210701/models.py +200 -0
- tencentcloud/tem/v20210701/tem_client.py +23 -0
- tencentcloud/teo/v20220901/models.py +1417 -117
- tencentcloud/trtc/v20190722/models.py +12 -4
- tencentcloud/vclm/v20240523/models.py +350 -0
- tencentcloud/vclm/v20240523/vclm_client.py +46 -0
- tencentcloud/vod/v20180717/models.py +44 -0
- tencentcloud/vpc/v20170312/models.py +19 -2
- tencentcloud/waf/v20180125/models.py +0 -2
- tencentcloud/wedata/v20210820/models.py +1902 -0
- tencentcloud/wedata/v20210820/wedata_client.py +23 -0
- {tencentcloud_sdk_python-3.0.1394.dist-info → tencentcloud_sdk_python-3.0.1396.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1394.dist-info → tencentcloud_sdk_python-3.0.1396.dist-info}/RECORD +42 -42
- {tencentcloud_sdk_python-3.0.1394.dist-info → tencentcloud_sdk_python-3.0.1396.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1394.dist-info → tencentcloud_sdk_python-3.0.1396.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1394.dist-info → tencentcloud_sdk_python-3.0.1396.dist-info}/top_level.txt +0 -0
@@ -1290,6 +1290,74 @@ class Action(AbstractModel):
|
|
1290
1290
|
|
1291
1291
|
|
1292
1292
|
|
1293
|
+
class AdaptiveFrequencyControl(AbstractModel):
|
1294
|
+
"""自适应频控
|
1295
|
+
|
1296
|
+
"""
|
1297
|
+
|
1298
|
+
def __init__(self):
|
1299
|
+
r"""
|
1300
|
+
:param _Enabled: 自适应频控是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
1301
|
+
:type Enabled: str
|
1302
|
+
:param _Sensitivity: 自适应频控的限制等级,当 Enabled 为 on 时,此字段必填。取值有:<li>Loose:宽松;</li><li>Moderate:适中;</li><li>Strict:严格。</li>
|
1303
|
+
:type Sensitivity: str
|
1304
|
+
:param _Action: 自适应频控的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name仅支持JSChallenge。</li>
|
1305
|
+
:type Action: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
1306
|
+
"""
|
1307
|
+
self._Enabled = None
|
1308
|
+
self._Sensitivity = None
|
1309
|
+
self._Action = None
|
1310
|
+
|
1311
|
+
@property
|
1312
|
+
def Enabled(self):
|
1313
|
+
"""自适应频控是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
1314
|
+
:rtype: str
|
1315
|
+
"""
|
1316
|
+
return self._Enabled
|
1317
|
+
|
1318
|
+
@Enabled.setter
|
1319
|
+
def Enabled(self, Enabled):
|
1320
|
+
self._Enabled = Enabled
|
1321
|
+
|
1322
|
+
@property
|
1323
|
+
def Sensitivity(self):
|
1324
|
+
"""自适应频控的限制等级,当 Enabled 为 on 时,此字段必填。取值有:<li>Loose:宽松;</li><li>Moderate:适中;</li><li>Strict:严格。</li>
|
1325
|
+
:rtype: str
|
1326
|
+
"""
|
1327
|
+
return self._Sensitivity
|
1328
|
+
|
1329
|
+
@Sensitivity.setter
|
1330
|
+
def Sensitivity(self, Sensitivity):
|
1331
|
+
self._Sensitivity = Sensitivity
|
1332
|
+
|
1333
|
+
@property
|
1334
|
+
def Action(self):
|
1335
|
+
"""自适应频控的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name仅支持JSChallenge。</li>
|
1336
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
1337
|
+
"""
|
1338
|
+
return self._Action
|
1339
|
+
|
1340
|
+
@Action.setter
|
1341
|
+
def Action(self, Action):
|
1342
|
+
self._Action = Action
|
1343
|
+
|
1344
|
+
|
1345
|
+
def _deserialize(self, params):
|
1346
|
+
self._Enabled = params.get("Enabled")
|
1347
|
+
self._Sensitivity = params.get("Sensitivity")
|
1348
|
+
if params.get("Action") is not None:
|
1349
|
+
self._Action = SecurityAction()
|
1350
|
+
self._Action._deserialize(params.get("Action"))
|
1351
|
+
memeber_set = set(params.keys())
|
1352
|
+
for name, value in vars(self).items():
|
1353
|
+
property_name = name[1:]
|
1354
|
+
if property_name in memeber_set:
|
1355
|
+
memeber_set.remove(property_name)
|
1356
|
+
if len(memeber_set) > 0:
|
1357
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
1358
|
+
|
1359
|
+
|
1360
|
+
|
1293
1361
|
class AdvancedFilter(AbstractModel):
|
1294
1362
|
"""描述键值对过滤器,用于条件过滤查询,支持模糊查询。例如过滤ID、名称、状态等。
|
1295
1363
|
若存在多个Filter时,Filter间的关系为逻辑与(AND)关系。
|
@@ -2813,6 +2881,59 @@ class AuthenticationParameters(AbstractModel):
|
|
2813
2881
|
|
2814
2882
|
|
2815
2883
|
|
2884
|
+
class BandwidthAbuseDefense(AbstractModel):
|
2885
|
+
"""流量防盗刷(仅适用中国大陆地区)的具体配置。
|
2886
|
+
|
2887
|
+
"""
|
2888
|
+
|
2889
|
+
def __init__(self):
|
2890
|
+
r"""
|
2891
|
+
:param _Enabled: 流量防盗刷(仅适用中国大陆地区)是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
2892
|
+
:type Enabled: str
|
2893
|
+
:param _Action: 流量防盗刷(仅适用中国大陆地区)的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name仅支持JSChallenge。</li>
|
2894
|
+
:type Action: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
2895
|
+
"""
|
2896
|
+
self._Enabled = None
|
2897
|
+
self._Action = None
|
2898
|
+
|
2899
|
+
@property
|
2900
|
+
def Enabled(self):
|
2901
|
+
"""流量防盗刷(仅适用中国大陆地区)是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
2902
|
+
:rtype: str
|
2903
|
+
"""
|
2904
|
+
return self._Enabled
|
2905
|
+
|
2906
|
+
@Enabled.setter
|
2907
|
+
def Enabled(self, Enabled):
|
2908
|
+
self._Enabled = Enabled
|
2909
|
+
|
2910
|
+
@property
|
2911
|
+
def Action(self):
|
2912
|
+
"""流量防盗刷(仅适用中国大陆地区)的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name仅支持JSChallenge。</li>
|
2913
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
2914
|
+
"""
|
2915
|
+
return self._Action
|
2916
|
+
|
2917
|
+
@Action.setter
|
2918
|
+
def Action(self, Action):
|
2919
|
+
self._Action = Action
|
2920
|
+
|
2921
|
+
|
2922
|
+
def _deserialize(self, params):
|
2923
|
+
self._Enabled = params.get("Enabled")
|
2924
|
+
if params.get("Action") is not None:
|
2925
|
+
self._Action = SecurityAction()
|
2926
|
+
self._Action._deserialize(params.get("Action"))
|
2927
|
+
memeber_set = set(params.keys())
|
2928
|
+
for name, value in vars(self).items():
|
2929
|
+
property_name = name[1:]
|
2930
|
+
if property_name in memeber_set:
|
2931
|
+
memeber_set.remove(property_name)
|
2932
|
+
if len(memeber_set) > 0:
|
2933
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
2934
|
+
|
2935
|
+
|
2936
|
+
|
2816
2937
|
class BillingData(AbstractModel):
|
2817
2938
|
"""计费数据项
|
2818
2939
|
|
@@ -5392,6 +5513,74 @@ class CertificateInfo(AbstractModel):
|
|
5392
5513
|
|
5393
5514
|
|
5394
5515
|
|
5516
|
+
class ChallengeActionParameters(AbstractModel):
|
5517
|
+
"""Web 安全 Challenge 挑战的附加参数
|
5518
|
+
|
5519
|
+
"""
|
5520
|
+
|
5521
|
+
def __init__(self):
|
5522
|
+
r"""
|
5523
|
+
:param _ChallengeOption: 安全执行的具体挑战动作。取值有:<li> InterstitialChallenge:插页式挑战;</li><li> InlineChallenge:内嵌式挑战;</li><li> JSChallenge:JavaScript 挑战;</li><li> ManagedChallenge:托管挑战。</li>
|
5524
|
+
:type ChallengeOption: str
|
5525
|
+
:param _Interval: 重复挑战的时间间隔,当 Name 为 InterstitialChallenge/InlineChallenge 时,该字段必填。默认值为 300s。支持的单位有:<li>s:秒,取值范围1~60;</li><li>m:分,取值范围1~60;</li><li>h:小时,取值范围1~24。</li>
|
5526
|
+
|
5527
|
+
:type Interval: str
|
5528
|
+
:param _AttesterId: 客户端认证方式 ID 。当 Name 为 InterstitialChallenge/InlineChallenge 时,该字段必填。
|
5529
|
+
:type AttesterId: str
|
5530
|
+
"""
|
5531
|
+
self._ChallengeOption = None
|
5532
|
+
self._Interval = None
|
5533
|
+
self._AttesterId = None
|
5534
|
+
|
5535
|
+
@property
|
5536
|
+
def ChallengeOption(self):
|
5537
|
+
"""安全执行的具体挑战动作。取值有:<li> InterstitialChallenge:插页式挑战;</li><li> InlineChallenge:内嵌式挑战;</li><li> JSChallenge:JavaScript 挑战;</li><li> ManagedChallenge:托管挑战。</li>
|
5538
|
+
:rtype: str
|
5539
|
+
"""
|
5540
|
+
return self._ChallengeOption
|
5541
|
+
|
5542
|
+
@ChallengeOption.setter
|
5543
|
+
def ChallengeOption(self, ChallengeOption):
|
5544
|
+
self._ChallengeOption = ChallengeOption
|
5545
|
+
|
5546
|
+
@property
|
5547
|
+
def Interval(self):
|
5548
|
+
"""重复挑战的时间间隔,当 Name 为 InterstitialChallenge/InlineChallenge 时,该字段必填。默认值为 300s。支持的单位有:<li>s:秒,取值范围1~60;</li><li>m:分,取值范围1~60;</li><li>h:小时,取值范围1~24。</li>
|
5549
|
+
|
5550
|
+
:rtype: str
|
5551
|
+
"""
|
5552
|
+
return self._Interval
|
5553
|
+
|
5554
|
+
@Interval.setter
|
5555
|
+
def Interval(self, Interval):
|
5556
|
+
self._Interval = Interval
|
5557
|
+
|
5558
|
+
@property
|
5559
|
+
def AttesterId(self):
|
5560
|
+
"""客户端认证方式 ID 。当 Name 为 InterstitialChallenge/InlineChallenge 时,该字段必填。
|
5561
|
+
:rtype: str
|
5562
|
+
"""
|
5563
|
+
return self._AttesterId
|
5564
|
+
|
5565
|
+
@AttesterId.setter
|
5566
|
+
def AttesterId(self, AttesterId):
|
5567
|
+
self._AttesterId = AttesterId
|
5568
|
+
|
5569
|
+
|
5570
|
+
def _deserialize(self, params):
|
5571
|
+
self._ChallengeOption = params.get("ChallengeOption")
|
5572
|
+
self._Interval = params.get("Interval")
|
5573
|
+
self._AttesterId = params.get("AttesterId")
|
5574
|
+
memeber_set = set(params.keys())
|
5575
|
+
for name, value in vars(self).items():
|
5576
|
+
property_name = name[1:]
|
5577
|
+
if property_name in memeber_set:
|
5578
|
+
memeber_set.remove(property_name)
|
5579
|
+
if len(memeber_set) > 0:
|
5580
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
5581
|
+
|
5582
|
+
|
5583
|
+
|
5395
5584
|
class CheckCnameStatusRequest(AbstractModel):
|
5396
5585
|
"""CheckCnameStatus请求参数结构体
|
5397
5586
|
|
@@ -5568,106 +5757,49 @@ class CheckRegionHealthStatus(AbstractModel):
|
|
5568
5757
|
|
5569
5758
|
|
5570
5759
|
|
5571
|
-
class
|
5572
|
-
"""
|
5573
|
-
|
5574
|
-
"""
|
5575
|
-
|
5576
|
-
def __init__(self):
|
5577
|
-
r"""
|
5578
|
-
:param _Switch: 配置开关,取值有:
|
5579
|
-
<li>on:开启;</li>
|
5580
|
-
<li>off:关闭。</li>
|
5581
|
-
:type Switch: str
|
5582
|
-
:param _HeaderName: 存放客户端 IP 所属地域信息的请求头名称,当 Switch=on 时有效。为空则使用默认值:EO-Client-IPCountry。
|
5583
|
-
:type HeaderName: str
|
5584
|
-
"""
|
5585
|
-
self._Switch = None
|
5586
|
-
self._HeaderName = None
|
5587
|
-
|
5588
|
-
@property
|
5589
|
-
def Switch(self):
|
5590
|
-
"""配置开关,取值有:
|
5591
|
-
<li>on:开启;</li>
|
5592
|
-
<li>off:关闭。</li>
|
5593
|
-
:rtype: str
|
5594
|
-
"""
|
5595
|
-
return self._Switch
|
5596
|
-
|
5597
|
-
@Switch.setter
|
5598
|
-
def Switch(self, Switch):
|
5599
|
-
self._Switch = Switch
|
5600
|
-
|
5601
|
-
@property
|
5602
|
-
def HeaderName(self):
|
5603
|
-
"""存放客户端 IP 所属地域信息的请求头名称,当 Switch=on 时有效。为空则使用默认值:EO-Client-IPCountry。
|
5604
|
-
:rtype: str
|
5605
|
-
"""
|
5606
|
-
return self._HeaderName
|
5607
|
-
|
5608
|
-
@HeaderName.setter
|
5609
|
-
def HeaderName(self, HeaderName):
|
5610
|
-
self._HeaderName = HeaderName
|
5611
|
-
|
5612
|
-
|
5613
|
-
def _deserialize(self, params):
|
5614
|
-
self._Switch = params.get("Switch")
|
5615
|
-
self._HeaderName = params.get("HeaderName")
|
5616
|
-
memeber_set = set(params.keys())
|
5617
|
-
for name, value in vars(self).items():
|
5618
|
-
property_name = name[1:]
|
5619
|
-
if property_name in memeber_set:
|
5620
|
-
memeber_set.remove(property_name)
|
5621
|
-
if len(memeber_set) > 0:
|
5622
|
-
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
5623
|
-
|
5624
|
-
|
5625
|
-
|
5626
|
-
class ClientIPHeaderParameters(AbstractModel):
|
5627
|
-
"""存储客户端请求IP的头部信息配置。
|
5760
|
+
class ClientFiltering(AbstractModel):
|
5761
|
+
"""智能客户端过滤
|
5628
5762
|
|
5629
5763
|
"""
|
5630
5764
|
|
5631
5765
|
def __init__(self):
|
5632
5766
|
r"""
|
5633
|
-
:param
|
5634
|
-
|
5635
|
-
|
5636
|
-
:type
|
5637
|
-
:param _HeaderName: 回源时,存放客户端 IP 的请求头名称。当 Switch 为 on 时,该参数必填。该参数不允许填写 X-Forwarded-For。
|
5638
|
-
:type HeaderName: str
|
5767
|
+
:param _Enabled: 智能客户端过滤是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
5768
|
+
:type Enabled: str
|
5769
|
+
:param _Action: 智能客户端过滤的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name仅支持JSChallenge。</li>
|
5770
|
+
:type Action: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
5639
5771
|
"""
|
5640
|
-
self.
|
5641
|
-
self.
|
5772
|
+
self._Enabled = None
|
5773
|
+
self._Action = None
|
5642
5774
|
|
5643
5775
|
@property
|
5644
|
-
def
|
5645
|
-
"""
|
5646
|
-
<li>on:开启;</li>
|
5647
|
-
<li>off:关闭。</li>
|
5776
|
+
def Enabled(self):
|
5777
|
+
"""智能客户端过滤是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
5648
5778
|
:rtype: str
|
5649
5779
|
"""
|
5650
|
-
return self.
|
5780
|
+
return self._Enabled
|
5651
5781
|
|
5652
|
-
@
|
5653
|
-
def
|
5654
|
-
self.
|
5782
|
+
@Enabled.setter
|
5783
|
+
def Enabled(self, Enabled):
|
5784
|
+
self._Enabled = Enabled
|
5655
5785
|
|
5656
5786
|
@property
|
5657
|
-
def
|
5658
|
-
"""
|
5659
|
-
:rtype:
|
5787
|
+
def Action(self):
|
5788
|
+
"""智能客户端过滤的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name仅支持JSChallenge。</li>
|
5789
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
5660
5790
|
"""
|
5661
|
-
return self.
|
5791
|
+
return self._Action
|
5662
5792
|
|
5663
|
-
@
|
5664
|
-
def
|
5665
|
-
self.
|
5793
|
+
@Action.setter
|
5794
|
+
def Action(self, Action):
|
5795
|
+
self._Action = Action
|
5666
5796
|
|
5667
5797
|
|
5668
5798
|
def _deserialize(self, params):
|
5669
|
-
self.
|
5670
|
-
|
5799
|
+
self._Enabled = params.get("Enabled")
|
5800
|
+
if params.get("Action") is not None:
|
5801
|
+
self._Action = SecurityAction()
|
5802
|
+
self._Action._deserialize(params.get("Action"))
|
5671
5803
|
memeber_set = set(params.keys())
|
5672
5804
|
for name, value in vars(self).items():
|
5673
5805
|
property_name = name[1:]
|
@@ -5678,8 +5810,8 @@ class ClientIPHeaderParameters(AbstractModel):
|
|
5678
5810
|
|
5679
5811
|
|
5680
5812
|
|
5681
|
-
class
|
5682
|
-
"""回源时携带客户端IP所属地域信息,值的格式为ISO-3166-1两位字母代码。
|
5813
|
+
class ClientIPCountryParameters(AbstractModel):
|
5814
|
+
"""回源时携带客户端 IP 所属地域信息,值的格式为 ISO-3166-1 两位字母代码。
|
5683
5815
|
|
5684
5816
|
"""
|
5685
5817
|
|
@@ -5689,8 +5821,7 @@ class ClientIpCountry(AbstractModel):
|
|
5689
5821
|
<li>on:开启;</li>
|
5690
5822
|
<li>off:关闭。</li>
|
5691
5823
|
:type Switch: str
|
5692
|
-
:param _HeaderName: 存放客户端 IP 所属地域信息的请求头名称,当 Switch=on
|
5693
|
-
为空则使用默认值:EO-Client-IPCountry。
|
5824
|
+
:param _HeaderName: 存放客户端 IP 所属地域信息的请求头名称,当 Switch=on 时有效。为空则使用默认值:EO-Client-IPCountry。
|
5694
5825
|
:type HeaderName: str
|
5695
5826
|
"""
|
5696
5827
|
self._Switch = None
|
@@ -5711,8 +5842,7 @@ class ClientIpCountry(AbstractModel):
|
|
5711
5842
|
|
5712
5843
|
@property
|
5713
5844
|
def HeaderName(self):
|
5714
|
-
"""存放客户端 IP 所属地域信息的请求头名称,当 Switch=on
|
5715
|
-
为空则使用默认值:EO-Client-IPCountry。
|
5845
|
+
"""存放客户端 IP 所属地域信息的请求头名称,当 Switch=on 时有效。为空则使用默认值:EO-Client-IPCountry。
|
5716
5846
|
:rtype: str
|
5717
5847
|
"""
|
5718
5848
|
return self._HeaderName
|
@@ -5735,8 +5865,120 @@ class ClientIpCountry(AbstractModel):
|
|
5735
5865
|
|
5736
5866
|
|
5737
5867
|
|
5738
|
-
class
|
5739
|
-
"""存储客户端请求IP
|
5868
|
+
class ClientIPHeaderParameters(AbstractModel):
|
5869
|
+
"""存储客户端请求IP的头部信息配置。
|
5870
|
+
|
5871
|
+
"""
|
5872
|
+
|
5873
|
+
def __init__(self):
|
5874
|
+
r"""
|
5875
|
+
:param _Switch: 配置开关,取值有:
|
5876
|
+
<li>on:开启;</li>
|
5877
|
+
<li>off:关闭。</li>
|
5878
|
+
:type Switch: str
|
5879
|
+
:param _HeaderName: 回源时,存放客户端 IP 的请求头名称。当 Switch 为 on 时,该参数必填。该参数不允许填写 X-Forwarded-For。
|
5880
|
+
:type HeaderName: str
|
5881
|
+
"""
|
5882
|
+
self._Switch = None
|
5883
|
+
self._HeaderName = None
|
5884
|
+
|
5885
|
+
@property
|
5886
|
+
def Switch(self):
|
5887
|
+
"""配置开关,取值有:
|
5888
|
+
<li>on:开启;</li>
|
5889
|
+
<li>off:关闭。</li>
|
5890
|
+
:rtype: str
|
5891
|
+
"""
|
5892
|
+
return self._Switch
|
5893
|
+
|
5894
|
+
@Switch.setter
|
5895
|
+
def Switch(self, Switch):
|
5896
|
+
self._Switch = Switch
|
5897
|
+
|
5898
|
+
@property
|
5899
|
+
def HeaderName(self):
|
5900
|
+
"""回源时,存放客户端 IP 的请求头名称。当 Switch 为 on 时,该参数必填。该参数不允许填写 X-Forwarded-For。
|
5901
|
+
:rtype: str
|
5902
|
+
"""
|
5903
|
+
return self._HeaderName
|
5904
|
+
|
5905
|
+
@HeaderName.setter
|
5906
|
+
def HeaderName(self, HeaderName):
|
5907
|
+
self._HeaderName = HeaderName
|
5908
|
+
|
5909
|
+
|
5910
|
+
def _deserialize(self, params):
|
5911
|
+
self._Switch = params.get("Switch")
|
5912
|
+
self._HeaderName = params.get("HeaderName")
|
5913
|
+
memeber_set = set(params.keys())
|
5914
|
+
for name, value in vars(self).items():
|
5915
|
+
property_name = name[1:]
|
5916
|
+
if property_name in memeber_set:
|
5917
|
+
memeber_set.remove(property_name)
|
5918
|
+
if len(memeber_set) > 0:
|
5919
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
5920
|
+
|
5921
|
+
|
5922
|
+
|
5923
|
+
class ClientIpCountry(AbstractModel):
|
5924
|
+
"""回源时携带客户端IP所属地域信息,值的格式为ISO-3166-1两位字母代码。
|
5925
|
+
|
5926
|
+
"""
|
5927
|
+
|
5928
|
+
def __init__(self):
|
5929
|
+
r"""
|
5930
|
+
:param _Switch: 配置开关,取值有:
|
5931
|
+
<li>on:开启;</li>
|
5932
|
+
<li>off:关闭。</li>
|
5933
|
+
:type Switch: str
|
5934
|
+
:param _HeaderName: 存放客户端 IP 所属地域信息的请求头名称,当 Switch=on 时有效。
|
5935
|
+
为空则使用默认值:EO-Client-IPCountry。
|
5936
|
+
:type HeaderName: str
|
5937
|
+
"""
|
5938
|
+
self._Switch = None
|
5939
|
+
self._HeaderName = None
|
5940
|
+
|
5941
|
+
@property
|
5942
|
+
def Switch(self):
|
5943
|
+
"""配置开关,取值有:
|
5944
|
+
<li>on:开启;</li>
|
5945
|
+
<li>off:关闭。</li>
|
5946
|
+
:rtype: str
|
5947
|
+
"""
|
5948
|
+
return self._Switch
|
5949
|
+
|
5950
|
+
@Switch.setter
|
5951
|
+
def Switch(self, Switch):
|
5952
|
+
self._Switch = Switch
|
5953
|
+
|
5954
|
+
@property
|
5955
|
+
def HeaderName(self):
|
5956
|
+
"""存放客户端 IP 所属地域信息的请求头名称,当 Switch=on 时有效。
|
5957
|
+
为空则使用默认值:EO-Client-IPCountry。
|
5958
|
+
:rtype: str
|
5959
|
+
"""
|
5960
|
+
return self._HeaderName
|
5961
|
+
|
5962
|
+
@HeaderName.setter
|
5963
|
+
def HeaderName(self, HeaderName):
|
5964
|
+
self._HeaderName = HeaderName
|
5965
|
+
|
5966
|
+
|
5967
|
+
def _deserialize(self, params):
|
5968
|
+
self._Switch = params.get("Switch")
|
5969
|
+
self._HeaderName = params.get("HeaderName")
|
5970
|
+
memeber_set = set(params.keys())
|
5971
|
+
for name, value in vars(self).items():
|
5972
|
+
property_name = name[1:]
|
5973
|
+
if property_name in memeber_set:
|
5974
|
+
memeber_set.remove(property_name)
|
5975
|
+
if len(memeber_set) > 0:
|
5976
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
5977
|
+
|
5978
|
+
|
5979
|
+
|
5980
|
+
class ClientIpHeader(AbstractModel):
|
5981
|
+
"""存储客户端请求IP的头部信息配置
|
5740
5982
|
|
5741
5983
|
"""
|
5742
5984
|
|
@@ -13173,6 +13415,143 @@ class DeliveryCondition(AbstractModel):
|
|
13173
13415
|
|
13174
13416
|
|
13175
13417
|
|
13418
|
+
class DenyActionParameters(AbstractModel):
|
13419
|
+
"""安全执行动作为封禁的附加参数。
|
13420
|
+
|
13421
|
+
"""
|
13422
|
+
|
13423
|
+
def __init__(self):
|
13424
|
+
r"""
|
13425
|
+
:param _BlockIp: 是否对来源 IP 延长封禁。取值有:
|
13426
|
+
<li>on:开启;</li>
|
13427
|
+
<li>off:关闭。</li>
|
13428
|
+
启用后,对触发规则的客户端 IP 持续拦截。当启用该选项时,必须同时指定 BlockIpDuration 参数。
|
13429
|
+
注意:该选项不可与 ReturnCustomPage 或 Stall 选项同时启用。
|
13430
|
+
:type BlockIp: str
|
13431
|
+
:param _BlockIpDuration: 当 BlockIP 为 on 时IP 的封禁时长。
|
13432
|
+
:type BlockIpDuration: str
|
13433
|
+
:param _ReturnCustomPage: 是否使用自定义页面。取值有:
|
13434
|
+
<li>on:开启;</li>
|
13435
|
+
<li>off:关闭。</li>
|
13436
|
+
启用后,使用自定义页面内容拦截(响应)请求,当启用该选项时,必须同时指定 ResponseCode 和 ErrorPageId 参数。
|
13437
|
+
注意:该选项不可与 BlockIp 或 Stall 选项同时启用。
|
13438
|
+
|
13439
|
+
:type ReturnCustomPage: str
|
13440
|
+
:param _ResponseCode: 自定义页面的状态码。
|
13441
|
+
:type ResponseCode: str
|
13442
|
+
:param _ErrorPageId: 自定义页面的PageId。
|
13443
|
+
:type ErrorPageId: str
|
13444
|
+
:param _Stall: 是否对请求来源挂起不予处理。取值有:
|
13445
|
+
<li>on:开启;</li>
|
13446
|
+
<li>off:关闭。</li>
|
13447
|
+
启用后,不再响应当前连接会话内请求,且不会主动断开连接。用于爬虫对抗时,消耗客户端连接资源。
|
13448
|
+
注意:该选项不可与 BlockIp 或 ReturnCustomPage 选项同时启用。
|
13449
|
+
:type Stall: str
|
13450
|
+
"""
|
13451
|
+
self._BlockIp = None
|
13452
|
+
self._BlockIpDuration = None
|
13453
|
+
self._ReturnCustomPage = None
|
13454
|
+
self._ResponseCode = None
|
13455
|
+
self._ErrorPageId = None
|
13456
|
+
self._Stall = None
|
13457
|
+
|
13458
|
+
@property
|
13459
|
+
def BlockIp(self):
|
13460
|
+
"""是否对来源 IP 延长封禁。取值有:
|
13461
|
+
<li>on:开启;</li>
|
13462
|
+
<li>off:关闭。</li>
|
13463
|
+
启用后,对触发规则的客户端 IP 持续拦截。当启用该选项时,必须同时指定 BlockIpDuration 参数。
|
13464
|
+
注意:该选项不可与 ReturnCustomPage 或 Stall 选项同时启用。
|
13465
|
+
:rtype: str
|
13466
|
+
"""
|
13467
|
+
return self._BlockIp
|
13468
|
+
|
13469
|
+
@BlockIp.setter
|
13470
|
+
def BlockIp(self, BlockIp):
|
13471
|
+
self._BlockIp = BlockIp
|
13472
|
+
|
13473
|
+
@property
|
13474
|
+
def BlockIpDuration(self):
|
13475
|
+
"""当 BlockIP 为 on 时IP 的封禁时长。
|
13476
|
+
:rtype: str
|
13477
|
+
"""
|
13478
|
+
return self._BlockIpDuration
|
13479
|
+
|
13480
|
+
@BlockIpDuration.setter
|
13481
|
+
def BlockIpDuration(self, BlockIpDuration):
|
13482
|
+
self._BlockIpDuration = BlockIpDuration
|
13483
|
+
|
13484
|
+
@property
|
13485
|
+
def ReturnCustomPage(self):
|
13486
|
+
"""是否使用自定义页面。取值有:
|
13487
|
+
<li>on:开启;</li>
|
13488
|
+
<li>off:关闭。</li>
|
13489
|
+
启用后,使用自定义页面内容拦截(响应)请求,当启用该选项时,必须同时指定 ResponseCode 和 ErrorPageId 参数。
|
13490
|
+
注意:该选项不可与 BlockIp 或 Stall 选项同时启用。
|
13491
|
+
|
13492
|
+
:rtype: str
|
13493
|
+
"""
|
13494
|
+
return self._ReturnCustomPage
|
13495
|
+
|
13496
|
+
@ReturnCustomPage.setter
|
13497
|
+
def ReturnCustomPage(self, ReturnCustomPage):
|
13498
|
+
self._ReturnCustomPage = ReturnCustomPage
|
13499
|
+
|
13500
|
+
@property
|
13501
|
+
def ResponseCode(self):
|
13502
|
+
"""自定义页面的状态码。
|
13503
|
+
:rtype: str
|
13504
|
+
"""
|
13505
|
+
return self._ResponseCode
|
13506
|
+
|
13507
|
+
@ResponseCode.setter
|
13508
|
+
def ResponseCode(self, ResponseCode):
|
13509
|
+
self._ResponseCode = ResponseCode
|
13510
|
+
|
13511
|
+
@property
|
13512
|
+
def ErrorPageId(self):
|
13513
|
+
"""自定义页面的PageId。
|
13514
|
+
:rtype: str
|
13515
|
+
"""
|
13516
|
+
return self._ErrorPageId
|
13517
|
+
|
13518
|
+
@ErrorPageId.setter
|
13519
|
+
def ErrorPageId(self, ErrorPageId):
|
13520
|
+
self._ErrorPageId = ErrorPageId
|
13521
|
+
|
13522
|
+
@property
|
13523
|
+
def Stall(self):
|
13524
|
+
"""是否对请求来源挂起不予处理。取值有:
|
13525
|
+
<li>on:开启;</li>
|
13526
|
+
<li>off:关闭。</li>
|
13527
|
+
启用后,不再响应当前连接会话内请求,且不会主动断开连接。用于爬虫对抗时,消耗客户端连接资源。
|
13528
|
+
注意:该选项不可与 BlockIp 或 ReturnCustomPage 选项同时启用。
|
13529
|
+
:rtype: str
|
13530
|
+
"""
|
13531
|
+
return self._Stall
|
13532
|
+
|
13533
|
+
@Stall.setter
|
13534
|
+
def Stall(self, Stall):
|
13535
|
+
self._Stall = Stall
|
13536
|
+
|
13537
|
+
|
13538
|
+
def _deserialize(self, params):
|
13539
|
+
self._BlockIp = params.get("BlockIp")
|
13540
|
+
self._BlockIpDuration = params.get("BlockIpDuration")
|
13541
|
+
self._ReturnCustomPage = params.get("ReturnCustomPage")
|
13542
|
+
self._ResponseCode = params.get("ResponseCode")
|
13543
|
+
self._ErrorPageId = params.get("ErrorPageId")
|
13544
|
+
self._Stall = params.get("Stall")
|
13545
|
+
memeber_set = set(params.keys())
|
13546
|
+
for name, value in vars(self).items():
|
13547
|
+
property_name = name[1:]
|
13548
|
+
if property_name in memeber_set:
|
13549
|
+
memeber_set.remove(property_name)
|
13550
|
+
if len(memeber_set) > 0:
|
13551
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
13552
|
+
|
13553
|
+
|
13554
|
+
|
13176
13555
|
class DeployConfigGroupVersionRequest(AbstractModel):
|
13177
13556
|
"""DeployConfigGroupVersion请求参数结构体
|
13178
13557
|
|
@@ -23773,6 +24152,223 @@ class ExceptUserRuleScope(AbstractModel):
|
|
23773
24152
|
|
23774
24153
|
|
23775
24154
|
|
24155
|
+
class ExceptionRule(AbstractModel):
|
24156
|
+
"""Web安全的例外规则
|
24157
|
+
|
24158
|
+
"""
|
24159
|
+
|
24160
|
+
def __init__(self):
|
24161
|
+
r"""
|
24162
|
+
:param _Id: 例外规则的 ID。<br>通过规则 ID 可支持不同的规则配置操作:<br> <li> <b>增加</b>新规则:ID 为空或不指定 ID 参数;</li><li> <b>修改</b>已有规则:指定需要更新/修改的规则 ID;</li><li> <b>删除</b>已有规则:ExceptionRules 参数中,Rules 列表中未包含的已有规则将被删除。</li>
|
24163
|
+
:type Id: str
|
24164
|
+
:param _Name: 例外规则的名称。
|
24165
|
+
:type Name: str
|
24166
|
+
:param _Condition: 例外规则的具体内容,需符合表达式语法,详细规范参见产品文档。
|
24167
|
+
:type Condition: str
|
24168
|
+
:param _SkipScope: 例外规则执行选项,取值有:<li>WebSecurityModules: 指定例外规则的安全防护模块。</li><li>ManagedRules:指定托管规则。</li>
|
24169
|
+
:type SkipScope: str
|
24170
|
+
:param _SkipOption: 跳过请求的具体类型,取值有:<li>SkipOnAllRequestFields: 跳过所有请求;</li><li>SkipOnSpecifiedRequestFields: 跳过指定请求字段。</li>仅当 SkipScope 为 ManagedRules 时有效。
|
24171
|
+
:type SkipOption: str
|
24172
|
+
:param _WebSecurityModulesForException: 指定例外规则的安全防护模块,仅当 SkipScope 为 WebSecurityModules 时有效。取值有:<li>websec-mod-managed-rules:托管规则;</li><li>websec-mod-rate-limiting:速率限制;</li><li>websec-mod-custom-rules:自定义规则;</li><li>websec-mod-adaptive-control:自适应频控、智能客户端过滤、慢速攻击防护、流量盗刷防护;</li><li>websec-mod-bot:Bot管理。</li>
|
24173
|
+
:type WebSecurityModulesForException: list of str
|
24174
|
+
:param _ManagedRulesForException: 指定例外规则的具体托管规则,仅当 SkipScope 为 ManagedRules 时有效,且此时不能指定 ManagedRuleGroupsForException 。
|
24175
|
+
:type ManagedRulesForException: list of str
|
24176
|
+
:param _ManagedRuleGroupsForException: 指定例外规则的托管规则组,仅当 SkipScope 为 ManagedRules 时有效,且此时不能指定 ManagedRulesForException 。
|
24177
|
+
:type ManagedRuleGroupsForException: list of str
|
24178
|
+
:param _RequestFieldsForException: 指定例外规则跳过指定请求字段的具体配置,仅当 SkipScope 为 ManagedRules 并且 SkipOption 为 SkipOnSpecifiedRequestFields 时有效。
|
24179
|
+
:type RequestFieldsForException: list of RequestFieldsForException
|
24180
|
+
:param _Enabled: 例外规则是否开启。取值有:<li>on:开启</li><li>off:关闭</li>
|
24181
|
+
:type Enabled: str
|
24182
|
+
"""
|
24183
|
+
self._Id = None
|
24184
|
+
self._Name = None
|
24185
|
+
self._Condition = None
|
24186
|
+
self._SkipScope = None
|
24187
|
+
self._SkipOption = None
|
24188
|
+
self._WebSecurityModulesForException = None
|
24189
|
+
self._ManagedRulesForException = None
|
24190
|
+
self._ManagedRuleGroupsForException = None
|
24191
|
+
self._RequestFieldsForException = None
|
24192
|
+
self._Enabled = None
|
24193
|
+
|
24194
|
+
@property
|
24195
|
+
def Id(self):
|
24196
|
+
"""例外规则的 ID。<br>通过规则 ID 可支持不同的规则配置操作:<br> <li> <b>增加</b>新规则:ID 为空或不指定 ID 参数;</li><li> <b>修改</b>已有规则:指定需要更新/修改的规则 ID;</li><li> <b>删除</b>已有规则:ExceptionRules 参数中,Rules 列表中未包含的已有规则将被删除。</li>
|
24197
|
+
:rtype: str
|
24198
|
+
"""
|
24199
|
+
return self._Id
|
24200
|
+
|
24201
|
+
@Id.setter
|
24202
|
+
def Id(self, Id):
|
24203
|
+
self._Id = Id
|
24204
|
+
|
24205
|
+
@property
|
24206
|
+
def Name(self):
|
24207
|
+
"""例外规则的名称。
|
24208
|
+
:rtype: str
|
24209
|
+
"""
|
24210
|
+
return self._Name
|
24211
|
+
|
24212
|
+
@Name.setter
|
24213
|
+
def Name(self, Name):
|
24214
|
+
self._Name = Name
|
24215
|
+
|
24216
|
+
@property
|
24217
|
+
def Condition(self):
|
24218
|
+
"""例外规则的具体内容,需符合表达式语法,详细规范参见产品文档。
|
24219
|
+
:rtype: str
|
24220
|
+
"""
|
24221
|
+
return self._Condition
|
24222
|
+
|
24223
|
+
@Condition.setter
|
24224
|
+
def Condition(self, Condition):
|
24225
|
+
self._Condition = Condition
|
24226
|
+
|
24227
|
+
@property
|
24228
|
+
def SkipScope(self):
|
24229
|
+
"""例外规则执行选项,取值有:<li>WebSecurityModules: 指定例外规则的安全防护模块。</li><li>ManagedRules:指定托管规则。</li>
|
24230
|
+
:rtype: str
|
24231
|
+
"""
|
24232
|
+
return self._SkipScope
|
24233
|
+
|
24234
|
+
@SkipScope.setter
|
24235
|
+
def SkipScope(self, SkipScope):
|
24236
|
+
self._SkipScope = SkipScope
|
24237
|
+
|
24238
|
+
@property
|
24239
|
+
def SkipOption(self):
|
24240
|
+
"""跳过请求的具体类型,取值有:<li>SkipOnAllRequestFields: 跳过所有请求;</li><li>SkipOnSpecifiedRequestFields: 跳过指定请求字段。</li>仅当 SkipScope 为 ManagedRules 时有效。
|
24241
|
+
:rtype: str
|
24242
|
+
"""
|
24243
|
+
return self._SkipOption
|
24244
|
+
|
24245
|
+
@SkipOption.setter
|
24246
|
+
def SkipOption(self, SkipOption):
|
24247
|
+
self._SkipOption = SkipOption
|
24248
|
+
|
24249
|
+
@property
|
24250
|
+
def WebSecurityModulesForException(self):
|
24251
|
+
"""指定例外规则的安全防护模块,仅当 SkipScope 为 WebSecurityModules 时有效。取值有:<li>websec-mod-managed-rules:托管规则;</li><li>websec-mod-rate-limiting:速率限制;</li><li>websec-mod-custom-rules:自定义规则;</li><li>websec-mod-adaptive-control:自适应频控、智能客户端过滤、慢速攻击防护、流量盗刷防护;</li><li>websec-mod-bot:Bot管理。</li>
|
24252
|
+
:rtype: list of str
|
24253
|
+
"""
|
24254
|
+
return self._WebSecurityModulesForException
|
24255
|
+
|
24256
|
+
@WebSecurityModulesForException.setter
|
24257
|
+
def WebSecurityModulesForException(self, WebSecurityModulesForException):
|
24258
|
+
self._WebSecurityModulesForException = WebSecurityModulesForException
|
24259
|
+
|
24260
|
+
@property
|
24261
|
+
def ManagedRulesForException(self):
|
24262
|
+
"""指定例外规则的具体托管规则,仅当 SkipScope 为 ManagedRules 时有效,且此时不能指定 ManagedRuleGroupsForException 。
|
24263
|
+
:rtype: list of str
|
24264
|
+
"""
|
24265
|
+
return self._ManagedRulesForException
|
24266
|
+
|
24267
|
+
@ManagedRulesForException.setter
|
24268
|
+
def ManagedRulesForException(self, ManagedRulesForException):
|
24269
|
+
self._ManagedRulesForException = ManagedRulesForException
|
24270
|
+
|
24271
|
+
@property
|
24272
|
+
def ManagedRuleGroupsForException(self):
|
24273
|
+
"""指定例外规则的托管规则组,仅当 SkipScope 为 ManagedRules 时有效,且此时不能指定 ManagedRulesForException 。
|
24274
|
+
:rtype: list of str
|
24275
|
+
"""
|
24276
|
+
return self._ManagedRuleGroupsForException
|
24277
|
+
|
24278
|
+
@ManagedRuleGroupsForException.setter
|
24279
|
+
def ManagedRuleGroupsForException(self, ManagedRuleGroupsForException):
|
24280
|
+
self._ManagedRuleGroupsForException = ManagedRuleGroupsForException
|
24281
|
+
|
24282
|
+
@property
|
24283
|
+
def RequestFieldsForException(self):
|
24284
|
+
"""指定例外规则跳过指定请求字段的具体配置,仅当 SkipScope 为 ManagedRules 并且 SkipOption 为 SkipOnSpecifiedRequestFields 时有效。
|
24285
|
+
:rtype: list of RequestFieldsForException
|
24286
|
+
"""
|
24287
|
+
return self._RequestFieldsForException
|
24288
|
+
|
24289
|
+
@RequestFieldsForException.setter
|
24290
|
+
def RequestFieldsForException(self, RequestFieldsForException):
|
24291
|
+
self._RequestFieldsForException = RequestFieldsForException
|
24292
|
+
|
24293
|
+
@property
|
24294
|
+
def Enabled(self):
|
24295
|
+
"""例外规则是否开启。取值有:<li>on:开启</li><li>off:关闭</li>
|
24296
|
+
:rtype: str
|
24297
|
+
"""
|
24298
|
+
return self._Enabled
|
24299
|
+
|
24300
|
+
@Enabled.setter
|
24301
|
+
def Enabled(self, Enabled):
|
24302
|
+
self._Enabled = Enabled
|
24303
|
+
|
24304
|
+
|
24305
|
+
def _deserialize(self, params):
|
24306
|
+
self._Id = params.get("Id")
|
24307
|
+
self._Name = params.get("Name")
|
24308
|
+
self._Condition = params.get("Condition")
|
24309
|
+
self._SkipScope = params.get("SkipScope")
|
24310
|
+
self._SkipOption = params.get("SkipOption")
|
24311
|
+
self._WebSecurityModulesForException = params.get("WebSecurityModulesForException")
|
24312
|
+
self._ManagedRulesForException = params.get("ManagedRulesForException")
|
24313
|
+
self._ManagedRuleGroupsForException = params.get("ManagedRuleGroupsForException")
|
24314
|
+
if params.get("RequestFieldsForException") is not None:
|
24315
|
+
self._RequestFieldsForException = []
|
24316
|
+
for item in params.get("RequestFieldsForException"):
|
24317
|
+
obj = RequestFieldsForException()
|
24318
|
+
obj._deserialize(item)
|
24319
|
+
self._RequestFieldsForException.append(obj)
|
24320
|
+
self._Enabled = params.get("Enabled")
|
24321
|
+
memeber_set = set(params.keys())
|
24322
|
+
for name, value in vars(self).items():
|
24323
|
+
property_name = name[1:]
|
24324
|
+
if property_name in memeber_set:
|
24325
|
+
memeber_set.remove(property_name)
|
24326
|
+
if len(memeber_set) > 0:
|
24327
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
24328
|
+
|
24329
|
+
|
24330
|
+
|
24331
|
+
class ExceptionRules(AbstractModel):
|
24332
|
+
"""Web安全的例外规则
|
24333
|
+
|
24334
|
+
"""
|
24335
|
+
|
24336
|
+
def __init__(self):
|
24337
|
+
r"""
|
24338
|
+
:param _Rules: 例外规则的定义列表。使用 ModifySecurityPolicy 修改 Web 防护配置时: <li>若未指定 Rules 参数,或 Rules 参数长度为零:清空所有例外规则配置。</li><li>若 SecurityPolicy 参数中,未指定 ExceptionRules 参数值:保持已有例外规则配置,不做修改。</li>
|
24339
|
+
:type Rules: list of ExceptionRule
|
24340
|
+
"""
|
24341
|
+
self._Rules = None
|
24342
|
+
|
24343
|
+
@property
|
24344
|
+
def Rules(self):
|
24345
|
+
"""例外规则的定义列表。使用 ModifySecurityPolicy 修改 Web 防护配置时: <li>若未指定 Rules 参数,或 Rules 参数长度为零:清空所有例外规则配置。</li><li>若 SecurityPolicy 参数中,未指定 ExceptionRules 参数值:保持已有例外规则配置,不做修改。</li>
|
24346
|
+
:rtype: list of ExceptionRule
|
24347
|
+
"""
|
24348
|
+
return self._Rules
|
24349
|
+
|
24350
|
+
@Rules.setter
|
24351
|
+
def Rules(self, Rules):
|
24352
|
+
self._Rules = Rules
|
24353
|
+
|
24354
|
+
|
24355
|
+
def _deserialize(self, params):
|
24356
|
+
if params.get("Rules") is not None:
|
24357
|
+
self._Rules = []
|
24358
|
+
for item in params.get("Rules"):
|
24359
|
+
obj = ExceptionRule()
|
24360
|
+
obj._deserialize(item)
|
24361
|
+
self._Rules.append(obj)
|
24362
|
+
memeber_set = set(params.keys())
|
24363
|
+
for name, value in vars(self).items():
|
24364
|
+
property_name = name[1:]
|
24365
|
+
if property_name in memeber_set:
|
24366
|
+
memeber_set.remove(property_name)
|
24367
|
+
if len(memeber_set) > 0:
|
24368
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
24369
|
+
|
24370
|
+
|
24371
|
+
|
23776
24372
|
class ExportZoneConfigRequest(AbstractModel):
|
23777
24373
|
"""ExportZoneConfig请求参数结构体
|
23778
24374
|
|
@@ -25728,6 +26324,95 @@ class Hsts(AbstractModel):
|
|
25728
26324
|
|
25729
26325
|
|
25730
26326
|
|
26327
|
+
class HttpDDoSProtection(AbstractModel):
|
26328
|
+
"""HTTP DDOS防护配置。
|
26329
|
+
|
26330
|
+
"""
|
26331
|
+
|
26332
|
+
def __init__(self):
|
26333
|
+
r"""
|
26334
|
+
:param _AdaptiveFrequencyControl: 自适应频控的具体配置。
|
26335
|
+
:type AdaptiveFrequencyControl: :class:`tencentcloud.teo.v20220901.models.AdaptiveFrequencyControl`
|
26336
|
+
:param _ClientFiltering: 智能客户端过滤的具体配置。
|
26337
|
+
:type ClientFiltering: :class:`tencentcloud.teo.v20220901.models.ClientFiltering`
|
26338
|
+
:param _BandwidthAbuseDefense: 流量防盗刷的具体配置。
|
26339
|
+
:type BandwidthAbuseDefense: :class:`tencentcloud.teo.v20220901.models.BandwidthAbuseDefense`
|
26340
|
+
:param _SlowAttackDefense: 慢速攻击防护的具体配置。
|
26341
|
+
:type SlowAttackDefense: :class:`tencentcloud.teo.v20220901.models.SlowAttackDefense`
|
26342
|
+
"""
|
26343
|
+
self._AdaptiveFrequencyControl = None
|
26344
|
+
self._ClientFiltering = None
|
26345
|
+
self._BandwidthAbuseDefense = None
|
26346
|
+
self._SlowAttackDefense = None
|
26347
|
+
|
26348
|
+
@property
|
26349
|
+
def AdaptiveFrequencyControl(self):
|
26350
|
+
"""自适应频控的具体配置。
|
26351
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.AdaptiveFrequencyControl`
|
26352
|
+
"""
|
26353
|
+
return self._AdaptiveFrequencyControl
|
26354
|
+
|
26355
|
+
@AdaptiveFrequencyControl.setter
|
26356
|
+
def AdaptiveFrequencyControl(self, AdaptiveFrequencyControl):
|
26357
|
+
self._AdaptiveFrequencyControl = AdaptiveFrequencyControl
|
26358
|
+
|
26359
|
+
@property
|
26360
|
+
def ClientFiltering(self):
|
26361
|
+
"""智能客户端过滤的具体配置。
|
26362
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.ClientFiltering`
|
26363
|
+
"""
|
26364
|
+
return self._ClientFiltering
|
26365
|
+
|
26366
|
+
@ClientFiltering.setter
|
26367
|
+
def ClientFiltering(self, ClientFiltering):
|
26368
|
+
self._ClientFiltering = ClientFiltering
|
26369
|
+
|
26370
|
+
@property
|
26371
|
+
def BandwidthAbuseDefense(self):
|
26372
|
+
"""流量防盗刷的具体配置。
|
26373
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.BandwidthAbuseDefense`
|
26374
|
+
"""
|
26375
|
+
return self._BandwidthAbuseDefense
|
26376
|
+
|
26377
|
+
@BandwidthAbuseDefense.setter
|
26378
|
+
def BandwidthAbuseDefense(self, BandwidthAbuseDefense):
|
26379
|
+
self._BandwidthAbuseDefense = BandwidthAbuseDefense
|
26380
|
+
|
26381
|
+
@property
|
26382
|
+
def SlowAttackDefense(self):
|
26383
|
+
"""慢速攻击防护的具体配置。
|
26384
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.SlowAttackDefense`
|
26385
|
+
"""
|
26386
|
+
return self._SlowAttackDefense
|
26387
|
+
|
26388
|
+
@SlowAttackDefense.setter
|
26389
|
+
def SlowAttackDefense(self, SlowAttackDefense):
|
26390
|
+
self._SlowAttackDefense = SlowAttackDefense
|
26391
|
+
|
26392
|
+
|
26393
|
+
def _deserialize(self, params):
|
26394
|
+
if params.get("AdaptiveFrequencyControl") is not None:
|
26395
|
+
self._AdaptiveFrequencyControl = AdaptiveFrequencyControl()
|
26396
|
+
self._AdaptiveFrequencyControl._deserialize(params.get("AdaptiveFrequencyControl"))
|
26397
|
+
if params.get("ClientFiltering") is not None:
|
26398
|
+
self._ClientFiltering = ClientFiltering()
|
26399
|
+
self._ClientFiltering._deserialize(params.get("ClientFiltering"))
|
26400
|
+
if params.get("BandwidthAbuseDefense") is not None:
|
26401
|
+
self._BandwidthAbuseDefense = BandwidthAbuseDefense()
|
26402
|
+
self._BandwidthAbuseDefense._deserialize(params.get("BandwidthAbuseDefense"))
|
26403
|
+
if params.get("SlowAttackDefense") is not None:
|
26404
|
+
self._SlowAttackDefense = SlowAttackDefense()
|
26405
|
+
self._SlowAttackDefense._deserialize(params.get("SlowAttackDefense"))
|
26406
|
+
memeber_set = set(params.keys())
|
26407
|
+
for name, value in vars(self).items():
|
26408
|
+
property_name = name[1:]
|
26409
|
+
if property_name in memeber_set:
|
26410
|
+
memeber_set.remove(property_name)
|
26411
|
+
if len(memeber_set) > 0:
|
26412
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
26413
|
+
|
26414
|
+
|
26415
|
+
|
25731
26416
|
class Https(AbstractModel):
|
25732
26417
|
"""域名 https 加速配置,默认为关闭状态
|
25733
26418
|
|
@@ -28956,6 +29641,72 @@ class MaxAgeParameters(AbstractModel):
|
|
28956
29641
|
|
28957
29642
|
|
28958
29643
|
|
29644
|
+
class MinimalRequestBodyTransferRate(AbstractModel):
|
29645
|
+
"""正文传输最小速率阈值的具体配置。
|
29646
|
+
|
29647
|
+
"""
|
29648
|
+
|
29649
|
+
def __init__(self):
|
29650
|
+
r"""
|
29651
|
+
:param _MinimalAvgTransferRateThreshold: 正文传输最小速率阈值,单位仅支持bps。
|
29652
|
+
:type MinimalAvgTransferRateThreshold: str
|
29653
|
+
:param _CountingPeriod: 正文传输最小速率统计时间范围,取值有:<li>10s:10秒;</li><li>30s:30秒;</li><li>60s:60秒;</li><li>120s:120秒。</li>
|
29654
|
+
:type CountingPeriod: str
|
29655
|
+
:param _Enabled: 正文传输最小速率阈值是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
29656
|
+
:type Enabled: str
|
29657
|
+
"""
|
29658
|
+
self._MinimalAvgTransferRateThreshold = None
|
29659
|
+
self._CountingPeriod = None
|
29660
|
+
self._Enabled = None
|
29661
|
+
|
29662
|
+
@property
|
29663
|
+
def MinimalAvgTransferRateThreshold(self):
|
29664
|
+
"""正文传输最小速率阈值,单位仅支持bps。
|
29665
|
+
:rtype: str
|
29666
|
+
"""
|
29667
|
+
return self._MinimalAvgTransferRateThreshold
|
29668
|
+
|
29669
|
+
@MinimalAvgTransferRateThreshold.setter
|
29670
|
+
def MinimalAvgTransferRateThreshold(self, MinimalAvgTransferRateThreshold):
|
29671
|
+
self._MinimalAvgTransferRateThreshold = MinimalAvgTransferRateThreshold
|
29672
|
+
|
29673
|
+
@property
|
29674
|
+
def CountingPeriod(self):
|
29675
|
+
"""正文传输最小速率统计时间范围,取值有:<li>10s:10秒;</li><li>30s:30秒;</li><li>60s:60秒;</li><li>120s:120秒。</li>
|
29676
|
+
:rtype: str
|
29677
|
+
"""
|
29678
|
+
return self._CountingPeriod
|
29679
|
+
|
29680
|
+
@CountingPeriod.setter
|
29681
|
+
def CountingPeriod(self, CountingPeriod):
|
29682
|
+
self._CountingPeriod = CountingPeriod
|
29683
|
+
|
29684
|
+
@property
|
29685
|
+
def Enabled(self):
|
29686
|
+
"""正文传输最小速率阈值是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
29687
|
+
:rtype: str
|
29688
|
+
"""
|
29689
|
+
return self._Enabled
|
29690
|
+
|
29691
|
+
@Enabled.setter
|
29692
|
+
def Enabled(self, Enabled):
|
29693
|
+
self._Enabled = Enabled
|
29694
|
+
|
29695
|
+
|
29696
|
+
def _deserialize(self, params):
|
29697
|
+
self._MinimalAvgTransferRateThreshold = params.get("MinimalAvgTransferRateThreshold")
|
29698
|
+
self._CountingPeriod = params.get("CountingPeriod")
|
29699
|
+
self._Enabled = params.get("Enabled")
|
29700
|
+
memeber_set = set(params.keys())
|
29701
|
+
for name, value in vars(self).items():
|
29702
|
+
property_name = name[1:]
|
29703
|
+
if property_name in memeber_set:
|
29704
|
+
memeber_set.remove(property_name)
|
29705
|
+
if len(memeber_set) > 0:
|
29706
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
29707
|
+
|
29708
|
+
|
29709
|
+
|
28959
29710
|
class ModifyAccelerationDomainRequest(AbstractModel):
|
28960
29711
|
"""ModifyAccelerationDomain请求参数结构体
|
28961
29712
|
|
@@ -32831,9 +33582,9 @@ class ModifySecurityPolicyRequest(AbstractModel):
|
|
32831
33582
|
r"""
|
32832
33583
|
:param _ZoneId: 站点 ID。
|
32833
33584
|
:type ZoneId: str
|
32834
|
-
:param _SecurityConfig: 安全策略配置。<li>当 SecurityPolicy 参数中的
|
33585
|
+
:param _SecurityConfig: 安全策略配置。<li>当 SecurityPolicy 参数中的 ExceptionRules 被设置时,SecurityConfig 参数中的 ExceptConfig 将被忽略;</li><li>当 SecurityPolicy 参数中的 CustomRules 被设置时,SecurityConfig 参数中的 AclConfig、 IpTableConfig 将被忽略;</li><li>当 SecurityPolicy 参数中的 HttpDDoSProtection 和 RateLimitingRules 被设置时,SecurityConfig 参数中的 RateLimitConfig 将被忽略;</li><li>当 SecurityPolicy 参数中的 ManagedRule 被设置时,SecurityConfig 参数中的 WafConfig 将被忽略;</li><li>对于例外规则、自定义规则、速率限制以及托管规则策略配置建议使用 SecurityPolicy 参数进行设置。</li>
|
32835
33586
|
:type SecurityConfig: :class:`tencentcloud.teo.v20220901.models.SecurityConfig`
|
32836
|
-
:param _SecurityPolicy: 安全策略配置。对 Web
|
33587
|
+
:param _SecurityPolicy: 安全策略配置。对 Web 例外规则、防护自定义策略、速率规则和托管规则配置建议使用,支持表达式语法对安全策略进行配置。
|
32837
33588
|
:type SecurityPolicy: :class:`tencentcloud.teo.v20220901.models.SecurityPolicy`
|
32838
33589
|
:param _Entity: 安全策略类型,可使用以下参数值: <li>ZoneDefaultPolicy:用于指定站点级策略;</li><li>Template:用于指定策略模板,需要同时指定 TemplateId 参数;</li><li>Host:用于指定域名级策略(注意:当使用域名来指定域名服务策略时,仅支持已经应用了域名级策略的域名服务或者策略模板)。</li>
|
32839
33590
|
:type Entity: str
|
@@ -32862,7 +33613,7 @@ class ModifySecurityPolicyRequest(AbstractModel):
|
|
32862
33613
|
|
32863
33614
|
@property
|
32864
33615
|
def SecurityConfig(self):
|
32865
|
-
"""安全策略配置。<li>当 SecurityPolicy 参数中的
|
33616
|
+
"""安全策略配置。<li>当 SecurityPolicy 参数中的 ExceptionRules 被设置时,SecurityConfig 参数中的 ExceptConfig 将被忽略;</li><li>当 SecurityPolicy 参数中的 CustomRules 被设置时,SecurityConfig 参数中的 AclConfig、 IpTableConfig 将被忽略;</li><li>当 SecurityPolicy 参数中的 HttpDDoSProtection 和 RateLimitingRules 被设置时,SecurityConfig 参数中的 RateLimitConfig 将被忽略;</li><li>当 SecurityPolicy 参数中的 ManagedRule 被设置时,SecurityConfig 参数中的 WafConfig 将被忽略;</li><li>对于例外规则、自定义规则、速率限制以及托管规则策略配置建议使用 SecurityPolicy 参数进行设置。</li>
|
32866
33617
|
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityConfig`
|
32867
33618
|
"""
|
32868
33619
|
return self._SecurityConfig
|
@@ -32873,7 +33624,7 @@ class ModifySecurityPolicyRequest(AbstractModel):
|
|
32873
33624
|
|
32874
33625
|
@property
|
32875
33626
|
def SecurityPolicy(self):
|
32876
|
-
"""安全策略配置。对 Web
|
33627
|
+
"""安全策略配置。对 Web 例外规则、防护自定义策略、速率规则和托管规则配置建议使用,支持表达式语法对安全策略进行配置。
|
32877
33628
|
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityPolicy`
|
32878
33629
|
"""
|
32879
33630
|
return self._SecurityPolicy
|
@@ -37447,6 +38198,220 @@ class RateLimitUserRule(AbstractModel):
|
|
37447
38198
|
|
37448
38199
|
|
37449
38200
|
|
38201
|
+
class RateLimitingRule(AbstractModel):
|
38202
|
+
"""速率限制的具体配置。
|
38203
|
+
|
38204
|
+
"""
|
38205
|
+
|
38206
|
+
def __init__(self):
|
38207
|
+
r"""
|
38208
|
+
:param _Id: 精准速率限制的 ID。<br>通过规则 ID 可支持不同的规则配置操作:<br> <li> <b>增加</b>新规则:ID 为空或不指定 ID 参数;</li><li><b>修改</b>已有规则:指定需要更新/修改的规则 ID;</li><li><b>删除</b>已有规则:RateLimitingRules 参数中,Rules 列表中未包含的已有规则将被删除。</li>
|
38209
|
+
:type Id: str
|
38210
|
+
:param _Name: 精准速率限制的名称。
|
38211
|
+
:type Name: str
|
38212
|
+
:param _Condition: 精准速率限制的具体内容,需符合表达式语法,详细规范参见产品文档。
|
38213
|
+
:type Condition: str
|
38214
|
+
:param _CountBy: 速率阈值请求特征的匹配方式, 当 Enabled 为 on 时,此字段必填。<br /><br />当条件有多个时,将组合多个条件共同进行统计计算,条件最多不可超过5条。取值有:<br/><li><b>http.request.ip</b>:客户端 IP;</li><li><b>http.request.xff_header_ip</b>:客户端 IP(优先匹配 XFF 头部);</li><li><b>http.request.uri.path</b>:请求的访问路径;</li><li><b>http.request.cookies['session']</b>:名称为session的Cookie,其中session可替换为自己指定的参数;</li><li><b>http.request.headers['user-agent']</b>:名称为user-agent的HTTP头部,其中user-agent可替换为自己指定的参数;</li><li><b>http.request.ja3</b>:请求的JA3指纹;</li><li><b>http.request.uri.query['test']</b>:名称为test的URL查询参数,其中test可替换为自己指定的参数。</li>
|
38215
|
+
:type CountBy: list of str
|
38216
|
+
:param _MaxRequestThreshold: 精准速率限制在时间范围内的累计拦截次数,取值范围 1 ~ 100000。
|
38217
|
+
:type MaxRequestThreshold: int
|
38218
|
+
:param _CountingPeriod: 统计的时间窗口,取值有:<li>1s:1秒;</li><li>5s:5秒;</li><li>10s:10秒;</li><li>20s:20秒;</li><li>30s:30秒;</li><li>40s:40秒;</li><li>50s:50秒;</li><li>1m:1分钟;</li><li>2m:2分钟;</li><li>5m:5分钟;</li><li>10m:10分钟;</li><li>1h:1小时。</li>
|
38219
|
+
:type CountingPeriod: str
|
38220
|
+
:param _ActionDuration: Action 动作的持续时长,单位仅支持:<li>s:秒,取值 1 ~ 120;</li><li>m:分钟,取值 1 ~ 120;</li><li>h:小时,取值 1 ~ 48;</li><li>d:天,取值 1 ~ 30。</li>
|
38221
|
+
:type ActionDuration: str
|
38222
|
+
:param _Action: 精准速率限制的处置方式。取值有:<li>Monitor:观察;</li><li>Deny:拦截,其中DenyActionParameters.Name支持Deny和ReturnCustomPage;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name支持JSChallenge和ManagedChallenge;</li><li>Redirect:重定向至URL;</li>
|
38223
|
+
:type Action: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
38224
|
+
:param _Priority: 精准速率限制的优先级,范围是 0 ~ 100,默认为 0。
|
38225
|
+
:type Priority: int
|
38226
|
+
:param _Enabled: 精准速率限制规则是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
38227
|
+
:type Enabled: str
|
38228
|
+
"""
|
38229
|
+
self._Id = None
|
38230
|
+
self._Name = None
|
38231
|
+
self._Condition = None
|
38232
|
+
self._CountBy = None
|
38233
|
+
self._MaxRequestThreshold = None
|
38234
|
+
self._CountingPeriod = None
|
38235
|
+
self._ActionDuration = None
|
38236
|
+
self._Action = None
|
38237
|
+
self._Priority = None
|
38238
|
+
self._Enabled = None
|
38239
|
+
|
38240
|
+
@property
|
38241
|
+
def Id(self):
|
38242
|
+
"""精准速率限制的 ID。<br>通过规则 ID 可支持不同的规则配置操作:<br> <li> <b>增加</b>新规则:ID 为空或不指定 ID 参数;</li><li><b>修改</b>已有规则:指定需要更新/修改的规则 ID;</li><li><b>删除</b>已有规则:RateLimitingRules 参数中,Rules 列表中未包含的已有规则将被删除。</li>
|
38243
|
+
:rtype: str
|
38244
|
+
"""
|
38245
|
+
return self._Id
|
38246
|
+
|
38247
|
+
@Id.setter
|
38248
|
+
def Id(self, Id):
|
38249
|
+
self._Id = Id
|
38250
|
+
|
38251
|
+
@property
|
38252
|
+
def Name(self):
|
38253
|
+
"""精准速率限制的名称。
|
38254
|
+
:rtype: str
|
38255
|
+
"""
|
38256
|
+
return self._Name
|
38257
|
+
|
38258
|
+
@Name.setter
|
38259
|
+
def Name(self, Name):
|
38260
|
+
self._Name = Name
|
38261
|
+
|
38262
|
+
@property
|
38263
|
+
def Condition(self):
|
38264
|
+
"""精准速率限制的具体内容,需符合表达式语法,详细规范参见产品文档。
|
38265
|
+
:rtype: str
|
38266
|
+
"""
|
38267
|
+
return self._Condition
|
38268
|
+
|
38269
|
+
@Condition.setter
|
38270
|
+
def Condition(self, Condition):
|
38271
|
+
self._Condition = Condition
|
38272
|
+
|
38273
|
+
@property
|
38274
|
+
def CountBy(self):
|
38275
|
+
"""速率阈值请求特征的匹配方式, 当 Enabled 为 on 时,此字段必填。<br /><br />当条件有多个时,将组合多个条件共同进行统计计算,条件最多不可超过5条。取值有:<br/><li><b>http.request.ip</b>:客户端 IP;</li><li><b>http.request.xff_header_ip</b>:客户端 IP(优先匹配 XFF 头部);</li><li><b>http.request.uri.path</b>:请求的访问路径;</li><li><b>http.request.cookies['session']</b>:名称为session的Cookie,其中session可替换为自己指定的参数;</li><li><b>http.request.headers['user-agent']</b>:名称为user-agent的HTTP头部,其中user-agent可替换为自己指定的参数;</li><li><b>http.request.ja3</b>:请求的JA3指纹;</li><li><b>http.request.uri.query['test']</b>:名称为test的URL查询参数,其中test可替换为自己指定的参数。</li>
|
38276
|
+
:rtype: list of str
|
38277
|
+
"""
|
38278
|
+
return self._CountBy
|
38279
|
+
|
38280
|
+
@CountBy.setter
|
38281
|
+
def CountBy(self, CountBy):
|
38282
|
+
self._CountBy = CountBy
|
38283
|
+
|
38284
|
+
@property
|
38285
|
+
def MaxRequestThreshold(self):
|
38286
|
+
"""精准速率限制在时间范围内的累计拦截次数,取值范围 1 ~ 100000。
|
38287
|
+
:rtype: int
|
38288
|
+
"""
|
38289
|
+
return self._MaxRequestThreshold
|
38290
|
+
|
38291
|
+
@MaxRequestThreshold.setter
|
38292
|
+
def MaxRequestThreshold(self, MaxRequestThreshold):
|
38293
|
+
self._MaxRequestThreshold = MaxRequestThreshold
|
38294
|
+
|
38295
|
+
@property
|
38296
|
+
def CountingPeriod(self):
|
38297
|
+
"""统计的时间窗口,取值有:<li>1s:1秒;</li><li>5s:5秒;</li><li>10s:10秒;</li><li>20s:20秒;</li><li>30s:30秒;</li><li>40s:40秒;</li><li>50s:50秒;</li><li>1m:1分钟;</li><li>2m:2分钟;</li><li>5m:5分钟;</li><li>10m:10分钟;</li><li>1h:1小时。</li>
|
38298
|
+
:rtype: str
|
38299
|
+
"""
|
38300
|
+
return self._CountingPeriod
|
38301
|
+
|
38302
|
+
@CountingPeriod.setter
|
38303
|
+
def CountingPeriod(self, CountingPeriod):
|
38304
|
+
self._CountingPeriod = CountingPeriod
|
38305
|
+
|
38306
|
+
@property
|
38307
|
+
def ActionDuration(self):
|
38308
|
+
"""Action 动作的持续时长,单位仅支持:<li>s:秒,取值 1 ~ 120;</li><li>m:分钟,取值 1 ~ 120;</li><li>h:小时,取值 1 ~ 48;</li><li>d:天,取值 1 ~ 30。</li>
|
38309
|
+
:rtype: str
|
38310
|
+
"""
|
38311
|
+
return self._ActionDuration
|
38312
|
+
|
38313
|
+
@ActionDuration.setter
|
38314
|
+
def ActionDuration(self, ActionDuration):
|
38315
|
+
self._ActionDuration = ActionDuration
|
38316
|
+
|
38317
|
+
@property
|
38318
|
+
def Action(self):
|
38319
|
+
"""精准速率限制的处置方式。取值有:<li>Monitor:观察;</li><li>Deny:拦截,其中DenyActionParameters.Name支持Deny和ReturnCustomPage;</li><li>Challenge:挑战,其中ChallengeActionParameters.Name支持JSChallenge和ManagedChallenge;</li><li>Redirect:重定向至URL;</li>
|
38320
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
38321
|
+
"""
|
38322
|
+
return self._Action
|
38323
|
+
|
38324
|
+
@Action.setter
|
38325
|
+
def Action(self, Action):
|
38326
|
+
self._Action = Action
|
38327
|
+
|
38328
|
+
@property
|
38329
|
+
def Priority(self):
|
38330
|
+
"""精准速率限制的优先级,范围是 0 ~ 100,默认为 0。
|
38331
|
+
:rtype: int
|
38332
|
+
"""
|
38333
|
+
return self._Priority
|
38334
|
+
|
38335
|
+
@Priority.setter
|
38336
|
+
def Priority(self, Priority):
|
38337
|
+
self._Priority = Priority
|
38338
|
+
|
38339
|
+
@property
|
38340
|
+
def Enabled(self):
|
38341
|
+
"""精准速率限制规则是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
38342
|
+
:rtype: str
|
38343
|
+
"""
|
38344
|
+
return self._Enabled
|
38345
|
+
|
38346
|
+
@Enabled.setter
|
38347
|
+
def Enabled(self, Enabled):
|
38348
|
+
self._Enabled = Enabled
|
38349
|
+
|
38350
|
+
|
38351
|
+
def _deserialize(self, params):
|
38352
|
+
self._Id = params.get("Id")
|
38353
|
+
self._Name = params.get("Name")
|
38354
|
+
self._Condition = params.get("Condition")
|
38355
|
+
self._CountBy = params.get("CountBy")
|
38356
|
+
self._MaxRequestThreshold = params.get("MaxRequestThreshold")
|
38357
|
+
self._CountingPeriod = params.get("CountingPeriod")
|
38358
|
+
self._ActionDuration = params.get("ActionDuration")
|
38359
|
+
if params.get("Action") is not None:
|
38360
|
+
self._Action = SecurityAction()
|
38361
|
+
self._Action._deserialize(params.get("Action"))
|
38362
|
+
self._Priority = params.get("Priority")
|
38363
|
+
self._Enabled = params.get("Enabled")
|
38364
|
+
memeber_set = set(params.keys())
|
38365
|
+
for name, value in vars(self).items():
|
38366
|
+
property_name = name[1:]
|
38367
|
+
if property_name in memeber_set:
|
38368
|
+
memeber_set.remove(property_name)
|
38369
|
+
if len(memeber_set) > 0:
|
38370
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
38371
|
+
|
38372
|
+
|
38373
|
+
|
38374
|
+
class RateLimitingRules(AbstractModel):
|
38375
|
+
"""精准速率限制的配置
|
38376
|
+
|
38377
|
+
"""
|
38378
|
+
|
38379
|
+
def __init__(self):
|
38380
|
+
r"""
|
38381
|
+
:param _Rules: 精准速率限制的定义列表。使用 ModifySecurityPolicy 修改 Web 防护配置时: <br> <li> 若未指定 Rules 参数,或 Rules 参数长度为零:清空所有精准速率限制配置。</li> <li> 若 SecurityPolicy 参数中,未指定 RateLimitingRules 参数值:保持已有自定义规则配置,不做修改。</li>
|
38382
|
+
:type Rules: list of RateLimitingRule
|
38383
|
+
"""
|
38384
|
+
self._Rules = None
|
38385
|
+
|
38386
|
+
@property
|
38387
|
+
def Rules(self):
|
38388
|
+
"""精准速率限制的定义列表。使用 ModifySecurityPolicy 修改 Web 防护配置时: <br> <li> 若未指定 Rules 参数,或 Rules 参数长度为零:清空所有精准速率限制配置。</li> <li> 若 SecurityPolicy 参数中,未指定 RateLimitingRules 参数值:保持已有自定义规则配置,不做修改。</li>
|
38389
|
+
:rtype: list of RateLimitingRule
|
38390
|
+
"""
|
38391
|
+
return self._Rules
|
38392
|
+
|
38393
|
+
@Rules.setter
|
38394
|
+
def Rules(self, Rules):
|
38395
|
+
self._Rules = Rules
|
38396
|
+
|
38397
|
+
|
38398
|
+
def _deserialize(self, params):
|
38399
|
+
if params.get("Rules") is not None:
|
38400
|
+
self._Rules = []
|
38401
|
+
for item in params.get("Rules"):
|
38402
|
+
obj = RateLimitingRule()
|
38403
|
+
obj._deserialize(item)
|
38404
|
+
self._Rules.append(obj)
|
38405
|
+
memeber_set = set(params.keys())
|
38406
|
+
for name, value in vars(self).items():
|
38407
|
+
property_name = name[1:]
|
38408
|
+
if property_name in memeber_set:
|
38409
|
+
memeber_set.remove(property_name)
|
38410
|
+
if len(memeber_set) > 0:
|
38411
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
38412
|
+
|
38413
|
+
|
38414
|
+
|
37450
38415
|
class RealtimeLogDeliveryTask(AbstractModel):
|
37451
38416
|
"""实时日志投递任务。
|
37452
38417
|
|
@@ -37938,6 +38903,151 @@ class RenewPlanResponse(AbstractModel):
|
|
37938
38903
|
self._RequestId = params.get("RequestId")
|
37939
38904
|
|
37940
38905
|
|
38906
|
+
class RequestBodyTransferTimeout(AbstractModel):
|
38907
|
+
"""正文传输超时时长的具体配置。
|
38908
|
+
|
38909
|
+
"""
|
38910
|
+
|
38911
|
+
def __init__(self):
|
38912
|
+
r"""
|
38913
|
+
:param _IdleTimeout: 正文传输超时时长,取值 5 ~ 120,单位仅支持秒(s)。
|
38914
|
+
:type IdleTimeout: str
|
38915
|
+
:param _Enabled: 正文传输超时时长是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
38916
|
+
:type Enabled: str
|
38917
|
+
"""
|
38918
|
+
self._IdleTimeout = None
|
38919
|
+
self._Enabled = None
|
38920
|
+
|
38921
|
+
@property
|
38922
|
+
def IdleTimeout(self):
|
38923
|
+
"""正文传输超时时长,取值 5 ~ 120,单位仅支持秒(s)。
|
38924
|
+
:rtype: str
|
38925
|
+
"""
|
38926
|
+
return self._IdleTimeout
|
38927
|
+
|
38928
|
+
@IdleTimeout.setter
|
38929
|
+
def IdleTimeout(self, IdleTimeout):
|
38930
|
+
self._IdleTimeout = IdleTimeout
|
38931
|
+
|
38932
|
+
@property
|
38933
|
+
def Enabled(self):
|
38934
|
+
"""正文传输超时时长是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
38935
|
+
:rtype: str
|
38936
|
+
"""
|
38937
|
+
return self._Enabled
|
38938
|
+
|
38939
|
+
@Enabled.setter
|
38940
|
+
def Enabled(self, Enabled):
|
38941
|
+
self._Enabled = Enabled
|
38942
|
+
|
38943
|
+
|
38944
|
+
def _deserialize(self, params):
|
38945
|
+
self._IdleTimeout = params.get("IdleTimeout")
|
38946
|
+
self._Enabled = params.get("Enabled")
|
38947
|
+
memeber_set = set(params.keys())
|
38948
|
+
for name, value in vars(self).items():
|
38949
|
+
property_name = name[1:]
|
38950
|
+
if property_name in memeber_set:
|
38951
|
+
memeber_set.remove(property_name)
|
38952
|
+
if len(memeber_set) > 0:
|
38953
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
38954
|
+
|
38955
|
+
|
38956
|
+
|
38957
|
+
class RequestFieldsForException(AbstractModel):
|
38958
|
+
"""例外规则中的跳过字段配置
|
38959
|
+
|
38960
|
+
"""
|
38961
|
+
|
38962
|
+
def __init__(self):
|
38963
|
+
r"""
|
38964
|
+
:param _Scope: 跳过的具体字段。取值支持:<br/>
|
38965
|
+
<li>body.json:JSON 请求内容;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "body.json", "Condition": "", "TargetField": "key" },表示 JSON 请求内容所有参数跳过 WAF 扫描;</li>
|
38966
|
+
<li style="margin-top:5px">cookie:Cookie;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "cookie", "Condition": "${key} in ['account-id'] and ${value} like ['prefix-*']", "TargetField": "value" },表示 Cookie 参数名称等于account-id 并且参数值通配符匹配 prefix-* 跳过 WAF 扫描;</li>
|
38967
|
+
<li style="margin-top:5px">header:HTTP 头部参数;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "header", "Condition": "${key} like ['x-auth-*']", "TargetField": "value" },表示 header 参数名称通配符匹配 x-auth-* 跳过 WAF 扫描;</li>
|
38968
|
+
<li style="margin-top:5px">uri.query:URL 编码内容/查询参数;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "uri.query", "Condition": "${key} in ['action'] and ${value} in ['upload', 'delete']", "TargetField": "value" },表示 URL 编码内容/查询参数的参数名称等于 action 并且参数值等于 upload 或 delete 跳过 WAF 扫描;</li>
|
38969
|
+
<li style="margin-top:5px">uri:请求路径URI;此时 Condition 必须为空, TargetField 支持 query、path、fullpath,例如 { "Scope": "uri", "Condition": "", "TargetField": "query" },表示请求路径 URI 仅查询参数跳过 WAF 扫描;</li>
|
38970
|
+
<li style="margin-top:5px">body:请求正文内容。此时 Condition 必须为空, TargetField 支持 fullbody、multipart,例如 { "Scope": "body", "Condition": "", "TargetField": "fullbody" },表示请求正文内容为完整请求正文跳过 WAF 扫描;</li>
|
38971
|
+
:type Scope: str
|
38972
|
+
:param _Condition: 跳过的具体字段的表达式,需要符合表达式语法。<br />
|
38973
|
+
Condition 支持表达式配置语法:<li> 按规则的匹配条件表达式语法编写,支持引用 key、value。</li><li> 支持 in、like 操作符,以及 and 逻辑组合。</li>
|
38974
|
+
例如:<li>${key} in ['x-trace-id']:参数名称等于x-trace-id。</li><li>${key} in ['x-trace-id'] and ${value} like ['Bearer *']:参数名称等于x-trace-id并且参数值通配符匹配Bearer *。</li>
|
38975
|
+
:type Condition: str
|
38976
|
+
:param _TargetField: Scope 参数使用不同取值时,TargetField 表达式中支持的值如下:
|
38977
|
+
<li> body.json:支持 key、value</li>
|
38978
|
+
<li> cookie:支持 key、value</li>
|
38979
|
+
<li> header:支持 key、value</li>
|
38980
|
+
<li> uri.query:支持 key、value</li>
|
38981
|
+
<li> uri:支持 path、query、fullpath</li>
|
38982
|
+
<li> body:支持 fullbody、multipart</li>
|
38983
|
+
:type TargetField: str
|
38984
|
+
"""
|
38985
|
+
self._Scope = None
|
38986
|
+
self._Condition = None
|
38987
|
+
self._TargetField = None
|
38988
|
+
|
38989
|
+
@property
|
38990
|
+
def Scope(self):
|
38991
|
+
"""跳过的具体字段。取值支持:<br/>
|
38992
|
+
<li>body.json:JSON 请求内容;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "body.json", "Condition": "", "TargetField": "key" },表示 JSON 请求内容所有参数跳过 WAF 扫描;</li>
|
38993
|
+
<li style="margin-top:5px">cookie:Cookie;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "cookie", "Condition": "${key} in ['account-id'] and ${value} like ['prefix-*']", "TargetField": "value" },表示 Cookie 参数名称等于account-id 并且参数值通配符匹配 prefix-* 跳过 WAF 扫描;</li>
|
38994
|
+
<li style="margin-top:5px">header:HTTP 头部参数;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "header", "Condition": "${key} like ['x-auth-*']", "TargetField": "value" },表示 header 参数名称通配符匹配 x-auth-* 跳过 WAF 扫描;</li>
|
38995
|
+
<li style="margin-top:5px">uri.query:URL 编码内容/查询参数;此时 Condition 支持 key、value, TargetField 支持 key、value,例如 { "Scope": "uri.query", "Condition": "${key} in ['action'] and ${value} in ['upload', 'delete']", "TargetField": "value" },表示 URL 编码内容/查询参数的参数名称等于 action 并且参数值等于 upload 或 delete 跳过 WAF 扫描;</li>
|
38996
|
+
<li style="margin-top:5px">uri:请求路径URI;此时 Condition 必须为空, TargetField 支持 query、path、fullpath,例如 { "Scope": "uri", "Condition": "", "TargetField": "query" },表示请求路径 URI 仅查询参数跳过 WAF 扫描;</li>
|
38997
|
+
<li style="margin-top:5px">body:请求正文内容。此时 Condition 必须为空, TargetField 支持 fullbody、multipart,例如 { "Scope": "body", "Condition": "", "TargetField": "fullbody" },表示请求正文内容为完整请求正文跳过 WAF 扫描;</li>
|
38998
|
+
:rtype: str
|
38999
|
+
"""
|
39000
|
+
return self._Scope
|
39001
|
+
|
39002
|
+
@Scope.setter
|
39003
|
+
def Scope(self, Scope):
|
39004
|
+
self._Scope = Scope
|
39005
|
+
|
39006
|
+
@property
|
39007
|
+
def Condition(self):
|
39008
|
+
"""跳过的具体字段的表达式,需要符合表达式语法。<br />
|
39009
|
+
Condition 支持表达式配置语法:<li> 按规则的匹配条件表达式语法编写,支持引用 key、value。</li><li> 支持 in、like 操作符,以及 and 逻辑组合。</li>
|
39010
|
+
例如:<li>${key} in ['x-trace-id']:参数名称等于x-trace-id。</li><li>${key} in ['x-trace-id'] and ${value} like ['Bearer *']:参数名称等于x-trace-id并且参数值通配符匹配Bearer *。</li>
|
39011
|
+
:rtype: str
|
39012
|
+
"""
|
39013
|
+
return self._Condition
|
39014
|
+
|
39015
|
+
@Condition.setter
|
39016
|
+
def Condition(self, Condition):
|
39017
|
+
self._Condition = Condition
|
39018
|
+
|
39019
|
+
@property
|
39020
|
+
def TargetField(self):
|
39021
|
+
"""Scope 参数使用不同取值时,TargetField 表达式中支持的值如下:
|
39022
|
+
<li> body.json:支持 key、value</li>
|
39023
|
+
<li> cookie:支持 key、value</li>
|
39024
|
+
<li> header:支持 key、value</li>
|
39025
|
+
<li> uri.query:支持 key、value</li>
|
39026
|
+
<li> uri:支持 path、query、fullpath</li>
|
39027
|
+
<li> body:支持 fullbody、multipart</li>
|
39028
|
+
:rtype: str
|
39029
|
+
"""
|
39030
|
+
return self._TargetField
|
39031
|
+
|
39032
|
+
@TargetField.setter
|
39033
|
+
def TargetField(self, TargetField):
|
39034
|
+
self._TargetField = TargetField
|
39035
|
+
|
39036
|
+
|
39037
|
+
def _deserialize(self, params):
|
39038
|
+
self._Scope = params.get("Scope")
|
39039
|
+
self._Condition = params.get("Condition")
|
39040
|
+
self._TargetField = params.get("TargetField")
|
39041
|
+
memeber_set = set(params.keys())
|
39042
|
+
for name, value in vars(self).items():
|
39043
|
+
property_name = name[1:]
|
39044
|
+
if property_name in memeber_set:
|
39045
|
+
memeber_set.remove(property_name)
|
39046
|
+
if len(memeber_set) > 0:
|
39047
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
39048
|
+
|
39049
|
+
|
39050
|
+
|
37941
39051
|
class Resource(AbstractModel):
|
37942
39052
|
"""计费资源
|
37943
39053
|
|
@@ -40797,24 +41907,48 @@ class SecurityAction(AbstractModel):
|
|
40797
41907
|
def __init__(self):
|
40798
41908
|
r"""
|
40799
41909
|
:param _Name: 安全执行的具体动作。取值有:
|
40800
|
-
<li>Deny
|
41910
|
+
<li>Deny:拦截,阻止请求访问站点资源;</li>
|
41911
|
+
<li>Monitor:观察,仅记录日志;</li>
|
41912
|
+
<li>Redirect:重定向至 URL;</li>
|
41913
|
+
<li>Disabled:未启用,不启用指定规则;</li>
|
41914
|
+
<li>Allow:允许访问,但延迟处理请求;</li>
|
41915
|
+
<li>Challenge:挑战,响应挑战内容;</li>
|
41916
|
+
<li>BlockIP:待废弃,IP 封禁;</li>
|
41917
|
+
<li>ReturnCustomPage:待废弃,使用指定页面拦截;</li>
|
41918
|
+
<li>JSChallenge:待废弃,JavaScript 挑战;</li>
|
41919
|
+
<li>ManagedChallenge:待废弃,托管挑战。</li>
|
40801
41920
|
:type Name: str
|
40802
|
-
:param
|
40803
|
-
:type
|
40804
|
-
:param _ReturnCustomPageActionParameters: 当 Name 为 ReturnCustomPage 时的附加参数。
|
40805
|
-
:type ReturnCustomPageActionParameters: :class:`tencentcloud.teo.v20220901.models.ReturnCustomPageActionParameters`
|
41921
|
+
:param _DenyActionParameters: 当 Name 为 Deny 时的附加参数。
|
41922
|
+
:type DenyActionParameters: :class:`tencentcloud.teo.v20220901.models.DenyActionParameters`
|
40806
41923
|
:param _RedirectActionParameters: 当 Name 为 Redirect 时的附加参数。
|
40807
41924
|
:type RedirectActionParameters: :class:`tencentcloud.teo.v20220901.models.RedirectActionParameters`
|
41925
|
+
:param _ChallengeActionParameters: 当 Name 为 Challenge 时的附加参数。
|
41926
|
+
:type ChallengeActionParameters: :class:`tencentcloud.teo.v20220901.models.ChallengeActionParameters`
|
41927
|
+
:param _BlockIPActionParameters: 待废弃,当 Name 为 BlockIP 时的附加参数。
|
41928
|
+
:type BlockIPActionParameters: :class:`tencentcloud.teo.v20220901.models.BlockIPActionParameters`
|
41929
|
+
:param _ReturnCustomPageActionParameters: 待废弃,当 Name 为 ReturnCustomPage 时的附加参数。
|
41930
|
+
:type ReturnCustomPageActionParameters: :class:`tencentcloud.teo.v20220901.models.ReturnCustomPageActionParameters`
|
40808
41931
|
"""
|
40809
41932
|
self._Name = None
|
41933
|
+
self._DenyActionParameters = None
|
41934
|
+
self._RedirectActionParameters = None
|
41935
|
+
self._ChallengeActionParameters = None
|
40810
41936
|
self._BlockIPActionParameters = None
|
40811
41937
|
self._ReturnCustomPageActionParameters = None
|
40812
|
-
self._RedirectActionParameters = None
|
40813
41938
|
|
40814
41939
|
@property
|
40815
41940
|
def Name(self):
|
40816
41941
|
"""安全执行的具体动作。取值有:
|
40817
|
-
<li>Deny
|
41942
|
+
<li>Deny:拦截,阻止请求访问站点资源;</li>
|
41943
|
+
<li>Monitor:观察,仅记录日志;</li>
|
41944
|
+
<li>Redirect:重定向至 URL;</li>
|
41945
|
+
<li>Disabled:未启用,不启用指定规则;</li>
|
41946
|
+
<li>Allow:允许访问,但延迟处理请求;</li>
|
41947
|
+
<li>Challenge:挑战,响应挑战内容;</li>
|
41948
|
+
<li>BlockIP:待废弃,IP 封禁;</li>
|
41949
|
+
<li>ReturnCustomPage:待废弃,使用指定页面拦截;</li>
|
41950
|
+
<li>JSChallenge:待废弃,JavaScript 挑战;</li>
|
41951
|
+
<li>ManagedChallenge:待废弃,托管挑战。</li>
|
40818
41952
|
:rtype: str
|
40819
41953
|
"""
|
40820
41954
|
return self._Name
|
@@ -40823,9 +41957,42 @@ class SecurityAction(AbstractModel):
|
|
40823
41957
|
def Name(self, Name):
|
40824
41958
|
self._Name = Name
|
40825
41959
|
|
41960
|
+
@property
|
41961
|
+
def DenyActionParameters(self):
|
41962
|
+
"""当 Name 为 Deny 时的附加参数。
|
41963
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.DenyActionParameters`
|
41964
|
+
"""
|
41965
|
+
return self._DenyActionParameters
|
41966
|
+
|
41967
|
+
@DenyActionParameters.setter
|
41968
|
+
def DenyActionParameters(self, DenyActionParameters):
|
41969
|
+
self._DenyActionParameters = DenyActionParameters
|
41970
|
+
|
41971
|
+
@property
|
41972
|
+
def RedirectActionParameters(self):
|
41973
|
+
"""当 Name 为 Redirect 时的附加参数。
|
41974
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.RedirectActionParameters`
|
41975
|
+
"""
|
41976
|
+
return self._RedirectActionParameters
|
41977
|
+
|
41978
|
+
@RedirectActionParameters.setter
|
41979
|
+
def RedirectActionParameters(self, RedirectActionParameters):
|
41980
|
+
self._RedirectActionParameters = RedirectActionParameters
|
41981
|
+
|
41982
|
+
@property
|
41983
|
+
def ChallengeActionParameters(self):
|
41984
|
+
"""当 Name 为 Challenge 时的附加参数。
|
41985
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.ChallengeActionParameters`
|
41986
|
+
"""
|
41987
|
+
return self._ChallengeActionParameters
|
41988
|
+
|
41989
|
+
@ChallengeActionParameters.setter
|
41990
|
+
def ChallengeActionParameters(self, ChallengeActionParameters):
|
41991
|
+
self._ChallengeActionParameters = ChallengeActionParameters
|
41992
|
+
|
40826
41993
|
@property
|
40827
41994
|
def BlockIPActionParameters(self):
|
40828
|
-
"""
|
41995
|
+
"""待废弃,当 Name 为 BlockIP 时的附加参数。
|
40829
41996
|
:rtype: :class:`tencentcloud.teo.v20220901.models.BlockIPActionParameters`
|
40830
41997
|
"""
|
40831
41998
|
return self._BlockIPActionParameters
|
@@ -40836,7 +42003,7 @@ class SecurityAction(AbstractModel):
|
|
40836
42003
|
|
40837
42004
|
@property
|
40838
42005
|
def ReturnCustomPageActionParameters(self):
|
40839
|
-
"""
|
42006
|
+
"""待废弃,当 Name 为 ReturnCustomPage 时的附加参数。
|
40840
42007
|
:rtype: :class:`tencentcloud.teo.v20220901.models.ReturnCustomPageActionParameters`
|
40841
42008
|
"""
|
40842
42009
|
return self._ReturnCustomPageActionParameters
|
@@ -40845,29 +42012,24 @@ class SecurityAction(AbstractModel):
|
|
40845
42012
|
def ReturnCustomPageActionParameters(self, ReturnCustomPageActionParameters):
|
40846
42013
|
self._ReturnCustomPageActionParameters = ReturnCustomPageActionParameters
|
40847
42014
|
|
40848
|
-
@property
|
40849
|
-
def RedirectActionParameters(self):
|
40850
|
-
"""当 Name 为 Redirect 时的附加参数。
|
40851
|
-
:rtype: :class:`tencentcloud.teo.v20220901.models.RedirectActionParameters`
|
40852
|
-
"""
|
40853
|
-
return self._RedirectActionParameters
|
40854
|
-
|
40855
|
-
@RedirectActionParameters.setter
|
40856
|
-
def RedirectActionParameters(self, RedirectActionParameters):
|
40857
|
-
self._RedirectActionParameters = RedirectActionParameters
|
40858
|
-
|
40859
42015
|
|
40860
42016
|
def _deserialize(self, params):
|
40861
42017
|
self._Name = params.get("Name")
|
42018
|
+
if params.get("DenyActionParameters") is not None:
|
42019
|
+
self._DenyActionParameters = DenyActionParameters()
|
42020
|
+
self._DenyActionParameters._deserialize(params.get("DenyActionParameters"))
|
42021
|
+
if params.get("RedirectActionParameters") is not None:
|
42022
|
+
self._RedirectActionParameters = RedirectActionParameters()
|
42023
|
+
self._RedirectActionParameters._deserialize(params.get("RedirectActionParameters"))
|
42024
|
+
if params.get("ChallengeActionParameters") is not None:
|
42025
|
+
self._ChallengeActionParameters = ChallengeActionParameters()
|
42026
|
+
self._ChallengeActionParameters._deserialize(params.get("ChallengeActionParameters"))
|
40862
42027
|
if params.get("BlockIPActionParameters") is not None:
|
40863
42028
|
self._BlockIPActionParameters = BlockIPActionParameters()
|
40864
42029
|
self._BlockIPActionParameters._deserialize(params.get("BlockIPActionParameters"))
|
40865
42030
|
if params.get("ReturnCustomPageActionParameters") is not None:
|
40866
42031
|
self._ReturnCustomPageActionParameters = ReturnCustomPageActionParameters()
|
40867
42032
|
self._ReturnCustomPageActionParameters._deserialize(params.get("ReturnCustomPageActionParameters"))
|
40868
|
-
if params.get("RedirectActionParameters") is not None:
|
40869
|
-
self._RedirectActionParameters = RedirectActionParameters()
|
40870
|
-
self._RedirectActionParameters._deserialize(params.get("RedirectActionParameters"))
|
40871
42033
|
memeber_set = set(params.keys())
|
40872
42034
|
for name, value in vars(self).items():
|
40873
42035
|
property_name = name[1:]
|
@@ -41097,9 +42259,18 @@ class SecurityPolicy(AbstractModel):
|
|
41097
42259
|
:type CustomRules: :class:`tencentcloud.teo.v20220901.models.CustomRules`
|
41098
42260
|
:param _ManagedRules: 托管规则配置。
|
41099
42261
|
:type ManagedRules: :class:`tencentcloud.teo.v20220901.models.ManagedRules`
|
42262
|
+
:param _HttpDDoSProtection: HTTP DDOS防护配置。
|
42263
|
+
:type HttpDDoSProtection: :class:`tencentcloud.teo.v20220901.models.HttpDDoSProtection`
|
42264
|
+
:param _RateLimitingRules: 速率限制规则配置。
|
42265
|
+
:type RateLimitingRules: :class:`tencentcloud.teo.v20220901.models.RateLimitingRules`
|
42266
|
+
:param _ExceptionRules: 例外规则配置。
|
42267
|
+
:type ExceptionRules: :class:`tencentcloud.teo.v20220901.models.ExceptionRules`
|
41100
42268
|
"""
|
41101
42269
|
self._CustomRules = None
|
41102
42270
|
self._ManagedRules = None
|
42271
|
+
self._HttpDDoSProtection = None
|
42272
|
+
self._RateLimitingRules = None
|
42273
|
+
self._ExceptionRules = None
|
41103
42274
|
|
41104
42275
|
@property
|
41105
42276
|
def CustomRules(self):
|
@@ -41123,6 +42294,39 @@ class SecurityPolicy(AbstractModel):
|
|
41123
42294
|
def ManagedRules(self, ManagedRules):
|
41124
42295
|
self._ManagedRules = ManagedRules
|
41125
42296
|
|
42297
|
+
@property
|
42298
|
+
def HttpDDoSProtection(self):
|
42299
|
+
"""HTTP DDOS防护配置。
|
42300
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.HttpDDoSProtection`
|
42301
|
+
"""
|
42302
|
+
return self._HttpDDoSProtection
|
42303
|
+
|
42304
|
+
@HttpDDoSProtection.setter
|
42305
|
+
def HttpDDoSProtection(self, HttpDDoSProtection):
|
42306
|
+
self._HttpDDoSProtection = HttpDDoSProtection
|
42307
|
+
|
42308
|
+
@property
|
42309
|
+
def RateLimitingRules(self):
|
42310
|
+
"""速率限制规则配置。
|
42311
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.RateLimitingRules`
|
42312
|
+
"""
|
42313
|
+
return self._RateLimitingRules
|
42314
|
+
|
42315
|
+
@RateLimitingRules.setter
|
42316
|
+
def RateLimitingRules(self, RateLimitingRules):
|
42317
|
+
self._RateLimitingRules = RateLimitingRules
|
42318
|
+
|
42319
|
+
@property
|
42320
|
+
def ExceptionRules(self):
|
42321
|
+
"""例外规则配置。
|
42322
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.ExceptionRules`
|
42323
|
+
"""
|
42324
|
+
return self._ExceptionRules
|
42325
|
+
|
42326
|
+
@ExceptionRules.setter
|
42327
|
+
def ExceptionRules(self, ExceptionRules):
|
42328
|
+
self._ExceptionRules = ExceptionRules
|
42329
|
+
|
41126
42330
|
|
41127
42331
|
def _deserialize(self, params):
|
41128
42332
|
if params.get("CustomRules") is not None:
|
@@ -41131,6 +42335,15 @@ class SecurityPolicy(AbstractModel):
|
|
41131
42335
|
if params.get("ManagedRules") is not None:
|
41132
42336
|
self._ManagedRules = ManagedRules()
|
41133
42337
|
self._ManagedRules._deserialize(params.get("ManagedRules"))
|
42338
|
+
if params.get("HttpDDoSProtection") is not None:
|
42339
|
+
self._HttpDDoSProtection = HttpDDoSProtection()
|
42340
|
+
self._HttpDDoSProtection._deserialize(params.get("HttpDDoSProtection"))
|
42341
|
+
if params.get("RateLimitingRules") is not None:
|
42342
|
+
self._RateLimitingRules = RateLimitingRules()
|
42343
|
+
self._RateLimitingRules._deserialize(params.get("RateLimitingRules"))
|
42344
|
+
if params.get("ExceptionRules") is not None:
|
42345
|
+
self._ExceptionRules = ExceptionRules()
|
42346
|
+
self._ExceptionRules._deserialize(params.get("ExceptionRules"))
|
41134
42347
|
memeber_set = set(params.keys())
|
41135
42348
|
for name, value in vars(self).items():
|
41136
42349
|
property_name = name[1:]
|
@@ -41552,6 +42765,93 @@ class SkipCondition(AbstractModel):
|
|
41552
42765
|
|
41553
42766
|
|
41554
42767
|
|
42768
|
+
class SlowAttackDefense(AbstractModel):
|
42769
|
+
"""慢速攻击防护的具体配置。
|
42770
|
+
|
42771
|
+
"""
|
42772
|
+
|
42773
|
+
def __init__(self):
|
42774
|
+
r"""
|
42775
|
+
:param _Enabled: 慢速攻击防护是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
42776
|
+
:type Enabled: str
|
42777
|
+
:param _Action: 慢速攻击防护的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li>
|
42778
|
+
:type Action: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
42779
|
+
:param _MinimalRequestBodyTransferRate: 正文传输最小速率阈值的具体配置,当 Enabled 为 on 时,此字段必填。
|
42780
|
+
:type MinimalRequestBodyTransferRate: :class:`tencentcloud.teo.v20220901.models.MinimalRequestBodyTransferRate`
|
42781
|
+
:param _RequestBodyTransferTimeout: 正文传输超时时长的具体配置,当 Enabled 为 on 时,此字段必填。
|
42782
|
+
:type RequestBodyTransferTimeout: :class:`tencentcloud.teo.v20220901.models.RequestBodyTransferTimeout`
|
42783
|
+
"""
|
42784
|
+
self._Enabled = None
|
42785
|
+
self._Action = None
|
42786
|
+
self._MinimalRequestBodyTransferRate = None
|
42787
|
+
self._RequestBodyTransferTimeout = None
|
42788
|
+
|
42789
|
+
@property
|
42790
|
+
def Enabled(self):
|
42791
|
+
"""慢速攻击防护是否开启。取值有:<li>on:开启;</li><li>off:关闭。</li>
|
42792
|
+
:rtype: str
|
42793
|
+
"""
|
42794
|
+
return self._Enabled
|
42795
|
+
|
42796
|
+
@Enabled.setter
|
42797
|
+
def Enabled(self, Enabled):
|
42798
|
+
self._Enabled = Enabled
|
42799
|
+
|
42800
|
+
@property
|
42801
|
+
def Action(self):
|
42802
|
+
"""慢速攻击防护的处置方式,当 Enabled 为 on 时,此字段必填。SecurityAction 的 Name 取值支持:<li>Monitor:观察;</li><li>Deny:拦截;</li>
|
42803
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.SecurityAction`
|
42804
|
+
"""
|
42805
|
+
return self._Action
|
42806
|
+
|
42807
|
+
@Action.setter
|
42808
|
+
def Action(self, Action):
|
42809
|
+
self._Action = Action
|
42810
|
+
|
42811
|
+
@property
|
42812
|
+
def MinimalRequestBodyTransferRate(self):
|
42813
|
+
"""正文传输最小速率阈值的具体配置,当 Enabled 为 on 时,此字段必填。
|
42814
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.MinimalRequestBodyTransferRate`
|
42815
|
+
"""
|
42816
|
+
return self._MinimalRequestBodyTransferRate
|
42817
|
+
|
42818
|
+
@MinimalRequestBodyTransferRate.setter
|
42819
|
+
def MinimalRequestBodyTransferRate(self, MinimalRequestBodyTransferRate):
|
42820
|
+
self._MinimalRequestBodyTransferRate = MinimalRequestBodyTransferRate
|
42821
|
+
|
42822
|
+
@property
|
42823
|
+
def RequestBodyTransferTimeout(self):
|
42824
|
+
"""正文传输超时时长的具体配置,当 Enabled 为 on 时,此字段必填。
|
42825
|
+
:rtype: :class:`tencentcloud.teo.v20220901.models.RequestBodyTransferTimeout`
|
42826
|
+
"""
|
42827
|
+
return self._RequestBodyTransferTimeout
|
42828
|
+
|
42829
|
+
@RequestBodyTransferTimeout.setter
|
42830
|
+
def RequestBodyTransferTimeout(self, RequestBodyTransferTimeout):
|
42831
|
+
self._RequestBodyTransferTimeout = RequestBodyTransferTimeout
|
42832
|
+
|
42833
|
+
|
42834
|
+
def _deserialize(self, params):
|
42835
|
+
self._Enabled = params.get("Enabled")
|
42836
|
+
if params.get("Action") is not None:
|
42837
|
+
self._Action = SecurityAction()
|
42838
|
+
self._Action._deserialize(params.get("Action"))
|
42839
|
+
if params.get("MinimalRequestBodyTransferRate") is not None:
|
42840
|
+
self._MinimalRequestBodyTransferRate = MinimalRequestBodyTransferRate()
|
42841
|
+
self._MinimalRequestBodyTransferRate._deserialize(params.get("MinimalRequestBodyTransferRate"))
|
42842
|
+
if params.get("RequestBodyTransferTimeout") is not None:
|
42843
|
+
self._RequestBodyTransferTimeout = RequestBodyTransferTimeout()
|
42844
|
+
self._RequestBodyTransferTimeout._deserialize(params.get("RequestBodyTransferTimeout"))
|
42845
|
+
memeber_set = set(params.keys())
|
42846
|
+
for name, value in vars(self).items():
|
42847
|
+
property_name = name[1:]
|
42848
|
+
if property_name in memeber_set:
|
42849
|
+
memeber_set.remove(property_name)
|
42850
|
+
if len(memeber_set) > 0:
|
42851
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
42852
|
+
|
42853
|
+
|
42854
|
+
|
41555
42855
|
class SlowPostConfig(AbstractModel):
|
41556
42856
|
"""慢速攻击配置。
|
41557
42857
|
|