Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions jdcloud_sdk/services/ipanti/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# 更新历史 #
API版本:1.6.12
API版本:1.7.0

|发布时间|版本号|更新|说明|
|---|---|---|---|
|2020-03-05|1.6.12|接口新增与更新|1. 网站规则创建与编辑不再支持上传证书, IP 高防已对接 SSL 数字证书, 新增网站规则绑定证书接口 bindCert <br>2. 网站类规则支持按地域回源, 新增接口查询网站类转发规则按地域回源配置 geoRsRoute 参数可设置的区域|
|2019-07-26|1.4.9|接口新增与删除|1. 新增网站规则级黑白名单相关接口<br>2. 新增非网站规则级黑白名单相关接口<br>3. 新增实例 IP 黑白名单库相关接口<br>4. 新增网站规则级 CC 防护相关接口<br>5. 网站规则回源 IP 支持设置云物理服务器公网 IP(使用 describeCpsIpList 查询可知)<br>6. 删除实例级 IP 黑白名单, url 白名单及 CC 防护等相关接口|
|2019-02-28|1.3.0|新增接口|1. 新增接口: 查询非网站类转发规则的防护规则(describeProtectionRuleOfForwardRule)<br>2. 新增接口: 修改非网站类转发规则的防护规则(modifyProtectionRuleOfForwardRule)<br>3. 新增接口: 查询非网站类转发规则的防护规则 Geo 拦截可设置区域编码(describeGeoAreas)|
|2018-11-30|1.2.0|接口更新|1. 创建实例, 查询实例添加 ipv6 支持|
|2018-08-31|1.1.0|新增接口|1. 新增 DDos 攻击日志, CC攻击日志, CC攻击详情下载接口<br>2. 新增攻击次数及流量峰值, 各类型攻击次数查询接口<br>3. 新增高防实例名称列表, 高防实例防护统计信息, CC 自定义默认阈值, 用户的京东云 IP 资源查询接口<br>4. 新增实例名称合法性检测接口, 实例弹性防护带宽更新接口<br>5. 新增告警配置查询, 告警配置更新接口<br>6. 新增证书预览信息查询接口, 证书编辑接口|
|2018-06-26|1.0.1|问题修复|1. 修复 operationId 重复的问题|
|2018-06-26|1.0.0|新增接口|1. 新增 CC 防护 IP 限速, 观察者模式接口<br>2. 新增 DDos 攻击日志, CC 攻击日志, CC 攻击详情查询接口<br>3. 新增 DDos 攻击流量报表, 转发流量报表, CC 流量报表查询接口|
|2018-04-20|0.3.0|问题修复|1. 调整操作类型接口 path|
|2018-03-31|0.2.0|新增接口|1. 新增网站规则操作接口<br>2. 新增非网站规则操作接口|
|2018-01-31|0.1.0|初始版本|1. IP 高防基本操作接口|
| 发布时间 | 版本号 | 更新 | 说明 |
| ---------- | ------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2020-06-24 | 1.7.0 | 接口新增与更新 | 1. 新增查询实例高防IP接口 |
| 2020-03-05 | 1.6.12 | 接口新增与更新 | 1. 网站规则创建与编辑不再支持上传证书, IP 高防已对接 SSL 数字证书, 新增网站规则绑定证书接口 bindCert <br>2. 网站类规则支持按地域回源, 新增接口查询网站类转发规则按地域回源配置 geoRsRoute 参数可设置的区域 |
| 2019-07-26 | 1.4.9 | 接口新增与删除 | 1. 新增网站规则级黑白名单相关接口<br>2. 新增非网站规则级黑白名单相关接口<br>3. 新增实例 IP 黑白名单库相关接口<br>4. 新增网站规则级 CC 防护相关接口<br>5. 网站规则回源 IP 支持设置云物理服务器公网 IP(使用 describeCpsIpList 查询可知)<br>6. 删除实例级 IP 黑白名单, url 白名单及 CC 防护等相关接口 |
| 2019-02-28 | 1.3.0 | 新增接口 | 1. 新增接口: 查询非网站类转发规则的防护规则(describeProtectionRuleOfForwardRule)<br>2. 新增接口: 修改非网站类转发规则的防护规则(modifyProtectionRuleOfForwardRule)<br>3. 新增接口: 查询非网站类转发规则的防护规则 Geo 拦截可设置区域编码(describeGeoAreas) |
| 2018-11-30 | 1.2.0 | 接口更新 | 1. 创建实例, 查询实例添加 ipv6 支持 |
| 2018-08-31 | 1.1.0 | 新增接口 | 1. 新增 DDos 攻击日志, CC攻击日志, CC攻击详情下载接口<br>2. 新增攻击次数及流量峰值, 各类型攻击次数查询接口<br>3. 新增高防实例名称列表, 高防实例防护统计信息, CC 自定义默认阈值, 用户的京东云 IP 资源查询接口<br>4. 新增实例名称合法性检测接口, 实例弹性防护带宽更新接口<br>5. 新增告警配置查询, 告警配置更新接口<br>6. 新增证书预览信息查询接口, 证书编辑接口 |
| 2018-06-26 | 1.0.1 | 问题修复 | 1. 修复 operationId 重复的问题 |
| 2018-06-26 | 1.0.0 | 新增接口 | 1. 新增 CC 防护 IP 限速, 观察者模式接口<br>2. 新增 DDos 攻击日志, CC 攻击日志, CC 攻击详情查询接口<br>3. 新增 DDos 攻击流量报表, 转发流量报表, CC 流量报表查询接口 |
| 2018-04-20 | 0.3.0 | 问题修复 | 1. 调整操作类型接口 path |
| 2018-03-31 | 0.2.0 | 新增接口 | 1. 新增网站规则操作接口<br>2. 新增非网站规则操作接口 |
| 2018-01-31 | 0.1.0 | 初始版本 | 1. IP 高防基本操作接口 |

