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.
Files changed (49) hide show
  1. baiducloud_python_sdk_bcc/__init__.py +5 -0
  2. baiducloud_python_sdk_bcc/api/__init__.py +0 -0
  3. baiducloud_python_sdk_bcc/api/bcc_client.py +554 -0
  4. baiducloud_python_sdk_bcc/models/__init__.py +44 -0
  5. baiducloud_python_sdk_bcc/models/attach_volume_request.py +82 -0
  6. baiducloud_python_sdk_bcc/models/attach_volume_response.py +70 -0
  7. baiducloud_python_sdk_bcc/models/auto_snapshot_policy_info.py +98 -0
  8. baiducloud_python_sdk_bcc/models/auto_snapshot_policy_model.py +151 -0
  9. baiducloud_python_sdk_bcc/models/billing.py +68 -0
  10. baiducloud_python_sdk_bcc/models/bind_tag_volume_request.py +67 -0
  11. baiducloud_python_sdk_bcc/models/cds_prices.py +90 -0
  12. baiducloud_python_sdk_bcc/models/create_volume_request.py +264 -0
  13. baiducloud_python_sdk_bcc/models/create_volume_response.py +77 -0
  14. baiducloud_python_sdk_bcc/models/detach_volume_request.py +66 -0
  15. baiducloud_python_sdk_bcc/models/disk_info.py +74 -0
  16. baiducloud_python_sdk_bcc/models/get_cds_price_request.py +117 -0
  17. baiducloud_python_sdk_bcc/models/get_cds_price_response.py +62 -0
  18. baiducloud_python_sdk_bcc/models/get_disk_quota_request.py +58 -0
  19. baiducloud_python_sdk_bcc/models/get_disk_quota_response.py +78 -0
  20. baiducloud_python_sdk_bcc/models/get_volume_request.py +58 -0
  21. baiducloud_python_sdk_bcc/models/get_volume_resize_progress_request.py +58 -0
  22. baiducloud_python_sdk_bcc/models/get_volume_resize_progress_response.py +61 -0
  23. baiducloud_python_sdk_bcc/models/get_volume_response.py +62 -0
  24. baiducloud_python_sdk_bcc/models/group_info.py +66 -0
  25. baiducloud_python_sdk_bcc/models/list_volumes_request.py +117 -0
  26. baiducloud_python_sdk_bcc/models/list_volumes_response.py +94 -0
  27. baiducloud_python_sdk_bcc/models/modify_cds_attribute_request.py +90 -0
  28. baiducloud_python_sdk_bcc/models/modify_volume_charge_type_request.py +75 -0
  29. baiducloud_python_sdk_bcc/models/purchase_reserved_volume_request.py +75 -0
  30. baiducloud_python_sdk_bcc/models/purchase_reserved_volume_response.py +61 -0
  31. baiducloud_python_sdk_bcc/models/release_volume_request.py +90 -0
  32. baiducloud_python_sdk_bcc/models/rename_volume_request.py +66 -0
  33. baiducloud_python_sdk_bcc/models/reservation.py +66 -0
  34. baiducloud_python_sdk_bcc/models/resize_volume_request.py +82 -0
  35. baiducloud_python_sdk_bcc/models/resize_volume_response.py +61 -0
  36. baiducloud_python_sdk_bcc/models/rollback_volume_request.py +66 -0
  37. baiducloud_python_sdk_bcc/models/storage_type.py +53 -0
  38. baiducloud_python_sdk_bcc/models/tag_model.py +66 -0
  39. baiducloud_python_sdk_bcc/models/unbind_tag_volume_request.py +67 -0
  40. baiducloud_python_sdk_bcc/models/volume_attachment_model.py +82 -0
  41. baiducloud_python_sdk_bcc/models/volume_model.py +417 -0
  42. baiducloud_python_sdk_bcc/models/volume_multi_attach_info.py +82 -0
  43. baiducloud_python_sdk_bcc/models/volume_status.py +45 -0
  44. baiducloud_python_sdk_bcc/models/volume_type.py +20 -0
  45. baiducloud_python_sdk_bcc-0.0.1.dist-info/LICENSE +177 -0
  46. baiducloud_python_sdk_bcc-0.0.1.dist-info/METADATA +76 -0
  47. baiducloud_python_sdk_bcc-0.0.1.dist-info/RECORD +49 -0
  48. baiducloud_python_sdk_bcc-0.0.1.dist-info/WHEEL +5 -0
  49. baiducloud_python_sdk_bcc-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,66 @@
