Skip to content

Commit

Permalink
Support HA VPN attachment.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Oct 25, 2024
1 parent 2860e93 commit 9590d3e
Show file tree
Hide file tree
Showing 103 changed files with 3,619 additions and 148 deletions.
3 changes: 3 additions & 0 deletions aliyun-python-sdk-vpc/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-10-25 Version: 3.0.46
- Support HA VPN attachment.

2023-07-21 Version: 3.0.45
- Add error code.
- Add Deliver Param.
Expand Down
2 changes: 1 addition & 1 deletion aliyun-python-sdk-vpc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Aliyun Python SDK is the official software development kit. It makes things easy

This module works on Python versions:

2.6.5 and greater
3.7 and greater

**Documentation:**

Expand Down
2 changes: 1 addition & 1 deletion aliyun-python-sdk-vpc/aliyunsdkvpc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.0.45'
__version__ = '3.0.46'
20 changes: 6 additions & 14 deletions aliyun-python-sdk-vpc/aliyunsdkvpc/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,45 +21,37 @@
class EndpointData():
def __init__(self):
self.endpoint_map = {
"cn-shanghai-internal-test-1": "vpc.aliyuncs.com",
"cn-shanghai-internal-test-1": "vpc-pre.cn-hangzhou.aliyuncs.com",
"cn-beijing-gov-1": "vpc.aliyuncs.com",
"cn-shenzhen-su18-b01": "vpc.aliyuncs.com",
"cn-beijing": "vpc.aliyuncs.com",
"cn-shanghai-inner": "vpc.aliyuncs.com",
"cn-shenzhen-st4-d01": "vpc.aliyuncs.com",
"cn-haidian-cm12-c01": "vpc.aliyuncs.com",
"cn-hangzhou-internal-prod-1": "vpc.aliyuncs.com",
"cn-north-2-gov-1": "vpc.aliyuncs.com",
"cn-yushanfang": "vpc.aliyuncs.com",
"cn-qingdao": "vpc.aliyuncs.com",
"cn-hongkong-finance-pop": "vpc.aliyuncs.com",
"cn-qingdao-nebula": "vpc-nebula.cn-qingdao-nebula.aliyuncs.com",
"cn-shanghai": "vpc.aliyuncs.com",
"cn-shanghai-finance-1": "vpc.aliyuncs.com",
"cn-hongkong": "vpc.aliyuncs.com",
"cn-beijing-finance-pop": "vpc.aliyuncs.com",
"cn-wuhan": "vpc.aliyuncs.com",
"us-west-1": "vpc.aliyuncs.com",
"cn-zhangbei": "vpc.aliyuncs.com",
"cn-shenzhen": "vpc.aliyuncs.com",
"cn-zhengzhou-nebula-1": "vpc-nebula.cn-qingdao-nebula.aliyuncs.com",
"rus-west-1-pop": "vpc.aliyuncs.com",
"cn-shanghai-et15-b01": "vpc.aliyuncs.com",
"cn-shanghai-et15-b01": "vpc-pre.cn-hangzhou.aliyuncs.com",
"cn-hangzhou-bj-b01": "vpc.aliyuncs.com",
"cn-hangzhou-internal-test-1": "vpc.aliyuncs.com",
"cn-hangzhou-internal-test-1": "vpc-pre.cn-hangzhou.aliyuncs.com",
"eu-west-1-oxs": "vpc-nebula.cn-shenzhen-cloudstone.aliyuncs.com",
"cn-zhangbei-na61-b01": "vpc.aliyuncs.com",
"cn-hangzhou-internal-test-3": "vpc.aliyuncs.com",
"cn-hangzhou-internal-test-3": "vpc-pre.cn-hangzhou.aliyuncs.com",
"cn-shenzhen-finance-1": "vpc.aliyuncs.com",
"cn-hangzhou-internal-test-2": "vpc.aliyuncs.com",
"cn-hangzhou-test-306": "vpc.aliyuncs.com",
"cn-hangzhou-internal-test-2": "vpc-inner-pre.cn-hangzhou.aliyuncs.com",
"cn-hangzhou-test-306": "vpc-pre.cn-hangzhou.aliyuncs.com",
"cn-huhehaote-nebula-1": "vpc-nebula.cn-qingdao-nebula.aliyuncs.com",
"cn-shanghai-et2-b01": "vpc.aliyuncs.com",
"cn-hangzhou-finance": "vpc.aliyuncs.com",
"ap-southeast-1": "vpc.aliyuncs.com",
"cn-beijing-nu16-b01": "vpc.aliyuncs.com",
"cn-edge-1": "vpc-nebula.cn-qingdao-nebula.aliyuncs.com",
"us-east-1": "vpc.aliyuncs.com",
"cn-fujian": "vpc.aliyuncs.com",
"ap-northeast-2-pop": "vpc.aliyuncs.com",
"cn-shenzhen-inner": "vpc.aliyuncs.com",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest
from aliyunsdkvpc.endpoint import endpoint_data

class AllocateIpv6AddressRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Vpc', '2016-04-28', 'AllocateIpv6Address','vpc')
self.set_method('POST')

if hasattr(self, "endpoint_map"):
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
if hasattr(self, "endpoint_regional"):
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())