9 changes: 8 additions & 1 deletion jdcloud_sdk/services/ipanti/apis/CreateInstanceRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ def __init__(self, parameters, header=None, version="v1"):

class CreateInstanceParameters(object):

def __init__(self, regionId, createInstanceSpec):
def __init__(self, regionId, createInstanceSpec, ):
"""
:param regionId: 区域 ID, 高防不区分区域, 传 cn-north-1 即可
:param createInstanceSpec: 新购或升级实例请求参数
"""

self.regionId = regionId
self.createInstanceSpec = createInstanceSpec
self.autoRenewalSpec = None

def setAutoRenewalSpec(self, autoRenewalSpec):
"""
:param autoRenewalSpec: (Optional) 自动续费配置, 默认不开通, 仅新购实例时可设置
"""
self.autoRenewalSpec = autoRenewalSpec

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setPageSize(self, pageSize):

def setSearchType(self, searchType):
"""
:param searchType: (Optional) 查询类型名称, domain:源站域名, ip:源站 IP, port: 转发端口, originPort: 源站端口
:param searchType: (Optional) 查询类型名称, domain:源站域名, ip:源站 IP, port: 转发端口, originPort: 源站端口, serviceIp: 高防IP(仅支持BGP线路的实例)
"""
self.searchType = searchType

Expand Down
57 changes: 57 additions & 0 deletions jdcloud_sdk/services/ipanti/apis/DescribeServiceIpListRequest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.

from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest


class DescribeServiceIpListRequest(JDCloudRequest):
"""
查询实例高防 IP 列表
"""

def __init__(self, parameters, header=None, version="v1"):
super(DescribeServiceIpListRequest, self).__init__(
'/regions/{regionId}/instances/{instanceId}:describeServiceIpList', 'GET', header, version)
self.parameters = parameters


class DescribeServiceIpListParameters(object):

def __init__(self, regionId, instanceId, ):
"""
:param regionId: 区域 ID, 高防不区分区域, 传 cn-north-1 即可
:param instanceId: 实例 ID
"""

self.regionId = regionId
self.instanceId = instanceId
self.pageNumber = None
self.pageSize = None

def setPageNumber(self, pageNumber):
"""
:param pageNumber: (Optional) 页码, 默认为 1
"""
self.pageNumber = pageNumber

def setPageSize(self, pageSize):
"""
:param pageSize: (Optional) 分页大小, 默认为 10, 取值范围[10, 100]
"""
self.pageSize = pageSize

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setPageSize(self, pageSize):

