Skip to content

Commit 95f18bd

Browse files
Merge pull request #164 from jdcloud-apigateway/master
20220415 publish jdcloud-sdk-python 1.6.155
2 parents c85f5c3 + 2b535d9 commit 95f18bd

115 files changed

Lines changed: 1535 additions & 119 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.

jdcloud_sdk/services/vpc/ChangeLog.md

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

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2022-04-14|1.0.1|扩展支持|* 修改共享带宽包,对外发布|
7+
|2022-02-10|1.0.0|扩展支持|* 支持ip接入资源组;支持共享带宽包接入tag和资源组|
8+
|2021-05-17|1.0.0|增加新接口|* 支持根据私有唯一ip修改natgw子网acl|
9+
|2021-03-30|1.0.0|增加新接口|* 支持共享带宽包|
10+
|2020-11-10|0.9.5|增加新接口|* 对接dns,提供接口给dns支持dns针对vpcId解析|
11+
|2020-08-05|0.9.4|增加新接口|* 对接统一选购,支持port绑定cidr|
12+
|2020-04-19|0.9.3|增加新接口|* 增加DescribeSpecialIpPool|
613
|2020-04-13|0.9.2|扩展支持|* 支持边缘计算|
714
|2019-11-04|0.9.1|增加新接口|* 增加SetEipTag<br>* 增加GetStatus|
815
|2019-09-12|0.9.0|增加新接口|* 增加AddRoutePropagation<br>* 增加ModifyRoutePropagation<br>* 增加RemoveRoutePropagation<br>* 修改AddRouteTableRules,增加description属性<br>* 修改ModifyRouteTableRules,增加description属性<br>* 修改DescribeRouteTable/DescribeRouteTables返回信息增加路由传播列表(routePropagations)、路由信息增加路由类型、description属性<br>* 查询和修改配额接口支持传播路由|
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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 AddBandwidthPackageIPRequest(JDCloudRequest):
23+
"""
24+
25+
向共享带宽包内增加公网IP
26+
27+
## 接口说明
28+
29+
- 确保已有至少一个共享带宽包资源。
30+
31+
- 添加弹性公网IP前,需确保弹性公网IP所在地域与共享带宽包地域和线路相同,弹性公网IP的计费模式为按配置或按用量计费,且未加入其他的共享带宽包资源。
32+
33+
- 已欠费的、包年包月的公网IP不能加入共享带宽包。
34+
35+
- 一个公网IP同时只能加入一个共享带宽包。
36+
37+
- 共享带宽包中可添加的弹性公网IP受配额限制,添加前请通过 [DescribeQuotas](https://docs.jdcloud.com/cn/shared-bandwidth-package/api/describequotas?content=API) 确认配额,如须提升请[提交工单](https://ticket.jdcloud.com/applyorder/submit)或联系京东云客服。
38+
39+
- 弹性公网IP加入共享带宽包后,弹性公网 IP 会原有的计费和带宽上限暂时失效,已共享带宽包进行计费,带宽上限默认为共享带宽包的带宽上限,可通过[modifyBandwidthPackageIpBandwidth](https://docs.jdcloud.com/cn/shared-bandwidth-package/api/modifybandwidthpackageIpbandwidth)进行修改。
40+
41+
- 共享带宽包欠费或到期停服后不支持添加弹性公网IP。
42+
43+
"""
44+
45+
def __init__(self, parameters, header=None, version="v1"):
46+
super(AddBandwidthPackageIPRequest, self).__init__(
47+
'/regions/{regionId}/bandwidthPackages/{bandwidthPackageId}:addBandwidthPackageIP', 'POST', header, version)
48+
self.parameters = parameters
49+
50+
51+
class AddBandwidthPackageIPParameters(object):
52+
53+
def __init__(self, regionId,bandwidthPackageId,bandwidthPackageIPSpecs):
54+
"""
55+
:param regionId: Region ID
56+
:param bandwidthPackageId: 共享带宽包ID
57+
:param bandwidthPackageIPSpecs: Ip列表
58+
"""
59+
60+
self.regionId = regionId
61+
self.bandwidthPackageId = bandwidthPackageId
62+
self.bandwidthPackageIPSpecs = bandwidthPackageIPSpecs
63+

