Skip to content

Commit 27d8a60

Browse files
feat(api): api update (#186)
1 parent 3f61afa commit 27d8a60

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 27
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-4ec0adec99c6779da0f166f8ff466d681b287a8465e98529368b123123ac0c43.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8284fde181cf470e6d029c6b2a01497e86b27cf07cdde64d59d9ba063f281b86.yml

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def create(
108108
name: str | NotGiven = NOT_GIVEN,
109109
prebuilt: str | NotGiven = NOT_GIVEN,
110110
setup_commands: List[str] | NotGiven = NOT_GIVEN,
111+
snapshot_id: str | NotGiven = NOT_GIVEN,
111112
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
112113
# The extra values given here take precedence over values defined on the client or passed to this method.
113114
extra_headers: Headers | None = None,
@@ -149,6 +150,8 @@ def create(
149150
fetching a tool or building your dependencies. Runloop will look optimize these
150151
steps for you.
151152
153+
snapshot_id: Snapshot ID to use for the Devbox.
154+
152155
extra_headers: Send extra headers
153156
154157
extra_query: Add additional query parameters to the request
@@ -172,6 +175,7 @@ def create(
172175
"name": name,
173176
"prebuilt": prebuilt,
174177
"setup_commands": setup_commands,
178+
"snapshot_id": snapshot_id,
175179
},
176180
devbox_create_params.DevboxCreateParams,
177181
),
@@ -641,6 +645,7 @@ async def create(
641645
name: str | NotGiven = NOT_GIVEN,
642646
prebuilt: str | NotGiven = NOT_GIVEN,
643647
setup_commands: List[str] | NotGiven = NOT_GIVEN,
648+
snapshot_id: str | NotGiven = NOT_GIVEN,
644649
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
645650
# The extra values given here take precedence over values defined on the client or passed to this method.
646651
extra_headers: Headers | None = None,
@@ -682,6 +687,8 @@ async def create(
682687
fetching a tool or building your dependencies. Runloop will look optimize these
683688
steps for you.
684689
690+
snapshot_id: Snapshot ID to use for the Devbox.
691+
685692
extra_headers: Send extra headers
686693
687694
extra_query: Add additional query parameters to the request
@@ -705,6 +712,7 @@ async def create(
705712
"name": name,
706713
"prebuilt": prebuilt,
707714
"setup_commands": setup_commands,
715+
"snapshot_id": snapshot_id,
708716
},
709717
devbox_create_params.DevboxCreateParams,
710718
),

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class DevboxCreateParams(TypedDict, total=False):
6060
will look optimize these steps for you.
6161
"""
6262

63+
snapshot_id: str
64+
"""Snapshot ID to use for the Devbox."""
65+
6366

6467
class LaunchParameters(TypedDict, total=False):
6568
keep_alive_time_seconds: int

tests/api_resources/test_devboxes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
7373
name="name",
7474
prebuilt="prebuilt",
7575
setup_commands=["string", "string", "string"],
76+
snapshot_id="snapshot_id",
7677
)
7778
assert_matches_type(DevboxView, devbox, path=["response"])
7879

@@ -581,6 +582,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
581582
name="name",
582583
prebuilt="prebuilt",
583584
setup_commands=["string", "string", "string"],
585+
snapshot_id="snapshot_id",
584586
)
585587
assert_matches_type(DevboxView, devbox, path=["response"])
586588

0 commit comments

Comments
 (0)