@@ -430,8 +430,26 @@ def is_done_booting(devbox: DevboxView) -> bool:
430430 def create_and_await_running (
431431 self ,
432432 * ,
433- create_args : devbox_create_params .DevboxCreateParams | None = None ,
434- request_args : DevboxRequestArgs | None = None ,
433+ blueprint_id : Optional [str ] | NotGiven = NOT_GIVEN ,
434+ blueprint_name : Optional [str ] | NotGiven = NOT_GIVEN ,
435+ code_mounts : Optional [Iterable [CodeMountParameters ]] | NotGiven = NOT_GIVEN ,
436+ entrypoint : Optional [str ] | NotGiven = NOT_GIVEN ,
437+ environment_variables : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
438+ file_mounts : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
439+ launch_parameters : Optional [LaunchParameters ] | NotGiven = NOT_GIVEN ,
440+ metadata : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
441+ name : Optional [str ] | NotGiven = NOT_GIVEN ,
442+ repo_connection_id : Optional [str ] | NotGiven = NOT_GIVEN ,
443+ secrets : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
444+ snapshot_id : Optional [str ] | NotGiven = NOT_GIVEN ,
445+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
446+ # The extra values given here take precedence over values defined on the client or passed to this method.
447+ extra_headers : Headers | None = None ,
448+ extra_query : Query | None = None ,
449+ extra_body : Body | None = None ,
450+ polling_config : PollingConfig | None = None ,
451+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
452+ idempotency_key : str | None = None ,
435453 ) -> DevboxView :
436454 """Create a new devbox and wait for it to be in running state.
437455
@@ -448,22 +466,30 @@ def create_and_await_running(
448466 PollingTimeout: If polling times out before devbox is running
449467 RunloopError: If devbox enters a non-running terminal state
450468 """
451- # Extract polling config and other request args
452- if request_args is None :
453- request_args = {}
454-
455469 # Pass all create_args to the underlying create method
456470 devbox = self .create (
457- ** (create_args or {}),
458- extra_headers = request_args .get ("extra_headers" , None ),
459- extra_query = request_args .get ("extra_query" , None ),
460- extra_body = request_args .get ("extra_body" , None ),
461- timeout = request_args .get ("timeout" , None ),
471+ blueprint_id = blueprint_id ,
472+ blueprint_name = blueprint_name ,
473+ code_mounts = code_mounts ,
474+ entrypoint = entrypoint ,
475+ environment_variables = environment_variables ,
476+ file_mounts = file_mounts ,
477+ launch_parameters = launch_parameters ,
478+ metadata = metadata ,
479+ name = name ,
480+ repo_connection_id = repo_connection_id ,
481+ secrets = secrets ,
482+ snapshot_id = snapshot_id ,
483+ extra_headers = extra_headers ,
484+ extra_query = extra_query ,
485+ extra_body = extra_body ,
486+ timeout = timeout ,
487+ idempotency_key = idempotency_key ,
462488 )
463489
464490 return self .await_running (
465491 devbox .id ,
466- polling_config = request_args . get ( " polling_config" , None ) ,
492+ polling_config = polling_config ,
467493 )
468494
469495 def list (
@@ -1558,16 +1584,34 @@ async def retrieve(
15581584 async def create_and_await_running (
15591585 self ,
15601586 * ,
1561- create_args : devbox_create_params .DevboxCreateParams | None = None ,
1562- request_args : DevboxRequestArgs | None = None ,
1587+ blueprint_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1588+ blueprint_name : Optional [str ] | NotGiven = NOT_GIVEN ,
1589+ code_mounts : Optional [Iterable [CodeMountParameters ]] | NotGiven = NOT_GIVEN ,
1590+ entrypoint : Optional [str ] | NotGiven = NOT_GIVEN ,
1591+ environment_variables : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1592+ file_mounts : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1593+ launch_parameters : Optional [LaunchParameters ] | NotGiven = NOT_GIVEN ,
1594+ metadata : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1595+ name : Optional [str ] | NotGiven = NOT_GIVEN ,
1596+ repo_connection_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1597+ secrets : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
1598+ snapshot_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1599+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1600+ # The extra values given here take precedence over values defined on the client or passed to this method.
1601+ extra_headers : Headers | None = None ,
1602+ extra_query : Query | None = None ,
1603+ extra_body : Body | None = None ,
1604+ polling_config : PollingConfig | None = None ,
1605+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1606+ idempotency_key : str | None = None ,
15631607 ) -> DevboxView :
15641608 """Create a devbox and wait for it to be in running state.
15651609
15661610 This is a wrapper around the `create` method that waits for the devbox to reach running state.
15671611
15681612 Args:
1569- create_args: Arguments to pass to the `create` method. See the `create` method for detailed documentation.
1570- request_args : Optional request arguments including polling configuration and additional request options
1613+ See the `create` method for detailed documentation.
1614+ polling_config : Optional polling configuration
15711615
15721616 Returns:
15731617 The devbox in running state
@@ -1577,22 +1621,30 @@ async def create_and_await_running(
15771621 RunloopError: If devbox enters a non-running terminal state
15781622 """
15791623
1580- # Extract polling config and other request args
1581- if request_args is None :
1582- request_args = {}
1583-
15841624 # Pass all create_args, relevant request args to the underlying create method
15851625 devbox = await self .create (
1586- ** (create_args or {}),
1587- extra_headers = request_args .get ("extra_headers" , None ),
1588- extra_query = request_args .get ("extra_query" , None ),
1589- extra_body = request_args .get ("extra_body" , None ),
1590- timeout = request_args .get ("timeout" , None ),
1626+ blueprint_id = blueprint_id ,
1627+ blueprint_name = blueprint_name ,
1628+ code_mounts = code_mounts ,
1629+ entrypoint = entrypoint ,
1630+ environment_variables = environment_variables ,
1631+ file_mounts = file_mounts ,
1632+ launch_parameters = launch_parameters ,
1633+ metadata = metadata ,
1634+ name = name ,
1635+ repo_connection_id = repo_connection_id ,
1636+ secrets = secrets ,
1637+ snapshot_id = snapshot_id ,
1638+ extra_headers = extra_headers ,
1639+ extra_query = extra_query ,
1640+ extra_body = extra_body ,
1641+ timeout = timeout ,
1642+ idempotency_key = idempotency_key ,
15911643 )
15921644
15931645 return await self .await_running (
15941646 devbox .id ,
1595- polling_config = request_args . get ( " polling_config" , None ) ,
1647+ polling_config = polling_config ,
15961648 )
15971649
15981650 async def await_running (
0 commit comments