jdcloud_sdk/services/vpc/apis/AddNetworkAclRulesRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class AddNetworkAclRulesParameters(object):
3434

35-
def __init__(self, regionId, networkAclId, networkAclRuleSpecs):
35+
def __init__(self, regionId,networkAclId,networkAclRuleSpecs):
3636
"""
3737
:param regionId: Region ID
3838
:param networkAclId: networkAclId ID

jdcloud_sdk/services/vpc/apis/AddNetworkSecurityGroupRulesRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class AddNetworkSecurityGroupRulesParameters(object):
3434

35-
def __init__(self, regionId, networkSecurityGroupId, networkSecurityGroupRuleSpecs):
35+
def __init__(self, regionId,networkSecurityGroupId,networkSecurityGroupRuleSpecs):
3636
"""
3737
:param regionId: Region ID
3838
:param networkSecurityGroupId: NetworkSecurityGroup ID

jdcloud_sdk/services/vpc/apis/AddRouteTableRulesRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class AddRouteTableRulesParameters(object):
3434

35-
def __init__(self, regionId, routeTableId, routeTableRuleSpecs):
35+
def __init__(self, regionId,routeTableId,routeTableRuleSpecs):
3636
"""
3737
:param regionId: Region ID
3838
:param routeTableId: RouteTable ID

jdcloud_sdk/services/vpc/apis/AssignSecondaryIpsRequest.py

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

2222
class AssignSecondaryIpsRequest(JDCloudRequest):
2323
"""
24-
给网卡分配secondaryIp接口
24+
给网卡分配secondaryIp
2525
"""
2626

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

3333
class AssignSecondaryIpsParameters(object):
3434

35-
def __init__(self, regionId, networkInterfaceId, ):
35+
def __init__(self, regionId,networkInterfaceId,):
3636
"""
3737
:param regionId: Region ID
3838
:param networkInterfaceId: networkInterface ID
@@ -43,10 +43,12 @@ def __init__(self, regionId, networkInterfaceId, ):
4343
self.force = None
4444
self.secondaryIps = None
4545
self.secondaryIpCount = None
46+
self.secondaryIpMaskLen = None
47+
self.secondaryIpAddress = None
4648

4749
def setForce(self, force):
4850
"""
49-
:param force: (Optional) secondary ip被其他接口占用时,是否抢占。false:非抢占重分配,true:抢占重分配默认抢占重分配。默认值:true
51+
:param force: (Optional) secondary ip被其他接口占用时,是否抢占。false:非抢占重分配,true:抢占重分配;按网段分配时,默认非抢占重分配,指定IP或者个数时,默认抢占重分配。
5052
"""
5153
self.force = force
5254

@@ -62,3 +64,15 @@ def setSecondaryIpCount(self, secondaryIpCount):
6264
"""
6365
self.secondaryIpCount = secondaryIpCount
6466

67+
def setSecondaryIpMaskLen(self, secondaryIpMaskLen):
68+
"""
69+
:param secondaryIpMaskLen: (Optional) 指定分配的网段掩码长度, 支持24-28位掩码长度,不能与secondaryIpCount或secondaryIps同时指定,不支持抢占重分配
70+
"""
71+
self.secondaryIpMaskLen = secondaryIpMaskLen
72+
73+
def setSecondaryIpAddress(self, secondaryIpAddress):
74+
"""
75+
:param secondaryIpAddress: (Optional) 指定分配的网段中第一个secondaryIp地址,不能与secondaryIpCount或secondaryIps同时指定,secondaryIpAddress与secondaryIpMaskLen需要保持一致,否则无法创建
76+
"""
77+
self.secondaryIpAddress = secondaryIpAddress
78+

jdcloud_sdk/services/vpc/apis/AssociateElasticIpRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class AssociateElasticIpParameters(object):
3434

35-
def __init__(self, regionId, networkInterfaceId, ):
35+
def __init__(self, regionId,networkInterfaceId,):
3636
"""
3737
:param regionId: Region ID
3838
:param networkInterfaceId: networkInterface ID