1
+ """
2
+ Request entity for RollbackVolumeRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class RollbackVolumeRequest(AbstractModel):
9
+ """
10
+ Request entity for RollbackVolumeRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, volume_id, snapshot_id):
16
+ """
17
+ Initialize RollbackVolumeRequest request entity.
18
+
19
+ :param volume_id: volume_id parameter
20
+ :type volume_id: str (required)
21
+
22
+ :param snapshot_id: 用于回滚指定磁盘的快照ID,必须为 volumeId 所创建的快照
23
+ :type snapshot_id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.volume_id = volume_id
27
+ self.snapshot_id = snapshot_id
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.snapshot_id is not None:
43
+ result['snapshotId'] = self.snapshot_id
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: RollbackVolumeRequest
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('snapshotId') is not None:
65
+ self.snapshot_id = m.get('snapshotId')
66
+ return self
@@ -0,0 +1,53 @@
1
+ """
2
+ StorageType information
3
+ """
4
+
5
+
6
+ class StorageType:
7
+ """
8
+ Enum class for StorageType
9
+ """
10
+
11
+ ENHANCED_SSD_PL0 = 'enhanced_ssd_pl0'
12
+ ENHANCED_SSD_PL1 = 'enhanced_ssd_pl1'
13
+ SSD_ENHANCED = 'SSD_Enhanced'
14
+ ENHANCED_SSD_PL2 = 'enhanced_ssd_pl2'
15
+ ENHANCED_SSD_PL3 = 'enhanced_ssd_pl3'
16
+ CLOUD_HP1 = 'cloud_hp1'
17
+ PREMIUM_SSD = 'premium_ssd'
18
+ HP1 = 'hp1'
19
+ SSD = 'ssd'
20
+ HDD = 'hdd'
21
+ ELASTIC_EPHEMERAL_DISK = 'elastic_ephemeral_disk'
22
+ LOCAL = 'local'
23
+ SATA = 'sata'
24
+ LOCAL_SSD = 'local_ssd'
25
+ LOCAL_HDD = 'local_hdd'
26
+ STD1 = 'std1'
27
+ LOCAL_NVME = 'local_nvme'
28
+ NVME = 'nvme'
29
+
30
+ @staticmethod
31
+ def is_valid(value):
32
+ """Check if the value is valid for this enum"""
33
+ valid_values = [
34
+ 'enhanced_ssd_pl0',
35
+ 'enhanced_ssd_pl1',
36
+ 'SSD_Enhanced',
37
+ 'enhanced_ssd_pl2',
38
+ 'enhanced_ssd_pl3',
39
+ 'cloud_hp1',
40
+ 'premium_ssd',
41
+ 'hp1',
42
+ 'ssd',
43
+ 'hdd',
44
+ 'elastic_ephemeral_disk',
45
+ 'local',
46
+ 'sata',
47
+ 'local_ssd',
48
+ 'local_hdd',
49
+ 'std1',
50
+ 'local_nvme',
51
+ 'nvme',
52
+ ]
53
+ return value in valid_values
@@ -0,0 +1,66 @@
1
+ """
2
+ TagModel information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class TagModel(AbstractModel):
9
+ """
10
+ TagModel
11
+ """
12
+
13
+ def __init__(self, tag_key=None, tag_value=None):
14
+ """
15
+ Initialize TagModel instance.
16
+
17
+ :param tag_key: 标签键
18
+ :type tag_key: str (optional)
19
+
20
+ :param tag_value: 标签值
21
+ :type tag_value: str (optional)
22
+ """
23
+ super().__init__()
24
+ self.tag_key = tag_key
25
+ self.tag_value = tag_value
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.tag_key is not None:
41
+ result['tagKey'] = self.tag_key
42
+ if self.tag_value is not None:
43
+ result['tagValue'] = self.tag_value
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: TagModel
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('tagKey') is not None:
63
+ self.tag_key = m.get('tagKey')
64
+ if m.get('tagValue') is not None:
65
+ self.tag_value = m.get('tagValue')
66
+ return self
@@ -0,0 +1,67 @@
1
+ """
2
+ Request entity for UnbindTagVolumeRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_bcc.models.tag_model import TagModel
7
+
8
+
9
+ class UnbindTagVolumeRequest(AbstractModel):
10
+ """
11
+ Request entity for UnbindTagVolumeRequest operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(self, volume_id, change_tags):
17
+ """
18
+ Initialize UnbindTagVolumeRequest request entity.
19
+
20
+ :param volume_id: volume_id parameter
21
+ :type volume_id: str (required)
22
+
23
+ :param change_tags: 待解绑的标签列表
24
+ :type change_tags: List[TagModel] (required)
25
+ """
26
+ super().__init__()
27
+ self.volume_id = volume_id
28
+ self.change_tags = change_tags
29
+
30
+ def to_dict(self):
31
+ """
32
+ Convert the request entity to a dictionary representation.
33
+
34
+ Nested model objects are recursively converted to dictionaries.
35
+
36
+ :return: Dictionary representation of the request
37
+ :rtype: dict
38
+ """
39
+ _map = super().to_dict()
40
+ if _map is not None:
41
+ return _map
42
+ result = dict()
43
+ if self.change_tags is not None:
44
+ result['changeTags'] = [i.to_dict() for i in self.change_tags]
45
+ return result
46
+
47
+ def from_dict(self, m):
48
+ """
49
+ Populate the request entity from a dictionary.
50
+
51
+ Nested dictionaries are recursively converted to model objects.
52
+
53
+ :param m: Dictionary containing request data
54
+ :type m: dict
55
+
56
+ :return: Self reference for method chaining
57
+ :rtype: UnbindTagVolumeRequest
58
+
59
+ :raises TypeError: If input is not a dictionary or field type mismatch
60
+ :raises ValueError: If nested model conversion fails
61
+ """
62
+ m = m or dict()
63
+ if m.get('volumeId') is not None:
64
+ self.volume_id = m.get('volumeId')
65
+ if m.get('changeTags') is not None:
66
+ self.change_tags = [TagModel().from_dict(i) for i in m.get('changeTags')]
67
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ VolumeAttachmentModel information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class VolumeAttachmentModel(AbstractModel):
9
+ """
10
+ VolumeAttachmentModel
11
+ """
12
+
13
+ def __init__(self, volume_id=None, serial=None, instance_id=None, device=None):
14
+ """
15
+ Initialize VolumeAttachmentModel instance.
16
+
17
+ :param volume_id: 磁盘ID
18
+ :type volume_id: str (optional)
19
+
20
+ :param serial: 磁盘序列号
21
+ :type serial: str (optional)
22
+
23
+ :param instance_id: 实例ID
24
+ :type instance_id: str (optional)
25
+
26
+ :param device: 挂载设备路径(该参数即将停止使用,为提高代码的兼容性,建议您尽量不要使用该参数)
27
+ :type device: str (optional)
28
+ """
29
+ super().__init__()
30
+ self.volume_id = volume_id
31
+ self.serial = serial
32
+ self.instance_id = instance_id
33
+ self.device = device
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
40
+
41
+ :return: Dictionary representation of the model
42
+ :rtype: dict
43
+ """
44
+ _map = super().to_dict()
45
+ if _map is not None:
46
+ return _map
47
+ result = dict()
48
+ if self.volume_id is not None:
49
+ result['volumeId'] = self.volume_id
50
+ if self.serial is not None:
51
+ result['serial'] = self.serial
52
+ if self.instance_id is not None:
53
+ result['instanceId'] = self.instance_id
54
+ if self.device is not None:
55
+ result['device'] = self.device
56
+ return result
57
+
58
+ def from_dict(self, m):
59
+ """
60
+ Populate the model instance from a dictionary.
61
+
62
+ Nested dictionaries are recursively converted to model objects.
63
+
64
+ :param m: Dictionary containing model data
65
+ :type m: dict
66
+
67
+ :return: Self reference for method chaining
68
+ :rtype: VolumeAttachmentModel
69
+
70
+ :raises TypeError: If input is not a dictionary type
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('serial') is not None:
77
+ self.serial = m.get('serial')
78
+ if m.get('instanceId') is not None:
79
+ self.instance_id = m.get('instanceId')
80
+ if m.get('device') is not None:
81
+ self.device = m.get('device')
82
+ return self