baiducloud-python-sdk-vpc 0.0.3__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- baiducloud_python_sdk_vpc/__init__.py +1 -0
- baiducloud_python_sdk_vpc/api/__init__.py +0 -0
- baiducloud_python_sdk_vpc/api/vpc_client.py +225 -0
- baiducloud_python_sdk_vpc/models/__init__.py +0 -0
- baiducloud_python_sdk_vpc/models/close_vpc_relay_request.py +24 -0
- baiducloud_python_sdk_vpc/models/create_a_reserved_network_segment_request.py +41 -0
- baiducloud_python_sdk_vpc/models/create_a_reserved_network_segment_response.py +27 -0
- baiducloud_python_sdk_vpc/models/create_subnet_request.py +70 -0
- baiducloud_python_sdk_vpc/models/create_subnet_response.py +27 -0
- baiducloud_python_sdk_vpc/models/create_vpc_request.py +50 -0
- baiducloud_python_sdk_vpc/models/create_vpc_response.py +27 -0
- baiducloud_python_sdk_vpc/models/delete_reserved_network_segment_request.py +24 -0
- baiducloud_python_sdk_vpc/models/delete_subnet_request.py +24 -0
- baiducloud_python_sdk_vpc/models/delete_vpc_request.py +24 -0
- baiducloud_python_sdk_vpc/models/enable_vpc_relay_request.py +24 -0
- baiducloud_python_sdk_vpc/models/ip_reserve.py +57 -0
- baiducloud_python_sdk_vpc/models/query_specified_subnet_request.py +21 -0
- baiducloud_python_sdk_vpc/models/query_specified_subnet_response.py +28 -0
- baiducloud_python_sdk_vpc/models/query_specified_vpc_request.py +21 -0
- baiducloud_python_sdk_vpc/models/query_specified_vpc_response.py +28 -0
- baiducloud_python_sdk_vpc/models/query_subnet_list_request.py +36 -0
- baiducloud_python_sdk_vpc/models/query_subnet_list_response.py +51 -0
- baiducloud_python_sdk_vpc/models/query_the_ip_addresses_occupied_by_products_within_vpc_request.py +33 -0
- baiducloud_python_sdk_vpc/models/query_the_ip_addresses_occupied_by_products_within_vpc_response.py +46 -0
- baiducloud_python_sdk_vpc/models/query_the_reserved_network_segment_list_request.py +27 -0
- baiducloud_python_sdk_vpc/models/query_the_reserved_network_segment_list_response.py +51 -0
- baiducloud_python_sdk_vpc/models/query_vpc_intranet_ip_request.py +27 -0
- baiducloud_python_sdk_vpc/models/query_vpc_intranet_ip_response.py +31 -0
- baiducloud_python_sdk_vpc/models/query_vpc_list_request.py +30 -0
- baiducloud_python_sdk_vpc/models/query_vpc_list_response.py +51 -0
- baiducloud_python_sdk_vpc/models/resource_ip.py +32 -0
- baiducloud_python_sdk_vpc/models/show_vpc_model.py +82 -0
- baiducloud_python_sdk_vpc/models/subnet.py +87 -0
- baiducloud_python_sdk_vpc/models/subnet_detail.py +87 -0
- baiducloud_python_sdk_vpc/models/tag_model.py +32 -0
- baiducloud_python_sdk_vpc/models/update_subnet_request.py +39 -0
- baiducloud_python_sdk_vpc/models/update_vpc_request.py +44 -0
- baiducloud_python_sdk_vpc/models/vpc.py +72 -0
- baiducloud_python_sdk_vpc/models/vpc_private_ip_address.py +42 -0
- baiducloud_python_sdk_vpc/setup.py +70 -0
- baiducloud_python_sdk_vpc-0.0.3.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_vpc-0.0.3.dist-info/METADATA +74 -0
- baiducloud_python_sdk_vpc-0.0.3.dist-info/RECORD +45 -0
- baiducloud_python_sdk_vpc-0.0.3.dist-info/WHEEL +6 -0
- baiducloud_python_sdk_vpc-0.0.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QuerySpecifiedSubnetRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, subnet_id):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.subnet_id = subnet_id
|
|
8
|
+
|
|
9
|
+
def to_dict(self):
|
|
10
|
+
_map = super().to_dict()
|
|
11
|
+
if _map is not None:
|
|
12
|
+
return _map
|
|
13
|
+
result = dict()
|
|
14
|
+
return result
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def from_dict(self, m):
|
|
18
|
+
m = m or dict()
|
|
19
|
+
if m.get('subnetId') is not None:
|
|
20
|
+
self.subnet_id = m.get('subnetId')
|
|
21
|
+
return self
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.subnet_detail import SubnetDetail
|
|
3
|
+
|
|
4
|
+
class QuerySpecifiedSubnetResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QuerySpecifiedSubnetResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, subnet=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.subnet = subnet
|
|
11
|
+
|
|
12
|
+
def to_dict(self):
|
|
13
|
+
_map = super().to_dict()
|
|
14
|
+
if _map is not None:
|
|
15
|
+
return _map
|
|
16
|
+
result = dict()
|
|
17
|
+
if self.metadata is not None:
|
|
18
|
+
result['metadata'] = self.metadata
|
|
19
|
+
if self.subnet is not None:
|
|
20
|
+
result['subnet'] = self.subnet.to_dict()
|
|
21
|
+
return result
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def from_dict(self, m):
|
|
25
|
+
m = m or dict()
|
|
26
|
+
if m.get('subnet') is not None:
|
|
27
|
+
self.subnet = SubnetDetail().from_dict(m.get('subnet'))
|
|
28
|
+
return self
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QuerySpecifiedVpcRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, vpc_id):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.vpc_id = vpc_id
|
|
8
|
+
|
|
9
|
+
def to_dict(self):
|
|
10
|
+
_map = super().to_dict()
|
|
11
|
+
if _map is not None:
|
|
12
|
+
return _map
|
|
13
|
+
result = dict()
|
|
14
|
+
return result
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def from_dict(self, m):
|
|
18
|
+
m = m or dict()
|
|
19
|
+
if m.get('vpcId') is not None:
|
|
20
|
+
self.vpc_id = m.get('vpcId')
|
|
21
|
+
return self
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.show_vpc_model import ShowVpcModel
|
|
3
|
+
|
|
4
|
+
class QuerySpecifiedVpcResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QuerySpecifiedVpcResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, vpc=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.vpc = vpc
|
|
11
|
+
|
|
12
|
+
def to_dict(self):
|
|
13
|
+
_map = super().to_dict()
|
|
14
|
+
if _map is not None:
|
|
15
|
+
return _map
|
|
16
|
+
result = dict()
|
|
17
|
+
if self.metadata is not None:
|
|
18
|
+
result['metadata'] = self.metadata
|
|
19
|
+
if self.vpc is not None:
|
|
20
|
+
result['vpc'] = self.vpc.to_dict()
|
|
21
|
+
return result
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def from_dict(self, m):
|
|
25
|
+
m = m or dict()
|
|
26
|
+
if m.get('vpc') is not None:
|
|
27
|
+
self.vpc = ShowVpcModel().from_dict(m.get('vpc'))
|
|
28
|
+
return self
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QuerySubnetListRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, marker=None, max_keys=None, vpc_id=None, zone_name=None, subnet_type=None, subnet_ids=None):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.marker = marker
|
|
8
|
+
self.max_keys = max_keys
|
|
9
|
+
self.vpc_id = vpc_id
|
|
10
|
+
self.zone_name = zone_name
|
|
11
|
+
self.subnet_type = subnet_type
|
|
12
|
+
self.subnet_ids = subnet_ids
|
|
13
|
+
|
|
14
|
+
def to_dict(self):
|
|
15
|
+
_map = super().to_dict()
|
|
16
|
+
if _map is not None:
|
|
17
|
+
return _map
|
|
18
|
+
result = dict()
|
|
19
|
+
return result
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def from_dict(self, m):
|
|
23
|
+
m = m or dict()
|
|
24
|
+
if m.get('marker') is not None:
|
|
25
|
+
self.marker = m.get('marker')
|
|
26
|
+
if m.get('maxKeys') is not None:
|
|
27
|
+
self.max_keys = m.get('maxKeys')
|
|
28
|
+
if m.get('vpcId') is not None:
|
|
29
|
+
self.vpc_id = m.get('vpcId')
|
|
30
|
+
if m.get('zoneName') is not None:
|
|
31
|
+
self.zone_name = m.get('zoneName')
|
|
32
|
+
if m.get('subnetType') is not None:
|
|
33
|
+
self.subnet_type = m.get('subnetType')
|
|
34
|
+
if m.get('subnetIds') is not None:
|
|
35
|
+
self.subnet_ids = m.get('subnetIds')
|
|
36
|
+
return self
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.subnet import Subnet
|
|
3
|
+
|
|
4
|
+
class QuerySubnetListResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QuerySubnetListResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, marker=None, is_truncated=None, next_marker=None, max_keys=None, subnets=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.marker = marker
|
|
11
|
+
self.is_truncated = is_truncated
|
|
12
|
+
self.next_marker = next_marker
|
|
13
|
+
self.max_keys = max_keys
|
|
14
|
+
self.subnets = subnets
|
|
15
|
+
|
|
16
|
+
def to_dict(self):
|
|
17
|
+
_map = super().to_dict()
|
|
18
|
+
if _map is not None:
|
|
19
|
+
return _map
|
|
20
|
+
result = dict()
|
|
21
|
+
if self.metadata is not None:
|
|
22
|
+
result['metadata'] = self.metadata
|
|
23
|
+
if self.marker is not None:
|
|
24
|
+
result['marker'] = self.marker
|
|
25
|
+
if self.is_truncated is not None:
|
|
26
|
+
result['isTruncated'] = self.is_truncated
|
|
27
|
+
if self.next_marker is not None:
|
|
28
|
+
result['nextMarker'] = self.next_marker
|
|
29
|
+
if self.max_keys is not None:
|
|
30
|
+
result['maxKeys'] = self.max_keys
|
|
31
|
+
if self.subnets is not None:
|
|
32
|
+
result['subnets'] = [i.to_dict() for i in self.subnets]
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def from_dict(self, m):
|
|
37
|
+
m = m or dict()
|
|
38
|
+
if m.get('marker') is not None:
|
|
39
|
+
self.marker = m.get('marker')
|
|
40
|
+
if m.get('isTruncated') is not None:
|
|
41
|
+
self.is_truncated = m.get('isTruncated')
|
|
42
|
+
if m.get('nextMarker') is not None:
|
|
43
|
+
self.next_marker = m.get('nextMarker')
|
|
44
|
+
if m.get('maxKeys') is not None:
|
|
45
|
+
self.max_keys = m.get('maxKeys')
|
|
46
|
+
if m.get('subnets') is not None:
|
|
47
|
+
self.subnets = [
|
|
48
|
+
Subnet().from_dict(i)
|
|
49
|
+
for i in m.get('subnets')
|
|
50
|
+
]
|
|
51
|
+
return self
|
baiducloud_python_sdk_vpc/models/query_the_ip_addresses_occupied_by_products_within_vpc_request.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QueryTheIpAddressesOccupiedByProductsWithinVpcRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, vpc_id, subnet_id=None, resource_type=None, page_no=None, page_size=None):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.vpc_id = vpc_id
|
|
8
|
+
self.subnet_id = subnet_id
|
|
9
|
+
self.resource_type = resource_type
|
|
10
|
+
self.page_no = page_no
|
|
11
|
+
self.page_size = page_size
|
|
12
|
+
|
|
13
|
+
def to_dict(self):
|
|
14
|
+
_map = super().to_dict()
|
|
15
|
+
if _map is not None:
|
|
16
|
+
return _map
|
|
17
|
+
result = dict()
|
|
18
|
+
return result
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def from_dict(self, m):
|
|
22
|
+
m = m or dict()
|
|
23
|
+
if m.get('vpcId') is not None:
|
|
24
|
+
self.vpc_id = m.get('vpcId')
|
|
25
|
+
if m.get('subnetId') is not None:
|
|
26
|
+
self.subnet_id = m.get('subnetId')
|
|
27
|
+
if m.get('resourceType') is not None:
|
|
28
|
+
self.resource_type = m.get('resourceType')
|
|
29
|
+
if m.get('pageNo') is not None:
|
|
30
|
+
self.page_no = m.get('pageNo')
|
|
31
|
+
if m.get('pageSize') is not None:
|
|
32
|
+
self.page_size = m.get('pageSize')
|
|
33
|
+
return self
|
baiducloud_python_sdk_vpc/models/query_the_ip_addresses_occupied_by_products_within_vpc_response.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.resource_ip import ResourceIp
|
|
3
|
+
|
|
4
|
+
class QueryTheIpAddressesOccupiedByProductsWithinVpcResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QueryTheIpAddressesOccupiedByProductsWithinVpcResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, page_no=None, page_size=None, total_count=None, result=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.page_no = page_no
|
|
11
|
+
self.page_size = page_size
|
|
12
|
+
self.total_count = total_count
|
|
13
|
+
self.result = result
|
|
14
|
+
|
|
15
|
+
def to_dict(self):
|
|
16
|
+
_map = super().to_dict()
|
|
17
|
+
if _map is not None:
|
|
18
|
+
return _map
|
|
19
|
+
result = dict()
|
|
20
|
+
if self.metadata is not None:
|
|
21
|
+
result['metadata'] = self.metadata
|
|
22
|
+
if self.page_no is not None:
|
|
23
|
+
result['pageNo'] = self.page_no
|
|
24
|
+
if self.page_size is not None:
|
|
25
|
+
result['pageSize'] = self.page_size
|
|
26
|
+
if self.total_count is not None:
|
|
27
|
+
result['totalCount'] = self.total_count
|
|
28
|
+
if self.result is not None:
|
|
29
|
+
result['result'] = [i.to_dict() for i in self.result]
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def from_dict(self, m):
|
|
34
|
+
m = m or dict()
|
|
35
|
+
if m.get('pageNo') is not None:
|
|
36
|
+
self.page_no = m.get('pageNo')
|
|
37
|
+
if m.get('pageSize') is not None:
|
|
38
|
+
self.page_size = m.get('pageSize')
|
|
39
|
+
if m.get('totalCount') is not None:
|
|
40
|
+
self.total_count = m.get('totalCount')
|
|
41
|
+
if m.get('result') is not None:
|
|
42
|
+
self.result = [
|
|
43
|
+
ResourceIp().from_dict(i)
|
|
44
|
+
for i in m.get('result')
|
|
45
|
+
]
|
|
46
|
+
return self
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QueryTheReservedNetworkSegmentListRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, subnet_id=None, marker=None, max_keys=None):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.subnet_id = subnet_id
|
|
8
|
+
self.marker = marker
|
|
9
|
+
self.max_keys = max_keys
|
|
10
|
+
|
|
11
|
+
def to_dict(self):
|
|
12
|
+
_map = super().to_dict()
|
|
13
|
+
if _map is not None:
|
|
14
|
+
return _map
|
|
15
|
+
result = dict()
|
|
16
|
+
return result
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def from_dict(self, m):
|
|
20
|
+
m = m or dict()
|
|
21
|
+
if m.get('subnetId') is not None:
|
|
22
|
+
self.subnet_id = m.get('subnetId')
|
|
23
|
+
if m.get('marker') is not None:
|
|
24
|
+
self.marker = m.get('marker')
|
|
25
|
+
if m.get('maxKeys') is not None:
|
|
26
|
+
self.max_keys = m.get('maxKeys')
|
|
27
|
+
return self
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.ip_reserve import IpReserve
|
|
3
|
+
|
|
4
|
+
class QueryTheReservedNetworkSegmentListResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QueryTheReservedNetworkSegmentListResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, ip_reserves=None, marker=None, is_truncated=None, next_marker=None, max_keys=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.ip_reserves = ip_reserves
|
|
11
|
+
self.marker = marker
|
|
12
|
+
self.is_truncated = is_truncated
|
|
13
|
+
self.next_marker = next_marker
|
|
14
|
+
self.max_keys = max_keys
|
|
15
|
+
|
|
16
|
+
def to_dict(self):
|
|
17
|
+
_map = super().to_dict()
|
|
18
|
+
if _map is not None:
|
|
19
|
+
return _map
|
|
20
|
+
result = dict()
|
|
21
|
+
if self.metadata is not None:
|
|
22
|
+
result['metadata'] = self.metadata
|
|
23
|
+
if self.ip_reserves is not None:
|
|
24
|
+
result['ipReserves'] = [i.to_dict() for i in self.ip_reserves]
|
|
25
|
+
if self.marker is not None:
|
|
26
|
+
result['marker'] = self.marker
|
|
27
|
+
if self.is_truncated is not None:
|
|
28
|
+
result['isTruncated'] = self.is_truncated
|
|
29
|
+
if self.next_marker is not None:
|
|
30
|
+
result['nextMarker'] = self.next_marker
|
|
31
|
+
if self.max_keys is not None:
|
|
32
|
+
result['maxKeys'] = self.max_keys
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def from_dict(self, m):
|
|
37
|
+
m = m or dict()
|
|
38
|
+
if m.get('ipReserves') is not None:
|
|
39
|
+
self.ip_reserves = [
|
|
40
|
+
IpReserve().from_dict(i)
|
|
41
|
+
for i in m.get('ipReserves')
|
|
42
|
+
]
|
|
43
|
+
if m.get('marker') is not None:
|
|
44
|
+
self.marker = m.get('marker')
|
|
45
|
+
if m.get('isTruncated') is not None:
|
|
46
|
+
self.is_truncated = m.get('isTruncated')
|
|
47
|
+
if m.get('nextMarker') is not None:
|
|
48
|
+
self.next_marker = m.get('nextMarker')
|
|
49
|
+
if m.get('maxKeys') is not None:
|
|
50
|
+
self.max_keys = m.get('maxKeys')
|
|
51
|
+
return self
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QueryVpcIntranetIpRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, vpc_id, private_ip_addresses=None, private_ip_range=None):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.vpc_id = vpc_id
|
|
8
|
+
self.private_ip_addresses = private_ip_addresses
|
|
9
|
+
self.private_ip_range = private_ip_range
|
|
10
|
+
|
|
11
|
+
def to_dict(self):
|
|
12
|
+
_map = super().to_dict()
|
|
13
|
+
if _map is not None:
|
|
14
|
+
return _map
|
|
15
|
+
result = dict()
|
|
16
|
+
return result
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def from_dict(self, m):
|
|
20
|
+
m = m or dict()
|
|
21
|
+
if m.get('vpcId') is not None:
|
|
22
|
+
self.vpc_id = m.get('vpcId')
|
|
23
|
+
if m.get('privateIpAddresses') is not None:
|
|
24
|
+
self.private_ip_addresses = m.get('privateIpAddresses')
|
|
25
|
+
if m.get('privateIpRange') is not None:
|
|
26
|
+
self.private_ip_range = m.get('privateIpRange')
|
|
27
|
+
return self
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.vpc_private_ip_address import VpcPrivateIpAddress
|
|
3
|
+
|
|
4
|
+
class QueryVpcIntranetIpResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QueryVpcIntranetIpResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, vpc_private_ip_addresses=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.vpc_private_ip_addresses = vpc_private_ip_addresses
|
|
11
|
+
|
|
12
|
+
def to_dict(self):
|
|
13
|
+
_map = super().to_dict()
|
|
14
|
+
if _map is not None:
|
|
15
|
+
return _map
|
|
16
|
+
result = dict()
|
|
17
|
+
if self.metadata is not None:
|
|
18
|
+
result['metadata'] = self.metadata
|
|
19
|
+
if self.vpc_private_ip_addresses is not None:
|
|
20
|
+
result['vpcPrivateIpAddresses'] = [i.to_dict() for i in self.vpc_private_ip_addresses]
|
|
21
|
+
return result
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def from_dict(self, m):
|
|
25
|
+
m = m or dict()
|
|
26
|
+
if m.get('vpcPrivateIpAddresses') is not None:
|
|
27
|
+
self.vpc_private_ip_addresses = [
|
|
28
|
+
VpcPrivateIpAddress().from_dict(i)
|
|
29
|
+
for i in m.get('vpcPrivateIpAddresses')
|
|
30
|
+
]
|
|
31
|
+
return self
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class QueryVpcListRequest(AbstractModel):
|
|
4
|
+
|
|
5
|
+
def __init__(self, marker=None, max_keys=None, is_default=None, vpc_ids=None):
|
|
6
|
+
super().__init__()
|
|
7
|
+
self.marker = marker
|
|
8
|
+
self.max_keys = max_keys
|
|
9
|
+
self.is_default = is_default
|
|
10
|
+
self.vpc_ids = vpc_ids
|
|
11
|
+
|
|
12
|
+
def to_dict(self):
|
|
13
|
+
_map = super().to_dict()
|
|
14
|
+
if _map is not None:
|
|
15
|
+
return _map
|
|
16
|
+
result = dict()
|
|
17
|
+
return result
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def from_dict(self, m):
|
|
21
|
+
m = m or dict()
|
|
22
|
+
if m.get('marker') is not None:
|
|
23
|
+
self.marker = m.get('marker')
|
|
24
|
+
if m.get('maxKeys') is not None:
|
|
25
|
+
self.max_keys = m.get('maxKeys')
|
|
26
|
+
if m.get('isDefault') is not None:
|
|
27
|
+
self.is_default = m.get('isDefault')
|
|
28
|
+
if m.get('vpcIds') is not None:
|
|
29
|
+
self.vpc_ids = m.get('vpcIds')
|
|
30
|
+
return self
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
2
|
+
from baiducloud_python_sdk_vpc.models.vpc import Vpc
|
|
3
|
+
|
|
4
|
+
class QueryVpcListResponse(BceResponse):
|
|
5
|
+
"""
|
|
6
|
+
QueryVpcListResponse
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, marker=None, is_truncated=None, next_marker=None, max_keys=None, vpcs=None):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.marker = marker
|
|
11
|
+
self.is_truncated = is_truncated
|
|
12
|
+
self.next_marker = next_marker
|
|
13
|
+
self.max_keys = max_keys
|
|
14
|
+
self.vpcs = vpcs
|
|
15
|
+
|
|
16
|
+
def to_dict(self):
|
|
17
|
+
_map = super().to_dict()
|
|
18
|
+
if _map is not None:
|
|
19
|
+
return _map
|
|
20
|
+
result = dict()
|
|
21
|
+
if self.metadata is not None:
|
|
22
|
+
result['metadata'] = self.metadata
|
|
23
|
+
if self.marker is not None:
|
|
24
|
+
result['marker'] = self.marker
|
|
25
|
+
if self.is_truncated is not None:
|
|
26
|
+
result['isTruncated'] = self.is_truncated
|
|
27
|
+
if self.next_marker is not None:
|
|
28
|
+
result['nextMarker'] = self.next_marker
|
|
29
|
+
if self.max_keys is not None:
|
|
30
|
+
result['maxKeys'] = self.max_keys
|
|
31
|
+
if self.vpcs is not None:
|
|
32
|
+
result['vpcs'] = [i.to_dict() for i in self.vpcs]
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def from_dict(self, m):
|
|
37
|
+
m = m or dict()
|
|
38
|
+
if m.get('marker') is not None:
|
|
39
|
+
self.marker = m.get('marker')
|
|
40
|
+
if m.get('isTruncated') is not None:
|
|
41
|
+
self.is_truncated = m.get('isTruncated')
|
|
42
|
+
if m.get('nextMarker') is not None:
|
|
43
|
+
self.next_marker = m.get('nextMarker')
|
|
44
|
+
if m.get('maxKeys') is not None:
|
|
45
|
+
self.max_keys = m.get('maxKeys')
|
|
46
|
+
if m.get('vpcs') is not None:
|
|
47
|
+
self.vpcs = [
|
|
48
|
+
Vpc().from_dict(i)
|
|
49
|
+
for i in m.get('vpcs')
|
|
50
|
+
]
|
|
51
|
+
return self
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ResourceIp(AbstractModel):
|
|
6
|
+
"""
|
|
7
|
+
ResourceIp
|
|
8
|
+
"""
|
|
9
|
+
def __init__(self, ip=None, resource_type=None):
|
|
10
|
+
super().__init__()
|
|
11
|
+
self.ip = ip
|
|
12
|
+
self.resource_type = resource_type
|
|
13
|
+
|
|
14
|
+
def to_dict(self):
|
|
15
|
+
_map = super().to_dict()
|
|
16
|
+
if _map is not None:
|
|
17
|
+
return _map
|
|
18
|
+
result = dict()
|
|
19
|
+
if self.ip is not None:
|
|
20
|
+
result['ip'] = self.ip
|
|
21
|
+
if self.resource_type is not None:
|
|
22
|
+
result['resourceType'] = self.resource_type
|
|
23
|
+
return result
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def from_dict(self, m):
|
|
27
|
+
m = m or dict()
|
|
28
|
+
if m.get('ip') is not None:
|
|
29
|
+
self.ip = m.get('ip')
|
|
30
|
+
if m.get('resourceType') is not None:
|
|
31
|
+
self.resource_type = m.get('resourceType')
|
|
32
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
|
|
2
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
3
|
+
|
|
4
|
+
from baiducloud_python_sdk_vpc.models.subnet import Subnet
|
|
5
|
+
|
|
6
|
+
from baiducloud_python_sdk_vpc.models.tag_model import TagModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ShowVpcModel(AbstractModel):
|
|
10
|
+
"""
|
|
11
|
+
ShowVpcModel
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, vpc_id=None, name=None, cidr=None, ipv6_cidr=None, description=None, is_default=None, relay=None, subnets=None, secondary_cidr=None, tags=None):
|
|
14
|
+
super().__init__()
|
|
15
|
+
self.vpc_id = vpc_id
|
|
16
|
+
self.name = name
|
|
17
|
+
self.cidr = cidr
|
|
18
|
+
self.ipv6_cidr = ipv6_cidr
|
|
19
|
+
self.description = description
|
|
20
|
+
self.is_default = is_default
|
|
21
|
+
self.relay = relay
|
|
22
|
+
self.subnets = subnets
|
|
23
|
+
self.secondary_cidr = secondary_cidr
|
|
24
|
+
self.tags = tags
|
|
25
|
+
|
|
26
|
+
def to_dict(self):
|
|
27
|
+
_map = super().to_dict()
|
|
28
|
+
if _map is not None:
|
|
29
|
+
return _map
|
|
30
|
+
result = dict()
|
|
31
|
+
if self.vpc_id is not None:
|
|
32
|
+
result['vpcId'] = self.vpc_id
|
|
33
|
+
if self.name is not None:
|
|
34
|
+
result['name'] = self.name
|
|
35
|
+
if self.cidr is not None:
|
|
36
|
+
result['cidr'] = self.cidr
|
|
37
|
+
if self.ipv6_cidr is not None:
|
|
38
|
+
result['ipv6Cidr'] = self.ipv6_cidr
|
|
39
|
+
if self.description is not None:
|
|
40
|
+
result['description'] = self.description
|
|
41
|
+
if self.is_default is not None:
|
|
42
|
+
result['isDefault'] = self.is_default
|
|
43
|
+
if self.relay is not None:
|
|
44
|
+
result['relay'] = self.relay
|
|
45
|
+
if self.subnets is not None:
|
|
46
|
+
result['subnets'] = [i.to_dict() for i in self.subnets]
|
|
47
|
+
if self.secondary_cidr is not None:
|
|
48
|
+
result['secondaryCidr'] = self.secondary_cidr
|
|
49
|
+
if self.tags is not None:
|
|
50
|
+
result['tags'] = [i.to_dict() for i in self.tags]
|
|
51
|
+
return result
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def from_dict(self, m):
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('vpcId') is not None:
|
|
57
|
+
self.vpc_id = m.get('vpcId')
|
|
58
|
+
if m.get('name') is not None:
|
|
59
|
+
self.name = m.get('name')
|
|
60
|
+
if m.get('cidr') is not None:
|
|
61
|
+
self.cidr = m.get('cidr')
|
|
62
|
+
if m.get('ipv6Cidr') is not None:
|
|
63
|
+
self.ipv6_cidr = m.get('ipv6Cidr')
|
|
64
|
+
if m.get('description') is not None:
|
|
65
|
+
self.description = m.get('description')
|
|
66
|
+
if m.get('isDefault') is not None:
|
|
67
|
+
self.is_default = m.get('isDefault')
|
|
68
|
+
if m.get('relay') is not None:
|
|
69
|
+
self.relay = m.get('relay')
|
|
70
|
+
if m.get('subnets') is not None:
|
|
71
|
+
self.subnets = [
|
|
72
|
+
Subnet().from_dict(i)
|
|
73
|
+
for i in m.get('subnets')
|
|
74
|
+
]
|
|
75
|
+
if m.get('secondaryCidr') is not None:
|
|
76
|
+
self.secondary_cidr = m.get('secondaryCidr')
|
|
77
|
+
if m.get('tags') is not None:
|
|
78
|
+
self.tags = [
|
|
79
|
+
TagModel().from_dict(i)
|
|
80
|
+
for i in m.get('tags')
|
|
81
|
+
]
|
|
82
|
+
return self
|