daytona_api_client 0.105.0__py3-none-any.whl → 0.106.0a1__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.
- daytona_api_client/__init__.py +4 -1
- daytona_api_client/api/audit_api.py +47 -47
- daytona_api_client/api/sandbox_api.py +565 -44
- daytona_api_client/api/snapshots_api.py +79 -28
- daytona_api_client/api/workspace_api.py +316 -21
- daytona_api_client/models/__init__.py +4 -1
- daytona_api_client/models/paginated_sandboxes.py +115 -0
- daytona_api_client/models/paginated_snapshots.py +115 -0
- daytona_api_client/models/paginated_workspaces.py +115 -0
- daytona_api_client/models/region.py +101 -0
- {daytona_api_client-0.105.0.dist-info → daytona_api_client-0.106.0a1.dist-info}/METADATA +1 -1
- {daytona_api_client-0.105.0.dist-info → daytona_api_client-0.106.0a1.dist-info}/RECORD +15 -11
- {daytona_api_client-0.105.0.dist-info → daytona_api_client-0.106.0a1.dist-info}/WHEEL +0 -0
- {daytona_api_client-0.105.0.dist-info → daytona_api_client-0.106.0a1.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client-0.105.0.dist-info → daytona_api_client-0.106.0a1.dist-info}/top_level.txt +0 -0
|
@@ -17,10 +17,12 @@ 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
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
22
|
from typing import List, Optional, Union
|
|
22
23
|
from typing_extensions import Annotated
|
|
23
24
|
from daytona_api_client.models.create_workspace import CreateWorkspace
|
|
25
|
+
from daytona_api_client.models.paginated_workspaces import PaginatedWorkspaces
|
|
24
26
|
from daytona_api_client.models.port_preview_url import PortPreviewUrl
|
|
25
27
|
from daytona_api_client.models.sandbox_labels import SandboxLabels
|
|
26
28
|
from daytona_api_client.models.workspace import Workspace
|
|
@@ -2044,8 +2046,24 @@ class WorkspaceApi:
|
|
|
2044
2046
|
def list_workspaces_deprecated(
|
|
2045
2047
|
self,
|
|
2046
2048
|
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2047
|
-
|
|
2049
|
+
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,
|
|
2050
|
+
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,
|
|
2051
|
+
id: Annotated[Optional[StrictStr], Field(description="Filter by partial ID match")] = None,
|
|
2048
2052
|
labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
|
|
2053
|
+
include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include results with errored state and deleted desired state")] = None,
|
|
2054
|
+
states: Annotated[Optional[List[StrictStr]], Field(description="List of states to filter by")] = None,
|
|
2055
|
+
snapshots: Annotated[Optional[List[StrictStr]], Field(description="List of snapshot names to filter by")] = None,
|
|
2056
|
+
regions: Annotated[Optional[List[StrictStr]], Field(description="List of regions to filter by")] = None,
|
|
2057
|
+
min_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum CPU")] = None,
|
|
2058
|
+
max_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum CPU")] = None,
|
|
2059
|
+
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,
|
|
2060
|
+
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,
|
|
2061
|
+
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,
|
|
2062
|
+
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,
|
|
2063
|
+
last_event_after: Annotated[Optional[datetime], Field(description="Include items with last event after this timestamp")] = None,
|
|
2064
|
+
last_event_before: Annotated[Optional[datetime], Field(description="Include items with last event before this timestamp")] = None,
|
|
2065
|
+
sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
|
|
2066
|
+
order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
|
|
2049
2067
|
_request_timeout: Union[
|
|
2050
2068
|
None,
|
|
2051
2069
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2058,16 +2076,48 @@ class WorkspaceApi:
|
|
|
2058
2076
|
_content_type: Optional[StrictStr] = None,
|
|
2059
2077
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2060
2078
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2061
|
-
) ->
|
|
2079
|
+
) -> PaginatedWorkspaces:
|
|
2062
2080
|
"""(Deprecated) [DEPRECATED] List all workspaces
|
|
2063
2081
|
|
|
2064
2082
|
|
|
2065
2083
|
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2066
2084
|
:type x_daytona_organization_id: str
|
|
2067
|
-
:param
|
|
2068
|
-
:type
|
|
2085
|
+
:param page: Page number of the results
|
|
2086
|
+
:type page: float
|
|
2087
|
+
:param limit: Number of results per page
|
|
2088
|
+
:type limit: float
|
|
2089
|
+
:param id: Filter by partial ID match
|
|
2090
|
+
:type id: str
|
|
2069
2091
|
:param labels: JSON encoded labels to filter by
|
|
2070
2092
|
:type labels: str
|
|
2093
|
+
:param include_errored_deleted: Include results with errored state and deleted desired state
|
|
2094
|
+
:type include_errored_deleted: bool
|
|
2095
|
+
:param states: List of states to filter by
|
|
2096
|
+
:type states: List[str]
|
|
2097
|
+
:param snapshots: List of snapshot names to filter by
|
|
2098
|
+
:type snapshots: List[str]
|
|
2099
|
+
:param regions: List of regions to filter by
|
|
2100
|
+
:type regions: List[str]
|
|
2101
|
+
:param min_cpu: Minimum CPU
|
|
2102
|
+
:type min_cpu: float
|
|
2103
|
+
:param max_cpu: Maximum CPU
|
|
2104
|
+
:type max_cpu: float
|
|
2105
|
+
:param min_memory_gi_b: Minimum memory in GiB
|
|
2106
|
+
:type min_memory_gi_b: float
|
|
2107
|
+
:param max_memory_gi_b: Maximum memory in GiB
|
|
2108
|
+
:type max_memory_gi_b: float
|
|
2109
|
+
:param min_disk_gi_b: Minimum disk space in GiB
|
|
2110
|
+
:type min_disk_gi_b: float
|
|
2111
|
+
:param max_disk_gi_b: Maximum disk space in GiB
|
|
2112
|
+
:type max_disk_gi_b: float
|
|
2113
|
+
:param last_event_after: Include items with last event after this timestamp
|
|
2114
|
+
:type last_event_after: datetime
|
|
2115
|
+
:param last_event_before: Include items with last event before this timestamp
|
|
2116
|
+
:type last_event_before: datetime
|
|
2117
|
+
:param sort: Field to sort by
|
|
2118
|
+
:type sort: str
|
|
2119
|
+
:param order: Direction to sort by
|
|
2120
|
+
:type order: str
|
|
2071
2121
|
:param _request_timeout: timeout setting for this request. If one
|
|
2072
2122
|
number provided, it will be total request
|
|
2073
2123
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2093,8 +2143,24 @@ class WorkspaceApi:
|
|
|
2093
2143
|
|
|
2094
2144
|
_param = self._list_workspaces_deprecated_serialize(
|
|
2095
2145
|
x_daytona_organization_id=x_daytona_organization_id,
|
|
2096
|
-
|
|
2146
|
+
page=page,
|
|
2147
|
+
limit=limit,
|
|
2148
|
+
id=id,
|
|
2097
2149
|
labels=labels,
|
|
2150
|
+
include_errored_deleted=include_errored_deleted,
|
|
2151
|
+
states=states,
|
|
2152
|
+
snapshots=snapshots,
|
|
2153
|
+
regions=regions,
|
|
2154
|
+
min_cpu=min_cpu,
|
|
2155
|
+
max_cpu=max_cpu,
|
|
2156
|
+
min_memory_gi_b=min_memory_gi_b,
|
|
2157
|
+
max_memory_gi_b=max_memory_gi_b,
|
|
2158
|
+
min_disk_gi_b=min_disk_gi_b,
|
|
2159
|
+
max_disk_gi_b=max_disk_gi_b,
|
|
2160
|
+
last_event_after=last_event_after,
|
|
2161
|
+
last_event_before=last_event_before,
|
|
2162
|
+
sort=sort,
|
|
2163
|
+
order=order,
|
|
2098
2164
|
_request_auth=_request_auth,
|
|
2099
2165
|
_content_type=_content_type,
|
|
2100
2166
|
_headers=_headers,
|
|
@@ -2102,7 +2168,7 @@ class WorkspaceApi:
|
|
|
2102
2168
|
)
|
|
2103
2169
|
|
|
2104
2170
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2105
|
-
'200': "
|
|
2171
|
+
'200': "PaginatedWorkspaces",
|
|
2106
2172
|
}
|
|
2107
2173
|
response_data = self.api_client.call_api(
|
|
2108
2174
|
*_param,
|
|
@@ -2119,8 +2185,24 @@ class WorkspaceApi:
|
|
|
2119
2185
|
def list_workspaces_deprecated_with_http_info(
|
|
2120
2186
|
self,
|
|
2121
2187
|
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2122
|
-
|
|
2188
|
+
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,
|
|
2189
|
+
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,
|
|
2190
|
+
id: Annotated[Optional[StrictStr], Field(description="Filter by partial ID match")] = None,
|
|
2123
2191
|
labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
|
|
2192
|
+
include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include results with errored state and deleted desired state")] = None,
|
|
2193
|
+
states: Annotated[Optional[List[StrictStr]], Field(description="List of states to filter by")] = None,
|
|
2194
|
+
snapshots: Annotated[Optional[List[StrictStr]], Field(description="List of snapshot names to filter by")] = None,
|
|
2195
|
+
regions: Annotated[Optional[List[StrictStr]], Field(description="List of regions to filter by")] = None,
|
|
2196
|
+
min_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum CPU")] = None,
|
|
2197
|
+
max_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum CPU")] = None,
|
|
2198
|
+
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,
|
|
2199
|
+
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,
|
|
2200
|
+
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,
|
|
2201
|
+
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,
|
|
2202
|
+
last_event_after: Annotated[Optional[datetime], Field(description="Include items with last event after this timestamp")] = None,
|
|
2203
|
+
last_event_before: Annotated[Optional[datetime], Field(description="Include items with last event before this timestamp")] = None,
|
|
2204
|
+
sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
|
|
2205
|
+
order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
|
|
2124
2206
|
_request_timeout: Union[
|
|
2125
2207
|
None,
|
|
2126
2208
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2133,16 +2215,48 @@ class WorkspaceApi:
|
|
|
2133
2215
|
_content_type: Optional[StrictStr] = None,
|
|
2134
2216
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2135
2217
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2136
|
-
) -> ApiResponse[
|
|
2218
|
+
) -> ApiResponse[PaginatedWorkspaces]:
|
|
2137
2219
|
"""(Deprecated) [DEPRECATED] List all workspaces
|
|
2138
2220
|
|
|
2139
2221
|
|
|
2140
2222
|
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2141
2223
|
:type x_daytona_organization_id: str
|
|
2142
|
-
:param
|
|
2143
|
-
:type
|
|
2224
|
+
:param page: Page number of the results
|
|
2225
|
+
:type page: float
|
|
2226
|
+
:param limit: Number of results per page
|
|
2227
|
+
:type limit: float
|
|
2228
|
+
:param id: Filter by partial ID match
|
|
2229
|
+
:type id: str
|
|
2144
2230
|
:param labels: JSON encoded labels to filter by
|
|
2145
2231
|
:type labels: str
|
|
2232
|
+
:param include_errored_deleted: Include results with errored state and deleted desired state
|
|
2233
|
+
:type include_errored_deleted: bool
|
|
2234
|
+
:param states: List of states to filter by
|
|
2235
|
+
:type states: List[str]
|
|
2236
|
+
:param snapshots: List of snapshot names to filter by
|
|
2237
|
+
:type snapshots: List[str]
|
|
2238
|
+
:param regions: List of regions to filter by
|
|
2239
|
+
:type regions: List[str]
|
|
2240
|
+
:param min_cpu: Minimum CPU
|
|
2241
|
+
:type min_cpu: float
|
|
2242
|
+
:param max_cpu: Maximum CPU
|
|
2243
|
+
:type max_cpu: float
|
|
2244
|
+
:param min_memory_gi_b: Minimum memory in GiB
|
|
2245
|
+
:type min_memory_gi_b: float
|
|
2246
|
+
:param max_memory_gi_b: Maximum memory in GiB
|
|
2247
|
+
:type max_memory_gi_b: float
|
|
2248
|
+
:param min_disk_gi_b: Minimum disk space in GiB
|
|
2249
|
+
:type min_disk_gi_b: float
|
|
2250
|
+
:param max_disk_gi_b: Maximum disk space in GiB
|
|
2251
|
+
:type max_disk_gi_b: float
|
|
2252
|
+
:param last_event_after: Include items with last event after this timestamp
|
|
2253
|
+
:type last_event_after: datetime
|
|
2254
|
+
:param last_event_before: Include items with last event before this timestamp
|
|
2255
|
+
:type last_event_before: datetime
|
|
2256
|
+
:param sort: Field to sort by
|
|
2257
|
+
:type sort: str
|
|
2258
|
+
:param order: Direction to sort by
|
|
2259
|
+
:type order: str
|
|
2146
2260
|
:param _request_timeout: timeout setting for this request. If one
|
|
2147
2261
|
number provided, it will be total request
|
|
2148
2262
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2168,8 +2282,24 @@ class WorkspaceApi:
|
|
|
2168
2282
|
|
|
2169
2283
|
_param = self._list_workspaces_deprecated_serialize(
|
|
2170
2284
|
x_daytona_organization_id=x_daytona_organization_id,
|
|
2171
|
-
|
|
2285
|
+
page=page,
|
|
2286
|
+
limit=limit,
|
|
2287
|
+
id=id,
|
|
2172
2288
|
labels=labels,
|
|
2289
|
+
include_errored_deleted=include_errored_deleted,
|
|
2290
|
+
states=states,
|
|
2291
|
+
snapshots=snapshots,
|
|
2292
|
+
regions=regions,
|
|
2293
|
+
min_cpu=min_cpu,
|
|
2294
|
+
max_cpu=max_cpu,
|
|
2295
|
+
min_memory_gi_b=min_memory_gi_b,
|
|
2296
|
+
max_memory_gi_b=max_memory_gi_b,
|
|
2297
|
+
min_disk_gi_b=min_disk_gi_b,
|
|
2298
|
+
max_disk_gi_b=max_disk_gi_b,
|
|
2299
|
+
last_event_after=last_event_after,
|
|
2300
|
+
last_event_before=last_event_before,
|
|
2301
|
+
sort=sort,
|
|
2302
|
+
order=order,
|
|
2173
2303
|
_request_auth=_request_auth,
|
|
2174
2304
|
_content_type=_content_type,
|
|
2175
2305
|
_headers=_headers,
|
|
@@ -2177,7 +2307,7 @@ class WorkspaceApi:
|
|
|
2177
2307
|
)
|
|
2178
2308
|
|
|
2179
2309
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2180
|
-
'200': "
|
|
2310
|
+
'200': "PaginatedWorkspaces",
|
|
2181
2311
|
}
|
|
2182
2312
|
response_data = self.api_client.call_api(
|
|
2183
2313
|
*_param,
|
|
@@ -2194,8 +2324,24 @@ class WorkspaceApi:
|
|
|
2194
2324
|
def list_workspaces_deprecated_without_preload_content(
|
|
2195
2325
|
self,
|
|
2196
2326
|
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2197
|
-
|
|
2327
|
+
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,
|
|
2328
|
+
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,
|
|
2329
|
+
id: Annotated[Optional[StrictStr], Field(description="Filter by partial ID match")] = None,
|
|
2198
2330
|
labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
|
|
2331
|
+
include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include results with errored state and deleted desired state")] = None,
|
|
2332
|
+
states: Annotated[Optional[List[StrictStr]], Field(description="List of states to filter by")] = None,
|
|
2333
|
+
snapshots: Annotated[Optional[List[StrictStr]], Field(description="List of snapshot names to filter by")] = None,
|
|
2334
|
+
regions: Annotated[Optional[List[StrictStr]], Field(description="List of regions to filter by")] = None,
|
|
2335
|
+
min_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Minimum CPU")] = None,
|
|
2336
|
+
max_cpu: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Maximum CPU")] = None,
|
|
2337
|
+
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,
|
|
2338
|
+
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,
|
|
2339
|
+
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,
|
|
2340
|
+
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,
|
|
2341
|
+
last_event_after: Annotated[Optional[datetime], Field(description="Include items with last event after this timestamp")] = None,
|
|
2342
|
+
last_event_before: Annotated[Optional[datetime], Field(description="Include items with last event before this timestamp")] = None,
|
|
2343
|
+
sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
|
|
2344
|
+
order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
|
|
2199
2345
|
_request_timeout: Union[
|
|
2200
2346
|
None,
|
|
2201
2347
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2214,10 +2360,42 @@ class WorkspaceApi:
|
|
|
2214
2360
|
|
|
2215
2361
|
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2216
2362
|
:type x_daytona_organization_id: str
|
|
2217
|
-
:param
|
|
2218
|
-
:type
|
|
2363
|
+
:param page: Page number of the results
|
|
2364
|
+
:type page: float
|
|
2365
|
+
:param limit: Number of results per page
|
|
2366
|
+
:type limit: float
|
|
2367
|
+
:param id: Filter by partial ID match
|
|
2368
|
+
:type id: str
|
|
2219
2369
|
:param labels: JSON encoded labels to filter by
|
|
2220
2370
|
:type labels: str
|
|
2371
|
+
:param include_errored_deleted: Include results with errored state and deleted desired state
|
|
2372
|
+
:type include_errored_deleted: bool
|
|
2373
|
+
:param states: List of states to filter by
|
|
2374
|
+
:type states: List[str]
|
|
2375
|
+
:param snapshots: List of snapshot names to filter by
|
|
2376
|
+
:type snapshots: List[str]
|
|
2377
|
+
:param regions: List of regions to filter by
|
|
2378
|
+
:type regions: List[str]
|
|
2379
|
+
:param min_cpu: Minimum CPU
|
|
2380
|
+
:type min_cpu: float
|
|
2381
|
+
:param max_cpu: Maximum CPU
|
|
2382
|
+
:type max_cpu: float
|
|
2383
|
+
:param min_memory_gi_b: Minimum memory in GiB
|
|
2384
|
+
:type min_memory_gi_b: float
|
|
2385
|
+
:param max_memory_gi_b: Maximum memory in GiB
|
|
2386
|
+
:type max_memory_gi_b: float
|
|
2387
|
+
:param min_disk_gi_b: Minimum disk space in GiB
|
|
2388
|
+
:type min_disk_gi_b: float
|
|
2389
|
+
:param max_disk_gi_b: Maximum disk space in GiB
|
|
2390
|
+
:type max_disk_gi_b: float
|
|
2391
|
+
:param last_event_after: Include items with last event after this timestamp
|
|
2392
|
+
:type last_event_after: datetime
|
|
2393
|
+
:param last_event_before: Include items with last event before this timestamp
|
|
2394
|
+
:type last_event_before: datetime
|
|
2395
|
+
:param sort: Field to sort by
|
|
2396
|
+
:type sort: str
|
|
2397
|
+
:param order: Direction to sort by
|
|
2398
|
+
:type order: str
|
|
2221
2399
|
:param _request_timeout: timeout setting for this request. If one
|
|
2222
2400
|
number provided, it will be total request
|
|
2223
2401
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2243,8 +2421,24 @@ class WorkspaceApi:
|
|
|
2243
2421
|
|
|
2244
2422
|
_param = self._list_workspaces_deprecated_serialize(
|
|
2245
2423
|
x_daytona_organization_id=x_daytona_organization_id,
|
|
2246
|
-
|
|
2424
|
+
page=page,
|
|
2425
|
+
limit=limit,
|
|
2426
|
+
id=id,
|
|
2247
2427
|
labels=labels,
|
|
2428
|
+
include_errored_deleted=include_errored_deleted,
|
|
2429
|
+
states=states,
|
|
2430
|
+
snapshots=snapshots,
|
|
2431
|
+
regions=regions,
|
|
2432
|
+
min_cpu=min_cpu,
|
|
2433
|
+
max_cpu=max_cpu,
|
|
2434
|
+
min_memory_gi_b=min_memory_gi_b,
|
|
2435
|
+
max_memory_gi_b=max_memory_gi_b,
|
|
2436
|
+
min_disk_gi_b=min_disk_gi_b,
|
|
2437
|
+
max_disk_gi_b=max_disk_gi_b,
|
|
2438
|
+
last_event_after=last_event_after,
|
|
2439
|
+
last_event_before=last_event_before,
|
|
2440
|
+
sort=sort,
|
|
2441
|
+
order=order,
|
|
2248
2442
|
_request_auth=_request_auth,
|
|
2249
2443
|
_content_type=_content_type,
|
|
2250
2444
|
_headers=_headers,
|
|
@@ -2252,7 +2446,7 @@ class WorkspaceApi:
|
|
|
2252
2446
|
)
|
|
2253
2447
|
|
|
2254
2448
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2255
|
-
'200': "
|
|
2449
|
+
'200': "PaginatedWorkspaces",
|
|
2256
2450
|
}
|
|
2257
2451
|
response_data = self.api_client.call_api(
|
|
2258
2452
|
*_param,
|
|
@@ -2264,8 +2458,24 @@ class WorkspaceApi:
|
|
|
2264
2458
|
def _list_workspaces_deprecated_serialize(
|
|
2265
2459
|
self,
|
|
2266
2460
|
x_daytona_organization_id,
|
|
2267
|
-
|
|
2461
|
+
page,
|
|
2462
|
+
limit,
|
|
2463
|
+
id,
|
|
2268
2464
|
labels,
|
|
2465
|
+
include_errored_deleted,
|
|
2466
|
+
states,
|
|
2467
|
+
snapshots,
|
|
2468
|
+
regions,
|
|
2469
|
+
min_cpu,
|
|
2470
|
+
max_cpu,
|
|
2471
|
+
min_memory_gi_b,
|
|
2472
|
+
max_memory_gi_b,
|
|
2473
|
+
min_disk_gi_b,
|
|
2474
|
+
max_disk_gi_b,
|
|
2475
|
+
last_event_after,
|
|
2476
|
+
last_event_before,
|
|
2477
|
+
sort,
|
|
2478
|
+
order,
|
|
2269
2479
|
_request_auth,
|
|
2270
2480
|
_content_type,
|
|
2271
2481
|
_headers,
|
|
@@ -2275,6 +2485,9 @@ class WorkspaceApi:
|
|
|
2275
2485
|
_host = None
|
|
2276
2486
|
|
|
2277
2487
|
_collection_formats: Dict[str, str] = {
|
|
2488
|
+
'states': 'multi',
|
|
2489
|
+
'snapshots': 'multi',
|
|
2490
|
+
'regions': 'multi',
|
|
2278
2491
|
}
|
|
2279
2492
|
|
|
2280
2493
|
_path_params: Dict[str, str] = {}
|
|
@@ -2288,14 +2501,96 @@ class WorkspaceApi:
|
|
|
2288
2501
|
|
|
2289
2502
|
# process the path parameters
|
|
2290
2503
|
# process the query parameters
|
|
2291
|
-
if
|
|
2504
|
+
if page is not None:
|
|
2292
2505
|
|
|
2293
|
-
_query_params.append(('
|
|
2506
|
+
_query_params.append(('page', page))
|
|
2507
|
+
|
|
2508
|
+
if limit is not None:
|
|
2509
|
+
|
|
2510
|
+
_query_params.append(('limit', limit))
|
|
2511
|
+
|
|
2512
|
+
if id is not None:
|
|
2513
|
+
|
|
2514
|
+
_query_params.append(('id', id))
|
|
2294
2515
|
|
|
2295
2516
|
if labels is not None:
|
|
2296
2517
|
|
|
2297
2518
|
_query_params.append(('labels', labels))
|
|
2298
2519
|
|
|
2520
|
+
if include_errored_deleted is not None:
|
|
2521
|
+
|
|
2522
|
+
_query_params.append(('includeErroredDeleted', include_errored_deleted))
|
|
2523
|
+
|
|
2524
|
+
if states is not None:
|
|
2525
|
+
|
|
2526
|
+
_query_params.append(('states', states))
|
|
2527
|
+
|
|
2528
|
+
if snapshots is not None:
|
|
2529
|
+
|
|
2530
|
+
_query_params.append(('snapshots', snapshots))
|
|
2531
|
+
|
|
2532
|
+
if regions is not None:
|
|
2533
|
+
|
|
2534
|
+
_query_params.append(('regions', regions))
|
|
2535
|
+
|
|
2536
|
+
if min_cpu is not None:
|
|
2537
|
+
|
|
2538
|
+
_query_params.append(('minCpu', min_cpu))
|
|
2539
|
+
|
|
2540
|
+
if max_cpu is not None:
|
|
2541
|
+
|
|
2542
|
+
_query_params.append(('maxCpu', max_cpu))
|
|
2543
|
+
|
|
2544
|
+
if min_memory_gi_b is not None:
|
|
2545
|
+
|
|
2546
|
+
_query_params.append(('minMemoryGiB', min_memory_gi_b))
|
|
2547
|
+
|
|
2548
|
+
if max_memory_gi_b is not None:
|
|
2549
|
+
|
|
2550
|
+
_query_params.append(('maxMemoryGiB', max_memory_gi_b))
|
|
2551
|
+
|
|
2552
|
+
if min_disk_gi_b is not None:
|
|
2553
|
+
|
|
2554
|
+
_query_params.append(('minDiskGiB', min_disk_gi_b))
|
|
2555
|
+
|
|
2556
|
+
if max_disk_gi_b is not None:
|
|
2557
|
+
|
|
2558
|
+
_query_params.append(('maxDiskGiB', max_disk_gi_b))
|
|
2559
|
+
|
|
2560
|
+
if last_event_after is not None:
|
|
2561
|
+
if isinstance(last_event_after, datetime):
|
|
2562
|
+
_query_params.append(
|
|
2563
|
+
(
|
|
2564
|
+
'lastEventAfter',
|
|
2565
|
+
last_event_after.strftime(
|
|
2566
|
+
self.api_client.configuration.datetime_format
|
|
2567
|
+
)
|
|
2568
|
+
)
|
|
2569
|
+
)
|
|
2570
|
+
else:
|
|
2571
|
+
_query_params.append(('lastEventAfter', last_event_after))
|
|
2572
|
+
|
|
2573
|
+
if last_event_before is not None:
|
|
2574
|
+
if isinstance(last_event_before, datetime):
|
|
2575
|
+
_query_params.append(
|
|
2576
|
+
(
|
|
2577
|
+
'lastEventBefore',
|
|
2578
|
+
last_event_before.strftime(
|
|
2579
|
+
self.api_client.configuration.datetime_format
|
|
2580
|
+
)
|
|
2581
|
+
)
|
|
2582
|
+
)
|
|
2583
|
+
else:
|
|
2584
|
+
_query_params.append(('lastEventBefore', last_event_before))
|
|
2585
|
+
|
|
2586
|
+
if sort is not None:
|
|
2587
|
+
|
|
2588
|
+
_query_params.append(('sort', sort))
|
|
2589
|
+
|
|
2590
|
+
if order is not None:
|
|
2591
|
+
|
|
2592
|
+
_query_params.append(('order', order))
|
|
2593
|
+
|
|
2299
2594
|
# process the header parameters
|
|
2300
2595
|
if x_daytona_organization_id is not None:
|
|
2301
2596
|
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
@@ -94,7 +94,9 @@ from daytona_api_client.models.organization_suspension import OrganizationSuspen
|
|
|
94
94
|
from daytona_api_client.models.organization_usage_overview import OrganizationUsageOverview
|
|
95
95
|
from daytona_api_client.models.organization_user import OrganizationUser
|
|
96
96
|
from daytona_api_client.models.paginated_audit_logs import PaginatedAuditLogs
|
|
97
|
-
from daytona_api_client.models.
|
|
97
|
+
from daytona_api_client.models.paginated_sandboxes import PaginatedSandboxes
|
|
98
|
+
from daytona_api_client.models.paginated_snapshots import PaginatedSnapshots
|
|
99
|
+
from daytona_api_client.models.paginated_workspaces import PaginatedWorkspaces
|
|
98
100
|
from daytona_api_client.models.port_preview_url import PortPreviewUrl
|
|
99
101
|
from daytona_api_client.models.position import Position
|
|
100
102
|
from daytona_api_client.models.posthog_config import PosthogConfig
|
|
@@ -104,6 +106,7 @@ from daytona_api_client.models.process_restart_response import ProcessRestartRes
|
|
|
104
106
|
from daytona_api_client.models.process_status_response import ProcessStatusResponse
|
|
105
107
|
from daytona_api_client.models.project_dir_response import ProjectDirResponse
|
|
106
108
|
from daytona_api_client.models.range import Range
|
|
109
|
+
from daytona_api_client.models.region import Region
|
|
107
110
|
from daytona_api_client.models.region_screenshot_response import RegionScreenshotResponse
|
|
108
111
|
from daytona_api_client.models.registry_push_access_dto import RegistryPushAccessDto
|
|
109
112
|
from daytona_api_client.models.replace_request import ReplaceRequest
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
23
|
+
from daytona_api_client.models.sandbox import Sandbox
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedSandboxes(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedSandboxes
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
items: List[Sandbox]
|
|
32
|
+
total: Union[StrictFloat, StrictInt]
|
|
33
|
+
page: Union[StrictFloat, StrictInt]
|
|
34
|
+
total_pages: Union[StrictFloat, StrictInt] = Field(alias="totalPages")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["items", "total", "page", "totalPages"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of PaginatedSandboxes from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
80
|
+
_items = []
|
|
81
|
+
if self.items:
|
|
82
|
+
for _item_items in self.items:
|
|
83
|
+
if _item_items:
|
|
84
|
+
_items.append(_item_items.to_dict())
|
|
85
|
+
_dict['items'] = _items
|
|
86
|
+
# puts key-value pairs in additional_properties in the top level
|
|
87
|
+
if self.additional_properties is not None:
|
|
88
|
+
for _key, _value in self.additional_properties.items():
|
|
89
|
+
_dict[_key] = _value
|
|
90
|
+
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of PaginatedSandboxes from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return cls.model_validate(obj)
|
|
101
|
+
|
|
102
|
+
_obj = cls.model_validate({
|
|
103
|
+
"items": [Sandbox.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
104
|
+
"total": obj.get("total"),
|
|
105
|
+
"page": obj.get("page"),
|
|
106
|
+
"totalPages": obj.get("totalPages")
|
|
107
|
+
})
|
|
108
|
+
# store additional fields in additional_properties
|
|
109
|
+
for _key in obj.keys():
|
|
110
|
+
if _key not in cls.__properties:
|
|
111
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
112
|
+
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|