daytona_api_client 0.106.0a3__py3-none-any.whl → 0.106.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.

Potentially problematic release.


This version of daytona_api_client might be problematic. Click here for more details.

@@ -17,14 +17,11 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
17
  from typing import Any, Dict, List, Optional, Tuple, Union
18
18
  from typing_extensions import Annotated
19
19
 
20
- from datetime import datetime
21
- from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
20
+ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
22
21
  from typing import List, Optional, Union
23
22
  from typing_extensions import Annotated
24
23
  from daytona_api_client.models.create_sandbox import CreateSandbox
25
- from daytona_api_client.models.paginated_sandboxes import PaginatedSandboxes
26
24
  from daytona_api_client.models.port_preview_url import PortPreviewUrl
27
- from daytona_api_client.models.region import Region
28
25
  from daytona_api_client.models.sandbox import Sandbox
29
26
  from daytona_api_client.models.sandbox_labels import SandboxLabels
30
27
  from daytona_api_client.models.ssh_access_dto import SshAccessDto
@@ -1172,8 +1169,8 @@ class SandboxApi:
1172
1169
  def delete_sandbox(
1173
1170
  self,
1174
1171
  sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1172
+ force: StrictBool,
1175
1173
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1176
- force: Annotated[Optional[StrictBool], Field(description="Force delete sandbox")] = None,
1177
1174
  _request_timeout: Union[
1178
1175
  None,
1179
1176
  Annotated[StrictFloat, Field(gt=0)],
@@ -1192,10 +1189,10 @@ class SandboxApi:
1192
1189
 
1193
1190
  :param sandbox_id: ID of the sandbox (required)
1194
1191
  :type sandbox_id: str
1192
+ :param force: (required)
1193
+ :type force: bool
1195
1194
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
1196
1195
  :type x_daytona_organization_id: str
1197
- :param force: Force delete sandbox
1198
- :type force: bool
1199
1196
  :param _request_timeout: timeout setting for this request. If one
1200
1197
  number provided, it will be total request
1201
1198
  timeout. It can also be a pair (tuple) of
@@ -1220,8 +1217,8 @@ class SandboxApi:
1220
1217
 
1221
1218
  _param = self._delete_sandbox_serialize(
1222
1219
  sandbox_id=sandbox_id,
1223
- x_daytona_organization_id=x_daytona_organization_id,
1224
1220
  force=force,
1221
+ x_daytona_organization_id=x_daytona_organization_id,
1225
1222
  _request_auth=_request_auth,
1226
1223
  _content_type=_content_type,
1227
1224
  _headers=_headers,
@@ -1246,8 +1243,8 @@ class SandboxApi:
1246
1243
  def delete_sandbox_with_http_info(
1247
1244
  self,
1248
1245
  sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1246
+ force: StrictBool,
1249
1247
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1250
- force: Annotated[Optional[StrictBool], Field(description="Force delete sandbox")] = None,
1251
1248
  _request_timeout: Union[
1252
1249
  None,
1253
1250
  Annotated[StrictFloat, Field(gt=0)],
@@ -1266,10 +1263,10 @@ class SandboxApi:
1266
1263
 
1267
1264
  :param sandbox_id: ID of the sandbox (required)
1268
1265
  :type sandbox_id: str
1266
+ :param force: (required)
1267
+ :type force: bool
1269
1268
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
1270
1269
  :type x_daytona_organization_id: str
1271
- :param force: Force delete sandbox
1272
- :type force: bool
1273
1270
  :param _request_timeout: timeout setting for this request. If one
1274
1271
  number provided, it will be total request
1275
1272
  timeout. It can also be a pair (tuple) of
@@ -1294,8 +1291,8 @@ class SandboxApi:
1294
1291
 
1295
1292
  _param = self._delete_sandbox_serialize(
1296
1293
  sandbox_id=sandbox_id,
1297
- x_daytona_organization_id=x_daytona_organization_id,
1298
1294
  force=force,
1295
+ x_daytona_organization_id=x_daytona_organization_id,
1299
1296
  _request_auth=_request_auth,
1300
1297
  _content_type=_content_type,
1301
1298
  _headers=_headers,
@@ -1320,8 +1317,8 @@ class SandboxApi:
1320
1317
  def delete_sandbox_without_preload_content(
1321
1318
  self,
1322
1319
  sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
1320
+ force: StrictBool,
1323
1321
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1324
- force: Annotated[Optional[StrictBool], Field(description="Force delete sandbox")] = None,
1325
1322
  _request_timeout: Union[
1326
1323
  None,
1327
1324
  Annotated[StrictFloat, Field(gt=0)],
@@ -1340,10 +1337,10 @@ class SandboxApi:
1340
1337
 
1341
1338
  :param sandbox_id: ID of the sandbox (required)
1342
1339
  :type sandbox_id: str
1340
+ :param force: (required)
1341
+ :type force: bool
1343
1342
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
1344
1343
  :type x_daytona_organization_id: str
1345
- :param force: Force delete sandbox
1346
- :type force: bool
1347
1344
  :param _request_timeout: timeout setting for this request. If one
1348
1345
  number provided, it will be total request
1349
1346
  timeout. It can also be a pair (tuple) of
@@ -1368,8 +1365,8 @@ class SandboxApi:
1368
1365
 
1369
1366
  _param = self._delete_sandbox_serialize(
1370
1367
  sandbox_id=sandbox_id,
1371
- x_daytona_organization_id=x_daytona_organization_id,
1372
1368
  force=force,
1369
+ x_daytona_organization_id=x_daytona_organization_id,
1373
1370
  _request_auth=_request_auth,
1374
1371
  _content_type=_content_type,
1375
1372
  _headers=_headers,
@@ -1389,8 +1386,8 @@ class SandboxApi:
1389
1386
  def _delete_sandbox_serialize(
1390
1387
  self,
1391
1388
  sandbox_id,
1392
- x_daytona_organization_id,
1393
1389
  force,
1390
+ x_daytona_organization_id,
1394
1391
  _request_auth,
1395
1392
  _content_type,
1396
1393
  _headers,
@@ -2317,9 +2314,11 @@ class SandboxApi:
2317
2314
 
2318
2315
 
2319
2316
  @validate_call
2320
- def get_sandbox_regions(
2317
+ def get_sandboxes_for_runner(
2321
2318
  self,
2322
2319
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2320
+ states: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sandbox states to filter by")] = None,
2321
+ skip_reconciling_sandboxes: Annotated[Optional[StrictBool], Field(description="Skip sandboxes where state differs from desired state")] = None,
2323
2322
  _request_timeout: Union[
2324
2323
  None,
2325
2324
  Annotated[StrictFloat, Field(gt=0)],
@@ -2332,12 +2331,16 @@ class SandboxApi:
2332
2331
  _content_type: Optional[StrictStr] = None,
2333
2332
  _headers: Optional[Dict[StrictStr, Any]] = None,
2334
2333
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2335
- ) -> List[Region]:
2336
- """List all regions where sandboxes have been created
2334
+ ) -> List[Sandbox]:
2335
+ """Get sandboxes for the authenticated runner
2337
2336
 
2338
2337
 
2339
2338
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
2340
2339
  :type x_daytona_organization_id: str
2340
+ :param states: Comma-separated list of sandbox states to filter by
2341
+ :type states: str
2342
+ :param skip_reconciling_sandboxes: Skip sandboxes where state differs from desired state
2343
+ :type skip_reconciling_sandboxes: bool
2341
2344
  :param _request_timeout: timeout setting for this request. If one
2342
2345
  number provided, it will be total request
2343
2346
  timeout. It can also be a pair (tuple) of
@@ -2360,8 +2363,10 @@ class SandboxApi:
2360
2363
  :return: Returns the result object.
2361
2364
  """ # noqa: E501
2362
2365
 
2363
- _param = self._get_sandbox_regions_serialize(
2366
+ _param = self._get_sandboxes_for_runner_serialize(
2364
2367
  x_daytona_organization_id=x_daytona_organization_id,
2368
+ states=states,
2369
+ skip_reconciling_sandboxes=skip_reconciling_sandboxes,
2365
2370
  _request_auth=_request_auth,
2366
2371
  _content_type=_content_type,
2367
2372
  _headers=_headers,
@@ -2369,7 +2374,7 @@ class SandboxApi:
2369
2374
  )
2370
2375
 
2371
2376
  _response_types_map: Dict[str, Optional[str]] = {
2372
- '200': "List[Region]",
2377
+ '200': "List[Sandbox]",
2373
2378
  }
2374
2379
  response_data = self.api_client.call_api(
2375
2380
  *_param,
@@ -2383,9 +2388,11 @@ class SandboxApi:
2383
2388
 
2384
2389
 
2385
2390
  @validate_call
2386
- def get_sandbox_regions_with_http_info(
2391
+ def get_sandboxes_for_runner_with_http_info(
2387
2392
  self,
2388
2393
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2394
+ states: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sandbox states to filter by")] = None,
2395
+ skip_reconciling_sandboxes: Annotated[Optional[StrictBool], Field(description="Skip sandboxes where state differs from desired state")] = None,
2389
2396
  _request_timeout: Union[
2390
2397
  None,
2391
2398
  Annotated[StrictFloat, Field(gt=0)],
@@ -2398,12 +2405,16 @@ class SandboxApi:
2398
2405
  _content_type: Optional[StrictStr] = None,
2399
2406
  _headers: Optional[Dict[StrictStr, Any]] = None,
2400
2407
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2401
- ) -> ApiResponse[List[Region]]:
2402
- """List all regions where sandboxes have been created
2408
+ ) -> ApiResponse[List[Sandbox]]:
2409
+ """Get sandboxes for the authenticated runner
2403
2410
 
2404
2411
 
2405
2412
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
2406
2413
  :type x_daytona_organization_id: str
2414
+ :param states: Comma-separated list of sandbox states to filter by
2415
+ :type states: str
2416
+ :param skip_reconciling_sandboxes: Skip sandboxes where state differs from desired state
2417
+ :type skip_reconciling_sandboxes: bool
2407
2418
  :param _request_timeout: timeout setting for this request. If one
2408
2419
  number provided, it will be total request
2409
2420
  timeout. It can also be a pair (tuple) of
@@ -2426,8 +2437,10 @@ class SandboxApi:
2426
2437
  :return: Returns the result object.
2427
2438
  """ # noqa: E501
2428
2439
 
2429
- _param = self._get_sandbox_regions_serialize(
2440
+ _param = self._get_sandboxes_for_runner_serialize(
2430
2441
  x_daytona_organization_id=x_daytona_organization_id,
2442
+ states=states,
2443
+ skip_reconciling_sandboxes=skip_reconciling_sandboxes,
2431
2444
  _request_auth=_request_auth,
2432
2445
  _content_type=_content_type,
2433
2446
  _headers=_headers,
@@ -2435,7 +2448,7 @@ class SandboxApi:
2435
2448
  )
2436
2449
 
2437
2450
  _response_types_map: Dict[str, Optional[str]] = {
2438
- '200': "List[Region]",
2451
+ '200': "List[Sandbox]",
2439
2452
  }
2440
2453
  response_data = self.api_client.call_api(
2441
2454
  *_param,
@@ -2449,9 +2462,11 @@ class SandboxApi:
2449
2462
 
2450
2463
 
2451
2464
  @validate_call
2452
- def get_sandbox_regions_without_preload_content(
2465
+ def get_sandboxes_for_runner_without_preload_content(
2453
2466
  self,
2454
2467
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2468
+ states: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sandbox states to filter by")] = None,
2469
+ skip_reconciling_sandboxes: Annotated[Optional[StrictBool], Field(description="Skip sandboxes where state differs from desired state")] = None,
2455
2470
  _request_timeout: Union[
2456
2471
  None,
2457
2472
  Annotated[StrictFloat, Field(gt=0)],
@@ -2465,11 +2480,15 @@ class SandboxApi:
2465
2480
  _headers: Optional[Dict[StrictStr, Any]] = None,
2466
2481
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2467
2482
  ) -> RESTResponseType:
2468
- """List all regions where sandboxes have been created
2483
+ """Get sandboxes for the authenticated runner
2469
2484
 
2470
2485
 
2471
2486
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
2472
2487
  :type x_daytona_organization_id: str
2488
+ :param states: Comma-separated list of sandbox states to filter by
2489
+ :type states: str
2490
+ :param skip_reconciling_sandboxes: Skip sandboxes where state differs from desired state
2491
+ :type skip_reconciling_sandboxes: bool
2473
2492
  :param _request_timeout: timeout setting for this request. If one
2474
2493
  number provided, it will be total request
2475
2494
  timeout. It can also be a pair (tuple) of
@@ -2492,8 +2511,10 @@ class SandboxApi:
2492
2511
  :return: Returns the result object.
2493
2512
  """ # noqa: E501
2494
2513
 
2495
- _param = self._get_sandbox_regions_serialize(
2514
+ _param = self._get_sandboxes_for_runner_serialize(
2496
2515
  x_daytona_organization_id=x_daytona_organization_id,
2516
+ states=states,
2517
+ skip_reconciling_sandboxes=skip_reconciling_sandboxes,
2497
2518
  _request_auth=_request_auth,
2498
2519
  _content_type=_content_type,
2499
2520
  _headers=_headers,
@@ -2501,7 +2522,7 @@ class SandboxApi:
2501
2522
  )
2502
2523
 
2503
2524
  _response_types_map: Dict[str, Optional[str]] = {
2504
- '200': "List[Region]",
2525
+ '200': "List[Sandbox]",
2505
2526
  }
2506
2527
  response_data = self.api_client.call_api(
2507
2528
  *_param,
@@ -2510,9 +2531,11 @@ class SandboxApi:
2510
2531
  return response_data.response
2511
2532
 
2512
2533
 
2513
- def _get_sandbox_regions_serialize(
2534
+ def _get_sandboxes_for_runner_serialize(
2514
2535
  self,
2515
2536
  x_daytona_organization_id,
2537
+ states,
2538
+ skip_reconciling_sandboxes,
2516
2539
  _request_auth,
2517
2540
  _content_type,
2518
2541
  _headers,
@@ -2535,6 +2558,14 @@ class SandboxApi:
2535
2558
 
2536
2559
  # process the path parameters
2537
2560
  # process the query parameters
2561
+ if states is not None:
2562
+
2563
+ _query_params.append(('states', states))
2564
+
2565
+ if skip_reconciling_sandboxes is not None:
2566
+
2567
+ _query_params.append(('skipReconcilingSandboxes', skip_reconciling_sandboxes))
2568
+
2538
2569
  # process the header parameters
2539
2570
  if x_daytona_organization_id is not None:
2540
2571
  _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
@@ -2559,7 +2590,7 @@ class SandboxApi:
2559
2590
 
2560
2591
  return self.api_client.param_serialize(
2561
2592
  method='GET',
2562
- resource_path='/sandbox/regions',
2593
+ resource_path='/sandbox/for-runner',
2563
2594
  path_params=_path_params,
2564
2595
  query_params=_query_params,
2565
2596
  header_params=_header_params,
@@ -2576,11 +2607,12 @@ class SandboxApi:
2576
2607
 
2577
2608
 
2578
2609
  @validate_call
2579
- def get_sandboxes_for_runner(
2610
+ def list_sandboxes(
2580
2611
  self,
2581
2612
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2582
- states: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sandbox states to filter by")] = None,
2583
- skip_reconciling_sandboxes: Annotated[Optional[StrictBool], Field(description="Skip sandboxes where state differs from desired state")] = None,
2613
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2614
+ labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2615
+ include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
2584
2616
  _request_timeout: Union[
2585
2617
  None,
2586
2618
  Annotated[StrictFloat, Field(gt=0)],
@@ -2594,15 +2626,17 @@ class SandboxApi:
2594
2626
  _headers: Optional[Dict[StrictStr, Any]] = None,
2595
2627
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2596
2628
  ) -> List[Sandbox]:
2597
- """Get sandboxes for the authenticated runner
2629
+ """List all sandboxes
2598
2630
 
2599
2631
 
2600
2632
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
2601
2633
  :type x_daytona_organization_id: str
2602
- :param states: Comma-separated list of sandbox states to filter by
2603
- :type states: str
2604
- :param skip_reconciling_sandboxes: Skip sandboxes where state differs from desired state
2605
- :type skip_reconciling_sandboxes: bool
2634
+ :param verbose: Include verbose output
2635
+ :type verbose: bool
2636
+ :param labels: JSON encoded labels to filter by
2637
+ :type labels: str
2638
+ :param include_errored_deleted: Include errored and deleted sandboxes
2639
+ :type include_errored_deleted: bool
2606
2640
  :param _request_timeout: timeout setting for this request. If one
2607
2641
  number provided, it will be total request
2608
2642
  timeout. It can also be a pair (tuple) of
@@ -2625,10 +2659,11 @@ class SandboxApi:
2625
2659
  :return: Returns the result object.
2626
2660
  """ # noqa: E501
2627
2661
 
2628
- _param = self._get_sandboxes_for_runner_serialize(
2662
+ _param = self._list_sandboxes_serialize(
2629
2663
  x_daytona_organization_id=x_daytona_organization_id,
2630
- states=states,
2631
- skip_reconciling_sandboxes=skip_reconciling_sandboxes,
2664
+ verbose=verbose,
2665
+ labels=labels,
2666
+ include_errored_deleted=include_errored_deleted,
2632
2667
  _request_auth=_request_auth,
2633
2668
  _content_type=_content_type,
2634
2669
  _headers=_headers,
@@ -2650,11 +2685,12 @@ class SandboxApi:
2650
2685
 
2651
2686
 
2652
2687
  @validate_call
2653
- def get_sandboxes_for_runner_with_http_info(
2688
+ def list_sandboxes_with_http_info(
2654
2689
  self,
2655
2690
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2656
- states: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sandbox states to filter by")] = None,
2657
- skip_reconciling_sandboxes: Annotated[Optional[StrictBool], Field(description="Skip sandboxes where state differs from desired state")] = None,
2691
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2692
+ labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2693
+ include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
2658
2694
  _request_timeout: Union[
2659
2695
  None,
2660
2696
  Annotated[StrictFloat, Field(gt=0)],
@@ -2668,15 +2704,17 @@ class SandboxApi:
2668
2704
  _headers: Optional[Dict[StrictStr, Any]] = None,
2669
2705
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2670
2706
  ) -> ApiResponse[List[Sandbox]]:
2671
- """Get sandboxes for the authenticated runner
2707
+ """List all sandboxes
2672
2708
 
2673
2709
 
2674
2710
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
2675
2711
  :type x_daytona_organization_id: str
2676
- :param states: Comma-separated list of sandbox states to filter by
2677
- :type states: str
2678
- :param skip_reconciling_sandboxes: Skip sandboxes where state differs from desired state
2679
- :type skip_reconciling_sandboxes: bool
2712
+ :param verbose: Include verbose output
2713
+ :type verbose: bool
2714
+ :param labels: JSON encoded labels to filter by
2715
+ :type labels: str
2716
+ :param include_errored_deleted: Include errored and deleted sandboxes
2717
+ :type include_errored_deleted: bool
2680
2718
  :param _request_timeout: timeout setting for this request. If one
2681
2719
  number provided, it will be total request
2682
2720
  timeout. It can also be a pair (tuple) of
@@ -2699,10 +2737,11 @@ class SandboxApi:
2699
2737
  :return: Returns the result object.
2700
2738
  """ # noqa: E501
2701
2739
 
2702
- _param = self._get_sandboxes_for_runner_serialize(
2740
+ _param = self._list_sandboxes_serialize(
2703
2741
  x_daytona_organization_id=x_daytona_organization_id,
2704
- states=states,
2705
- skip_reconciling_sandboxes=skip_reconciling_sandboxes,
2742
+ verbose=verbose,
2743
+ labels=labels,
2744
+ include_errored_deleted=include_errored_deleted,
2706
2745
  _request_auth=_request_auth,
2707
2746
  _content_type=_content_type,
2708
2747
  _headers=_headers,
@@ -2724,11 +2763,12 @@ class SandboxApi:
2724
2763
 
2725
2764
 
2726
2765
  @validate_call
2727
- def get_sandboxes_for_runner_without_preload_content(
2766
+ def list_sandboxes_without_preload_content(
2728
2767
  self,
2729
2768
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2730
- states: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sandbox states to filter by")] = None,
2731
- skip_reconciling_sandboxes: Annotated[Optional[StrictBool], Field(description="Skip sandboxes where state differs from desired state")] = None,
2769
+ verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2770
+ labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2771
+ include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
2732
2772
  _request_timeout: Union[
2733
2773
  None,
2734
2774
  Annotated[StrictFloat, Field(gt=0)],
@@ -2742,15 +2782,17 @@ class SandboxApi:
2742
2782
  _headers: Optional[Dict[StrictStr, Any]] = None,
2743
2783
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2744
2784
  ) -> RESTResponseType:
2745
- """Get sandboxes for the authenticated runner
2785
+ """List all sandboxes
2746
2786
 
2747
2787
 
2748
2788
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
2749
2789
  :type x_daytona_organization_id: str
2750
- :param states: Comma-separated list of sandbox states to filter by
2751
- :type states: str
2752
- :param skip_reconciling_sandboxes: Skip sandboxes where state differs from desired state
2753
- :type skip_reconciling_sandboxes: bool
2790
+ :param verbose: Include verbose output
2791
+ :type verbose: bool
2792
+ :param labels: JSON encoded labels to filter by
2793
+ :type labels: str
2794
+ :param include_errored_deleted: Include errored and deleted sandboxes
2795
+ :type include_errored_deleted: bool
2754
2796
  :param _request_timeout: timeout setting for this request. If one
2755
2797
  number provided, it will be total request
2756
2798
  timeout. It can also be a pair (tuple) of
@@ -2773,10 +2815,11 @@ class SandboxApi:
2773
2815
  :return: Returns the result object.
2774
2816
  """ # noqa: E501
2775
2817
 
2776
- _param = self._get_sandboxes_for_runner_serialize(
2818
+ _param = self._list_sandboxes_serialize(
2777
2819
  x_daytona_organization_id=x_daytona_organization_id,
2778
- states=states,
2779
- skip_reconciling_sandboxes=skip_reconciling_sandboxes,
2820
+ verbose=verbose,
2821
+ labels=labels,
2822
+ include_errored_deleted=include_errored_deleted,
2780
2823
  _request_auth=_request_auth,
2781
2824
  _content_type=_content_type,
2782
2825
  _headers=_headers,
@@ -2793,11 +2836,12 @@ class SandboxApi:
2793
2836
  return response_data.response
2794
2837
 
2795
2838
 
2796
- def _get_sandboxes_for_runner_serialize(
2839
+ def _list_sandboxes_serialize(
2797
2840
  self,
2798
2841
  x_daytona_organization_id,
2799
- states,
2800
- skip_reconciling_sandboxes,
2842
+ verbose,
2843
+ labels,
2844
+ include_errored_deleted,
2801
2845
  _request_auth,
2802
2846
  _content_type,
2803
2847
  _headers,
@@ -2820,323 +2864,17 @@ class SandboxApi:
2820
2864
 
2821
2865
  # process the path parameters
2822
2866
  # process the query parameters
2823
- if states is not None:
2867
+ if verbose is not None:
2824
2868
 
2825
- _query_params.append(('states', states))
2869
+ _query_params.append(('verbose', verbose))
2826
2870
 
2827
- if skip_reconciling_sandboxes is not None:
2871
+ if labels is not None:
2828
2872
 
2829
- _query_params.append(('skipReconcilingSandboxes', skip_reconciling_sandboxes))
2830
-
2831
- # process the header parameters
2832
- if x_daytona_organization_id is not None:
2833
- _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
2834
- # process the form parameters
2835
- # process the body parameter
2836
-
2837
-
2838
- # set the HTTP header `Accept`
2839
- if 'Accept' not in _header_params:
2840
- _header_params['Accept'] = self.api_client.select_header_accept(
2841
- [
2842
- 'application/json'
2843
- ]
2844
- )
2845
-
2846
-
2847
- # authentication setting
2848
- _auth_settings: List[str] = [
2849
- 'bearer',
2850
- 'oauth2'
2851
- ]
2852
-
2853
- return self.api_client.param_serialize(
2854
- method='GET',
2855
- resource_path='/sandbox/for-runner',
2856
- path_params=_path_params,
2857
- query_params=_query_params,
2858
- header_params=_header_params,
2859
- body=_body_params,
2860
- post_params=_form_params,
2861
- files=_files,
2862
- auth_settings=_auth_settings,
2863
- collection_formats=_collection_formats,
2864
- _host=_host,
2865
- _request_auth=_request_auth
2866
- )
2867
-
2868
-
2869
-
2870
-
2871
- @validate_call
2872
- def list_sandboxes(
2873
- self,
2874
- x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2875
- verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2876
- labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2877
- include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
2878
- _request_timeout: Union[
2879
- None,
2880
- Annotated[StrictFloat, Field(gt=0)],
2881
- Tuple[
2882
- Annotated[StrictFloat, Field(gt=0)],
2883
- Annotated[StrictFloat, Field(gt=0)]
2884
- ]
2885
- ] = None,
2886
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2887
- _content_type: Optional[StrictStr] = None,
2888
- _headers: Optional[Dict[StrictStr, Any]] = None,
2889
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2890
- ) -> List[Sandbox]:
2891
- """List all sandboxes
2892
-
2893
-
2894
- :param x_daytona_organization_id: Use with JWT to specify the organization ID
2895
- :type x_daytona_organization_id: str
2896
- :param verbose: Include verbose output
2897
- :type verbose: bool
2898
- :param labels: JSON encoded labels to filter by
2899
- :type labels: str
2900
- :param include_errored_deleted: Include errored and deleted sandboxes
2901
- :type include_errored_deleted: bool
2902
- :param _request_timeout: timeout setting for this request. If one
2903
- number provided, it will be total request
2904
- timeout. It can also be a pair (tuple) of
2905
- (connection, read) timeouts.
2906
- :type _request_timeout: int, tuple(int, int), optional
2907
- :param _request_auth: set to override the auth_settings for an a single
2908
- request; this effectively ignores the
2909
- authentication in the spec for a single request.
2910
- :type _request_auth: dict, optional
2911
- :param _content_type: force content-type for the request.
2912
- :type _content_type: str, Optional
2913
- :param _headers: set to override the headers for a single
2914
- request; this effectively ignores the headers
2915
- in the spec for a single request.
2916
- :type _headers: dict, optional
2917
- :param _host_index: set to override the host_index for a single
2918
- request; this effectively ignores the host_index
2919
- in the spec for a single request.
2920
- :type _host_index: int, optional
2921
- :return: Returns the result object.
2922
- """ # noqa: E501
2923
-
2924
- _param = self._list_sandboxes_serialize(
2925
- x_daytona_organization_id=x_daytona_organization_id,
2926
- verbose=verbose,
2927
- labels=labels,
2928
- include_errored_deleted=include_errored_deleted,
2929
- _request_auth=_request_auth,
2930
- _content_type=_content_type,
2931
- _headers=_headers,
2932
- _host_index=_host_index
2933
- )
2934
-
2935
- _response_types_map: Dict[str, Optional[str]] = {
2936
- '200': "List[Sandbox]",
2937
- }
2938
- response_data = self.api_client.call_api(
2939
- *_param,
2940
- _request_timeout=_request_timeout
2941
- )
2942
- response_data.read()
2943
- return self.api_client.response_deserialize(
2944
- response_data=response_data,
2945
- response_types_map=_response_types_map,
2946
- ).data
2947
-
2948
-
2949
- @validate_call
2950
- def list_sandboxes_with_http_info(
2951
- self,
2952
- x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
2953
- verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
2954
- labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
2955
- include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
2956
- _request_timeout: Union[
2957
- None,
2958
- Annotated[StrictFloat, Field(gt=0)],
2959
- Tuple[
2960
- Annotated[StrictFloat, Field(gt=0)],
2961
- Annotated[StrictFloat, Field(gt=0)]
2962
- ]
2963
- ] = None,
2964
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2965
- _content_type: Optional[StrictStr] = None,
2966
- _headers: Optional[Dict[StrictStr, Any]] = None,
2967
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2968
- ) -> ApiResponse[List[Sandbox]]:
2969
- """List all sandboxes
2970
-
2971
-
2972
- :param x_daytona_organization_id: Use with JWT to specify the organization ID
2973
- :type x_daytona_organization_id: str
2974
- :param verbose: Include verbose output
2975
- :type verbose: bool
2976
- :param labels: JSON encoded labels to filter by
2977
- :type labels: str
2978
- :param include_errored_deleted: Include errored and deleted sandboxes
2979
- :type include_errored_deleted: bool
2980
- :param _request_timeout: timeout setting for this request. If one
2981
- number provided, it will be total request
2982
- timeout. It can also be a pair (tuple) of
2983
- (connection, read) timeouts.
2984
- :type _request_timeout: int, tuple(int, int), optional
2985
- :param _request_auth: set to override the auth_settings for an a single
2986
- request; this effectively ignores the
2987
- authentication in the spec for a single request.
2988
- :type _request_auth: dict, optional
2989
- :param _content_type: force content-type for the request.
2990
- :type _content_type: str, Optional
2991
- :param _headers: set to override the headers for a single
2992
- request; this effectively ignores the headers
2993
- in the spec for a single request.
2994
- :type _headers: dict, optional
2995
- :param _host_index: set to override the host_index for a single
2996
- request; this effectively ignores the host_index
2997
- in the spec for a single request.
2998
- :type _host_index: int, optional
2999
- :return: Returns the result object.
3000
- """ # noqa: E501
3001
-
3002
- _param = self._list_sandboxes_serialize(
3003
- x_daytona_organization_id=x_daytona_organization_id,
3004
- verbose=verbose,
3005
- labels=labels,
3006
- include_errored_deleted=include_errored_deleted,
3007
- _request_auth=_request_auth,
3008
- _content_type=_content_type,
3009
- _headers=_headers,
3010
- _host_index=_host_index
3011
- )
3012
-
3013
- _response_types_map: Dict[str, Optional[str]] = {
3014
- '200': "List[Sandbox]",
3015
- }
3016
- response_data = self.api_client.call_api(
3017
- *_param,
3018
- _request_timeout=_request_timeout
3019
- )
3020
- response_data.read()
3021
- return self.api_client.response_deserialize(
3022
- response_data=response_data,
3023
- response_types_map=_response_types_map,
3024
- )
3025
-
3026
-
3027
- @validate_call
3028
- def list_sandboxes_without_preload_content(
3029
- self,
3030
- x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3031
- verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
3032
- labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
3033
- include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
3034
- _request_timeout: Union[
3035
- None,
3036
- Annotated[StrictFloat, Field(gt=0)],
3037
- Tuple[
3038
- Annotated[StrictFloat, Field(gt=0)],
3039
- Annotated[StrictFloat, Field(gt=0)]
3040
- ]
3041
- ] = None,
3042
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3043
- _content_type: Optional[StrictStr] = None,
3044
- _headers: Optional[Dict[StrictStr, Any]] = None,
3045
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3046
- ) -> RESTResponseType:
3047
- """List all sandboxes
3048
-
3049
-
3050
- :param x_daytona_organization_id: Use with JWT to specify the organization ID
3051
- :type x_daytona_organization_id: str
3052
- :param verbose: Include verbose output
3053
- :type verbose: bool
3054
- :param labels: JSON encoded labels to filter by
3055
- :type labels: str
3056
- :param include_errored_deleted: Include errored and deleted sandboxes
3057
- :type include_errored_deleted: bool
3058
- :param _request_timeout: timeout setting for this request. If one
3059
- number provided, it will be total request
3060
- timeout. It can also be a pair (tuple) of
3061
- (connection, read) timeouts.
3062
- :type _request_timeout: int, tuple(int, int), optional
3063
- :param _request_auth: set to override the auth_settings for an a single
3064
- request; this effectively ignores the
3065
- authentication in the spec for a single request.
3066
- :type _request_auth: dict, optional
3067
- :param _content_type: force content-type for the request.
3068
- :type _content_type: str, Optional
3069
- :param _headers: set to override the headers for a single
3070
- request; this effectively ignores the headers
3071
- in the spec for a single request.
3072
- :type _headers: dict, optional
3073
- :param _host_index: set to override the host_index for a single
3074
- request; this effectively ignores the host_index
3075
- in the spec for a single request.
3076
- :type _host_index: int, optional
3077
- :return: Returns the result object.
3078
- """ # noqa: E501
3079
-
3080
- _param = self._list_sandboxes_serialize(
3081
- x_daytona_organization_id=x_daytona_organization_id,
3082
- verbose=verbose,
3083
- labels=labels,
3084
- include_errored_deleted=include_errored_deleted,
3085
- _request_auth=_request_auth,
3086
- _content_type=_content_type,
3087
- _headers=_headers,
3088
- _host_index=_host_index
3089
- )
3090
-
3091
- _response_types_map: Dict[str, Optional[str]] = {
3092
- '200': "List[Sandbox]",
3093
- }
3094
- response_data = self.api_client.call_api(
3095
- *_param,
3096
- _request_timeout=_request_timeout
3097
- )
3098
- return response_data.response
3099
-
3100
-
3101
- def _list_sandboxes_serialize(
3102
- self,
3103
- x_daytona_organization_id,
3104
- verbose,
3105
- labels,
3106
- include_errored_deleted,
3107
- _request_auth,
3108
- _content_type,
3109
- _headers,
3110
- _host_index,
3111
- ) -> RequestSerialized:
3112
-
3113
- _host = None
3114
-
3115
- _collection_formats: Dict[str, str] = {
3116
- }
3117
-
3118
- _path_params: Dict[str, str] = {}
3119
- _query_params: List[Tuple[str, str]] = []
3120
- _header_params: Dict[str, Optional[str]] = _headers or {}
3121
- _form_params: List[Tuple[str, str]] = []
3122
- _files: Dict[
3123
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3124
- ] = {}
3125
- _body_params: Optional[bytes] = None
3126
-
3127
- # process the path parameters
3128
- # process the query parameters
3129
- if verbose is not None:
3130
-
3131
- _query_params.append(('verbose', verbose))
3132
-
3133
- if labels is not None:
3134
-
3135
- _query_params.append(('labels', labels))
3136
-
3137
- if include_errored_deleted is not None:
3138
-
3139
- _query_params.append(('includeErroredDeleted', include_errored_deleted))
2873
+ _query_params.append(('labels', labels))
2874
+
2875
+ if include_errored_deleted is not None:
2876
+
2877
+ _query_params.append(('includeErroredDeleted', include_errored_deleted))
3140
2878
 
3141
2879
  # process the header parameters
3142
2880
  if x_daytona_organization_id is not None:
@@ -3178,592 +2916,6 @@ class SandboxApi:
3178
2916
 
3179
2917
 
3180
2918
 
3181
- @validate_call
3182
- def list_sandboxes_paginated(
3183
- self,
3184
- x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3185
- page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
3186
- limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
3187
- id: Annotated[Optional[StrictStr], Field(description="Filter by partial ID match")] = None,
3188
- labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
3189
- include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include results with errored state and deleted desired state")] = None,
3190
- states: Annotated[Optional[List[StrictStr]], Field(description="List of states to filter by")] = None,
3191
- snapshots: Annotated[Optional[List[StrictStr]], Field(description="List of snapshot names to filter by")] = None,
3192
- regions: Annotated[Optional[List[StrictStr]], Field(description="List of regions to filter by")] = None,
3193
- min_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum CPU")] = None,
3194
- max_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum CPU")] = None,
3195
- min_memory_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum memory in GiB")] = None,
3196
- max_memory_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum memory in GiB")] = None,
3197
- min_disk_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum disk space in GiB")] = None,
3198
- max_disk_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum disk space in GiB")] = None,
3199
- last_event_after: Annotated[Optional[datetime], Field(description="Include items with last event after this timestamp")] = None,
3200
- last_event_before: Annotated[Optional[datetime], Field(description="Include items with last event before this timestamp")] = None,
3201
- sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
3202
- order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
3203
- _request_timeout: Union[
3204
- None,
3205
- Annotated[StrictFloat, Field(gt=0)],
3206
- Tuple[
3207
- Annotated[StrictFloat, Field(gt=0)],
3208
- Annotated[StrictFloat, Field(gt=0)]
3209
- ]
3210
- ] = None,
3211
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3212
- _content_type: Optional[StrictStr] = None,
3213
- _headers: Optional[Dict[StrictStr, Any]] = None,
3214
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3215
- ) -> PaginatedSandboxes:
3216
- """List all sandboxes paginated
3217
-
3218
-
3219
- :param x_daytona_organization_id: Use with JWT to specify the organization ID
3220
- :type x_daytona_organization_id: str
3221
- :param page: Page number of the results
3222
- :type page: float
3223
- :param limit: Number of results per page
3224
- :type limit: float
3225
- :param id: Filter by partial ID match
3226
- :type id: str
3227
- :param labels: JSON encoded labels to filter by
3228
- :type labels: str
3229
- :param include_errored_deleted: Include results with errored state and deleted desired state
3230
- :type include_errored_deleted: bool
3231
- :param states: List of states to filter by
3232
- :type states: List[str]
3233
- :param snapshots: List of snapshot names to filter by
3234
- :type snapshots: List[str]
3235
- :param regions: List of regions to filter by
3236
- :type regions: List[str]
3237
- :param min_cpu: Minimum CPU
3238
- :type min_cpu: float
3239
- :param max_cpu: Maximum CPU
3240
- :type max_cpu: float
3241
- :param min_memory_gi_b: Minimum memory in GiB
3242
- :type min_memory_gi_b: float
3243
- :param max_memory_gi_b: Maximum memory in GiB
3244
- :type max_memory_gi_b: float
3245
- :param min_disk_gi_b: Minimum disk space in GiB
3246
- :type min_disk_gi_b: float
3247
- :param max_disk_gi_b: Maximum disk space in GiB
3248
- :type max_disk_gi_b: float
3249
- :param last_event_after: Include items with last event after this timestamp
3250
- :type last_event_after: datetime
3251
- :param last_event_before: Include items with last event before this timestamp
3252
- :type last_event_before: datetime
3253
- :param sort: Field to sort by
3254
- :type sort: str
3255
- :param order: Direction to sort by
3256
- :type order: str
3257
- :param _request_timeout: timeout setting for this request. If one
3258
- number provided, it will be total request
3259
- timeout. It can also be a pair (tuple) of
3260
- (connection, read) timeouts.
3261
- :type _request_timeout: int, tuple(int, int), optional
3262
- :param _request_auth: set to override the auth_settings for an a single
3263
- request; this effectively ignores the
3264
- authentication in the spec for a single request.
3265
- :type _request_auth: dict, optional
3266
- :param _content_type: force content-type for the request.
3267
- :type _content_type: str, Optional
3268
- :param _headers: set to override the headers for a single
3269
- request; this effectively ignores the headers
3270
- in the spec for a single request.
3271
- :type _headers: dict, optional
3272
- :param _host_index: set to override the host_index for a single
3273
- request; this effectively ignores the host_index
3274
- in the spec for a single request.
3275
- :type _host_index: int, optional
3276
- :return: Returns the result object.
3277
- """ # noqa: E501
3278
-
3279
- _param = self._list_sandboxes_paginated_serialize(
3280
- x_daytona_organization_id=x_daytona_organization_id,
3281
- page=page,
3282
- limit=limit,
3283
- id=id,
3284
- labels=labels,
3285
- include_errored_deleted=include_errored_deleted,
3286
- states=states,
3287
- snapshots=snapshots,
3288
- regions=regions,
3289
- min_cpu=min_cpu,
3290
- max_cpu=max_cpu,
3291
- min_memory_gi_b=min_memory_gi_b,
3292
- max_memory_gi_b=max_memory_gi_b,
3293
- min_disk_gi_b=min_disk_gi_b,
3294
- max_disk_gi_b=max_disk_gi_b,
3295
- last_event_after=last_event_after,
3296
- last_event_before=last_event_before,
3297
- sort=sort,
3298
- order=order,
3299
- _request_auth=_request_auth,
3300
- _content_type=_content_type,
3301
- _headers=_headers,
3302
- _host_index=_host_index
3303
- )
3304
-
3305
- _response_types_map: Dict[str, Optional[str]] = {
3306
- '200': "PaginatedSandboxes",
3307
- }
3308
- response_data = self.api_client.call_api(
3309
- *_param,
3310
- _request_timeout=_request_timeout
3311
- )
3312
- response_data.read()
3313
- return self.api_client.response_deserialize(
3314
- response_data=response_data,
3315
- response_types_map=_response_types_map,
3316
- ).data
3317
-
3318
-
3319
- @validate_call
3320
- def list_sandboxes_paginated_with_http_info(
3321
- self,
3322
- x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3323
- page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
3324
- limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
3325
- id: Annotated[Optional[StrictStr], Field(description="Filter by partial ID match")] = None,
3326
- labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
3327
- include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include results with errored state and deleted desired state")] = None,
3328
- states: Annotated[Optional[List[StrictStr]], Field(description="List of states to filter by")] = None,
3329
- snapshots: Annotated[Optional[List[StrictStr]], Field(description="List of snapshot names to filter by")] = None,
3330
- regions: Annotated[Optional[List[StrictStr]], Field(description="List of regions to filter by")] = None,
3331
- min_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum CPU")] = None,
3332
- max_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum CPU")] = None,
3333
- min_memory_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum memory in GiB")] = None,
3334
- max_memory_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum memory in GiB")] = None,
3335
- min_disk_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum disk space in GiB")] = None,
3336
- max_disk_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum disk space in GiB")] = None,
3337
- last_event_after: Annotated[Optional[datetime], Field(description="Include items with last event after this timestamp")] = None,
3338
- last_event_before: Annotated[Optional[datetime], Field(description="Include items with last event before this timestamp")] = None,
3339
- sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
3340
- order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
3341
- _request_timeout: Union[
3342
- None,
3343
- Annotated[StrictFloat, Field(gt=0)],
3344
- Tuple[
3345
- Annotated[StrictFloat, Field(gt=0)],
3346
- Annotated[StrictFloat, Field(gt=0)]
3347
- ]
3348
- ] = None,
3349
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3350
- _content_type: Optional[StrictStr] = None,
3351
- _headers: Optional[Dict[StrictStr, Any]] = None,
3352
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3353
- ) -> ApiResponse[PaginatedSandboxes]:
3354
- """List all sandboxes paginated
3355
-
3356
-
3357
- :param x_daytona_organization_id: Use with JWT to specify the organization ID
3358
- :type x_daytona_organization_id: str
3359
- :param page: Page number of the results
3360
- :type page: float
3361
- :param limit: Number of results per page
3362
- :type limit: float
3363
- :param id: Filter by partial ID match
3364
- :type id: str
3365
- :param labels: JSON encoded labels to filter by
3366
- :type labels: str
3367
- :param include_errored_deleted: Include results with errored state and deleted desired state
3368
- :type include_errored_deleted: bool
3369
- :param states: List of states to filter by
3370
- :type states: List[str]
3371
- :param snapshots: List of snapshot names to filter by
3372
- :type snapshots: List[str]
3373
- :param regions: List of regions to filter by
3374
- :type regions: List[str]
3375
- :param min_cpu: Minimum CPU
3376
- :type min_cpu: float
3377
- :param max_cpu: Maximum CPU
3378
- :type max_cpu: float
3379
- :param min_memory_gi_b: Minimum memory in GiB
3380
- :type min_memory_gi_b: float
3381
- :param max_memory_gi_b: Maximum memory in GiB
3382
- :type max_memory_gi_b: float
3383
- :param min_disk_gi_b: Minimum disk space in GiB
3384
- :type min_disk_gi_b: float
3385
- :param max_disk_gi_b: Maximum disk space in GiB
3386
- :type max_disk_gi_b: float
3387
- :param last_event_after: Include items with last event after this timestamp
3388
- :type last_event_after: datetime
3389
- :param last_event_before: Include items with last event before this timestamp
3390
- :type last_event_before: datetime
3391
- :param sort: Field to sort by
3392
- :type sort: str
3393
- :param order: Direction to sort by
3394
- :type order: str
3395
- :param _request_timeout: timeout setting for this request. If one
3396
- number provided, it will be total request
3397
- timeout. It can also be a pair (tuple) of
3398
- (connection, read) timeouts.
3399
- :type _request_timeout: int, tuple(int, int), optional
3400
- :param _request_auth: set to override the auth_settings for an a single
3401
- request; this effectively ignores the
3402
- authentication in the spec for a single request.
3403
- :type _request_auth: dict, optional
3404
- :param _content_type: force content-type for the request.
3405
- :type _content_type: str, Optional
3406
- :param _headers: set to override the headers for a single
3407
- request; this effectively ignores the headers
3408
- in the spec for a single request.
3409
- :type _headers: dict, optional
3410
- :param _host_index: set to override the host_index for a single
3411
- request; this effectively ignores the host_index
3412
- in the spec for a single request.
3413
- :type _host_index: int, optional
3414
- :return: Returns the result object.
3415
- """ # noqa: E501
3416
-
3417
- _param = self._list_sandboxes_paginated_serialize(
3418
- x_daytona_organization_id=x_daytona_organization_id,
3419
- page=page,
3420
- limit=limit,
3421
- id=id,
3422
- labels=labels,
3423
- include_errored_deleted=include_errored_deleted,
3424
- states=states,
3425
- snapshots=snapshots,
3426
- regions=regions,
3427
- min_cpu=min_cpu,
3428
- max_cpu=max_cpu,
3429
- min_memory_gi_b=min_memory_gi_b,
3430
- max_memory_gi_b=max_memory_gi_b,
3431
- min_disk_gi_b=min_disk_gi_b,
3432
- max_disk_gi_b=max_disk_gi_b,
3433
- last_event_after=last_event_after,
3434
- last_event_before=last_event_before,
3435
- sort=sort,
3436
- order=order,
3437
- _request_auth=_request_auth,
3438
- _content_type=_content_type,
3439
- _headers=_headers,
3440
- _host_index=_host_index
3441
- )
3442
-
3443
- _response_types_map: Dict[str, Optional[str]] = {
3444
- '200': "PaginatedSandboxes",
3445
- }
3446
- response_data = self.api_client.call_api(
3447
- *_param,
3448
- _request_timeout=_request_timeout
3449
- )
3450
- response_data.read()
3451
- return self.api_client.response_deserialize(
3452
- response_data=response_data,
3453
- response_types_map=_response_types_map,
3454
- )
3455
-
3456
-
3457
- @validate_call
3458
- def list_sandboxes_paginated_without_preload_content(
3459
- self,
3460
- x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
3461
- page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
3462
- limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
3463
- id: Annotated[Optional[StrictStr], Field(description="Filter by partial ID match")] = None,
3464
- labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
3465
- include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include results with errored state and deleted desired state")] = None,
3466
- states: Annotated[Optional[List[StrictStr]], Field(description="List of states to filter by")] = None,
3467
- snapshots: Annotated[Optional[List[StrictStr]], Field(description="List of snapshot names to filter by")] = None,
3468
- regions: Annotated[Optional[List[StrictStr]], Field(description="List of regions to filter by")] = None,
3469
- min_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum CPU")] = None,
3470
- max_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum CPU")] = None,
3471
- min_memory_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum memory in GiB")] = None,
3472
- max_memory_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum memory in GiB")] = None,
3473
- min_disk_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum disk space in GiB")] = None,
3474
- max_disk_gi_b: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum disk space in GiB")] = None,
3475
- last_event_after: Annotated[Optional[datetime], Field(description="Include items with last event after this timestamp")] = None,
3476
- last_event_before: Annotated[Optional[datetime], Field(description="Include items with last event before this timestamp")] = None,
3477
- sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
3478
- order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
3479
- _request_timeout: Union[
3480
- None,
3481
- Annotated[StrictFloat, Field(gt=0)],
3482
- Tuple[
3483
- Annotated[StrictFloat, Field(gt=0)],
3484
- Annotated[StrictFloat, Field(gt=0)]
3485
- ]
3486
- ] = None,
3487
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3488
- _content_type: Optional[StrictStr] = None,
3489
- _headers: Optional[Dict[StrictStr, Any]] = None,
3490
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3491
- ) -> RESTResponseType:
3492
- """List all sandboxes paginated
3493
-
3494
-
3495
- :param x_daytona_organization_id: Use with JWT to specify the organization ID
3496
- :type x_daytona_organization_id: str
3497
- :param page: Page number of the results
3498
- :type page: float
3499
- :param limit: Number of results per page
3500
- :type limit: float
3501
- :param id: Filter by partial ID match
3502
- :type id: str
3503
- :param labels: JSON encoded labels to filter by
3504
- :type labels: str
3505
- :param include_errored_deleted: Include results with errored state and deleted desired state
3506
- :type include_errored_deleted: bool
3507
- :param states: List of states to filter by
3508
- :type states: List[str]
3509
- :param snapshots: List of snapshot names to filter by
3510
- :type snapshots: List[str]
3511
- :param regions: List of regions to filter by
3512
- :type regions: List[str]
3513
- :param min_cpu: Minimum CPU
3514
- :type min_cpu: float
3515
- :param max_cpu: Maximum CPU
3516
- :type max_cpu: float
3517
- :param min_memory_gi_b: Minimum memory in GiB
3518
- :type min_memory_gi_b: float
3519
- :param max_memory_gi_b: Maximum memory in GiB
3520
- :type max_memory_gi_b: float
3521
- :param min_disk_gi_b: Minimum disk space in GiB
3522
- :type min_disk_gi_b: float
3523
- :param max_disk_gi_b: Maximum disk space in GiB
3524
- :type max_disk_gi_b: float
3525
- :param last_event_after: Include items with last event after this timestamp
3526
- :type last_event_after: datetime
3527
- :param last_event_before: Include items with last event before this timestamp
3528
- :type last_event_before: datetime
3529
- :param sort: Field to sort by
3530
- :type sort: str
3531
- :param order: Direction to sort by
3532
- :type order: str
3533
- :param _request_timeout: timeout setting for this request. If one
3534
- number provided, it will be total request
3535
- timeout. It can also be a pair (tuple) of
3536
- (connection, read) timeouts.
3537
- :type _request_timeout: int, tuple(int, int), optional
3538
- :param _request_auth: set to override the auth_settings for an a single
3539
- request; this effectively ignores the
3540
- authentication in the spec for a single request.
3541
- :type _request_auth: dict, optional
3542
- :param _content_type: force content-type for the request.
3543
- :type _content_type: str, Optional
3544
- :param _headers: set to override the headers for a single
3545
- request; this effectively ignores the headers
3546
- in the spec for a single request.
3547
- :type _headers: dict, optional
3548
- :param _host_index: set to override the host_index for a single
3549
- request; this effectively ignores the host_index
3550
- in the spec for a single request.
3551
- :type _host_index: int, optional
3552
- :return: Returns the result object.
3553
- """ # noqa: E501
3554
-
3555
- _param = self._list_sandboxes_paginated_serialize(
3556
- x_daytona_organization_id=x_daytona_organization_id,
3557
- page=page,
3558
- limit=limit,
3559
- id=id,
3560
- labels=labels,
3561
- include_errored_deleted=include_errored_deleted,
3562
- states=states,
3563
- snapshots=snapshots,
3564
- regions=regions,
3565
- min_cpu=min_cpu,
3566
- max_cpu=max_cpu,
3567
- min_memory_gi_b=min_memory_gi_b,
3568
- max_memory_gi_b=max_memory_gi_b,
3569
- min_disk_gi_b=min_disk_gi_b,
3570
- max_disk_gi_b=max_disk_gi_b,
3571
- last_event_after=last_event_after,
3572
- last_event_before=last_event_before,
3573
- sort=sort,
3574
- order=order,
3575
- _request_auth=_request_auth,
3576
- _content_type=_content_type,
3577
- _headers=_headers,
3578
- _host_index=_host_index
3579
- )
3580
-
3581
- _response_types_map: Dict[str, Optional[str]] = {
3582
- '200': "PaginatedSandboxes",
3583
- }
3584
- response_data = self.api_client.call_api(
3585
- *_param,
3586
- _request_timeout=_request_timeout
3587
- )
3588
- return response_data.response
3589
-
3590
-
3591
- def _list_sandboxes_paginated_serialize(
3592
- self,
3593
- x_daytona_organization_id,
3594
- page,
3595
- limit,
3596
- id,
3597
- labels,
3598
- include_errored_deleted,
3599
- states,
3600
- snapshots,
3601
- regions,
3602
- min_cpu,
3603
- max_cpu,
3604
- min_memory_gi_b,
3605
- max_memory_gi_b,
3606
- min_disk_gi_b,
3607
- max_disk_gi_b,
3608
- last_event_after,
3609
- last_event_before,
3610
- sort,
3611
- order,
3612
- _request_auth,
3613
- _content_type,
3614
- _headers,
3615
- _host_index,
3616
- ) -> RequestSerialized:
3617
-
3618
- _host = None
3619
-
3620
- _collection_formats: Dict[str, str] = {
3621
- 'states': 'multi',
3622
- 'snapshots': 'multi',
3623
- 'regions': 'multi',
3624
- }
3625
-
3626
- _path_params: Dict[str, str] = {}
3627
- _query_params: List[Tuple[str, str]] = []
3628
- _header_params: Dict[str, Optional[str]] = _headers or {}
3629
- _form_params: List[Tuple[str, str]] = []
3630
- _files: Dict[
3631
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3632
- ] = {}
3633
- _body_params: Optional[bytes] = None
3634
-
3635
- # process the path parameters
3636
- # process the query parameters
3637
- if page is not None:
3638
-
3639
- _query_params.append(('page', page))
3640
-
3641
- if limit is not None:
3642
-
3643
- _query_params.append(('limit', limit))
3644
-
3645
- if id is not None:
3646
-
3647
- _query_params.append(('id', id))
3648
-
3649
- if labels is not None:
3650
-
3651
- _query_params.append(('labels', labels))
3652
-
3653
- if include_errored_deleted is not None:
3654
-
3655
- _query_params.append(('includeErroredDeleted', include_errored_deleted))
3656
-
3657
- if states is not None:
3658
-
3659
- _query_params.append(('states', states))
3660
-
3661
- if snapshots is not None:
3662
-
3663
- _query_params.append(('snapshots', snapshots))
3664
-
3665
- if regions is not None:
3666
-
3667
- _query_params.append(('regions', regions))
3668
-
3669
- if min_cpu is not None:
3670
-
3671
- _query_params.append(('minCpu', min_cpu))
3672
-
3673
- if max_cpu is not None:
3674
-
3675
- _query_params.append(('maxCpu', max_cpu))
3676
-
3677
- if min_memory_gi_b is not None:
3678
-
3679
- _query_params.append(('minMemoryGiB', min_memory_gi_b))
3680
-
3681
- if max_memory_gi_b is not None:
3682
-
3683
- _query_params.append(('maxMemoryGiB', max_memory_gi_b))
3684
-
3685
- if min_disk_gi_b is not None:
3686
-
3687
- _query_params.append(('minDiskGiB', min_disk_gi_b))
3688
-
3689
- if max_disk_gi_b is not None:
3690
-
3691
- _query_params.append(('maxDiskGiB', max_disk_gi_b))
3692
-
3693
- if last_event_after is not None:
3694
- if isinstance(last_event_after, datetime):
3695
- _query_params.append(
3696
- (
3697
- 'lastEventAfter',
3698
- last_event_after.strftime(
3699
- self.api_client.configuration.datetime_format
3700
- )
3701
- )
3702
- )
3703
- else:
3704
- _query_params.append(('lastEventAfter', last_event_after))
3705
-
3706
- if last_event_before is not None:
3707
- if isinstance(last_event_before, datetime):
3708
- _query_params.append(
3709
- (
3710
- 'lastEventBefore',
3711
- last_event_before.strftime(
3712
- self.api_client.configuration.datetime_format
3713
- )
3714
- )
3715
- )
3716
- else:
3717
- _query_params.append(('lastEventBefore', last_event_before))
3718
-
3719
- if sort is not None:
3720
-
3721
- _query_params.append(('sort', sort))
3722
-
3723
- if order is not None:
3724
-
3725
- _query_params.append(('order', order))
3726
-
3727
- # process the header parameters
3728
- if x_daytona_organization_id is not None:
3729
- _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
3730
- # process the form parameters
3731
- # process the body parameter
3732
-
3733
-
3734
- # set the HTTP header `Accept`
3735
- if 'Accept' not in _header_params:
3736
- _header_params['Accept'] = self.api_client.select_header_accept(
3737
- [
3738
- 'application/json'
3739
- ]
3740
- )
3741
-
3742
-
3743
- # authentication setting
3744
- _auth_settings: List[str] = [
3745
- 'bearer',
3746
- 'oauth2'
3747
- ]
3748
-
3749
- return self.api_client.param_serialize(
3750
- method='GET',
3751
- resource_path='/sandbox/paginated',
3752
- path_params=_path_params,
3753
- query_params=_query_params,
3754
- header_params=_header_params,
3755
- body=_body_params,
3756
- post_params=_form_params,
3757
- files=_files,
3758
- auth_settings=_auth_settings,
3759
- collection_formats=_collection_formats,
3760
- _host=_host,
3761
- _request_auth=_request_auth
3762
- )
3763
-
3764
-
3765
-
3766
-
3767
2919
  @validate_call
3768
2920
  def replace_labels(
3769
2921
  self,