Skip to content

Commit 882eedf

Browse files
publish jdcloud-sdk-python 1.6.134
1 parent 267987c commit 882eedf

20 files changed

Lines changed: 369 additions & 12 deletions

jdcloud_sdk/services/baseanti/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# 更新历史 #
2-
API版本:1.2.3
2+
API版本:1.3.0
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2022-01-14|1.3.0|接口新增与更新|1. 新增接口 describeWafIpResources 查询已防护的Web应用防火墙公网IP|
67
|2020-04-17|1.2.3|接口修复|1. 修复 describeAttackStatistics 接口返回字段类型错误|
78
|2019-07-26|1.2.0|新增接口|1. 新增接口查询基础防护已防护的托管区公网 IP 安全信息|
89
|2019-05-25|1.1.0|新增接口|1. 查询区域下的公网 IP 资源列表接口(describeIpResources)增加返回字段<br>2. 增加查询弹性公网 IP, 查询云物理机公网 IP 接口<br>3. 增加攻击记录查询接口, 攻击记录统计接口, 各类型攻击次数查询接口<br>4. 增加查询多个公网 IP 流量接口<br>5. 增加查询公网IP安全信息接口(支持ipv6)<br>6. 增加公网 IP 清洗阈值查询与修改接口(支持ipv6)|

jdcloud_sdk/services/baseanti/apis/DescribeCcsIpResourcesRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __init__(self, regionId, ):
4040
self.regionId = regionId
4141
self.pageNumber = None
4242
self.pageSize = None
43+
self.ip = None
4344

4445
def setPageNumber(self, pageNumber):
4546
"""
@@ -53,3 +54,9 @@ def setPageSize(self, pageSize):
5354
"""
5455
self.pageSize = pageSize
5556

57+
def setIp(self, ip):
58+
"""
59+
:param ip: (Optional) IP 模糊匹配
60+
"""
61+
self.ip = ip
62+

jdcloud_sdk/services/baseanti/apis/DescribeCpsIpResourcesRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def __init__(self, regionId, ):
4141
self.regionId = regionId
4242
self.pageNumber = None
4343
self.pageSize = None
44+
self.ip = None
4445

4546
def setPageNumber(self, pageNumber):
4647
"""
@@ -54,3 +55,9 @@ def setPageSize(self, pageSize):
5455
"""
5556
self.pageSize = pageSize
5657

58+
def setIp(self, ip):
59+
"""
60+
:param ip: (Optional) IP 模糊匹配
61+
"""
62+
self.ip = ip
63+

jdcloud_sdk/services/baseanti/apis/DescribeElasticIpResourcesRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def __init__(self, regionId, ):
4141
self.regionId = regionId
4242
self.pageNumber = None
4343
self.pageSize = None
44+
self.ip = None
4445

4546
def setPageNumber(self, pageNumber):
4647
"""
@@ -54,3 +55,9 @@ def setPageSize(self, pageSize):
5455
"""
5556
self.pageSize = pageSize
5657

58+
def setIp(self, ip):
59+
"""
60+
:param ip: (Optional) IP 模糊匹配
61+
"""
62+
self.ip = ip
63+

jdcloud_sdk/services/baseanti/apis/DescribeIpCleanThresholdRangeRequest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ class DescribeIpCleanThresholdRangeParameters(object):
3535
def __init__(self, regionId, ip):
3636
"""
3737
:param regionId: 地域编码. 基础防护已支持华北-北京, 华东-宿迁, 华东-上海, 华南-广州
38-
:param ip: 基础防护已防护公网 IP. <br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeelasticipresources'>describeElasticIpResources</a> 接口查询基础防护已防护的私有网络弹性公网 IP <br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describecpsipresources'>describeCpsIpResources</a> 接口查询基础防护已防护的云物理服务器公网IP 和 弹性公网 IP <br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeccsipresources'>describeCcsIpResources</a> 接口查询基础防护已防护的托管区公网 IP
38+
:param ip: 基础防护已防护公网 IP, 支持 ipv4 和 ipv6.
39+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeelasticipresources'>describeElasticIpResources</a> 接口查询基础防护已防护的私有网络弹性公网 IP
40+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describecpsipresources'>describeCpsIpResources</a> 接口查询基础防护已防护的云物理服务器公网IP 和 弹性公网 IP
41+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describewafipresources'>describeWafIpResources</a> 接口查询基础防护已防护的Web应用防火墙 IP
42+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeccsipresources'>describeCcsIpResources</a> 接口查询基础防护已防护的托管区公网 IP
43+
3944
"""
4045

4146
self.regionId = regionId

jdcloud_sdk/services/baseanti/apis/DescribeIpSafetyInfoRequest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ class DescribeIpSafetyInfoParameters(object):
3535
def __init__(self, regionId, ip):
3636
"""
3737
:param regionId: 地域编码. 基础防护已支持华北-北京, 华东-宿迁, 华东-上海, 华南-广州
38-
:param ip: 基础防护已防护公网 IP. <br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeelasticipresources'>describeElasticIpResources</a> 接口查询基础防护已防护的私有网络弹性公网 IP <br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describecpsipresources'>describeCpsIpResources</a> 接口查询基础防护已防护的云物理服务器公网IP 和 弹性公网 IP <br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeccsipresources'>describeCcsIpResources</a> 接口查询基础防护已防护的托管区公网 IP
38+
:param ip: 基础防护已防护公网 IP, 支持 ipv4 和 ipv6.
39+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeelasticipresources'>describeElasticIpResources</a> 接口查询基础防护已防护的私有网络弹性公网 IP
40+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describecpsipresources'>describeCpsIpResources</a> 接口查询基础防护已防护的云物理服务器公网IP 和 弹性公网 IP
41+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describewafipresources'>describeWafIpResources</a> 接口查询基础防护已防护的Web应用防火墙 IP
42+
<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-basic/api/describeccsipresources'>describeCcsIpResources</a> 接口查询基础防护已防护的托管区公网 IP
43+
3944
"""
4045

