tencentcloud-sdk-waf 1.0.298 → 1.0.301
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.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20180125/client.rb +24 -0
- data/lib/v20180125/models.rb +159 -0
- 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: 319e76cfbab05a5e7af86060f71077253c2f7c6d
|
4
|
+
data.tar.gz: 3eaa4b7fc6b59c98bdae1202fbf1b3f240c623ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b70072e47a8c83343e7645eed89f44be204bfe0ca1744730485e0c3b3889fcfd31301adcdad64e5cc29729d80172439e463918b4a3d318373c727959082cce9a
|
7
|
+
data.tar.gz: fd70030e5decd7299b6bb57e3ab2eb563449d319df9d868d09038e1eae7284f6f1bdc8b537e941aaed55090a90ee05791b4324c38b16a6886b5cef4770b0505d
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.301
|
data/lib/v20180125/client.rb
CHANGED
@@ -77,6 +77,30 @@ module TencentCloud
|
|
77
77
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
78
|
end
|
79
79
|
|
80
|
+
# 添加Spart防护域名
|
81
|
+
|
82
|
+
# @param request: Request instance for AddSpartaProtection.
|
83
|
+
# @type request: :class:`Tencentcloud::waf::V20180125::AddSpartaProtectionRequest`
|
84
|
+
# @rtype: :class:`Tencentcloud::waf::V20180125::AddSpartaProtectionResponse`
|
85
|
+
def AddSpartaProtection(request)
|
86
|
+
body = send_request('AddSpartaProtection', request.serialize)
|
87
|
+
response = JSON.parse(body)
|
88
|
+
if response['Response'].key?('Error') == false
|
89
|
+
model = AddSpartaProtectionResponse.new
|
90
|
+
model.deserialize(response['Response'])
|
91
|
+
model
|
92
|
+
else
|
93
|
+
code = response['Response']['Error']['Code']
|
94
|
+
message = response['Response']['Error']['Message']
|
95
|
+
reqid = response['Response']['RequestId']
|
96
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
97
|
+
end
|
98
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
99
|
+
raise e
|
100
|
+
rescue StandardError => e
|
101
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
102
|
+
end
|
103
|
+
|
80
104
|
# 本接口用于创建访问日志导出
|
81
105
|
|
82
106
|
# @param request: Request instance for CreateAccessExport.
|
data/lib/v20180125/models.rb
CHANGED
@@ -434,6 +434,133 @@ module TencentCloud
|
|
434
434
|
end
|
435
435
|
end
|
436
436
|
|
437
|
+
# AddSpartaProtection请求参数结构体
|
438
|
+
class AddSpartaProtectionRequest < TencentCloud::Common::AbstractModel
|
439
|
+
# @param Domain: 需要防御的域名
|
440
|
+
# @type Domain: String
|
441
|
+
# @param CertType: 证书类型,0表示没有证书,CertType=1表示自有证书,2 为托管证书
|
442
|
+
# @type CertType: Integer
|
443
|
+
# @param IsCdn: 表示是否开启了CDN代理,1:有部署CDN,0:未部署CDN
|
444
|
+
# @type IsCdn: Integer
|
445
|
+
# @param UpstreamType: 回源类型,0表示通过IP回源,1 表示通过域名回源
|
446
|
+
# @type UpstreamType: Integer
|
447
|
+
# @param IsWebsocket: 是否开启WebSocket支持,1表示开启,0不开启
|
448
|
+
# @type IsWebsocket: Integer
|
449
|
+
# @param LoadBalance: 负载均衡策略,0表示轮徇,1表示IP hash
|
450
|
+
# @type LoadBalance: String
|
451
|
+
# @param Cert: CertType=1时,需要填次参数,表示证书内容
|
452
|
+
# @type Cert: String
|
453
|
+
# @param PrivateKey: CertType=1时,需要填次参数,表示证书的私钥
|
454
|
+
# @type PrivateKey: String
|
455
|
+
# @param SSLId: CertType=2时,需要填次参数,表示证书的ID
|
456
|
+
# @type SSLId: String
|
457
|
+
# @param ResourceId: Waf的资源ID
|
458
|
+
# @type ResourceId: String
|
459
|
+
# @param UpstreamScheme: HTTPS回源协议,填http或者https
|
460
|
+
# @type UpstreamScheme: String
|
461
|
+
# @param HttpsUpstreamPort: HTTPS回源端口,仅UpstreamScheme为http时需要填当前字段
|
462
|
+
# @type HttpsUpstreamPort: String
|
463
|
+
# @param IsGray: 是否开启灰度,0表示不开启灰度
|
464
|
+
# @type IsGray: Integer
|
465
|
+
# @param GrayAreas: 灰度的地区
|
466
|
+
# @type GrayAreas: Array
|
467
|
+
# @param UpstreamDomain: UpstreamType=1时,填次字段表示回源域名
|
468
|
+
# @type UpstreamDomain: String
|
469
|
+
# @param SrcList: UpstreamType=0时,填次字段表示回源ip
|
470
|
+
# @type SrcList: Array
|
471
|
+
# @param IsHttp2: 是否开启HTTP2,开启HTTP2需要HTTPS支持
|
472
|
+
# @type IsHttp2: Integer
|
473
|
+
# @param HttpsRewrite: 表示是否强制跳转到HTTPS,1强制跳转Https,0不强制跳转
|
474
|
+
# @type HttpsRewrite: Integer
|
475
|
+
# @param Ports: 服务有多端口需要设置此字段
|
476
|
+
# @type Ports: Array
|
477
|
+
# @param Edition: 版本:sparta-waf、clb-waf、cdn-waf
|
478
|
+
# @type Edition: String
|
479
|
+
# @param IsKeepAlive: 是否开启长连接,仅IP回源时可以用填次参数,域名回源时这个参数无效
|
480
|
+
# @type IsKeepAlive: String
|
481
|
+
# @param InstanceID: 实例id,上线之后带上此字段
|
482
|
+
# @type InstanceID: String
|
483
|
+
# @param Anycast: anycast ip类型开关: 0 普通ip 1 Anycast ip
|
484
|
+
# @type Anycast: Integer
|
485
|
+
|
486
|
+
attr_accessor :Domain, :CertType, :IsCdn, :UpstreamType, :IsWebsocket, :LoadBalance, :Cert, :PrivateKey, :SSLId, :ResourceId, :UpstreamScheme, :HttpsUpstreamPort, :IsGray, :GrayAreas, :UpstreamDomain, :SrcList, :IsHttp2, :HttpsRewrite, :Ports, :Edition, :IsKeepAlive, :InstanceID, :Anycast
|
487
|
+
|
488
|
+
def initialize(domain=nil, certtype=nil, iscdn=nil, upstreamtype=nil, iswebsocket=nil, loadbalance=nil, cert=nil, privatekey=nil, sslid=nil, resourceid=nil, upstreamscheme=nil, httpsupstreamport=nil, isgray=nil, grayareas=nil, upstreamdomain=nil, srclist=nil, ishttp2=nil, httpsrewrite=nil, ports=nil, edition=nil, iskeepalive=nil, instanceid=nil, anycast=nil)
|
489
|
+
@Domain = domain
|
490
|
+
@CertType = certtype
|
491
|
+
@IsCdn = iscdn
|
492
|
+
@UpstreamType = upstreamtype
|
493
|
+
@IsWebsocket = iswebsocket
|
494
|
+
@LoadBalance = loadbalance
|
495
|
+
@Cert = cert
|
496
|
+
@PrivateKey = privatekey
|
497
|
+
@SSLId = sslid
|
498
|
+
@ResourceId = resourceid
|
499
|
+
@UpstreamScheme = upstreamscheme
|
500
|
+
@HttpsUpstreamPort = httpsupstreamport
|
501
|
+
@IsGray = isgray
|
502
|
+
@GrayAreas = grayareas
|
503
|
+
@UpstreamDomain = upstreamdomain
|
504
|
+
@SrcList = srclist
|
505
|
+
@IsHttp2 = ishttp2
|
506
|
+
@HttpsRewrite = httpsrewrite
|
507
|
+
@Ports = ports
|
508
|
+
@Edition = edition
|
509
|
+
@IsKeepAlive = iskeepalive
|
510
|
+
@InstanceID = instanceid
|
511
|
+
@Anycast = anycast
|
512
|
+
end
|
513
|
+
|
514
|
+
def deserialize(params)
|
515
|
+
@Domain = params['Domain']
|
516
|
+
@CertType = params['CertType']
|
517
|
+
@IsCdn = params['IsCdn']
|
518
|
+
@UpstreamType = params['UpstreamType']
|
519
|
+
@IsWebsocket = params['IsWebsocket']
|
520
|
+
@LoadBalance = params['LoadBalance']
|
521
|
+
@Cert = params['Cert']
|
522
|
+
@PrivateKey = params['PrivateKey']
|
523
|
+
@SSLId = params['SSLId']
|
524
|
+
@ResourceId = params['ResourceId']
|
525
|
+
@UpstreamScheme = params['UpstreamScheme']
|
526
|
+
@HttpsUpstreamPort = params['HttpsUpstreamPort']
|
527
|
+
@IsGray = params['IsGray']
|
528
|
+
@GrayAreas = params['GrayAreas']
|
529
|
+
@UpstreamDomain = params['UpstreamDomain']
|
530
|
+
@SrcList = params['SrcList']
|
531
|
+
@IsHttp2 = params['IsHttp2']
|
532
|
+
@HttpsRewrite = params['HttpsRewrite']
|
533
|
+
unless params['Ports'].nil?
|
534
|
+
@Ports = []
|
535
|
+
params['Ports'].each do |i|
|
536
|
+
portitem_tmp = PortItem.new
|
537
|
+
portitem_tmp.deserialize(i)
|
538
|
+
@Ports << portitem_tmp
|
539
|
+
end
|
540
|
+
end
|
541
|
+
@Edition = params['Edition']
|
542
|
+
@IsKeepAlive = params['IsKeepAlive']
|
543
|
+
@InstanceID = params['InstanceID']
|
544
|
+
@Anycast = params['Anycast']
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
# AddSpartaProtection返回参数结构体
|
549
|
+
class AddSpartaProtectionResponse < TencentCloud::Common::AbstractModel
|
550
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
551
|
+
# @type RequestId: String
|
552
|
+
|
553
|
+
attr_accessor :RequestId
|
554
|
+
|
555
|
+
def initialize(requestid=nil)
|
556
|
+
@RequestId = requestid
|
557
|
+
end
|
558
|
+
|
559
|
+
def deserialize(params)
|
560
|
+
@RequestId = params['RequestId']
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
437
564
|
# Waf 攻击自动封禁详情
|
438
565
|
class AutoDenyDetail < TencentCloud::Common::AbstractModel
|
439
566
|
# @param AttackTags: 攻击封禁类型标签
|
@@ -2140,6 +2267,38 @@ module TencentCloud
|
|
2140
2267
|
end
|
2141
2268
|
end
|
2142
2269
|
|
2270
|
+
# 防护域名端口配置信息
|
2271
|
+
class PortItem < TencentCloud::Common::AbstractModel
|
2272
|
+
# @param Port: 监听端口配置
|
2273
|
+
# @type Port: String
|
2274
|
+
# @param Protocol: 与Port一一对应,表示端口对应的协议
|
2275
|
+
# @type Protocol: String
|
2276
|
+
# @param UpstreamPort: 与Port一一对应, 表示回源端口
|
2277
|
+
# @type UpstreamPort: String
|
2278
|
+
# @param UpstreamProtocol: 与Port一一对应, 表示回源协议
|
2279
|
+
# @type UpstreamProtocol: String
|
2280
|
+
# @param NginxServerId: Nginx的服务器ID
|
2281
|
+
# @type NginxServerId: String
|
2282
|
+
|
2283
|
+
attr_accessor :Port, :Protocol, :UpstreamPort, :UpstreamProtocol, :NginxServerId
|
2284
|
+
|
2285
|
+
def initialize(port=nil, protocol=nil, upstreamport=nil, upstreamprotocol=nil, nginxserverid=nil)
|
2286
|
+
@Port = port
|
2287
|
+
@Protocol = protocol
|
2288
|
+
@UpstreamPort = upstreamport
|
2289
|
+
@UpstreamProtocol = upstreamprotocol
|
2290
|
+
@NginxServerId = nginxserverid
|
2291
|
+
end
|
2292
|
+
|
2293
|
+
def deserialize(params)
|
2294
|
+
@Port = params['Port']
|
2295
|
+
@Protocol = params['Protocol']
|
2296
|
+
@UpstreamPort = params['UpstreamPort']
|
2297
|
+
@UpstreamProtocol = params['UpstreamProtocol']
|
2298
|
+
@NginxServerId = params['NginxServerId']
|
2299
|
+
end
|
2300
|
+
end
|
2301
|
+
|
2143
2302
|
# 响应体的返回码
|
2144
2303
|
class ResponseCode < TencentCloud::Common::AbstractModel
|
2145
2304
|
# @param Code: 如果成功则返回Success,失败则返回yunapi定义的错误码
|
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: 1.0.
|
4
|
+
version: 1.0.301
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|