2929from ..lib .polling_async import async_poll_until
3030from ..types .blueprint_view import BlueprintView
3131from ..types .blueprint_preview_view import BlueprintPreviewView
32+ from ..types .inspection_source_param import InspectionSourceParam
3233from ..types .blueprint_build_logs_list_view import BlueprintBuildLogsListView
3334from ..types .shared_params .launch_parameters import LaunchParameters
3435from ..types .shared_params .code_mount_parameters import CodeMountParameters
@@ -71,16 +72,11 @@ def with_streaming_response(self) -> BlueprintsResourceWithStreamingResponse:
7172 def create (
7273 self ,
7374 * ,
75+ inspection_source : InspectionSourceParam ,
7476 name : str ,
75- base_blueprint_id : Optional [str ] | Omit = omit ,
76- base_blueprint_name : Optional [str ] | Omit = omit ,
77- build_args : Optional [Dict [str , str ]] | Omit = omit ,
78- code_mounts : Optional [Iterable [CodeMountParameters ]] | Omit = omit ,
79- dockerfile : Optional [str ] | Omit = omit ,
8077 file_mounts : Optional [Dict [str , str ]] | Omit = omit ,
8178 launch_parameters : Optional [LaunchParameters ] | Omit = omit ,
8279 metadata : Optional [Dict [str , str ]] | Omit = omit ,
83- services : Optional [Iterable [blueprint_create_params .Service ]] | Omit = omit ,
8480 system_setup_commands : Optional [SequenceNotStr [str ]] | Omit = omit ,
8581 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8682 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -90,40 +86,23 @@ def create(
9086 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
9187 idempotency_key : str | None = None ,
9288 ) -> BlueprintView :
93- """Starts build of custom defined container Blueprint.
94-
95- The Blueprint will begin in
96- the 'provisioning' step and transition to the 'building' step once it is
97- selected off the build queue., Upon build complete it will transition to
98- 'building_complete' if the build is successful.
89+ """
90+ Starts build of custom defined container Blueprint using a RepositoryConnection
91+ Inspection as a source container specification.
9992
10093 Args:
101- name: Name of the Blueprint.
102-
103- base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
104- build.
105-
106- base_blueprint_name: (Optional) Name of previously built blueprint to use as a base blueprint for
107- this build. When set, this will load the latest successfully built Blueprint
108- with the given name. Only one of (base_blueprint_id, base_blueprint_name) should
109- be specified.
94+ inspection_source: (Optional) Use a RepositoryInspection a source of a Blueprint build. The
95+ Dockerfile will be automatically created based on the RepositoryInspection
96+ contents.
11097
111- build_args: (Optional) Arbitrary Docker build args to pass during build.
112-
113- code_mounts: A list of code mounts to be included in the Blueprint.
114-
115- dockerfile: Dockerfile contents to be used to build the Blueprint.
98+ name: Name of the Blueprint.
11699
117100 file_mounts: (Optional) Map of paths and file contents to write before setup.
118101
119102 launch_parameters: Parameters to configure your Devbox at launch time.
120103
121104 metadata: (Optional) User defined metadata for the Blueprint.
122105
123- services: (Optional) List of containerized services to include in the Blueprint. These
124- services will be pre-pulled during the build phase for optimized startup
125- performance.
126-
127106 system_setup_commands: A list of commands to run to set up your system.
128107
129108 extra_headers: Send extra headers
@@ -140,16 +119,11 @@ def create(
140119 "/v1/blueprints" ,
141120 body = maybe_transform (
142121 {
122+ "inspection_source" : inspection_source ,
143123 "name" : name ,
144- "base_blueprint_id" : base_blueprint_id ,
145- "base_blueprint_name" : base_blueprint_name ,
146- "build_args" : build_args ,
147- "code_mounts" : code_mounts ,
148- "dockerfile" : dockerfile ,
149124 "file_mounts" : file_mounts ,
150125 "launch_parameters" : launch_parameters ,
151126 "metadata" : metadata ,
152- "services" : services ,
153127 "system_setup_commands" : system_setup_commands ,
154128 },
155129 blueprint_create_params .BlueprintCreateParams ,
@@ -596,16 +570,11 @@ def with_streaming_response(self) -> AsyncBlueprintsResourceWithStreamingRespons
596570 async def create (
597571 self ,
598572 * ,
573+ inspection_source : InspectionSourceParam ,
599574 name : str ,
600- base_blueprint_id : Optional [str ] | Omit = omit ,
601- base_blueprint_name : Optional [str ] | Omit = omit ,
602- build_args : Optional [Dict [str , str ]] | Omit = omit ,
603- code_mounts : Optional [Iterable [CodeMountParameters ]] | Omit = omit ,
604- dockerfile : Optional [str ] | Omit = omit ,
605575 file_mounts : Optional [Dict [str , str ]] | Omit = omit ,
606576 launch_parameters : Optional [LaunchParameters ] | Omit = omit ,
607577 metadata : Optional [Dict [str , str ]] | Omit = omit ,
608- services : Optional [Iterable [blueprint_create_params .Service ]] | Omit = omit ,
609578 system_setup_commands : Optional [SequenceNotStr [str ]] | Omit = omit ,
610579 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
611580 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -615,40 +584,23 @@ async def create(
615584 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
616585 idempotency_key : str | None = None ,
617586 ) -> BlueprintView :
618- """Starts build of custom defined container Blueprint.
619-
620- The Blueprint will begin in
621- the 'provisioning' step and transition to the 'building' step once it is
622- selected off the build queue., Upon build complete it will transition to
623- 'building_complete' if the build is successful.
587+ """
588+ Starts build of custom defined container Blueprint using a RepositoryConnection
589+ Inspection as a source container specification.
624590
625591 Args:
626- name: Name of the Blueprint.
627-
628- base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
629- build.
630-
631- base_blueprint_name: (Optional) Name of previously built blueprint to use as a base blueprint for
632- this build. When set, this will load the latest successfully built Blueprint
633- with the given name. Only one of (base_blueprint_id, base_blueprint_name) should
634- be specified.
592+ inspection_source: (Optional) Use a RepositoryInspection a source of a Blueprint build. The
593+ Dockerfile will be automatically created based on the RepositoryInspection
594+ contents.
635595
636- build_args: (Optional) Arbitrary Docker build args to pass during build.
637-
638- code_mounts: A list of code mounts to be included in the Blueprint.
639-
640- dockerfile: Dockerfile contents to be used to build the Blueprint.
596+ name: Name of the Blueprint.
641597
642598 file_mounts: (Optional) Map of paths and file contents to write before setup.
643599
644600 launch_parameters: Parameters to configure your Devbox at launch time.
645601
646602 metadata: (Optional) User defined metadata for the Blueprint.
647603
648- services: (Optional) List of containerized services to include in the Blueprint. These
649- services will be pre-pulled during the build phase for optimized startup
650- performance.
651-
652604 system_setup_commands: A list of commands to run to set up your system.
653605
654606 extra_headers: Send extra headers
@@ -665,16 +617,11 @@ async def create(
665617 "/v1/blueprints" ,
666618 body = await async_maybe_transform (
667619 {
620+ "inspection_source" : inspection_source ,
668621 "name" : name ,
669- "base_blueprint_id" : base_blueprint_id ,
670- "base_blueprint_name" : base_blueprint_name ,
671- "build_args" : build_args ,
672- "code_mounts" : code_mounts ,
673- "dockerfile" : dockerfile ,
674622 "file_mounts" : file_mounts ,
675623 "launch_parameters" : launch_parameters ,
676624 "metadata" : metadata ,
677- "services" : services ,
678625 "system_setup_commands" : system_setup_commands ,
679626 },
680627 blueprint_create_params .BlueprintCreateParams ,
0 commit comments