1 | <?php |
||
20 | class Volume extends AbstractApi |
||
21 | { |
||
22 | /** |
||
23 | * @param string $regionSlug restricts results to volumes available in a specific region. |
||
24 | * |
||
25 | * @return VolumeEntity[] Lists all of the Block Storage volumes available. |
||
26 | */ |
||
27 | public function getAll($regionSlug = null) |
||
40 | |||
41 | /** |
||
42 | * @param string $driveName restricts results to volumes with the specified name. |
||
43 | * @param string $regionSlug restricts results to volumes available in a specific region. |
||
44 | * |
||
45 | * @return VolumeEntity[] Lists all of the Block Storage volumes available. |
||
46 | */ |
||
47 | public function getByNameAndRegion($driveName, $regionSlug) |
||
59 | |||
60 | /** |
||
61 | * @param string $id |
||
62 | * |
||
63 | * @return VolumeEntity the Block Storage volume with the specified id. |
||
64 | */ |
||
65 | public function getById($id) |
||
73 | |||
74 | /** |
||
75 | * @param string $name A human-readable name for the Block Storage volume. |
||
76 | * @param string $description Free-form text field to describe a Block Storage volume. |
||
77 | * @param string $sizeInGigabytes The size of the Block Storage volume in GiB. |
||
78 | * @param string $regionSlug The region where the Block Storage volume will be created. |
||
79 | * |
||
80 | * @throws HttpException |
||
81 | * |
||
82 | * @return VolumeEntity the Block Storage volume that was created. |
||
83 | */ |
||
84 | public function create($name, $description, $sizeInGigabytes, $regionSlug) |
||
99 | |||
100 | /** |
||
101 | * @param string $id |
||
102 | * |
||
103 | * @throws HttpException |
||
104 | */ |
||
105 | public function delete($id) |
||
109 | |||
110 | /** |
||
111 | * @param string $driveName restricts the search to volumes with the specified name. |
||
112 | * @param string $regionSlug restricts the search to volumes available in a specific region. |
||
113 | * |
||
114 | * @throws HttpException |
||
115 | */ |
||
116 | public function deleteWithNameAndRegion($driveName, $regionSlug) |
||
120 | |||
121 | /** |
||
122 | * @param string $id the id of the volume |
||
123 | * @param int $dropletId the unique identifier for the Droplet the volume will be attached to. |
||
124 | * @param string $regionSlug the slug identifier for the region the volume is located in. |
||
125 | * |
||
126 | * @return ActionEntity |
||
127 | */ |
||
128 | public function attach($id, $dropletId, $regionSlug) |
||
142 | |||
143 | /** |
||
144 | * @param string $id the id of the volume |
||
145 | * @param int $dropletId the unique identifier for the Droplet the volume will detach from. |
||
146 | * @param string $regionSlug the slug identifier for the region the volume is located in. |
||
147 | * |
||
148 | * @return ActionEntity |
||
149 | */ |
||
150 | public function detach($id, $dropletId, $regionSlug) |
||
164 | |||
165 | /** |
||
166 | * @param string $id the id of the volume |
||
167 | * @param int $newSize the new size of the Block Storage volume in GiB. |
||
168 | * @param string $regionSlug the slug identifier for the region the volume is located in. |
||
169 | * |
||
170 | * @return ActionEntity |
||
171 | */ |
||
172 | public function resize($id, $newSize, $regionSlug) |
||
186 | |||
187 | /** |
||
188 | * @param string $id |
||
189 | * @param int $actionId |
||
190 | * |
||
191 | * @return ActionEntity |
||
192 | */ |
||
193 | public function getActionById($id, $actionId) |
||
201 | |||
202 | /** |
||
203 | * @param string $id |
||
204 | * |
||
205 | * @return ActionEntity[] |
||
206 | */ |
||
207 | public function getActions($id) |
||
219 | } |
||
220 |