Skip to content

Commit 70f8782

Browse files
publish jdcloud-sdk-python 1.6.132
1 parent 50e6f61 commit 70f8782

68 files changed

Lines changed: 1657 additions & 136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 更新历史 #
2-
API版本:1.1.0
2+
API版本:1.2.0
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2022-01-14|1.2.0|接口新增与更新|1. 增加接口支持访问控制规则配置<br>2. 增加接口支持防护Web应用防护墙公网 IP 接口<br>3. 创建实例时支持配置自动续费,创建实例成功自动绑定IP|
67
|2019-07-26|1.1.0|接口新增与更新|1. 增加 DDoS 防护包可防护的托管区公网 IP 查询接口<br>2. 查询已防护公网 IP 接口支持托管区<br>3. 防护规则支持 IP 黑白名单|
78
|2018-05-25|1.0.0|初始版本|京东云 DDoS 防护包基本操作接口|

jdcloud_sdk/services/antipro/apis/AddProtectedIpRequest.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@
2121

2222
class AddProtectedIpRequest(JDCloudRequest):
2323
"""
24-
添加防护包防护 IP.
25-
- 防护包仅能防护防护包实例所在区域的公网 IP, 且该公网 IP 未被其他防护包防护, 如果已经被其他防护包防护, 请先调用删除防护包防护 IP 接口删除防护 IP
26-
- 防护包可添加的防护 IP 个数小于等于防护包的可防护 IP 数量减去已防护的 IP 数量
27-
- 使用 <a href="http://docs.jdcloud.com/anti-ddos-protection-package/api/describeelasticipresources">describeElasticIpResources</a> 接口查询防护包可防护的弹性公网 IP
28-
- 使用 <a href="http://docs.jdcloud.com/anti-ddos-protection-package/api/describecpsipresources">describeCpsIpResources</a> 接口查询防护包可防护的云物理服务器公网 IP
29-
24+
添加防护包防护 IP. <br>- 防护包仅能防护防护包实例所在区域的公网 IP, 且该公网 IP 未被其他防护包防护, 如果已经被其他防护包防护, 请先调用删除防护包防护 IP 接口删除防护 IP<br>- 防护包可添加的防护 IP 个数小于等于防护包的可防护 IP 数量减去已防护的 IP 数量<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-protection-package/api/describeelasticipresources'>describeElasticIpResources</a> 接口查询防护包可防护的弹性公网 IP<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-protection-package/api/describecpsipresources'>describeCpsIpResources</a> 接口查询防护包可防护的云物理服务器公网 IP<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-protection-package/api/describewafipresources'>describeWafIpResources</a> 接口查询防护包可防护的Web应用防火墙公网 IP<br>- 使用 <a href='http://docs.jdcloud.com/anti-ddos-protection-package/api/describeccsipresources'>describeCcsIpResources</a> 接口查询防护包可防护的托管区公网 IP
3025
"""
3126

3227
def __init__(self, parameters, header=None, version="v1"):
@@ -39,7 +34,7 @@ class AddProtectedIpParameters(object):
3934

4035
def __init__(self, regionId, instanceId, protectedIpSpec):
4136
"""
42-
:param regionId: 地域编码
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
4338
:param instanceId: 防护包实例 Id
4439
:param protectedIpSpec: 添加防护包防护 IP 请求参数
4540
"""
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+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateAclRequest(JDCloudRequest):
23+
"""
24+
创建访问控制规则
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateAclRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/acl', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateAclParameters(object):
34+
35+
def __init__(self, regionId, instanceId, createAclSpec):
36+
"""
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
38+
:param instanceId: 防护包实例 Id
39+
:param createAclSpec: 创建防护包实例请求参数
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.createAclSpec = createAclSpec
45+

jdcloud_sdk/services/antipro/apis/CreateInstanceRequest.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class CreateInstanceRequest(JDCloudRequest):
2323
"""
24-
创建防护包实例, 当前支持区域: 华北-北京, 华东-宿迁, 华东-上海
24+
创建防护包实例
2525
"""
2626

