Skip to content

update_app_image_config

update_app_image_config(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    app_image_config_name: Optional[AppImageConfigName] = None,
    kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = None,
    jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = None,
    code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = None,
) -> UpdateAppImageConfigResponse

Updates the properties of an AppImageConfig.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def update_app_image_config(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    app_image_config_name: Optional[
        "capo_sagemaker.types.app_image_config_name.AppImageConfigName"
    ] = None,
    kernel_gateway_image_config: Optional[
        "capo_sagemaker.types.kernel_gateway_image_config.KernelGatewayImageConfig"
    ] = None,
    jupyter_lab_app_image_config: Optional[
        "capo_sagemaker.types.jupyter_lab_app_image_config.JupyterLabAppImageConfig"
    ] = None,
    code_editor_app_image_config: Optional[
        "capo_sagemaker.types.code_editor_app_image_config.CodeEditorAppImageConfig"
    ] = None,
) -> "capo_sagemaker.types.update_app_image_config_response.UpdateAppImageConfigResponse":
    """<p>Updates the properties of an AppImageConfig.</p>

    Args:
        app_image_config_name: <p>The name of the AppImageConfig to update.</p>
        kernel_gateway_image_config: <p>The new KernelGateway app to run on the image.</p>
        jupyter_lab_app_image_config: <p>The JupyterLab app running on the image.</p>
        code_editor_app_image_config: <p>The Code Editor app running on the image.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.update_app_image_config_request.UpdateAppImageConfigRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.update_app_image_config_response.UpdateAppImageConfigResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.update_app_image_config

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAppImageConfig")
    )
    input_: capo_sagemaker.types.update_app_image_config_request.UpdateAppImageConfigRequest = {}
    if app_image_config_name is not None:
        input_["app_image_config_name"] = app_image_config_name
    if kernel_gateway_image_config is not None:
        input_["kernel_gateway_image_config"] = kernel_gateway_image_config
    if jupyter_lab_app_image_config is not None:
        input_["jupyter_lab_app_image_config"] = jupyter_lab_app_image_config
    if code_editor_app_image_config is not None:
        input_["code_editor_app_image_config"] = code_editor_app_image_config

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