def setSearchType(self, searchType):
"""
:param searchType: (Optional) 查询类型名称, domain:源站域名, ip:源站 IP, rawDomain: 域名
:param searchType: (Optional) 查询类型名称, domain:源站域名, ip:源站 IP, rawDomain: 域名, serviceIp: 高防IP(仅支持BGP线路的实例)
"""
self.searchType = searchType

Expand Down
2 changes: 1 addition & 1 deletion jdcloud_sdk/services/ipanti/client/IpantiClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def __init__(self, credential, config=None, logger=None):
if config is None:
config = Config('ipanti.jdcloud-api.com')

super(IpantiClient, self).__init__(credential, config, 'ipanti', '1.6.12', logger)
super(IpantiClient, self).__init__(credential, config, 'ipanti', '1.7.0', logger)
8 changes: 7 additions & 1 deletion jdcloud_sdk/services/ipanti/models/AlarmConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class AlarmConfig(object):

def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None, blackHoleAlarmStatus=None, ddosAlarmEmailStatus=None, ddosAlarmSmsStatus=None, ddosAlarmStatus=None, errorCodeAlarmStatus=None, errorCodeDomain=None):
def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None, blackHoleAlarmStatus=None, ddosAlarmEmailStatus=None, ddosAlarmSmsStatus=None, ddosAlarmStatus=None, errorCodeAlarmStatus=None, errorCodeDomain=None, errorCode=None, errorCodePercent=None, errorCodeCount=None):
"""
:param blackHoleAlarmEmailStatus: (Optional) 黑洞告警邮件开关 0 关闭 1 开启
:param blackHoleAlarmSmsStatus: (Optional) 黑洞告警短信开关 0 关闭 1 开启
Expand All @@ -29,6 +29,9 @@ def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None,
:param ddosAlarmStatus: (Optional) DDos 告警总开关 0 关闭 1 开启
:param errorCodeAlarmStatus: (Optional) 错误码告警总开关
:param errorCodeDomain: (Optional) 错误码告警域名列表
:param errorCode: (Optional) 错误码列表
:param errorCodePercent: (Optional) 错误码触发告警比例
:param errorCodeCount: (Optional) 错误码触发告警次数
"""

self.blackHoleAlarmEmailStatus = blackHoleAlarmEmailStatus
Expand All @@ -39,3 +42,6 @@ def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None,
self.ddosAlarmStatus = ddosAlarmStatus
self.errorCodeAlarmStatus = errorCodeAlarmStatus
self.errorCodeDomain = errorCodeDomain
self.errorCode = errorCode
self.errorCodePercent = errorCodePercent
self.errorCodeCount = errorCodeCount
8 changes: 7 additions & 1 deletion jdcloud_sdk/services/ipanti/models/AlarmConfigSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class AlarmConfigSpec(object):

def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None, blackHoleAlarmStatus=None, ddosAlarmEmailStatus=None, ddosAlarmSmsStatus=None, ddosAlarmStatus=None, errorCodeAlarmStatus=None, errorCodeDomain=None):
def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None, blackHoleAlarmStatus=None, ddosAlarmEmailStatus=None, ddosAlarmSmsStatus=None, ddosAlarmStatus=None, errorCodeAlarmStatus=None, errorCodeDomain=None, errorCode=None, errorCodePercent=None, errorCodeCount=None):
"""
:param blackHoleAlarmEmailStatus: (Optional) 黑洞告警邮件开关 0 关闭 1 开启
:param blackHoleAlarmSmsStatus: (Optional) 黑洞告警短信开关 0 关闭 1 开启
Expand All @@ -29,6 +29,9 @@ def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None,
:param ddosAlarmStatus: (Optional) DDos 告警总开关 0 关闭 1 开启
:param errorCodeAlarmStatus: (Optional) 错误码告警总开关
:param errorCodeDomain: (Optional) 错误码告警域名列表
:param errorCode: (Optional) 错误码列表
:param errorCodePercent: (Optional) 错误码触发告警比例
:param errorCodeCount: (Optional) 错误码触发告警次数
"""

