tencentcloud-sdk-waf 3.0.555 → 3.0.556
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20180125/client.rb +72 -0
- data/lib/v20180125/models.rb +185 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0ab7c687d738235a9c7d0c813f926dc9ad3b30c
|
4
|
+
data.tar.gz: cf92e3664e756cb5fcba0a70596a38e88065b22e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3e93bd4720d03b19d44fd6e8278e944e2bd2674e723ba9702f16fe81b9184ac5e10392a74e9be57d065cd114810eae285b748f6b770e9daa920ccf66dd22622
|
7
|
+
data.tar.gz: 86ec7d1e70fd18e4ba6dacd5167707ef0f11c23bdc32e0054ee2ff50f90a56fc2982301868b1b16d1eb6613a507fc5dcfe654ac842e6ac0ebec907cad65a5751
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.556
|
data/lib/v20180125/client.rb
CHANGED
@@ -53,6 +53,30 @@ module TencentCloud
|
|
53
53
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
54
54
|
end
|
55
55
|
|
56
|
+
# 增加精准白名单规则
|
57
|
+
|
58
|
+
# @param request: Request instance for AddCustomWhiteRule.
|
59
|
+
# @type request: :class:`Tencentcloud::waf::V20180125::AddCustomWhiteRuleRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::waf::V20180125::AddCustomWhiteRuleResponse`
|
61
|
+
def AddCustomWhiteRule(request)
|
62
|
+
body = send_request('AddCustomWhiteRule', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = AddCustomWhiteRuleResponse.new
|
66
|
+
model.deserialize(response['Response'])
|
67
|
+
model
|
68
|
+
else
|
69
|
+
code = response['Response']['Error']['Code']
|
70
|
+
message = response['Response']['Error']['Message']
|
71
|
+
reqid = response['Response']['RequestId']
|
72
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
73
|
+
end
|
74
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
75
|
+
raise e
|
76
|
+
rescue StandardError => e
|
77
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
|
+
end
|
79
|
+
|
56
80
|
# 增加域名规则白名单
|
57
81
|
|
58
82
|
# @param request: Request instance for AddDomainWhiteRule.
|
@@ -197,6 +221,30 @@ module TencentCloud
|
|
197
221
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
198
222
|
end
|
199
223
|
|
224
|
+
# 删除精准白名单规则
|
225
|
+
|
226
|
+
# @param request: Request instance for DeleteCustomWhiteRule.
|
227
|
+
# @type request: :class:`Tencentcloud::waf::V20180125::DeleteCustomWhiteRuleRequest`
|
228
|
+
# @rtype: :class:`Tencentcloud::waf::V20180125::DeleteCustomWhiteRuleResponse`
|
229
|
+
def DeleteCustomWhiteRule(request)
|
230
|
+
body = send_request('DeleteCustomWhiteRule', request.serialize)
|
231
|
+
response = JSON.parse(body)
|
232
|
+
if response['Response'].key?('Error') == false
|
233
|
+
model = DeleteCustomWhiteRuleResponse.new
|
234
|
+
model.deserialize(response['Response'])
|
235
|
+
model
|
236
|
+
else
|
237
|
+
code = response['Response']['Error']['Code']
|
238
|
+
message = response['Response']['Error']['Message']
|
239
|
+
reqid = response['Response']['RequestId']
|
240
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
241
|
+
end
|
242
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
243
|
+
raise e
|
244
|
+
rescue StandardError => e
|
245
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
246
|
+
end
|
247
|
+
|
200
248
|
# 删除域名规则白名单
|
201
249
|
|
202
250
|
|
@@ -942,6 +990,30 @@ module TencentCloud
|
|
942
990
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
943
991
|
end
|
944
992
|
|
993
|
+
# 编辑精准白名单
|
994
|
+
|
995
|
+
# @param request: Request instance for ModifyCustomWhiteRule.
|
996
|
+
# @type request: :class:`Tencentcloud::waf::V20180125::ModifyCustomWhiteRuleRequest`
|
997
|
+
# @rtype: :class:`Tencentcloud::waf::V20180125::ModifyCustomWhiteRuleResponse`
|
998
|
+
def ModifyCustomWhiteRule(request)
|
999
|
+
body = send_request('ModifyCustomWhiteRule', request.serialize)
|
1000
|
+
response = JSON.parse(body)
|
1001
|
+
if response['Response'].key?('Error') == false
|
1002
|
+
model = ModifyCustomWhiteRuleResponse.new
|
1003
|
+
model.deserialize(response['Response'])
|
1004
|
+
model
|
1005
|
+
else
|
1006
|
+
code = response['Response']['Error']['Code']
|
1007
|
+
message = response['Response']['Error']['Message']
|
1008
|
+
reqid = response['Response']['RequestId']
|
1009
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1010
|
+
end
|
1011
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1012
|
+
raise e
|
1013
|
+
rescue StandardError => e
|
1014
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1015
|
+
end
|
1016
|
+
|
945
1017
|
# 更改某一条规则
|
946
1018
|
|
947
1019
|
# @param request: Request instance for ModifyDomainWhiteRule.
|
data/lib/v20180125/models.rb
CHANGED
@@ -386,6 +386,77 @@ module TencentCloud
|
|
386
386
|
end
|
387
387
|
end
|
388
388
|
|
389
|
+
# AddCustomWhiteRule请求参数结构体
|
390
|
+
class AddCustomWhiteRuleRequest < TencentCloud::Common::AbstractModel
|
391
|
+
# @param Name: 规则名称
|
392
|
+
# @type Name: String
|
393
|
+
# @param SortId: 优先级
|
394
|
+
# @type SortId: String
|
395
|
+
# @param ExpireTime: 过期时间
|
396
|
+
# @type ExpireTime: String
|
397
|
+
# @param Strategies: 策略详情
|
398
|
+
# @type Strategies: Array
|
399
|
+
# @param Domain: 需要添加策略的域名
|
400
|
+
# @type Domain: String
|
401
|
+
# @param Bypass: 放行的详情
|
402
|
+
# @type Bypass: String
|
403
|
+
|
404
|
+
attr_accessor :Name, :SortId, :ExpireTime, :Strategies, :Domain, :Bypass
|
405
|
+
|
406
|
+
def initialize(name=nil, sortid=nil, expiretime=nil, strategies=nil, domain=nil, bypass=nil)
|
407
|
+
@Name = name
|
408
|
+
@SortId = sortid
|
409
|
+
@ExpireTime = expiretime
|
410
|
+
@Strategies = strategies
|
411
|
+
@Domain = domain
|
412
|
+
@Bypass = bypass
|
413
|
+
end
|
414
|
+
|
415
|
+
def deserialize(params)
|
416
|
+
@Name = params['Name']
|
417
|
+
@SortId = params['SortId']
|
418
|
+
@ExpireTime = params['ExpireTime']
|
419
|
+
unless params['Strategies'].nil?
|
420
|
+
@Strategies = []
|
421
|
+
params['Strategies'].each do |i|
|
422
|
+
strategy_tmp = Strategy.new
|
423
|
+
strategy_tmp.deserialize(i)
|
424
|
+
@Strategies << strategy_tmp
|
425
|
+
end
|
426
|
+
end
|
427
|
+
@Domain = params['Domain']
|
428
|
+
@Bypass = params['Bypass']
|
429
|
+
end
|
430
|
+
end
|
431
|
+
|
432
|
+
# AddCustomWhiteRule返回参数结构体
|
433
|
+
class AddCustomWhiteRuleResponse < TencentCloud::Common::AbstractModel
|
434
|
+
# @param Success: 操作的状态码,如果所有的资源操作成功则返回的是成功的状态码,如果有资源操作失败则需要解析Message的内容来查看哪个资源失败
|
435
|
+
# @type Success: :class:`Tencentcloud::Waf.v20180125.models.ResponseCode`
|
436
|
+
# @param RuleId: 添加成功的规则ID
|
437
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
438
|
+
# @type RuleId: Integer
|
439
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
440
|
+
# @type RequestId: String
|
441
|
+
|
442
|
+
attr_accessor :Success, :RuleId, :RequestId
|
443
|
+
|
444
|
+
def initialize(success=nil, ruleid=nil, requestid=nil)
|
445
|
+
@Success = success
|
446
|
+
@RuleId = ruleid
|
447
|
+
@RequestId = requestid
|
448
|
+
end
|
449
|
+
|
450
|
+
def deserialize(params)
|
451
|
+
unless params['Success'].nil?
|
452
|
+
@Success = ResponseCode.new
|
453
|
+
@Success.deserialize(params['Success'])
|
454
|
+
end
|
455
|
+
@RuleId = params['RuleId']
|
456
|
+
@RequestId = params['RequestId']
|
457
|
+
end
|
458
|
+
end
|
459
|
+
|
389
460
|
# AddDomainWhiteRule请求参数结构体
|
390
461
|
class AddDomainWhiteRuleRequest < TencentCloud::Common::AbstractModel
|
391
462
|
# @param Domain: 需要添加的域名
|
@@ -1001,6 +1072,49 @@ module TencentCloud
|
|
1001
1072
|
end
|
1002
1073
|
end
|
1003
1074
|
|
1075
|
+
# DeleteCustomWhiteRule请求参数结构体
|
1076
|
+
class DeleteCustomWhiteRuleRequest < TencentCloud::Common::AbstractModel
|
1077
|
+
# @param Domain: 删除的域名
|
1078
|
+
# @type Domain: String
|
1079
|
+
# @param RuleId: 删除的规则ID
|
1080
|
+
# @type RuleId: Integer
|
1081
|
+
|
1082
|
+
attr_accessor :Domain, :RuleId
|
1083
|
+
|
1084
|
+
def initialize(domain=nil, ruleid=nil)
|
1085
|
+
@Domain = domain
|
1086
|
+
@RuleId = ruleid
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
def deserialize(params)
|
1090
|
+
@Domain = params['Domain']
|
1091
|
+
@RuleId = params['RuleId']
|
1092
|
+
end
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
# DeleteCustomWhiteRule返回参数结构体
|
1096
|
+
class DeleteCustomWhiteRuleResponse < TencentCloud::Common::AbstractModel
|
1097
|
+
# @param Success: 操作的状态码,如果所有的资源操作成功则返回的是成功的状态码,如果有资源操作失败则需要解析Message的内容来查看哪个资源失败
|
1098
|
+
# @type Success: :class:`Tencentcloud::Waf.v20180125.models.ResponseCode`
|
1099
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
1100
|
+
# @type RequestId: String
|
1101
|
+
|
1102
|
+
attr_accessor :Success, :RequestId
|
1103
|
+
|
1104
|
+
def initialize(success=nil, requestid=nil)
|
1105
|
+
@Success = success
|
1106
|
+
@RequestId = requestid
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
def deserialize(params)
|
1110
|
+
unless params['Success'].nil?
|
1111
|
+
@Success = ResponseCode.new
|
1112
|
+
@Success.deserialize(params['Success'])
|
1113
|
+
end
|
1114
|
+
@RequestId = params['RequestId']
|
1115
|
+
end
|
1116
|
+
end
|
1117
|
+
|
1004
1118
|
# DeleteDomainWhiteRules请求参数结构体
|
1005
1119
|
class DeleteDomainWhiteRulesRequest < TencentCloud::Common::AbstractModel
|
1006
1120
|
# @param Domain: 需要删除的规则域名
|
@@ -3669,6 +3783,76 @@ module TencentCloud
|
|
3669
3783
|
end
|
3670
3784
|
end
|
3671
3785
|
|
3786
|
+
# ModifyCustomWhiteRule请求参数结构体
|
3787
|
+
class ModifyCustomWhiteRuleRequest < TencentCloud::Common::AbstractModel
|
3788
|
+
# @param Domain: 编辑的域名
|
3789
|
+
# @type Domain: String
|
3790
|
+
# @param RuleId: 编辑的规则ID
|
3791
|
+
# @type RuleId: Integer
|
3792
|
+
# @param RuleName: 编辑的规则名称
|
3793
|
+
# @type RuleName: String
|
3794
|
+
# @param Bypass: 放行时是否继续执行其它检查逻辑,继续执行地域封禁防护:geoip、继续执行CC策略防护:cc、继续执行WEB应用防护:owasp、继续执行AI引擎防护:ai、继续执行信息防泄漏防护:antileakage。如果多个勾选那么以,串接。
|
3795
|
+
# @type Bypass: String
|
3796
|
+
# @param SortId: 优先级,1~100的整数,数字越小,代表这条规则的执行优先级越高。
|
3797
|
+
# @type SortId: Integer
|
3798
|
+
# @param ExpireTime: 规则生效截止时间,0:永久生效,其它值为对应时间的时间戳。
|
3799
|
+
# @type ExpireTime: Integer
|
3800
|
+
# @param Strategies: 匹配条件数组
|
3801
|
+
# @type Strategies: Array
|
3802
|
+
|
3803
|
+
attr_accessor :Domain, :RuleId, :RuleName, :Bypass, :SortId, :ExpireTime, :Strategies
|
3804
|
+
|
3805
|
+
def initialize(domain=nil, ruleid=nil, rulename=nil, bypass=nil, sortid=nil, expiretime=nil, strategies=nil)
|
3806
|
+
@Domain = domain
|
3807
|
+
@RuleId = ruleid
|
3808
|
+
@RuleName = rulename
|
3809
|
+
@Bypass = bypass
|
3810
|
+
@SortId = sortid
|
3811
|
+
@ExpireTime = expiretime
|
3812
|
+
@Strategies = strategies
|
3813
|
+
end
|
3814
|
+
|
3815
|
+
def deserialize(params)
|
3816
|
+
@Domain = params['Domain']
|
3817
|
+
@RuleId = params['RuleId']
|
3818
|
+
@RuleName = params['RuleName']
|
3819
|
+
@Bypass = params['Bypass']
|
3820
|
+
@SortId = params['SortId']
|
3821
|
+
@ExpireTime = params['ExpireTime']
|
3822
|
+
unless params['Strategies'].nil?
|
3823
|
+
@Strategies = []
|
3824
|
+
params['Strategies'].each do |i|
|
3825
|
+
strategy_tmp = Strategy.new
|
3826
|
+
strategy_tmp.deserialize(i)
|
3827
|
+
@Strategies << strategy_tmp
|
3828
|
+
end
|
3829
|
+
end
|
3830
|
+
end
|
3831
|
+
end
|
3832
|
+
|
3833
|
+
# ModifyCustomWhiteRule返回参数结构体
|
3834
|
+
class ModifyCustomWhiteRuleResponse < TencentCloud::Common::AbstractModel
|
3835
|
+
# @param Success: 操作的状态码,如果所有的资源操作成功则返回的是成功的状态码,如果有资源操作失败则需要解析Message的内容来查看哪个资源失败
|
3836
|
+
# @type Success: :class:`Tencentcloud::Waf.v20180125.models.ResponseCode`
|
3837
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
3838
|
+
# @type RequestId: String
|
3839
|
+
|
3840
|
+
attr_accessor :Success, :RequestId
|
3841
|
+
|
3842
|
+
def initialize(success=nil, requestid=nil)
|
3843
|
+
@Success = success
|
3844
|
+
@RequestId = requestid
|
3845
|
+
end
|
3846
|
+
|
3847
|
+
def deserialize(params)
|
3848
|
+
unless params['Success'].nil?
|
3849
|
+
@Success = ResponseCode.new
|
3850
|
+
@Success.deserialize(params['Success'])
|
3851
|
+
end
|
3852
|
+
@RequestId = params['RequestId']
|
3853
|
+
end
|
3854
|
+
end
|
3855
|
+
|
3672
3856
|
# ModifyDomainWhiteRule请求参数结构体
|
3673
3857
|
class ModifyDomainWhiteRuleRequest < TencentCloud::Common::AbstractModel
|
3674
3858
|
# @param Domain: 需要更改的规则的域名
|
@@ -4406,7 +4590,7 @@ module TencentCloud
|
|
4406
4590
|
# @type Items: Array
|
4407
4591
|
# @param Edition: WAF实例类型,sparta-waf表示SAAS型WAF,clb-waf表示负载均衡型WAF
|
4408
4592
|
# @type Edition: String
|
4409
|
-
# @param SourceType: 是否为多域名黑白名单,当为多域名的黑白名单时,取值为batch
|
4593
|
+
# @param SourceType: 是否为多域名黑白名单,当为多域名的黑白名单时,取值为batch,否则为空
|
4410
4594
|
# @type SourceType: String
|
4411
4595
|
|
4412
4596
|
attr_accessor :Domain, :Items, :Edition, :SourceType
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-waf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.556
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|