2727
def __init__(self, parameters, header=None, version="v1"):
@@ -32,12 +32,26 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class CreateInstanceParameters(object):
3434

35-
def __init__(self, regionId, createInstanceSpec):
35+
def __init__(self, regionId, createInstanceSpec, ):
3636
"""
37-
:param regionId: 地域编码
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
3838
:param createInstanceSpec: 创建防护包实例请求参数
3939
"""
4040

4141
self.regionId = regionId
4242
self.createInstanceSpec = createInstanceSpec
43+
self.autoRenewalSpec = None
44+
self.extraOperationSpec = None
45+
46+
def setAutoRenewalSpec(self, autoRenewalSpec):
47+
"""
48+
:param autoRenewalSpec: (Optional) 自动续费配置, 默认不开通
49+
"""
50+
self.autoRenewalSpec = autoRenewalSpec
51+
52+
def setExtraOperationSpec(self, extraOperationSpec):
53+
"""
54+
:param extraOperationSpec: (Optional) 提交订单附加操作
55+
"""
56+
self.extraOperationSpec = extraOperationSpec
4357

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+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateIpSetRequest(JDCloudRequest):
23+
"""
24+
创建实例的 IP 库
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreateIpSetRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/ipSets', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateIpSetParameters(object):
34+
35+
def __init__(self, regionId, instanceId, ipSetSpec):
36+
"""
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
38+
:param instanceId: 防护包实例 Id
39+
:param ipSetSpec: 创建实例的 IP 库请求参数
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.ipSetSpec = ipSetSpec
45+
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+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreatePortSetRequest(JDCloudRequest):
23+
"""
24+
创建实例的端口库
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(CreatePortSetRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/portSets', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreatePortSetParameters(object):
34+
35+
def __init__(self, regionId, instanceId, portSetSpec):
36+
"""
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
38+
:param instanceId: 防护包实例 Id
39+
:param portSetSpec: 创建实例的端口库请求参数
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.portSetSpec = portSetSpec
45+
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+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteAclRequest(JDCloudRequest):
23+
"""
24+
删除实例的访问控制规则. 支持批量操作, 批量操作时 aclId个, 以 ',' 分隔
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DeleteAclRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/acl/{aclId}', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteAclParameters(object):
34+
35+
def __init__(self, regionId, instanceId, aclId, ):
36+
"""
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
38+
:param instanceId: 防护包实例 Id
39+
:param aclId: 访问控制规则 Id
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.aclId = aclId
45+
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+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteIpSetRequest(JDCloudRequest):
23+
"""
24+
删除实例的 IP 库. 支持批量操作, 批量操作时 ipSetId 传多个, 以 ',' 分隔. IP 黑白名单规则被引用时不允许删除
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DeleteIpSetRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/ipSets/{ipSetId}', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteIpSetParameters(object):
34+
35+
def __init__(self, regionId, instanceId, ipSetId, ):
36+
"""
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
38+
:param instanceId: 防护包实例 Id
39+
:param ipSetId: IP 库 Id
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.ipSetId = ipSetId
45+
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+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeletePortSetRequest(JDCloudRequest):
23+
"""
24+
删除实例的端口库. 支持批量操作, 批量操作时 ipSetId 传多个, 以 ',' 分隔. IP 黑白名单规则被引用时不允许删除
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DeletePortSetRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/portSets/{portSetId}', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeletePortSetParameters(object):
34+
35+
def __init__(self, regionId, instanceId, portSetId, ):
36+
"""
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
38+
:param instanceId: 防护包实例 Id
39+
:param portSetId: 端口库 Id
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.portSetId = portSetId
45+

jdcloud_sdk/services/antipro/apis/DeleteProtectedIpRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DeleteProtectedIpParameters(object):
3434

3535
def __init__(self, regionId, instanceId, protectedIpSpec):
3636
"""
37-
:param regionId: 地域编码
37+
:param regionId: 地域 Id, DDoS 防护包目前支持华北-北京, 华东-宿迁, 华东-上海
3838
:param instanceId: 防护包实例 Id
3939
:param protectedIpSpec: 删除防护包防护 IP 请求参数
4040
"""

0 commit comments

Comments
 (0)