Skip to content

Commit cc28910

Browse files
publish jdcloud-sdk-python 1.6.316
1 parent 539b9e5 commit cc28910

70 files changed

Lines changed: 1304 additions & 42 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: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
# 更新历史 #
2-
API版本:1.1.30
2+
API版本:1.1.57
33
| 发布时间 | 版本号 | 更新 | 说明 |
44
|------------|--------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
5+
| 2026-02-20 | 1.1.60 | 新增接口 | * 增加网卡绑定设备接口(网络侧) |
6+
| 2026-02-20 | 1.1.57 | 新增接口 | * 支持DNAT |
7+
| 2026-01-20 | 1.1.56 | 新增接口 | * 增加VPC NAT |
8+
| 2026-01-20 | 1.1.55 | 扩展支持 | * 带宽包支持边缘可用区 |
9+
| 2025-12-10 | 1.1.41 | 新增接口 | * 增加共享标签 |
10+
| 2025-11-25 | 1.1.40 | 新增接口 | * 增加hostgroup内部接口 |
11+
| 2025-11-24 | 1.1.39 | 新增接口 | * 子网 IP Validate |
12+
| 2025-11-10 | 1.1.38 | 扩展支持 | * 增加sis acl的code |
13+
| 2025-10-12 | 1.1.37 | 扩展支持 | * 增加vpc 返回 vni |
14+
| 2025-10-12 | 1.1.36 | 扩展支持 | * 增加二代机端口限速 |
15+
| 2025-09-18 | 1.1.35 | 扩展支持 | * 安全组规则增加模糊搜索等过滤条件 |
516
| 2025-09-10 | 1.1.32 | 扩展支持 | * 去掉不支持的功能 |
617
| 2025-09-07 | 1.1.31 | 扩展支持 | * 支持带宽临时变配 |
718
| 2025-08-25 | 1.1.30 | 扩展支持 | * 增加l2gw类型路由 |
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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 AddNatIpCidrRequest(JDCloudRequest):
23+
"""
24+
添加NAT IP地址段接口
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AddNatIpCidrRequest, self).__init__(
29+
'/regions/{regionId}/natGateways/{natGatewayId}/natIpCidrs', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AddNatIpCidrParameters(object):
34+
35+
def __init__(self,regionId, natGatewayId, natIpCidr):
36+
"""
37+
:param regionId: Region ID
38+
:param natGatewayId: natGateway ID
39+
:param natIpCidr: NAT IP 地址段,格式为CIDR表示法(如:192.168.1.0/24)
40+
"""
41+
42+
self.regionId = regionId
43+
self.natGatewayId = natGatewayId
44+
self.natIpCidrDescription = None
45+
self.natIpCidr = natIpCidr
46+
47+
def setNatIpCidrDescription(self, natIpCidrDescription):
48+
"""
49+
:param natIpCidrDescription: (Optional) NAT IP 地址段描述, 允许输入UTF-8编码下的全部字符,不超过256字符
50+
"""
51+
self.natIpCidrDescription = natIpCidrDescription
52+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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 AllocateNatIpRequest(JDCloudRequest):
23+
"""
24+
分配AT IP接口
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(AllocateNatIpRequest, self).__init__(
29+
'/regions/{regionId}/natGateways/{natGatewayId}/natIps', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class AllocateNatIpParameters(object):
34+
35+
def __init__(self,regionId, natGatewayId, natIpCidrId, ):
36+
"""
37+
:param regionId: Region ID
38+
:param natGatewayId: natGateway ID
39+
:param natIpCidrId: NAT Gateway 已添加的 NAT IP 地址段,支持使用默认地址段
40+
"""
41+
42+
self.regionId = regionId
43+
self.natGatewayId = natGatewayId
44+
self.natIpDescription = None
45+
self.natIpCidrId = natIpCidrId
46+
self.natIp = None
47+
48+
def setNatIpDescription(self, natIpDescription):
49+
"""
50+
:param natIpDescription: (Optional) NAT IP 地址描述, 允许输入UTF-8编码下的全部字符,不超过256字符
51+
"""
52+
self.natIpDescription = natIpDescription
53+
54+
def setNatIp(self, natIp):
55+
"""
56+
:param natIp: (Optional) NAT IP 地址,可选,不填时自动从地址段中分配1个
57+
"""
58+
self.natIp = natIp
59+

jdcloud_sdk/services/vpc/apis/AssignSecondaryIpsRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def __init__(self,regionId, networkInterfaceId, ):
4545
self.secondaryIpCount = None
4646
self.secondaryIpMaskLen = None
4747
self.secondaryIpAddress = None
48+
self.secondaryIpSubnetId = None
4849

4950
def setForce(self, force):
5051
"""
@@ -76,3 +77,9 @@ def setSecondaryIpAddress(self, secondaryIpAddress):
7677
"""
7778
self.secondaryIpAddress = secondaryIpAddress
7879

80+
def setSecondaryIpSubnetId(self, secondaryIpSubnetId):
81+
"""
82+
:param secondaryIpSubnetId: (Optional) SecondaryIp所在子网ID,不传默认使用网卡所在子网里分配
83+
"""
84+
self.secondaryIpSubnetId = secondaryIpSubnetId
85+

jdcloud_sdk/services/vpc/apis/CreateBandwidthPackageRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def __init__(self,regionId, name, bandwidthMbps, ):
6060
self.bandwidthMbps = bandwidthMbps
6161
self.chargeType = None
6262
self.provider = None
63+
self.bandwidthPackageType = None
6364
self.chargeSpec = None
6465
self.userTags = None
6566
self.resourceGroupId = None
@@ -82,6 +83,12 @@ def setProvider(self, provider):
8283
"""
8384
self.provider = provider
8485

86+
def setBandwidthPackageType(self, bandwidthPackageType):
87+
"""
88+
:param bandwidthPackageType: (Optional) 共享带宽包类型,取值:standard(标准带宽包),edge(边缘带宽包),默认取值为standard,需与 provider 的 providerType 一致
89+
"""
90+
self.bandwidthPackageType = bandwidthPackageType
91+
8592
def setChargeSpec(self, chargeSpec):
8693
"""
8794
:param chargeSpec: (Optional) 计费配置。支持包年包月、按配置、按用量计费模式

jdcloud_sdk/services/vpc/apis/CreateElasticIpsRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def __init__(self,regionId, maxCount, elasticIpSpec, ):
4848
self.userTags = None
4949
self.ipType = None
5050
self.resourceGroupId = None
51+
self.resourceTag = None
5152
self.dryRun = None
5253

5354
def setElasticIpName(self, elasticIpName):
@@ -86,6 +87,12 @@ def setResourceGroupId(self, resourceGroupId):
8687
"""
8788
self.resourceGroupId = resourceGroupId
8889

90+
def setResourceTag(self, resourceTag):
91+
"""
92+
:param resourceTag: (Optional) 物理资源专区, 仅内部使用[JDStack]
93+
"""
94+
self.resourceTag = resourceTag
95+
8996
def setDryRun(self, dryRun):
9097
"""
9198
:param dryRun: (Optional) 预检标识,默认false,dryRun为true时只作检查,不做变更

jdcloud_sdk/services/vpc/apis/CreateNatGatewayRequest.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def __init__(self,regionId, natGatewayName, vpcId, subnetId, ):
4343
self.regionId = regionId
4444
self.natGatewayName = natGatewayName
4545
self.natGatewaySpec = None
46+
self.networkType = None
4647
self.vpcId = vpcId
4748
self.subnetId = subnetId
4849
self.azIpSpecs = None
@@ -54,13 +55,23 @@ def __init__(self,regionId, natGatewayName, vpcId, subnetId, ):
5455
self.description = None
5556
self.userTags = None
5657
self.resourceGroupId = None
58+
self.resourceTag = None
5759

5860
def setNatGatewaySpec(self, natGatewaySpec):
5961
"""
6062
:param natGatewaySpec: (Optional) NAT网关规格,取值small(100万并发连接数),medium(300万并发连接数),large(1000万并发连接数),默认small
6163
"""
6264
self.natGatewaySpec = natGatewaySpec
6365

66+
def setNetworkType(self, networkType):
67+
"""
68+
:param networkType: (Optional) 创建的 NAT 网关类型,可不填,取值:
69+
- internet:公网 NAT 网关(默认值/不填时默认值)。
70+
- intranet:VPC NAT 网关。
71+
72+
"""
73+
self.networkType = networkType
74+
6475
def setAzIpSpecs(self, azIpSpecs):
6576
"""
6677
:param azIpSpecs: (Optional) NAT网关的可用区属性,即将废弃
@@ -69,7 +80,7 @@ def setAzIpSpecs(self, azIpSpecs):
6980

7081
def setAzs(self, azs):
7182
"""
72-
:param azs: (Optional) NAT网关可用区
83+
:param azs: (Optional) NAT网关可用区,目前仅支持单个可用区(例如 ["cn-north-1a"])
7384
"""
7485
self.azs = azs
7586

@@ -93,7 +104,7 @@ def setElasticIpSpec(self, elasticIpSpec):
93104

94105
def setNatGatewayCharge(self, natGatewayCharge):
95106
"""
96-
:param natGatewayCharge: (Optional) 计费配置,仅支持按配置,默认按配置
107+
:param natGatewayCharge: (Optional) 计费配置,公网 NAT 仅支持按配置,VPC NAT 仅支持按用量,默认按配置
97108
"""
98109
self.natGatewayCharge = natGatewayCharge
99110

@@ -115,3 +126,9 @@ def setResourceGroupId(self, resourceGroupId):
115126
"""
116127
self.resourceGroupId = resourceGroupId
117128

129+
def setResourceTag(self, resourceTag):
130+
"""
131+
:param resourceTag: (Optional) 物理资源专区, 仅内部使用[JDStack]
132+
"""
133+
self.resourceTag = resourceTag
134+

jdcloud_sdk/services/vpc/apis/CreateNetworkInterfaceRequest.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class CreateNetworkInterfaceRequest(JDCloudRequest):
2323
"""
24-
创建网卡接口,只能创建辅助网卡
24+
创建网卡接口
2525
"""
2626

2727
def __init__(self, parameters, header=None, version="v1"):
@@ -45,12 +45,14 @@ def __init__(self,regionId, subnetId, ):
4545
self.primaryIpAddress = None
4646
self.secondaryIpAddresses = None
4747
self.secondaryIpCount = None
48+
self.secondaryIpSubnetId = None
4849
self.securityGroups = None
4950
self.sanityCheck = None
5051
self.description = None
5152
self.ipv6Addresses = None
5253
self.userTags = None
5354
self.resourceGroupId = None
55+
self.connectionTrackingConfiguration = None
5456

5557
def setAz(self, az):
5658
"""
@@ -82,6 +84,12 @@ def setSecondaryIpCount(self, secondaryIpCount):
8284
"""
8385
self.secondaryIpCount = secondaryIpCount
8486

87+
def setSecondaryIpSubnetId(self, secondaryIpSubnetId):
88+
"""
89+
:param secondaryIpSubnetId: (Optional) SecondaryIp所在子网ID,不传默认使用网卡所在子网里分配
90+
"""
91+
self.secondaryIpSubnetId = secondaryIpSubnetId
92+
8593
def setSecurityGroups(self, securityGroups):
8694
"""
8795
:param securityGroups: (Optional) 要绑定的安全组ID列表,最多指定5个安全组
@@ -118,3 +126,9 @@ def setResourceGroupId(self, resourceGroupId):
118126
"""
119127
self.resourceGroupId = resourceGroupId
120128

129+
def setConnectionTrackingConfiguration(self, connectionTrackingConfiguration):
130+
"""
131+
:param connectionTrackingConfiguration: (Optional) 网卡连接超时时间设置
132+
"""
133+
self.connectionTrackingConfiguration = connectionTrackingConfiguration
134+

jdcloud_sdk/services/vpc/apis/CreateSubnetRequest.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def __init__(self,regionId, vpcId, subnetName, addressPrefix, ):
5353
self.dryRun = None
5454
self.userTags = None
5555
self.resourceGroupId = None
56+
self.type = None
57+
self.hpcClusterId = None
5658

5759
def setRouteTableId(self, routeTableId):
5860
"""
@@ -108,3 +110,15 @@ def setResourceGroupId(self, resourceGroupId):
108110
"""
109111
self.resourceGroupId = resourceGroupId
110112

113+
def setType(self, type):
114+
"""
115+
:param type: (Optional) 子网类型 hpc:智算,normal:普通(默认)
116+
"""
117+
self.type = type
118+
119+
def setHpcClusterId(self, hpcClusterId):
120+
"""
121+
:param hpcClusterId: (Optional) 子网所属hpc集群id(type=hpc必填)
122+
"""
123+
self.hpcClusterId = hpcClusterId
124+

jdcloud_sdk/services/vpc/apis/CreateVpcRequest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def __init__(self,regionId, vpcName, ):
4444
self.description = None
4545
self.userTags = None
4646
self.resourceGroupId = None
47+
self.resourceTag = None
4748

4849
def setAddressPrefix(self, addressPrefix):
4950
"""
@@ -69,3 +70,9 @@ def setResourceGroupId(self, resourceGroupId):
6970
"""
7071
self.resourceGroupId = resourceGroupId
7172

73+
def setResourceTag(self, resourceTag):
74+
"""
75+
:param resourceTag: (Optional) 物理资源专区, 仅内部使用[JDStack]
76+
"""
77+
self.resourceTag = resourceTag
78+

0 commit comments

Comments
 (0)