4146
self.regionId = regionId
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DescribeWafIpResourcesRequest(JDCloudRequest):
23+
"""
24+
查询基础防护已防护的Web应用防火墙 IP 的安全信息
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeWafIpResourcesRequest, self).__init__(
29+
'/regions/{regionId}/wafIpResources', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeWafIpResourcesParameters(object):
34+
35+
def __init__(self, regionId, ):
36+
"""
37+
:param regionId: 地域编码. 基础防护已支持华北-北京, 华东-宿迁, 华东-上海, 华南-广州
38+
"""
39+
40+
self.regionId = regionId
41+
self.pageNumber = None
42+
self.pageSize = None
43+
self.ip = None
44+
45+
def setPageNumber(self, pageNumber):
46+
"""
47+
:param pageNumber: (Optional) 页码
48+
"""
49+
self.pageNumber = pageNumber
50+
51+
def setPageSize(self, pageSize):
52+
"""
53+
:param pageSize: (Optional) 分页大小
54+
"""
55+
self.pageSize = pageSize
56+
57+
def setIp(self, ip):
58+
"""
59+
:param ip: (Optional) IP 模糊匹配
60+
"""
61+
self.ip = ip
62+

jdcloud_sdk/services/baseanti/client/BaseantiClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ def __init__(self, credential, config=None, logger=None):
2626
if config is None:
2727
config = Config('baseanti.jdcloud-api.com')
2828

29-
super(BaseantiClient, self).__init__(credential, config, 'baseanti', '1.2.3', logger)
29+
super(BaseantiClient, self).__init__(credential, config, 'baseanti', '1.3.0', logger)

jdcloud_sdk/services/baseanti/models/AttackLog.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@ class AttackLog(object):
2222
def __init__(self, ip=None, resourceType=None, attackLogId=None, startTime=None, endTime=None, cause=None, status=None, blackHole=None, peak=None, unit=None, attackType=None):
2323
"""
2424
:param ip: (Optional) 公网 IP 地址
25-
:param resourceType: (Optional) 公网 IP 类型或绑定资源类型.<br>- 0: 未知类型,<br>- 1: 弹性公网 IP(IP 为弹性公网 IP, 绑定资源类型未知),<br>- 10: 弹性公网 IP(IP 为弹性公网 IP, 但未绑定资源),<br>- 11: 云主机,<br>- 12: 负载均衡,<br>- 13: 原生容器实例,<br>- 14: 原生容器 Pod,<br>- 2: 云物理服务器,<br>- 4: 托管区公网 IP
25+
:param resourceType: (Optional) 公网 IP 类型或绑定资源类型.
26+
<br>- 0: 未知类型
27+
<br>- 1: 弹性公网 IP(IP 为弹性公网 IP, 绑定资源类型未知)
28+
<br>- 10: 弹性公网 IP(IP 为弹性公网 IP, 但未绑定资源)
29+
<br>- 11: 云主机
30+
<br>- 12: 负载均衡
31+
<br>- 13: 原生容器实例
32+
<br>- 14: 原生容器 Pod
33+
<br>- 2: 云物理服务器
34+
<br>- 3: Web应用防火墙 IP
35+
<br>- 4: 托管区公网 IP
36+
2637
:param attackLogId: (Optional) 攻击记录 ID
2738
:param startTime: (Optional) 攻击开始时间, UTC 时间, 格式: yyyy-MM-dd'T'HH:mm:ssZ
2839
:param endTime: (Optional) 攻击结束时间, UTC 时间, 格式: yyyy-MM-dd'T'HH:mm:ssZ
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class AttackProtection(object):
21+
22+
def __init__(self, region=None, ip=None, protectionAbility=None, protectionAbilityUnit=None, instanceId=None, instanceName=None, instanceType=None, safeStatus=None, attackPeak7Day=None, attackUnit7Day=None):
23+
"""
24+
:param region: (Optional) 公网 IP 所在区域编码
25+
:param ip: (Optional) 公网 IP 地址
26+
:param protectionAbility: (Optional) 防护能力
27+
:param protectionAbilityUnit: (Optional) 防护能力单位
28+
:param instanceId: (Optional) 绑定防护包 ID, 为空字符串时表示未绑定防护包
29+
:param instanceName: (Optional) 绑定防护包名称, 为空字符串时表示未绑定防护包
30+
:param instanceType: (Optional) 套餐类型, 为 0 时未绑定防护包. <br>- 1: 独享 IP<br>- 2: 共享 IP
31+
:param safeStatus: (Optional) 安全状态. <br>- 0: 安全<br>- 1: 清洗<br>- 2: 黑洞
32+
:param attackPeak7Day: (Optional) 7天内攻击流量峰值
33+
:param attackUnit7Day: (Optional) 7天内攻击流量峰值单位
34+
"""
35+
36+
self.region = region
37+
self.ip = ip
38+
self.protectionAbility = protectionAbility
39+
self.protectionAbilityUnit = protectionAbilityUnit
40+
self.instanceId = instanceId
41+
self.instanceName = instanceName
42+
self.instanceType = instanceType
43+
self.safeStatus = safeStatus
44+
self.attackPeak7Day = attackPeak7Day
45+
self.attackUnit7Day = attackUnit7Day

0 commit comments

Comments
 (0)