1 | <?php |
||
19 | class Volume extends AbstractApi |
||
20 | { |
||
21 | /** |
||
22 | * @param string $regionSlug restricts results to volumes available in a specific region. |
||
23 | * |
||
24 | * @return VolumeEntity[] Lists all of the Block Storage volumes available. |
||
25 | */ |
||
26 | public function getAll($regionSlug = null) |
||
39 | |||
40 | /** |
||
41 | * @param string $driveName restricts results to volumes with the specified name. |
||
42 | * @param string $regionSlug restricts results to volumes available in a specific region. |
||
43 | * |
||
44 | * @return VolumeEntity[] Lists all of the Block Storage volumes available. |
||
45 | */ |
||
46 | public function getByNameAndRegion($driveName, $regionSlug) |
||
58 | |||
59 | /** |
||
60 | * @param string $id |
||
61 | * |
||
62 | * @return VolumeEntity the Block Storage volume with the specified id. |
||
63 | */ |
||
64 | public function getById($id) |
||
72 | |||
73 | /** |
||
74 | * @param string $name A human-readable name for the Block Storage volume. |
||
75 | * @param string $description Free-form text field to describe a Block Storage volume. |
||
76 | * @param string $sizeInGigabytes The size of the Block Storage volume in GiB. |
||
77 | * @param string $regionSlug The region where the Block Storage volume will be created. |
||
78 | * |
||
79 | * @throws HttpException |
||
80 | * |
||
81 | * @return VolumeEntity the Block Storage volume that was created. |
||
82 | */ |
||
83 | public function create($name, $description, $sizeInGigabytes, $regionSlug) |
||
98 | |||
99 | /** |
||
100 | * @param string $id |
||
101 | * |
||
102 | * @throws HttpException |
||
103 | */ |
||
104 | public function delete($id) |
||
108 | |||
109 | /** |
||
110 | * @param string $driveName restricts the search to volumes with the specified name. |
||
111 | * @param string $regionSlug restricts the search to volumes available in a specific region. |
||
112 | * |
||
113 | * @throws HttpException |
||
114 | */ |
||
115 | public function deleteWithNameAndRegion($driveName, $regionSlug) |
||
119 | } |
||
120 |