jdcloud_sdk/services/vpc/apis/AssociateNetworkAclRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class AssociateNetworkAclParameters(object):
3434

35-
def __init__(self, regionId, networkAclId, subnetIds):
35+
def __init__(self, regionId,networkAclId,subnetIds):
3636
"""
3737
:param regionId: Region ID
3838
:param networkAclId: networkAclId ID

jdcloud_sdk/services/vpc/apis/AssociateRouteTableRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class AssociateRouteTableParameters(object):
3434

35-
def __init__(self, regionId, routeTableId, subnetIds):
35+
def __init__(self, regionId,routeTableId,subnetIds):
3636
"""
3737
:param regionId: Region ID
3838
:param routeTableId: RouteTable ID
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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 CreateBandwidthPackageRequest(JDCloudRequest):
23+
"""
24+
指定地域创建共享带宽包实例。
25+
26+
## 接口说明
27+
28+
- 需要接口完成实名认证、支付方式确认、计费类型选择等准备工作。
29+
30+
- 各地域下包年包月和按配置计费的共享带宽包不受配额限制,按用量计费的共享带宽包可创建数量受配额限制,创建前请通过 [DescribeQuotas](https://docs.jdcloud.com/cn/shared-bandwidth-package/api/describequotas?content=API) 确认配额,如须提升请[提交工单](https://ticket.jdcloud.com/applyorder/submit)或联系京东云客服。
31+
32+
- 通过本接口创建包年包月资源时将自动从账户扣款(代金券优先),如需使用第三方支付方式请通过控制台创建。
33+
34+
- 按用量计费模式需提工单申请使用权限,默认支持增强95消峰计费。
35+
36+
"""
37+
38+
def __init__(self, parameters, header=None, version="v1"):
39+
super(CreateBandwidthPackageRequest, self).__init__(
40+
'/regions/{regionId}/bandwidthPackages/', 'POST', header, version)
41+
self.parameters = parameters
42+
43+
44+
class CreateBandwidthPackageParameters(object):
45+
46+
def __init__(self, regionId,name, bandwidthMbps, ):
47+
"""
48+
:param regionId: Region ID
49+
:param name: 名称,只支持中文、数字、大小写字母、英文下划线“_”及中划线“-”,且长度不超过32个字符
50+
:param bandwidthMbps: 共享带宽包带宽上限,取值范围200-5000,单位为Mbps,保底带宽 = 共享带宽包带宽上限 * 20%
51+
"""
52+
53+
self.regionId = regionId
54+
self.name = name
55+
self.description = None
56+
self.bandwidthMbps = bandwidthMbps
57+
self.provider = None
58+
self.chargeSpec = None
59+
self.userTags = None
60+
self.resourceGroupId = None
61+
62+
def setDescription(self, description):
63+
"""
64+
:param description: (Optional) 描述,长度不超过256个字符
65+
"""
66+
self.description = description
67+
68+
def setProvider(self, provider):
69+
"""
70+
:param provider: (Optional) 线路信息,默认bgp,目前只支持中心节点的BGP线路
71+
"""
72+
self.provider = provider
73+
74+
def setChargeSpec(self, chargeSpec):
75+
"""
76+
:param chargeSpec: (Optional) 计费配置。支持包年包月、按配置、按用量计费模式
77+
"""
78+
self.chargeSpec = chargeSpec
79+
80+
def setUserTags(self, userTags):
81+
"""
82+
:param userTags: (Optional) 用户标签
83+
"""
84+
self.userTags = userTags
85+
86+
def setResourceGroupId(self, resourceGroupId):
87+
"""
88+
:param resourceGroupId: (Optional) 资源所属资源组ID
89+
"""
90+
self.resourceGroupId = resourceGroupId
91+

0 commit comments

Comments
 (0)