baiducloud-python-sdk-bcc 0.0.1__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_bcc/__init__.py +5 -0
- baiducloud_python_sdk_bcc/api/__init__.py +0 -0
- baiducloud_python_sdk_bcc/api/bcc_client.py +554 -0
- baiducloud_python_sdk_bcc/models/__init__.py +44 -0
- baiducloud_python_sdk_bcc/models/attach_volume_request.py +82 -0
- baiducloud_python_sdk_bcc/models/attach_volume_response.py +70 -0
- baiducloud_python_sdk_bcc/models/auto_snapshot_policy_info.py +98 -0
- baiducloud_python_sdk_bcc/models/auto_snapshot_policy_model.py +151 -0
- baiducloud_python_sdk_bcc/models/billing.py +68 -0
- baiducloud_python_sdk_bcc/models/bind_tag_volume_request.py +67 -0
- baiducloud_python_sdk_bcc/models/cds_prices.py +90 -0
- baiducloud_python_sdk_bcc/models/create_volume_request.py +264 -0
- baiducloud_python_sdk_bcc/models/create_volume_response.py +77 -0
- baiducloud_python_sdk_bcc/models/detach_volume_request.py +66 -0
- baiducloud_python_sdk_bcc/models/disk_info.py +74 -0
- baiducloud_python_sdk_bcc/models/get_cds_price_request.py +117 -0
- baiducloud_python_sdk_bcc/models/get_cds_price_response.py +62 -0
- baiducloud_python_sdk_bcc/models/get_disk_quota_request.py +58 -0
- baiducloud_python_sdk_bcc/models/get_disk_quota_response.py +78 -0
- baiducloud_python_sdk_bcc/models/get_volume_request.py +58 -0
- baiducloud_python_sdk_bcc/models/get_volume_resize_progress_request.py +58 -0
- baiducloud_python_sdk_bcc/models/get_volume_resize_progress_response.py +61 -0
- baiducloud_python_sdk_bcc/models/get_volume_response.py +62 -0
- baiducloud_python_sdk_bcc/models/group_info.py +66 -0
- baiducloud_python_sdk_bcc/models/list_volumes_request.py +117 -0
- baiducloud_python_sdk_bcc/models/list_volumes_response.py +94 -0
- baiducloud_python_sdk_bcc/models/modify_cds_attribute_request.py +90 -0
- baiducloud_python_sdk_bcc/models/modify_volume_charge_type_request.py +75 -0
- baiducloud_python_sdk_bcc/models/purchase_reserved_volume_request.py +75 -0
- baiducloud_python_sdk_bcc/models/purchase_reserved_volume_response.py +61 -0
- baiducloud_python_sdk_bcc/models/release_volume_request.py +90 -0
- baiducloud_python_sdk_bcc/models/rename_volume_request.py +66 -0
- baiducloud_python_sdk_bcc/models/reservation.py +66 -0
- baiducloud_python_sdk_bcc/models/resize_volume_request.py +82 -0
- baiducloud_python_sdk_bcc/models/resize_volume_response.py +61 -0
- baiducloud_python_sdk_bcc/models/rollback_volume_request.py +66 -0
- baiducloud_python_sdk_bcc/models/storage_type.py +53 -0
- baiducloud_python_sdk_bcc/models/tag_model.py +66 -0
- baiducloud_python_sdk_bcc/models/unbind_tag_volume_request.py +67 -0
- baiducloud_python_sdk_bcc/models/volume_attachment_model.py +82 -0
- baiducloud_python_sdk_bcc/models/volume_model.py +417 -0
- baiducloud_python_sdk_bcc/models/volume_multi_attach_info.py +82 -0
- baiducloud_python_sdk_bcc/models/volume_status.py +45 -0
- baiducloud_python_sdk_bcc/models/volume_type.py +20 -0
- baiducloud_python_sdk_bcc-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_bcc-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_bcc-0.0.1.dist-info/RECORD +49 -0
- baiducloud_python_sdk_bcc-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_bcc-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ModifyCdsAttributeRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ModifyCdsAttributeRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ModifyCdsAttributeRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, volume_id, cds_name=None, desc=None, delete_with_instance=None, delete_auto_snapshot=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ModifyCdsAttributeRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param volume_id: volume_id parameter
|
|
20
|
+
:type volume_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param cds_name: 磁盘新的名称,支持大小写字母、数字、中文以及-_ /.特殊字符,必须以字母开头,长度1-65
|
|
23
|
+
:type cds_name: str (optional)
|
|
24
|
+
|
|
25
|
+
:param desc: desc parameter
|
|
26
|
+
:type desc: str (optional)
|
|
27
|
+
|
|
28
|
+
:param delete_with_instance: delete_with_instance parameter
|
|
29
|
+
:type delete_with_instance: bool (optional)
|
|
30
|
+
|
|
31
|
+
:param delete_auto_snapshot: delete_auto_snapshot parameter
|
|
32
|
+
:type delete_auto_snapshot: bool (optional)
|
|
33
|
+
"""
|
|
34
|
+
super().__init__()
|
|
35
|
+
self.volume_id = volume_id
|
|
36
|
+
self.cds_name = cds_name
|
|
37
|
+
self.desc = desc
|
|
38
|
+
self.delete_with_instance = delete_with_instance
|
|
39
|
+
self.delete_auto_snapshot = delete_auto_snapshot
|
|
40
|
+
|
|
41
|
+
def to_dict(self):
|
|
42
|
+
"""
|
|
43
|
+
Convert the request entity to a dictionary representation.
|
|
44
|
+
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the request
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
if self.cds_name is not None:
|
|
55
|
+
result['cdsName'] = self.cds_name
|
|
56
|
+
if self.desc is not None:
|
|
57
|
+
result['desc'] = self.desc
|
|
58
|
+
if self.delete_with_instance is not None:
|
|
59
|
+
result['deleteWithInstance'] = self.delete_with_instance
|
|
60
|
+
if self.delete_auto_snapshot is not None:
|
|
61
|
+
result['deleteAutoSnapshot'] = self.delete_auto_snapshot
|
|
62
|
+
return result
|
|
63
|
+
|
|
64
|
+
def from_dict(self, m):
|
|
65
|
+
"""
|
|
66
|
+
Populate the request entity from a dictionary.
|
|
67
|
+
|
|
68
|
+
Nested dictionaries are recursively converted to model objects.
|
|
69
|
+
|
|
70
|
+
:param m: Dictionary containing request data
|
|
71
|
+
:type m: dict
|
|
72
|
+
|
|
73
|
+
:return: Self reference for method chaining
|
|
74
|
+
:rtype: ModifyCdsAttributeRequest
|
|
75
|
+
|
|
76
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
77
|
+
:raises ValueError: If nested model conversion fails
|
|
78
|
+
"""
|
|
79
|
+
m = m or dict()
|
|
80
|
+
if m.get('volumeId') is not None:
|
|
81
|
+
self.volume_id = m.get('volumeId')
|
|
82
|
+
if m.get('cdsName') is not None:
|
|
83
|
+
self.cds_name = m.get('cdsName')
|
|
84
|
+
if m.get('desc') is not None:
|
|
85
|
+
self.desc = m.get('desc')
|
|
86
|
+
if m.get('deleteWithInstance') is not None:
|
|
87
|
+
self.delete_with_instance = m.get('deleteWithInstance')
|
|
88
|
+
if m.get('deleteAutoSnapshot') is not None:
|
|
89
|
+
self.delete_auto_snapshot = m.get('deleteAutoSnapshot')
|
|
90
|
+
return self
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ModifyVolumeChargeTypeRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
from baiducloud_python_sdk_bcc.models.billing import Billing
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ModifyVolumeChargeTypeRequest(AbstractModel):
|
|
10
|
+
"""
|
|
11
|
+
Request entity for ModifyVolumeChargeTypeRequest operation.
|
|
12
|
+
|
|
13
|
+
This class encapsulates all parameters for the API request.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def __init__(self, volume_id, billing=None, effective_type=None):
|
|
17
|
+
"""
|
|
18
|
+
Initialize ModifyVolumeChargeTypeRequest request entity.
|
|
19
|
+
|
|
20
|
+
:param volume_id: volume_id parameter
|
|
21
|
+
:type volume_id: str (required)
|
|
22
|
+
|
|
23
|
+
:param billing: billing parameter
|
|
24
|
+
:type billing: Billing (optional)
|
|
25
|
+
|
|
26
|
+
:param effective_type: effective_type parameter
|
|
27
|
+
:type effective_type: str (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.volume_id = volume_id
|
|
31
|
+
self.billing = billing
|
|
32
|
+
self.effective_type = effective_type
|
|
33
|
+
|
|
34
|
+
def to_dict(self):
|
|
35
|
+
"""
|
|
36
|
+
Convert the request entity to a dictionary representation.
|
|
37
|
+
|
|
38
|
+
Nested model objects are recursively converted to dictionaries.
|
|
39
|
+
|
|
40
|
+
:return: Dictionary representation of the request
|
|
41
|
+
:rtype: dict
|
|
42
|
+
"""
|
|
43
|
+
_map = super().to_dict()
|
|
44
|
+
if _map is not None:
|
|
45
|
+
return _map
|
|
46
|
+
result = dict()
|
|
47
|
+
if self.billing is not None:
|
|
48
|
+
result['billing'] = self.billing.to_dict()
|
|
49
|
+
if self.effective_type is not None:
|
|
50
|
+
result['effectiveType'] = self.effective_type
|
|
51
|
+
return result
|
|
52
|
+
|
|
53
|
+
def from_dict(self, m):
|
|
54
|
+
"""
|
|
55
|
+
Populate the request entity from a dictionary.
|
|
56
|
+
|
|
57
|
+
Nested dictionaries are recursively converted to model objects.
|
|
58
|
+
|
|
59
|
+
:param m: Dictionary containing request data
|
|
60
|
+
:type m: dict
|
|
61
|
+
|
|
62
|
+
:return: Self reference for method chaining
|
|
63
|
+
:rtype: ModifyVolumeChargeTypeRequest
|
|
64
|
+
|
|
65
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
66
|
+
:raises ValueError: If nested model conversion fails
|
|
67
|
+
"""
|
|
68
|
+
m = m or dict()
|
|
69
|
+
if m.get('volumeId') is not None:
|
|
70
|
+
self.volume_id = m.get('volumeId')
|
|
71
|
+
if m.get('billing') is not None:
|
|
72
|
+
self.billing = Billing().from_dict(m.get('billing'))
|
|
73
|
+
if m.get('effectiveType') is not None:
|
|
74
|
+
self.effective_type = m.get('effectiveType')
|
|
75
|
+
return self
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for PurchaseReservedVolumeRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
from baiducloud_python_sdk_bcc.models.billing import Billing
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PurchaseReservedVolumeRequest(AbstractModel):
|
|
10
|
+
"""
|
|
11
|
+
Request entity for PurchaseReservedVolumeRequest operation.
|
|
12
|
+
|
|
13
|
+
This class encapsulates all parameters for the API request.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def __init__(self, volume_id, billing, instance_id=None):
|
|
17
|
+
"""
|
|
18
|
+
Initialize PurchaseReservedVolumeRequest request entity.
|
|
19
|
+
|
|
20
|
+
:param volume_id: volume_id parameter
|
|
21
|
+
:type volume_id: str (required)
|
|
22
|
+
|
|
23
|
+
:param billing: billing parameter
|
|
24
|
+
:type billing: Billing (required)
|
|
25
|
+
|
|
26
|
+
:param instance_id: 未挂载磁盘预期挂载到的预付费BCC实例ID,磁盘未挂载状态下必传,已挂载状态下可不传或传当前挂载的实例ID
|
|
27
|
+
:type instance_id: str (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.volume_id = volume_id
|
|
31
|
+
self.billing = billing
|
|
32
|
+
self.instance_id = instance_id
|
|
33
|
+
|
|
34
|
+
def to_dict(self):
|
|
35
|
+
"""
|
|
36
|
+
Convert the request entity to a dictionary representation.
|
|
37
|
+
|
|
38
|
+
Nested model objects are recursively converted to dictionaries.
|
|
39
|
+
|
|
40
|
+
:return: Dictionary representation of the request
|
|
41
|
+
:rtype: dict
|
|
42
|
+
"""
|
|
43
|
+
_map = super().to_dict()
|
|
44
|
+
if _map is not None:
|
|
45
|
+
return _map
|
|
46
|
+
result = dict()
|
|
47
|
+
if self.billing is not None:
|
|
48
|
+
result['billing'] = self.billing.to_dict()
|
|
49
|
+
if self.instance_id is not None:
|
|
50
|
+
result['instanceId'] = self.instance_id
|
|
51
|
+
return result
|
|
52
|
+
|
|
53
|
+
def from_dict(self, m):
|
|
54
|
+
"""
|
|
55
|
+
Populate the request entity from a dictionary.
|
|
56
|
+
|
|
57
|
+
Nested dictionaries are recursively converted to model objects.
|
|
58
|
+
|
|
59
|
+
:param m: Dictionary containing request data
|
|
60
|
+
:type m: dict
|
|
61
|
+
|
|
62
|
+
:return: Self reference for method chaining
|
|
63
|
+
:rtype: PurchaseReservedVolumeRequest
|
|
64
|
+
|
|
65
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
66
|
+
:raises ValueError: If nested model conversion fails
|
|
67
|
+
"""
|
|
68
|
+
m = m or dict()
|
|
69
|
+
if m.get('volumeId') is not None:
|
|
70
|
+
self.volume_id = m.get('volumeId')
|
|
71
|
+
if m.get('billing') is not None:
|
|
72
|
+
self.billing = Billing().from_dict(m.get('billing'))
|
|
73
|
+
if m.get('instanceId') is not None:
|
|
74
|
+
self.instance_id = m.get('instanceId')
|
|
75
|
+
return self
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for PurchaseReservedVolumeResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PurchaseReservedVolumeResponse(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
PurchaseReservedVolumeResponse
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, order_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize PurchaseReservedVolumeResponse response.
|
|
16
|
+
|
|
17
|
+
:param order_id: 订单ID
|
|
18
|
+
:type order_id: str (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.order_id = order_id
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
"""
|
|
25
|
+
Convert the response instance to a dictionary representation.
|
|
26
|
+
|
|
27
|
+
Includes metadata from the parent BceResponse class.
|
|
28
|
+
Nested model objects are recursively converted to dictionaries.
|
|
29
|
+
|
|
30
|
+
:return: Dictionary representation of the response
|
|
31
|
+
:rtype: dict
|
|
32
|
+
"""
|
|
33
|
+
_map = super().to_dict()
|
|
34
|
+
if _map is not None:
|
|
35
|
+
return _map
|
|
36
|
+
result = dict()
|
|
37
|
+
if self.metadata is not None:
|
|
38
|
+
result['metadata'] = dict(self.metadata)
|
|
39
|
+
if self.order_id is not None:
|
|
40
|
+
result['orderId'] = self.order_id
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def from_dict(self, m):
|
|
44
|
+
"""
|
|
45
|
+
Populate the response instance from a dictionary.
|
|
46
|
+
|
|
47
|
+
Nested dictionaries are recursively converted to model objects.
|
|
48
|
+
|
|
49
|
+
:param m: Dictionary containing response data
|
|
50
|
+
:type m: dict
|
|
51
|
+
|
|
52
|
+
:return: Self reference for method chaining
|
|
53
|
+
:rtype: PurchaseReservedVolumeResponse
|
|
54
|
+
|
|
55
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
56
|
+
:raises ValueError: If nested model conversion fails
|
|
57
|
+
"""
|
|
58
|
+
m = m or dict()
|
|
59
|
+
if m.get('orderId') is not None:
|
|
60
|
+
self.order_id = m.get('orderId')
|
|
61
|
+
return self
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ReleaseVolumeRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ReleaseVolumeRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ReleaseVolumeRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, volume_id, auto_snapshot=None, manual_snapshot=None, cds_attribute_active=None, recycle=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ReleaseVolumeRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param volume_id: volume_id parameter
|
|
20
|
+
:type volume_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param auto_snapshot: 取值为\"on\"时,会删除磁盘关联的自动快照
|
|
23
|
+
:type auto_snapshot: str (optional)
|
|
24
|
+
|
|
25
|
+
:param manual_snapshot: 取值为\"on\"时,会删除磁盘关联的手动快照
|
|
26
|
+
:type manual_snapshot: str (optional)
|
|
27
|
+
|
|
28
|
+
:param cds_attribute_active: cds_attribute_active parameter
|
|
29
|
+
:type cds_attribute_active: bool (optional)
|
|
30
|
+
|
|
31
|
+
:param recycle: 取值为\"on\"时,数据盘进入回收站,取值为\"off\"时,立即删除。默认为\"on\"。
|
|
32
|
+
:type recycle: str (optional)
|
|
33
|
+
"""
|
|
34
|
+
super().__init__()
|
|
35
|
+
self.volume_id = volume_id
|
|
36
|
+
self.auto_snapshot = auto_snapshot
|
|
37
|
+
self.manual_snapshot = manual_snapshot
|
|
38
|
+
self.cds_attribute_active = cds_attribute_active
|
|
39
|
+
self.recycle = recycle
|
|
40
|
+
|
|
41
|
+
def to_dict(self):
|
|
42
|
+
"""
|
|
43
|
+
Convert the request entity to a dictionary representation.
|
|
44
|
+
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the request
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
if self.auto_snapshot is not None:
|
|
55
|
+
result['autoSnapshot'] = self.auto_snapshot
|
|
56
|
+
if self.manual_snapshot is not None:
|
|
57
|
+
result['manualSnapshot'] = self.manual_snapshot
|
|
58
|
+
if self.cds_attribute_active is not None:
|
|
59
|
+
result['cdsAttributeActive'] = self.cds_attribute_active
|
|
60
|
+
if self.recycle is not None:
|
|
61
|
+
result['recycle'] = self.recycle
|
|
62
|
+
return result
|
|
63
|
+
|
|
64
|
+
def from_dict(self, m):
|
|
65
|
+
"""
|
|
66
|
+
Populate the request entity from a dictionary.
|
|
67
|
+
|
|
68
|
+
Nested dictionaries are recursively converted to model objects.
|
|
69
|
+
|
|
70
|
+
:param m: Dictionary containing request data
|
|
71
|
+
:type m: dict
|
|
72
|
+
|
|
73
|
+
:return: Self reference for method chaining
|
|
74
|
+
:rtype: ReleaseVolumeRequest
|
|
75
|
+
|
|
76
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
77
|
+
:raises ValueError: If nested model conversion fails
|
|
78
|
+
"""
|
|
79
|
+
m = m or dict()
|
|
80
|
+
if m.get('volumeId') is not None:
|
|
81
|
+
self.volume_id = m.get('volumeId')
|
|
82
|
+
if m.get('autoSnapshot') is not None:
|
|
83
|
+
self.auto_snapshot = m.get('autoSnapshot')
|
|
84
|
+
if m.get('manualSnapshot') is not None:
|
|
85
|
+
self.manual_snapshot = m.get('manualSnapshot')
|
|
86
|
+
if m.get('cdsAttributeActive') is not None:
|
|
87
|
+
self.cds_attribute_active = m.get('cdsAttributeActive')
|
|
88
|
+
if m.get('recycle') is not None:
|
|
89
|
+
self.recycle = m.get('recycle')
|
|
90
|
+
return self
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for RenameVolumeRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RenameVolumeRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for RenameVolumeRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, volume_id, name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize RenameVolumeRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param volume_id: volume_id parameter
|
|
20
|
+
:type volume_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param name: 磁盘新的名称,支持大小写字母、数字、中文以及-_ /.特殊字符,必须以字母开头,长度1-65
|
|
23
|
+
:type name: str (required)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.volume_id = volume_id
|
|
27
|
+
self.name = name
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the request entity to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the request
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
if self.name is not None:
|
|
43
|
+
result['name'] = self.name
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the request entity from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing request data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: RenameVolumeRequest
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('volumeId') is not None:
|
|
63
|
+
self.volume_id = m.get('volumeId')
|
|
64
|
+
if m.get('name') is not None:
|
|
65
|
+
self.name = m.get('name')
|
|
66
|
+
return self
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Reservation information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Reservation(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Reservation
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, reservation_length=None, reservation_time_unit=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize Reservation instance.
|
|
16
|
+
|
|
17
|
+
:param reservation_length: 时长,[1,2,3,4,5,6,7,8,9,12,24,36](创建实例、创建抢占实例、实例续费)
|
|
18
|
+
:type reservation_length: int (optional)
|
|
19
|
+
|
|
20
|
+
:param reservation_time_unit: 时间单位,Month,当前仅支持按月(创建实例、实例续费)
|
|
21
|
+
:type reservation_time_unit: str (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.reservation_length = reservation_length
|
|
25
|
+
self.reservation_time_unit = reservation_time_unit
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the model instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Nested model objects are recursively converted to dictionaries.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.reservation_length is not None:
|
|
41
|
+
result['reservationLength'] = self.reservation_length
|
|
42
|
+
if self.reservation_time_unit is not None:
|
|
43
|
+
result['reservationTimeUnit'] = self.reservation_time_unit
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: Reservation
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('reservationLength') is not None:
|
|
63
|
+
self.reservation_length = m.get('reservationLength')
|
|
64
|
+
if m.get('reservationTimeUnit') is not None:
|
|
65
|
+
self.reservation_time_unit = m.get('reservationTimeUnit')
|
|
66
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ResizeVolumeRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ResizeVolumeRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ResizeVolumeRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, volume_id, new_cds_size_in_gb=None, new_extra_io=None, new_volume_type=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ResizeVolumeRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param volume_id: volume_id parameter
|
|
20
|
+
:type volume_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param new_cds_size_in_gb: 新扩容CDS磁盘的容量大小,必须为大于当前CDS容量的整数,单位为GB,大小为0~32765GB的正整数。
|
|
23
|
+
:type new_cds_size_in_gb: int (optional)
|
|
24
|
+
|
|
25
|
+
:param new_extra_io: new_extra_io parameter
|
|
26
|
+
:type new_extra_io: int (optional)
|
|
27
|
+
|
|
28
|
+
:param new_volume_type: CDS支持对预付费和后付费云磁盘进行升配和降配。newVolumeType和newCdsSizeInGB不允许同时为空。
|
|
29
|
+
:type new_volume_type: str (optional)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.volume_id = volume_id
|
|
33
|
+
self.new_cds_size_in_gb = new_cds_size_in_gb
|
|
34
|
+
self.new_extra_io = new_extra_io
|
|
35
|
+
self.new_volume_type = new_volume_type
|
|
36
|
+
|
|
37
|
+
def to_dict(self):
|
|
38
|
+
"""
|
|
39
|
+
Convert the request entity to a dictionary representation.
|
|
40
|
+
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the request
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
if self.new_cds_size_in_gb is not None:
|
|
51
|
+
result['newCdsSizeInGB'] = self.new_cds_size_in_gb
|
|
52
|
+
if self.new_extra_io is not None:
|
|
53
|
+
result['newExtraIO'] = self.new_extra_io
|
|
54
|
+
if self.new_volume_type is not None:
|
|
55
|
+
result['newVolumeType'] = self.new_volume_type
|
|
56
|
+
return result
|
|
57
|
+
|
|
58
|
+
def from_dict(self, m):
|
|
59
|
+
"""
|
|
60
|
+
Populate the request entity from a dictionary.
|
|
61
|
+
|
|
62
|
+
Nested dictionaries are recursively converted to model objects.
|
|
63
|
+
|
|
64
|
+
:param m: Dictionary containing request data
|
|
65
|
+
:type m: dict
|
|
66
|
+
|
|
67
|
+
:return: Self reference for method chaining
|
|
68
|
+
:rtype: ResizeVolumeRequest
|
|
69
|
+
|
|
70
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
71
|
+
:raises ValueError: If nested model conversion fails
|
|
72
|
+
"""
|
|
73
|
+
m = m or dict()
|
|
74
|
+
if m.get('volumeId') is not None:
|
|
75
|
+
self.volume_id = m.get('volumeId')
|
|
76
|
+
if m.get('newCdsSizeInGB') is not None:
|
|
77
|
+
self.new_cds_size_in_gb = m.get('newCdsSizeInGB')
|
|
78
|
+
if m.get('newExtraIO') is not None:
|
|
79
|
+
self.new_extra_io = m.get('newExtraIO')
|
|
80
|
+
if m.get('newVolumeType') is not None:
|
|
81
|
+
self.new_volume_type = m.get('newVolumeType')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ResizeVolumeResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ResizeVolumeResponse(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
ResizeVolumeResponse
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, warning_list=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize ResizeVolumeResponse response.
|
|
16
|
+
|
|
17
|
+
:param warning_list: 磁盘扩容变更产生的warning信息
|
|
18
|
+
:type warning_list: List[str] (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.warning_list = warning_list
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
"""
|
|
25
|
+
Convert the response instance to a dictionary representation.
|
|
26
|
+
|
|
27
|
+
Includes metadata from the parent BceResponse class.
|
|
28
|
+
Nested model objects are recursively converted to dictionaries.
|
|
29
|
+
|
|
30
|
+
:return: Dictionary representation of the response
|
|
31
|
+
:rtype: dict
|
|
32
|
+
"""
|
|
33
|
+
_map = super().to_dict()
|
|
34
|
+
if _map is not None:
|
|
35
|
+
return _map
|
|
36
|
+
result = dict()
|
|
37
|
+
if self.metadata is not None:
|
|
38
|
+
result['metadata'] = dict(self.metadata)
|
|
39
|
+
if self.warning_list is not None:
|
|
40
|
+
result['warningList'] = self.warning_list
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def from_dict(self, m):
|
|
44
|
+
"""
|
|
45
|
+
Populate the response instance from a dictionary.
|
|
46
|
+
|
|
47
|
+
Nested dictionaries are recursively converted to model objects.
|
|
48
|
+
|
|
49
|
+
:param m: Dictionary containing response data
|
|
50
|
+
:type m: dict
|
|
51
|
+
|
|
52
|
+
:return: Self reference for method chaining
|
|
53
|
+
:rtype: ResizeVolumeResponse
|
|
54
|
+
|
|
55
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
56
|
+
:raises ValueError: If nested model conversion fails
|
|
57
|
+
"""
|
|
58
|
+
m = m or dict()
|
|
59
|
+
if m.get('warningList') is not None:
|
|
60
|
+
self.warning_list = m.get('warningList')
|
|
61
|
+
return self
|