self.blackHoleAlarmEmailStatus = blackHoleAlarmEmailStatus
Expand All @@ -39,3 +42,6 @@ def __init__(self, blackHoleAlarmEmailStatus=None, blackHoleAlarmSmsStatus=None,
self.ddosAlarmStatus = ddosAlarmStatus
self.errorCodeAlarmStatus = errorCodeAlarmStatus
self.errorCodeDomain = errorCodeDomain
self.errorCode = errorCode
self.errorCodePercent = errorCodePercent
self.errorCodeCount = errorCodeCount
31 changes: 31 additions & 0 deletions jdcloud_sdk/services/ipanti/models/AutoRenewalSpec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.


class AutoRenewalSpec(object):

def __init__(self, autoRenewalEnable, timeSpan=None, timeUnit=None):
"""
:param autoRenewalEnable: 是否开通自动续费, true: 开通自动续费, false: 不开通自动续费
:param timeSpan: (Optional) 购买时长, 开通自动续费时必传. <br>- timeUnit 为 3 时, 可取值 1-9<br>- timeUnit 为 4 时, 可取值 1-3
:param timeUnit: (Optional) 自动续费时长类型, 开通自动续费时必传. <br>- 3: 月<br>- 4: 年
"""

self.autoRenewalEnable = autoRenewalEnable
self.timeSpan = timeSpan
self.timeUnit = timeUnit
6 changes: 5 additions & 1 deletion jdcloud_sdk/services/ipanti/models/CCProtectionRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class CCProtectionRule(object):

def __init__(self, id=None, webRuleId=None, instanceId=None, name=None, enable=None, uri=None, matchType=None, detectPeriod=None, singleIpLimit=None, blockType=None, blockTime=None):
def __init__(self, id=None, webRuleId=None, instanceId=None, name=None, enable=None, uri=None, matchType=None, detectPeriod=None, singleIpLimit=None, blockType=None, blockTime=None, pageId=None, pageName=None):
"""
:param id: (Optional) CC 防护规则 ID
:param webRuleId: (Optional) CC 防护规则对应的网站规则 ID
Expand All @@ -32,6 +32,8 @@ def __init__(self, id=None, webRuleId=None, instanceId=None, name=None, enable=N
:param singleIpLimit: (Optional) ip 访问次数, 取值范围[2, 2000]
:param blockType: (Optional) 阻断类型, 1: 封禁, 2: 人机交互
:param blockTime: (Optional) 阻断持续时间, 单位为秒, 取值范围[10, 86400]
:param pageId: (Optional) 关联的自定义页面id
:param pageName: (Optional) 关联的自定义页面名称
"""

self.id = id
Expand All @@ -45,3 +47,5 @@ def __init__(self, id=None, webRuleId=None, instanceId=None, name=None, enable=N
self.singleIpLimit = singleIpLimit
self.blockType = blockType
self.blockTime = blockTime
self.pageId = pageId
self.pageName = pageName
4 changes: 3 additions & 1 deletion jdcloud_sdk/services/ipanti/models/CCProtectionRuleSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class CCProtectionRuleSpec(object):

def __init__(self, name, uri, matchType, detectPeriod, singleIpLimit, blockType, blockTime, ):
def __init__(self, name, uri, matchType, detectPeriod, singleIpLimit, blockType, blockTime, pageId=None):
"""
:param name: CC 防护规则名称, 不允许为空, 长度不超过 32 个字符, 支持中文, 大小写字母, 数字及字符'-'、'/'、'.'、'_'
:param uri: uri, 不允许为空, 以 / 开头, 长度不超过 2048 个字符
Expand All @@ -28,6 +28,7 @@ def __init__(self, name, uri, matchType, detectPeriod, singleIpLimit, blockType,
:param singleIpLimit: ip 访问次数, 取值范围[2, 2000]
:param blockType: 阻断类型, 1: 封禁, 2: 人机交互
:param blockTime: 阻断持续时间, 单位为秒, 取值范围[10, 86400]
:param pageId: (Optional) 关联的自定义页面id
"""

self.name = name
Expand All @@ -37,3 +38,4 @@ def __init__(self, name, uri, matchType, detectPeriod, singleIpLimit, blockType,
self.singleIpLimit = singleIpLimit
self.blockType = blockType
self.blockTime = blockTime
self.pageId = pageId
Loading