Skip to content

Commit 31d12f7

Browse files
feat(api): api update
1 parent 8c82907 commit 31d12f7

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 87
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-c23f8f8426208651ecf7b2a4108ea2003c6e3241c6928e88ef004f76fe826c08.yml
3-
openapi_spec_hash: 2eee5118b3c2dd49f9124df0d10341ed
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-028690466821f7d03fc038928ce12d65025db071b8a74b9c1fb39309e40a99ec.yml
3+
openapi_spec_hash: a6433c9e1bcf8cb3b4e23413ad6f7f11
44
config_hash: 4514558503b7aa6eba8c2941564c247d

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def create(
171171
name: Optional[str] | NotGiven = NOT_GIVEN,
172172
prebuilt: Optional[str] | NotGiven = NOT_GIVEN,
173173
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
174+
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
174175
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
175176
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
176177
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -218,6 +219,11 @@ def create(
218219
219220
repo_connection_id: Repository connection id the devbox should source its base image from.
220221
222+
secrets: (Optional) Map of environment variable names to secret names. The secret values
223+
will be securely injected as environment variables in the Devbox. Example:
224+
{"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the
225+
value of secret 'DATABASE_PASSWORD'.
226+
221227
snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID,
222228
Blueprint name) should be specified.
223229
@@ -246,6 +252,7 @@ def create(
246252
"name": name,
247253
"prebuilt": prebuilt,
248254
"repo_connection_id": repo_connection_id,
255+
"secrets": secrets,
249256
"snapshot_id": snapshot_id,
250257
},
251258
devbox_create_params.DevboxCreateParams,
@@ -1430,6 +1437,7 @@ async def create(
14301437
name: Optional[str] | NotGiven = NOT_GIVEN,
14311438
prebuilt: Optional[str] | NotGiven = NOT_GIVEN,
14321439
repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN,
1440+
secrets: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
14331441
snapshot_id: Optional[str] | NotGiven = NOT_GIVEN,
14341442
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
14351443
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1477,6 +1485,11 @@ async def create(
14771485
14781486
repo_connection_id: Repository connection id the devbox should source its base image from.
14791487
1488+
secrets: (Optional) Map of environment variable names to secret names. The secret values
1489+
will be securely injected as environment variables in the Devbox. Example:
1490+
{"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the
1491+
value of secret 'DATABASE_PASSWORD'.
1492+
14801493
snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID,
14811494
Blueprint name) should be specified.
14821495
@@ -1505,6 +1518,7 @@ async def create(
15051518
"name": name,
15061519
"prebuilt": prebuilt,
15071520
"repo_connection_id": repo_connection_id,
1521+
"secrets": secrets,
15081522
"snapshot_id": snapshot_id,
15091523
},
15101524
devbox_create_params.DevboxCreateParams,

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ class DevboxCreateParams(TypedDict, total=False):
6161
repo_connection_id: Optional[str]
6262
"""Repository connection id the devbox should source its base image from."""
6363

64+
secrets: Optional[Dict[str, str]]
65+
"""(Optional) Map of environment variable names to secret names.
66+
67+
The secret values will be securely injected as environment variables in the
68+
Devbox. Example: {"DB_PASS": "DATABASE_PASSWORD"} sets environment variable
69+
'DB_PASS' to the value of secret 'DATABASE_PASSWORD'.
70+
"""
71+
6472
snapshot_id: Optional[str]
6573
"""Snapshot ID to use for the Devbox.
6674

tests/api_resources/test_devboxes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
8080
name="name",
8181
prebuilt="prebuilt",
8282
repo_connection_id="repo_connection_id",
83+
secrets={"foo": "string"},
8384
snapshot_id="snapshot_id",
8485
)
8586
assert_matches_type(DevboxView, devbox, path=["response"])
@@ -1010,6 +1011,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
10101011
name="name",
10111012
prebuilt="prebuilt",
10121013
repo_connection_id="repo_connection_id",
1014+
secrets={"foo": "string"},
10131015
snapshot_id="snapshot_id",
10141016
)
10151017
assert_matches_type(DevboxView, devbox, path=["response"])

0 commit comments

Comments
 (0)