def get_ResourceOwnerId(self): # Long
return self.get_query_params().get('ResourceOwnerId')

def set_ResourceOwnerId(self, ResourceOwnerId): # Long
self.add_query_param('ResourceOwnerId', ResourceOwnerId)
def get_ClientToken(self): # String
return self.get_query_params().get('ClientToken')

def set_ClientToken(self, ClientToken): # String
self.add_query_param('ClientToken', ClientToken)
def get_Ipv6AddressDescription(self): # String
return self.get_query_params().get('Ipv6AddressDescription')

def set_Ipv6AddressDescription(self, Ipv6AddressDescription): # String
self.add_query_param('Ipv6AddressDescription', Ipv6AddressDescription)
def get_ResourceGroupId(self): # String
return self.get_query_params().get('ResourceGroupId')

def set_ResourceGroupId(self, ResourceGroupId): # String
self.add_query_param('ResourceGroupId', ResourceGroupId)
def get_AddressType(self): # String
return self.get_query_params().get('AddressType')

def set_AddressType(self, AddressType): # String
self.add_query_param('AddressType', AddressType)
def get_Tags(self): # RepeatList
return self.get_query_params().get('Tag')

def set_Tags(self, Tag): # RepeatList
for depth1 in range(len(Tag)):
if Tag[depth1].get('Key') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
if Tag[depth1].get('Value') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
def get_Ipv6AddressName(self): # String
return self.get_query_params().get('Ipv6AddressName')

def set_Ipv6AddressName(self, Ipv6AddressName): # String
self.add_query_param('Ipv6AddressName', Ipv6AddressName)
def get_DryRun(self): # Boolean
return self.get_query_params().get('DryRun')

def set_DryRun(self, DryRun): # Boolean
self.add_query_param('DryRun', DryRun)
def get_ResourceOwnerAccount(self): # String
return self.get_query_params().get('ResourceOwnerAccount')

def set_ResourceOwnerAccount(self, ResourceOwnerAccount): # String
self.add_query_param('ResourceOwnerAccount', ResourceOwnerAccount)
def get_OwnerAccount(self): # String
return self.get_query_params().get('OwnerAccount')

def set_OwnerAccount(self, OwnerAccount): # String
self.add_query_param('OwnerAccount', OwnerAccount)
def get_OwnerId(self): # Long
return self.get_query_params().get('OwnerId')

def set_OwnerId(self, OwnerId): # Long
self.add_query_param('OwnerId', OwnerId)
def get_VSwitchId(self): # String
return self.get_query_params().get('VSwitchId')

def set_VSwitchId(self, VSwitchId): # String
self.add_query_param('VSwitchId', VSwitchId)
def get_Ipv6Address(self): # String
return self.get_query_params().get('Ipv6Address')

def set_Ipv6Address(self, Ipv6Address): # String
self.add_query_param('Ipv6Address', Ipv6Address)
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def get_ClientToken(self): # String

def set_ClientToken(self, ClientToken): # String
self.add_query_param('ClientToken', ClientToken)
def get_DryRun(self): # Boolean
return self.get_query_params().get('DryRun')

def set_DryRun(self, DryRun): # Boolean
self.add_query_param('DryRun', DryRun)
def get_Bandwidth(self): # Integer
return self.get_query_params().get('Bandwidth')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def get_NetworkAclId(self): # String

def set_NetworkAclId(self, NetworkAclId): # String
self.add_query_param('NetworkAclId', NetworkAclId)
def get_DryRun(self): # Boolean
return self.get_query_params().get('DryRun')

def set_DryRun(self, DryRun): # Boolean
self.add_query_param('DryRun', DryRun)
def get_Resources(self): # RepeatList
return self.get_query_params().get('Resource')

Expand All @@ -60,6 +65,11 @@ def get_ResourceOwnerAccount(self): # String

def set_ResourceOwnerAccount(self, ResourceOwnerAccount): # String
self.add_query_param('ResourceOwnerAccount', ResourceOwnerAccount)
def get_OwnerAccount(self): # String
return self.get_query_params().get('OwnerAccount')

def set_OwnerAccount(self, OwnerAccount): # String
self.add_query_param('OwnerAccount', OwnerAccount)
def get_OwnerId(self): # Long
return self.get_query_params().get('OwnerId')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ def get_RouteTableId(self): # String

def set_RouteTableId(self, RouteTableId): # String
self.add_query_param('RouteTableId', RouteTableId)
def get_GatewayType(self): # String
return self.get_query_params().get('GatewayType')

def set_GatewayType(self, GatewayType): # String
self.add_query_param('GatewayType', GatewayType)
def get_DryRun(self): # Boolean
return self.get_query_params().get('DryRun')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def get_IPv6CidrBlock(self): # String

