Skip to content

start_notebook_instance

start_notebook_instance(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    notebook_instance_name: Optional[NotebookInstanceName] = None,
) -> None

Launches an ML compute instance with the latest version of the libraries and attaches your ML storage volume. After configuring the notebook instance, SageMaker AI sets the notebook instance status to InService. A notebook instance's status must be InService before you can connect to your Jupyter notebook.

Parameters:

Raises:

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def start_notebook_instance(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    notebook_instance_name: Optional[
        "capo_sagemaker.types.notebook_instance_name.NotebookInstanceName"
    ] = None,
) -> None:
    """<p>Launches an ML compute instance with the latest version of the libraries and attaches your ML storage volume. After configuring the notebook instance, SageMaker AI sets the notebook instance status to <code>InService</code>. A notebook instance's status must be <code>InService</code> before you can connect to your Jupyter notebook. </p>

    Args:
        notebook_instance_name: <p>The name of the notebook instance to start.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.start_notebook_instance_input.StartNotebookInstanceInput]",
    ) -> OperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.start_notebook_instance

        output, http_response = (
            capo_sagemaker._operations.sage_maker.start_notebook_instance.start_notebook_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartNotebookInstance")
    )
    input_: capo_sagemaker.types.start_notebook_instance_input.StartNotebookInstanceInput = {}
    if notebook_instance_name is not None:
        input_["notebook_instance_name"] = notebook_instance_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output