|
22 | 22 | devbox_execute_sync_params, |
23 | 23 | devbox_download_file_params, |
24 | 24 | devbox_execute_async_params, |
| 25 | + devbox_disk_snapshots_params, |
25 | 26 | devbox_read_file_contents_params, |
26 | 27 | ) |
27 | 28 | from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes |
|
61 | 62 | from ...types.code_mount_parameters_param import CodeMountParametersParam |
62 | 63 | from ...types.devbox_execution_detail_view import DevboxExecutionDetailView |
63 | 64 | from ...types.devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse |
| 65 | +from ...types.devbox_disk_snapshots_response import DevboxDiskSnapshotsResponse |
64 | 66 | from ...types.devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView |
65 | 67 |
|
66 | 68 | __all__ = ["DevboxesResource", "AsyncDevboxesResource"] |
@@ -304,6 +306,52 @@ def create_ssh_key( |
304 | 306 | cast_to=DevboxCreateSSHKeyResponse, |
305 | 307 | ) |
306 | 308 |
|
| 309 | + def disk_snapshots( |
| 310 | + self, |
| 311 | + *, |
| 312 | + limit: int | NotGiven = NOT_GIVEN, |
| 313 | + starting_after: str | NotGiven = NOT_GIVEN, |
| 314 | + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 315 | + # The extra values given here take precedence over values defined on the client or passed to this method. |
| 316 | + extra_headers: Headers | None = None, |
| 317 | + extra_query: Query | None = None, |
| 318 | + extra_body: Body | None = None, |
| 319 | + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 320 | + ) -> DevboxDiskSnapshotsResponse: |
| 321 | + """ |
| 322 | + List all snapshots of a devbox by id. |
| 323 | +
|
| 324 | + Args: |
| 325 | + limit: Page Limit |
| 326 | +
|
| 327 | + starting_after: Load the next page starting after the given token. |
| 328 | +
|
| 329 | + extra_headers: Send extra headers |
| 330 | +
|
| 331 | + extra_query: Add additional query parameters to the request |
| 332 | +
|
| 333 | + extra_body: Add additional JSON properties to the request |
| 334 | +
|
| 335 | + timeout: Override the client-level default timeout for this request, in seconds |
| 336 | + """ |
| 337 | + return self._get( |
| 338 | + "/v1/devboxes/disk_snapshots", |
| 339 | + options=make_request_options( |
| 340 | + extra_headers=extra_headers, |
| 341 | + extra_query=extra_query, |
| 342 | + extra_body=extra_body, |
| 343 | + timeout=timeout, |
| 344 | + query=maybe_transform( |
| 345 | + { |
| 346 | + "limit": limit, |
| 347 | + "starting_after": starting_after, |
| 348 | + }, |
| 349 | + devbox_disk_snapshots_params.DevboxDiskSnapshotsParams, |
| 350 | + ), |
| 351 | + ), |
| 352 | + cast_to=DevboxDiskSnapshotsResponse, |
| 353 | + ) |
| 354 | + |
307 | 355 | def download_file( |
308 | 356 | self, |
309 | 357 | id: str, |
@@ -841,6 +889,52 @@ async def create_ssh_key( |
841 | 889 | cast_to=DevboxCreateSSHKeyResponse, |
842 | 890 | ) |
843 | 891 |
|
| 892 | + async def disk_snapshots( |
| 893 | + self, |
| 894 | + *, |
| 895 | + limit: int | NotGiven = NOT_GIVEN, |
| 896 | + starting_after: str | NotGiven = NOT_GIVEN, |
| 897 | + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 898 | + # The extra values given here take precedence over values defined on the client or passed to this method. |
| 899 | + extra_headers: Headers | None = None, |
| 900 | + extra_query: Query | None = None, |
| 901 | + extra_body: Body | None = None, |
| 902 | + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 903 | + ) -> DevboxDiskSnapshotsResponse: |
| 904 | + """ |
| 905 | + List all snapshots of a devbox by id. |
| 906 | +
|
| 907 | + Args: |
| 908 | + limit: Page Limit |
| 909 | +
|
| 910 | + starting_after: Load the next page starting after the given token. |
| 911 | +
|
| 912 | + extra_headers: Send extra headers |
| 913 | +
|
| 914 | + extra_query: Add additional query parameters to the request |
| 915 | +
|
| 916 | + extra_body: Add additional JSON properties to the request |
| 917 | +
|
| 918 | + timeout: Override the client-level default timeout for this request, in seconds |
| 919 | + """ |
| 920 | + return await self._get( |
| 921 | + "/v1/devboxes/disk_snapshots", |
| 922 | + options=make_request_options( |
| 923 | + extra_headers=extra_headers, |
| 924 | + extra_query=extra_query, |
| 925 | + extra_body=extra_body, |
| 926 | + timeout=timeout, |
| 927 | + query=await async_maybe_transform( |
| 928 | + { |
| 929 | + "limit": limit, |
| 930 | + "starting_after": starting_after, |
| 931 | + }, |
| 932 | + devbox_disk_snapshots_params.DevboxDiskSnapshotsParams, |
| 933 | + ), |
| 934 | + ), |
| 935 | + cast_to=DevboxDiskSnapshotsResponse, |
| 936 | + ) |
| 937 | + |
844 | 938 | async def download_file( |
845 | 939 | self, |
846 | 940 | id: str, |
@@ -1156,6 +1250,9 @@ def __init__(self, devboxes: DevboxesResource) -> None: |
1156 | 1250 | self.create_ssh_key = to_raw_response_wrapper( |
1157 | 1251 | devboxes.create_ssh_key, |
1158 | 1252 | ) |
| 1253 | + self.disk_snapshots = to_raw_response_wrapper( |
| 1254 | + devboxes.disk_snapshots, |
| 1255 | + ) |
1159 | 1256 | self.download_file = to_custom_raw_response_wrapper( |
1160 | 1257 | devboxes.download_file, |
1161 | 1258 | BinaryAPIResponse, |
@@ -1204,6 +1301,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None: |
1204 | 1301 | self.create_ssh_key = async_to_raw_response_wrapper( |
1205 | 1302 | devboxes.create_ssh_key, |
1206 | 1303 | ) |
| 1304 | + self.disk_snapshots = async_to_raw_response_wrapper( |
| 1305 | + devboxes.disk_snapshots, |
| 1306 | + ) |
1207 | 1307 | self.download_file = async_to_custom_raw_response_wrapper( |
1208 | 1308 | devboxes.download_file, |
1209 | 1309 | AsyncBinaryAPIResponse, |
@@ -1252,6 +1352,9 @@ def __init__(self, devboxes: DevboxesResource) -> None: |
1252 | 1352 | self.create_ssh_key = to_streamed_response_wrapper( |
1253 | 1353 | devboxes.create_ssh_key, |
1254 | 1354 | ) |
| 1355 | + self.disk_snapshots = to_streamed_response_wrapper( |
| 1356 | + devboxes.disk_snapshots, |
| 1357 | + ) |
1255 | 1358 | self.download_file = to_custom_streamed_response_wrapper( |
1256 | 1359 | devboxes.download_file, |
1257 | 1360 | StreamedBinaryAPIResponse, |
@@ -1300,6 +1403,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None: |
1300 | 1403 | self.create_ssh_key = async_to_streamed_response_wrapper( |
1301 | 1404 | devboxes.create_ssh_key, |
1302 | 1405 | ) |
| 1406 | + self.disk_snapshots = async_to_streamed_response_wrapper( |
| 1407 | + devboxes.disk_snapshots, |
| 1408 | + ) |
1303 | 1409 | self.download_file = async_to_custom_streamed_response_wrapper( |
1304 | 1410 | devboxes.download_file, |
1305 | 1411 | AsyncStreamedBinaryAPIResponse, |
|
0 commit comments