def set_IPv6CidrBlock(self, IPv6CidrBlock): # String
self.add_query_param('IPv6CidrBlock', IPv6CidrBlock)
def get_SecondaryCidrMask(self): # Integer
return self.get_query_params().get('SecondaryCidrMask')

def set_SecondaryCidrMask(self, SecondaryCidrMask): # Integer
self.add_query_param('SecondaryCidrMask', SecondaryCidrMask)
def get_SecondaryCidrBlock(self): # String
return self.get_query_params().get('SecondaryCidrBlock')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ def get_ClientToken(self): # String

def set_ClientToken(self, ClientToken): # String
self.add_query_param('ClientToken', ClientToken)
def get_LineSPContactInfo(self): # String
return self.get_query_params().get('LineSPContactInfo')

def set_LineSPContactInfo(self, LineSPContactInfo): # String
self.add_query_param('LineSPContactInfo', LineSPContactInfo)
def get_FinishWork(self): # Boolean
return self.get_query_params().get('FinishWork')

def set_FinishWork(self, FinishWork): # Boolean
self.add_query_param('FinishWork', FinishWork)
def get_LineServiceProvider(self): # String
return self.get_query_params().get('LineServiceProvider')

def set_LineServiceProvider(self, LineServiceProvider): # String
self.add_query_param('LineServiceProvider', LineServiceProvider)
def get_LineLabel(self): # String
return self.get_query_params().get('LineLabel')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,21 @@ def get_SourceNetworkAclId(self): # String

def set_SourceNetworkAclId(self, SourceNetworkAclId): # String
self.add_query_param('SourceNetworkAclId', SourceNetworkAclId)
def get_DryRun(self): # Boolean
return self.get_query_params().get('DryRun')

def set_DryRun(self, DryRun): # Boolean
self.add_query_param('DryRun', DryRun)
def get_ResourceOwnerAccount(self): # String
return self.get_query_params().get('ResourceOwnerAccount')

def set_ResourceOwnerAccount(self, ResourceOwnerAccount): # String
self.add_query_param('ResourceOwnerAccount', ResourceOwnerAccount)
def get_OwnerAccount(self): # String
return self.get_query_params().get('OwnerAccount')

def set_OwnerAccount(self, OwnerAccount): # String
self.add_query_param('OwnerAccount', OwnerAccount)
def get_OwnerId(self): # Long
return self.get_query_params().get('OwnerId')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def get_Description(self): # String

def set_Description(self, Description): # String
self.add_query_param('Description', Description)
def get_ResourceGroupId(self): # String
return self.get_query_params().get('ResourceGroupId')

def set_ResourceGroupId(self, ResourceGroupId): # String
self.add_query_param('ResourceGroupId', ResourceGroupId)
def get_ResourceOwnerAccount(self): # String
return self.get_query_params().get('ResourceOwnerAccount')

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest
from aliyunsdkvpc.endpoint import endpoint_data

class CreateExpressConnectTrafficQosQueueRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Vpc', '2016-04-28', 'CreateExpressConnectTrafficQosQueue','vpc')
self.set_method('POST')

if hasattr(self, "endpoint_map"):
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
if hasattr(self, "endpoint_regional"):
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())

def get_QueueName(self): # String
return self.get_query_params().get('QueueName')

def set_QueueName(self, QueueName): # String
self.add_query_param('QueueName', QueueName)
def get_ClientToken(self): # String
return self.get_query_params().get('ClientToken')

def set_ClientToken(self, ClientToken): # String
self.add_query_param('ClientToken', ClientToken)
def get_QueueDescription(self): # String
return self.get_query_params().get('QueueDescription')

def set_QueueDescription(self, QueueDescription): # String
self.add_query_param('QueueDescription', QueueDescription)
def get_QosId(self): # String
return self.get_query_params().get('QosId')

def set_QosId(self, QosId): # String
self.add_query_param('QosId', QosId)
def get_ResourceOwnerAccount(self): # String
return self.get_query_params().get('ResourceOwnerAccount')

def set_ResourceOwnerAccount(self, ResourceOwnerAccount): # String
self.add_query_param('ResourceOwnerAccount', ResourceOwnerAccount)
def get_OwnerAccount(self): # String
return self.get_query_params().get('OwnerAccount')

def set_OwnerAccount(self, OwnerAccount): # String
self.add_query_param('OwnerAccount', OwnerAccount)
def get_QueueType(self): # String
return self.get_query_params().get('QueueType')

def set_QueueType(self, QueueType): # String
self.add_query_param('QueueType', QueueType)
def get_OwnerId(self): # Long
return self.get_query_params().get('OwnerId')

def set_OwnerId(self, OwnerId): # Long
self.add_query_param('OwnerId', OwnerId)
def get_BandwidthPercent(self): # String
return self.get_query_params().get('BandwidthPercent')

def set_BandwidthPercent(self, BandwidthPercent): # String
self.add_query_param('BandwidthPercent', BandwidthPercent)
Loading

0 comments on commit 9590d3e

Please sign in to comment.