{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.UpdateNotebookInstance
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a notebook instance. NotebookInstance updates include upgrading
-- or downgrading the ML compute instance used for your notebook instance
-- to accommodate changes in your workload requirements.
module Amazonka.SageMaker.UpdateNotebookInstance
  ( -- * Creating a Request
    UpdateNotebookInstance (..),
    newUpdateNotebookInstance,

    -- * Request Lenses
    updateNotebookInstance_acceleratorTypes,
    updateNotebookInstance_additionalCodeRepositories,
    updateNotebookInstance_defaultCodeRepository,
    updateNotebookInstance_disassociateAcceleratorTypes,
    updateNotebookInstance_disassociateAdditionalCodeRepositories,
    updateNotebookInstance_disassociateDefaultCodeRepository,
    updateNotebookInstance_disassociateLifecycleConfig,
    updateNotebookInstance_instanceMetadataServiceConfiguration,
    updateNotebookInstance_instanceType,
    updateNotebookInstance_lifecycleConfigName,
    updateNotebookInstance_roleArn,
    updateNotebookInstance_rootAccess,
    updateNotebookInstance_volumeSizeInGB,
    updateNotebookInstance_notebookInstanceName,

    -- * Destructuring the Response
    UpdateNotebookInstanceResponse (..),
    newUpdateNotebookInstanceResponse,

    -- * Response Lenses
    updateNotebookInstanceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newUpdateNotebookInstance' smart constructor.
data UpdateNotebookInstance = UpdateNotebookInstance'
  { -- | A list of the Elastic Inference (EI) instance types to associate with
    -- this notebook instance. Currently only one EI instance type can be
    -- associated with a notebook instance. For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
    UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes :: Prelude.Maybe [NotebookInstanceAcceleratorType],
    -- | An array of up to three Git repositories to associate with the notebook
    -- instance. These can be either the names of Git repositories stored as
    -- resources in your account, or the URL of Git repositories in
    -- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
    -- or in any other Git repository. These repositories are cloned at the
    -- same level as the default repository of your notebook instance. For more
    -- information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with SageMaker Notebook Instances>.
    UpdateNotebookInstance -> Maybe [Text]
additionalCodeRepositories :: Prelude.Maybe [Prelude.Text],
    -- | The Git repository to associate with the notebook instance as its
    -- default code repository. This can be either the name of a Git repository
    -- stored as a resource in your account, or the URL of a Git repository in
    -- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
    -- or in any other Git repository. When you open a notebook instance, it
    -- opens in the directory that contains this repository. For more
    -- information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with SageMaker Notebook Instances>.
    UpdateNotebookInstance -> Maybe Text
defaultCodeRepository :: Prelude.Maybe Prelude.Text,
    -- | A list of the Elastic Inference (EI) instance types to remove from this
    -- notebook instance. This operation is idempotent. If you specify an
    -- accelerator type that is not associated with the notebook instance when
    -- you call this method, it does not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateAcceleratorTypes :: Prelude.Maybe Prelude.Bool,
    -- | A list of names or URLs of the default Git repositories to remove from
    -- this notebook instance. This operation is idempotent. If you specify a
    -- Git repository that is not associated with the notebook instance when
    -- you call this method, it does not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateAdditionalCodeRepositories :: Prelude.Maybe Prelude.Bool,
    -- | The name or URL of the default Git repository to remove from this
    -- notebook instance. This operation is idempotent. If you specify a Git
    -- repository that is not associated with the notebook instance when you
    -- call this method, it does not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateDefaultCodeRepository :: Prelude.Maybe Prelude.Bool,
    -- | Set to @true@ to remove the notebook instance lifecycle configuration
    -- currently associated with the notebook instance. This operation is
    -- idempotent. If you specify a lifecycle configuration that is not
    -- associated with the notebook instance when you call this method, it does
    -- not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateLifecycleConfig :: Prelude.Maybe Prelude.Bool,
    -- | Information on the IMDS configuration of the notebook instance
    UpdateNotebookInstance
-> Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration :: Prelude.Maybe InstanceMetadataServiceConfiguration,
    -- | The Amazon ML compute instance type.
    UpdateNotebookInstance -> Maybe InstanceType
instanceType :: Prelude.Maybe InstanceType,
    -- | The name of a lifecycle configuration to associate with the notebook
    -- instance. For information about lifestyle configurations, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
    UpdateNotebookInstance -> Maybe Text
lifecycleConfigName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume
    -- to access the notebook instance. For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html SageMaker Roles>.
    --
    -- To be able to pass this role to SageMaker, the caller of this API must
    -- have the @iam:PassRole@ permission.
    UpdateNotebookInstance -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | Whether root access is enabled or disabled for users of the notebook
    -- instance. The default value is @Enabled@.
    --
    -- If you set this to @Disabled@, users don\'t have root access on the
    -- notebook instance, but lifecycle configuration scripts still run with
    -- root permissions.
    UpdateNotebookInstance -> Maybe RootAccess
rootAccess :: Prelude.Maybe RootAccess,
    -- | The size, in GB, of the ML storage volume to attach to the notebook
    -- instance. The default value is 5 GB. ML storage volumes are encrypted,
    -- so SageMaker can\'t determine the amount of available free space on the
    -- volume. Because of this, you can increase the volume size when you
    -- update a notebook instance, but you can\'t decrease the volume size. If
    -- you want to decrease the size of the ML storage volume in use, create a
    -- new notebook instance with the desired size.
    UpdateNotebookInstance -> Maybe Natural
volumeSizeInGB :: Prelude.Maybe Prelude.Natural,
    -- | The name of the notebook instance to update.
    UpdateNotebookInstance -> Text
notebookInstanceName :: Prelude.Text
  }
  deriving (UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
$c/= :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
== :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
$c== :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
Prelude.Eq, ReadPrec [UpdateNotebookInstance]
ReadPrec UpdateNotebookInstance
Int -> ReadS UpdateNotebookInstance
ReadS [UpdateNotebookInstance]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNotebookInstance]
$creadListPrec :: ReadPrec [UpdateNotebookInstance]
readPrec :: ReadPrec UpdateNotebookInstance
$creadPrec :: ReadPrec UpdateNotebookInstance
readList :: ReadS [UpdateNotebookInstance]
$creadList :: ReadS [UpdateNotebookInstance]
readsPrec :: Int -> ReadS UpdateNotebookInstance
$creadsPrec :: Int -> ReadS UpdateNotebookInstance
Prelude.Read, Int -> UpdateNotebookInstance -> ShowS
[UpdateNotebookInstance] -> ShowS
UpdateNotebookInstance -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotebookInstance] -> ShowS
$cshowList :: [UpdateNotebookInstance] -> ShowS
show :: UpdateNotebookInstance -> String
$cshow :: UpdateNotebookInstance -> String
showsPrec :: Int -> UpdateNotebookInstance -> ShowS
$cshowsPrec :: Int -> UpdateNotebookInstance -> ShowS
Prelude.Show, forall x. Rep UpdateNotebookInstance x -> UpdateNotebookInstance
forall x. UpdateNotebookInstance -> Rep UpdateNotebookInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateNotebookInstance x -> UpdateNotebookInstance
$cfrom :: forall x. UpdateNotebookInstance -> Rep UpdateNotebookInstance x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNotebookInstance' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'acceleratorTypes', 'updateNotebookInstance_acceleratorTypes' - A list of the Elastic Inference (EI) instance types to associate with
-- this notebook instance. Currently only one EI instance type can be
-- associated with a notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
--
-- 'additionalCodeRepositories', 'updateNotebookInstance_additionalCodeRepositories' - An array of up to three Git repositories to associate with the notebook
-- instance. These can be either the names of Git repositories stored as
-- resources in your account, or the URL of Git repositories in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. These repositories are cloned at the
-- same level as the default repository of your notebook instance. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with SageMaker Notebook Instances>.
--
-- 'defaultCodeRepository', 'updateNotebookInstance_defaultCodeRepository' - The Git repository to associate with the notebook instance as its
-- default code repository. This can be either the name of a Git repository
-- stored as a resource in your account, or the URL of a Git repository in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. When you open a notebook instance, it
-- opens in the directory that contains this repository. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with SageMaker Notebook Instances>.
--
-- 'disassociateAcceleratorTypes', 'updateNotebookInstance_disassociateAcceleratorTypes' - A list of the Elastic Inference (EI) instance types to remove from this
-- notebook instance. This operation is idempotent. If you specify an
-- accelerator type that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
--
-- 'disassociateAdditionalCodeRepositories', 'updateNotebookInstance_disassociateAdditionalCodeRepositories' - A list of names or URLs of the default Git repositories to remove from
-- this notebook instance. This operation is idempotent. If you specify a
-- Git repository that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
--
-- 'disassociateDefaultCodeRepository', 'updateNotebookInstance_disassociateDefaultCodeRepository' - The name or URL of the default Git repository to remove from this
-- notebook instance. This operation is idempotent. If you specify a Git
-- repository that is not associated with the notebook instance when you
-- call this method, it does not throw an error.
--
-- 'disassociateLifecycleConfig', 'updateNotebookInstance_disassociateLifecycleConfig' - Set to @true@ to remove the notebook instance lifecycle configuration
-- currently associated with the notebook instance. This operation is
-- idempotent. If you specify a lifecycle configuration that is not
-- associated with the notebook instance when you call this method, it does
-- not throw an error.
--
-- 'instanceMetadataServiceConfiguration', 'updateNotebookInstance_instanceMetadataServiceConfiguration' - Information on the IMDS configuration of the notebook instance
--
-- 'instanceType', 'updateNotebookInstance_instanceType' - The Amazon ML compute instance type.
--
-- 'lifecycleConfigName', 'updateNotebookInstance_lifecycleConfigName' - The name of a lifecycle configuration to associate with the notebook
-- instance. For information about lifestyle configurations, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
--
-- 'roleArn', 'updateNotebookInstance_roleArn' - The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume
-- to access the notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html SageMaker Roles>.
--
-- To be able to pass this role to SageMaker, the caller of this API must
-- have the @iam:PassRole@ permission.
--
-- 'rootAccess', 'updateNotebookInstance_rootAccess' - Whether root access is enabled or disabled for users of the notebook
-- instance. The default value is @Enabled@.
--
-- If you set this to @Disabled@, users don\'t have root access on the
-- notebook instance, but lifecycle configuration scripts still run with
-- root permissions.
--
-- 'volumeSizeInGB', 'updateNotebookInstance_volumeSizeInGB' - The size, in GB, of the ML storage volume to attach to the notebook
-- instance. The default value is 5 GB. ML storage volumes are encrypted,
-- so SageMaker can\'t determine the amount of available free space on the
-- volume. Because of this, you can increase the volume size when you
-- update a notebook instance, but you can\'t decrease the volume size. If
-- you want to decrease the size of the ML storage volume in use, create a
-- new notebook instance with the desired size.
--
-- 'notebookInstanceName', 'updateNotebookInstance_notebookInstanceName' - The name of the notebook instance to update.
newUpdateNotebookInstance ::
  -- | 'notebookInstanceName'
  Prelude.Text ->
  UpdateNotebookInstance
newUpdateNotebookInstance :: Text -> UpdateNotebookInstance
newUpdateNotebookInstance Text
pNotebookInstanceName_ =
  UpdateNotebookInstance'
    { $sel:acceleratorTypes:UpdateNotebookInstance' :: Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:additionalCodeRepositories:UpdateNotebookInstance' :: Maybe [Text]
additionalCodeRepositories = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultCodeRepository:UpdateNotebookInstance' :: Maybe Text
defaultCodeRepository = forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: Maybe Bool
disassociateAcceleratorTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: Maybe Bool
disassociateAdditionalCodeRepositories =
        forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: Maybe Bool
disassociateDefaultCodeRepository = forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: Maybe Bool
disassociateLifecycleConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceMetadataServiceConfiguration:UpdateNotebookInstance' :: Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:UpdateNotebookInstance' :: Maybe InstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycleConfigName:UpdateNotebookInstance' :: Maybe Text
lifecycleConfigName = forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateNotebookInstance' :: Maybe Text
roleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:rootAccess:UpdateNotebookInstance' :: Maybe RootAccess
rootAccess = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeSizeInGB:UpdateNotebookInstance' :: Maybe Natural
volumeSizeInGB = forall a. Maybe a
Prelude.Nothing,
      $sel:notebookInstanceName:UpdateNotebookInstance' :: Text
notebookInstanceName = Text
pNotebookInstanceName_
    }

-- | A list of the Elastic Inference (EI) instance types to associate with
-- this notebook instance. Currently only one EI instance type can be
-- associated with a notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
updateNotebookInstance_acceleratorTypes :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe [NotebookInstanceAcceleratorType])
updateNotebookInstance_acceleratorTypes :: Lens'
  UpdateNotebookInstance (Maybe [NotebookInstanceAcceleratorType])
updateNotebookInstance_acceleratorTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes :: Maybe [NotebookInstanceAcceleratorType]
$sel:acceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes} -> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe [NotebookInstanceAcceleratorType]
a -> UpdateNotebookInstance
s {$sel:acceleratorTypes:UpdateNotebookInstance' :: Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes = Maybe [NotebookInstanceAcceleratorType]
a} :: UpdateNotebookInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An array of up to three Git repositories to associate with the notebook
-- instance. These can be either the names of Git repositories stored as
-- resources in your account, or the URL of Git repositories in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. These repositories are cloned at the
-- same level as the default repository of your notebook instance. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with SageMaker Notebook Instances>.
updateNotebookInstance_additionalCodeRepositories :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe [Prelude.Text])
updateNotebookInstance_additionalCodeRepositories :: Lens' UpdateNotebookInstance (Maybe [Text])
updateNotebookInstance_additionalCodeRepositories = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe [Text]
additionalCodeRepositories :: Maybe [Text]
$sel:additionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [Text]
additionalCodeRepositories} -> Maybe [Text]
additionalCodeRepositories) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe [Text]
a -> UpdateNotebookInstance
s {$sel:additionalCodeRepositories:UpdateNotebookInstance' :: Maybe [Text]
additionalCodeRepositories = Maybe [Text]
a} :: UpdateNotebookInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Git repository to associate with the notebook instance as its
-- default code repository. This can be either the name of a Git repository
-- stored as a resource in your account, or the URL of a Git repository in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. When you open a notebook instance, it
-- opens in the directory that contains this repository. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with SageMaker Notebook Instances>.
updateNotebookInstance_defaultCodeRepository :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Text)
updateNotebookInstance_defaultCodeRepository :: Lens' UpdateNotebookInstance (Maybe Text)
updateNotebookInstance_defaultCodeRepository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Text
defaultCodeRepository :: Maybe Text
$sel:defaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
defaultCodeRepository} -> Maybe Text
defaultCodeRepository) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Text
a -> UpdateNotebookInstance
s {$sel:defaultCodeRepository:UpdateNotebookInstance' :: Maybe Text
defaultCodeRepository = Maybe Text
a} :: UpdateNotebookInstance)

-- | A list of the Elastic Inference (EI) instance types to remove from this
-- notebook instance. This operation is idempotent. If you specify an
-- accelerator type that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
updateNotebookInstance_disassociateAcceleratorTypes :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateAcceleratorTypes :: Lens' UpdateNotebookInstance (Maybe Bool)
updateNotebookInstance_disassociateAcceleratorTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateAcceleratorTypes :: Maybe Bool
$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateAcceleratorTypes} -> Maybe Bool
disassociateAcceleratorTypes) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: Maybe Bool
disassociateAcceleratorTypes = Maybe Bool
a} :: UpdateNotebookInstance)

-- | A list of names or URLs of the default Git repositories to remove from
-- this notebook instance. This operation is idempotent. If you specify a
-- Git repository that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
updateNotebookInstance_disassociateAdditionalCodeRepositories :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateAdditionalCodeRepositories :: Lens' UpdateNotebookInstance (Maybe Bool)
updateNotebookInstance_disassociateAdditionalCodeRepositories = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateAdditionalCodeRepositories :: Maybe Bool
$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateAdditionalCodeRepositories} -> Maybe Bool
disassociateAdditionalCodeRepositories) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: Maybe Bool
disassociateAdditionalCodeRepositories = Maybe Bool
a} :: UpdateNotebookInstance)

-- | The name or URL of the default Git repository to remove from this
-- notebook instance. This operation is idempotent. If you specify a Git
-- repository that is not associated with the notebook instance when you
-- call this method, it does not throw an error.
updateNotebookInstance_disassociateDefaultCodeRepository :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateDefaultCodeRepository :: Lens' UpdateNotebookInstance (Maybe Bool)
updateNotebookInstance_disassociateDefaultCodeRepository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateDefaultCodeRepository :: Maybe Bool
$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateDefaultCodeRepository} -> Maybe Bool
disassociateDefaultCodeRepository) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: Maybe Bool
disassociateDefaultCodeRepository = Maybe Bool
a} :: UpdateNotebookInstance)

-- | Set to @true@ to remove the notebook instance lifecycle configuration
-- currently associated with the notebook instance. This operation is
-- idempotent. If you specify a lifecycle configuration that is not
-- associated with the notebook instance when you call this method, it does
-- not throw an error.
updateNotebookInstance_disassociateLifecycleConfig :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateLifecycleConfig :: Lens' UpdateNotebookInstance (Maybe Bool)
updateNotebookInstance_disassociateLifecycleConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateLifecycleConfig :: Maybe Bool
$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateLifecycleConfig} -> Maybe Bool
disassociateLifecycleConfig) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: Maybe Bool
disassociateLifecycleConfig = Maybe Bool
a} :: UpdateNotebookInstance)

-- | Information on the IMDS configuration of the notebook instance
updateNotebookInstance_instanceMetadataServiceConfiguration :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe InstanceMetadataServiceConfiguration)
updateNotebookInstance_instanceMetadataServiceConfiguration :: Lens'
  UpdateNotebookInstance (Maybe InstanceMetadataServiceConfiguration)
updateNotebookInstance_instanceMetadataServiceConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration :: Maybe InstanceMetadataServiceConfiguration
$sel:instanceMetadataServiceConfiguration:UpdateNotebookInstance' :: UpdateNotebookInstance
-> Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration} -> Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe InstanceMetadataServiceConfiguration
a -> UpdateNotebookInstance
s {$sel:instanceMetadataServiceConfiguration:UpdateNotebookInstance' :: Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration = Maybe InstanceMetadataServiceConfiguration
a} :: UpdateNotebookInstance)

-- | The Amazon ML compute instance type.
updateNotebookInstance_instanceType :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe InstanceType)
updateNotebookInstance_instanceType :: Lens' UpdateNotebookInstance (Maybe InstanceType)
updateNotebookInstance_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe InstanceType
instanceType :: Maybe InstanceType
$sel:instanceType:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe InstanceType
instanceType} -> Maybe InstanceType
instanceType) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe InstanceType
a -> UpdateNotebookInstance
s {$sel:instanceType:UpdateNotebookInstance' :: Maybe InstanceType
instanceType = Maybe InstanceType
a} :: UpdateNotebookInstance)

-- | The name of a lifecycle configuration to associate with the notebook
-- instance. For information about lifestyle configurations, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
updateNotebookInstance_lifecycleConfigName :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Text)
updateNotebookInstance_lifecycleConfigName :: Lens' UpdateNotebookInstance (Maybe Text)
updateNotebookInstance_lifecycleConfigName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Text
lifecycleConfigName :: Maybe Text
$sel:lifecycleConfigName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
lifecycleConfigName} -> Maybe Text
lifecycleConfigName) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Text
a -> UpdateNotebookInstance
s {$sel:lifecycleConfigName:UpdateNotebookInstance' :: Maybe Text
lifecycleConfigName = Maybe Text
a} :: UpdateNotebookInstance)

-- | The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume
-- to access the notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html SageMaker Roles>.
--
-- To be able to pass this role to SageMaker, the caller of this API must
-- have the @iam:PassRole@ permission.
updateNotebookInstance_roleArn :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Text)
updateNotebookInstance_roleArn :: Lens' UpdateNotebookInstance (Maybe Text)
updateNotebookInstance_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Text
a -> UpdateNotebookInstance
s {$sel:roleArn:UpdateNotebookInstance' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateNotebookInstance)

-- | Whether root access is enabled or disabled for users of the notebook
-- instance. The default value is @Enabled@.
--
-- If you set this to @Disabled@, users don\'t have root access on the
-- notebook instance, but lifecycle configuration scripts still run with
-- root permissions.
updateNotebookInstance_rootAccess :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe RootAccess)
updateNotebookInstance_rootAccess :: Lens' UpdateNotebookInstance (Maybe RootAccess)
updateNotebookInstance_rootAccess = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe RootAccess
rootAccess :: Maybe RootAccess
$sel:rootAccess:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe RootAccess
rootAccess} -> Maybe RootAccess
rootAccess) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe RootAccess
a -> UpdateNotebookInstance
s {$sel:rootAccess:UpdateNotebookInstance' :: Maybe RootAccess
rootAccess = Maybe RootAccess
a} :: UpdateNotebookInstance)

-- | The size, in GB, of the ML storage volume to attach to the notebook
-- instance. The default value is 5 GB. ML storage volumes are encrypted,
-- so SageMaker can\'t determine the amount of available free space on the
-- volume. Because of this, you can increase the volume size when you
-- update a notebook instance, but you can\'t decrease the volume size. If
-- you want to decrease the size of the ML storage volume in use, create a
-- new notebook instance with the desired size.
updateNotebookInstance_volumeSizeInGB :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Natural)
updateNotebookInstance_volumeSizeInGB :: Lens' UpdateNotebookInstance (Maybe Natural)
updateNotebookInstance_volumeSizeInGB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Natural
volumeSizeInGB :: Maybe Natural
$sel:volumeSizeInGB:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Natural
volumeSizeInGB} -> Maybe Natural
volumeSizeInGB) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Natural
a -> UpdateNotebookInstance
s {$sel:volumeSizeInGB:UpdateNotebookInstance' :: Maybe Natural
volumeSizeInGB = Maybe Natural
a} :: UpdateNotebookInstance)

-- | The name of the notebook instance to update.
updateNotebookInstance_notebookInstanceName :: Lens.Lens' UpdateNotebookInstance Prelude.Text
updateNotebookInstance_notebookInstanceName :: Lens' UpdateNotebookInstance Text
updateNotebookInstance_notebookInstanceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Text
notebookInstanceName :: Text
$sel:notebookInstanceName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Text
notebookInstanceName} -> Text
notebookInstanceName) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Text
a -> UpdateNotebookInstance
s {$sel:notebookInstanceName:UpdateNotebookInstance' :: Text
notebookInstanceName = Text
a} :: UpdateNotebookInstance)

instance Core.AWSRequest UpdateNotebookInstance where
  type
    AWSResponse UpdateNotebookInstance =
      UpdateNotebookInstanceResponse
  request :: (Service -> Service)
-> UpdateNotebookInstance -> Request UpdateNotebookInstance
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateNotebookInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNotebookInstance)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateNotebookInstanceResponse
UpdateNotebookInstanceResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateNotebookInstance where
  hashWithSalt :: Int -> UpdateNotebookInstance -> Int
hashWithSalt Int
_salt UpdateNotebookInstance' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [NotebookInstanceAcceleratorType]
Maybe Text
Maybe InstanceMetadataServiceConfiguration
Maybe InstanceType
Maybe RootAccess
Text
notebookInstanceName :: Text
volumeSizeInGB :: Maybe Natural
rootAccess :: Maybe RootAccess
roleArn :: Maybe Text
lifecycleConfigName :: Maybe Text
instanceType :: Maybe InstanceType
instanceMetadataServiceConfiguration :: Maybe InstanceMetadataServiceConfiguration
disassociateLifecycleConfig :: Maybe Bool
disassociateDefaultCodeRepository :: Maybe Bool
disassociateAdditionalCodeRepositories :: Maybe Bool
disassociateAcceleratorTypes :: Maybe Bool
defaultCodeRepository :: Maybe Text
additionalCodeRepositories :: Maybe [Text]
acceleratorTypes :: Maybe [NotebookInstanceAcceleratorType]
$sel:notebookInstanceName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Text
$sel:volumeSizeInGB:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Natural
$sel:rootAccess:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe RootAccess
$sel:roleArn:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:lifecycleConfigName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:instanceType:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe InstanceType
$sel:instanceMetadataServiceConfiguration:UpdateNotebookInstance' :: UpdateNotebookInstance
-> Maybe InstanceMetadataServiceConfiguration
$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:defaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:additionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [Text]
$sel:acceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
additionalCodeRepositories
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultCodeRepository
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disassociateAcceleratorTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disassociateAdditionalCodeRepositories
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disassociateDefaultCodeRepository
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disassociateLifecycleConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceType
instanceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lifecycleConfigName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RootAccess
rootAccess
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
volumeSizeInGB
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
notebookInstanceName

instance Prelude.NFData UpdateNotebookInstance where
  rnf :: UpdateNotebookInstance -> ()
rnf UpdateNotebookInstance' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [NotebookInstanceAcceleratorType]
Maybe Text
Maybe InstanceMetadataServiceConfiguration
Maybe InstanceType
Maybe RootAccess
Text
notebookInstanceName :: Text
volumeSizeInGB :: Maybe Natural
rootAccess :: Maybe RootAccess
roleArn :: Maybe Text
lifecycleConfigName :: Maybe Text
instanceType :: Maybe InstanceType
instanceMetadataServiceConfiguration :: Maybe InstanceMetadataServiceConfiguration
disassociateLifecycleConfig :: Maybe Bool
disassociateDefaultCodeRepository :: Maybe Bool
disassociateAdditionalCodeRepositories :: Maybe Bool
disassociateAcceleratorTypes :: Maybe Bool
defaultCodeRepository :: Maybe Text
additionalCodeRepositories :: Maybe [Text]
acceleratorTypes :: Maybe [NotebookInstanceAcceleratorType]
$sel:notebookInstanceName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Text
$sel:volumeSizeInGB:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Natural
$sel:rootAccess:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe RootAccess
$sel:roleArn:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:lifecycleConfigName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:instanceType:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe InstanceType
$sel:instanceMetadataServiceConfiguration:UpdateNotebookInstance' :: UpdateNotebookInstance
-> Maybe InstanceMetadataServiceConfiguration
$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:defaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:additionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [Text]
$sel:acceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
additionalCodeRepositories
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultCodeRepository
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disassociateAcceleratorTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disassociateAdditionalCodeRepositories
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disassociateDefaultCodeRepository
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disassociateLifecycleConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceType
instanceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lifecycleConfigName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RootAccess
rootAccess
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
volumeSizeInGB
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
notebookInstanceName

instance Data.ToHeaders UpdateNotebookInstance where
  toHeaders :: UpdateNotebookInstance -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"SageMaker.UpdateNotebookInstance" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateNotebookInstance where
  toJSON :: UpdateNotebookInstance -> Value
toJSON UpdateNotebookInstance' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [NotebookInstanceAcceleratorType]
Maybe Text
Maybe InstanceMetadataServiceConfiguration
Maybe InstanceType
Maybe RootAccess
Text
notebookInstanceName :: Text
volumeSizeInGB :: Maybe Natural
rootAccess :: Maybe RootAccess
roleArn :: Maybe Text
lifecycleConfigName :: Maybe Text
instanceType :: Maybe InstanceType
instanceMetadataServiceConfiguration :: Maybe InstanceMetadataServiceConfiguration
disassociateLifecycleConfig :: Maybe Bool
disassociateDefaultCodeRepository :: Maybe Bool
disassociateAdditionalCodeRepositories :: Maybe Bool
disassociateAcceleratorTypes :: Maybe Bool
defaultCodeRepository :: Maybe Text
additionalCodeRepositories :: Maybe [Text]
acceleratorTypes :: Maybe [NotebookInstanceAcceleratorType]
$sel:notebookInstanceName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Text
$sel:volumeSizeInGB:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Natural
$sel:rootAccess:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe RootAccess
$sel:roleArn:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:lifecycleConfigName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:instanceType:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe InstanceType
$sel:instanceMetadataServiceConfiguration:UpdateNotebookInstance' :: UpdateNotebookInstance
-> Maybe InstanceMetadataServiceConfiguration
$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:defaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:additionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [Text]
$sel:acceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AcceleratorTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes,
            (Key
"AdditionalCodeRepositories" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
additionalCodeRepositories,
            (Key
"DefaultCodeRepository" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultCodeRepository,
            (Key
"DisassociateAcceleratorTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateAcceleratorTypes,
            (Key
"DisassociateAdditionalCodeRepositories" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateAdditionalCodeRepositories,
            (Key
"DisassociateDefaultCodeRepository" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateDefaultCodeRepository,
            (Key
"DisassociateLifecycleConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateLifecycleConfig,
            (Key
"InstanceMetadataServiceConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceMetadataServiceConfiguration
instanceMetadataServiceConfiguration,
            (Key
"InstanceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceType
instanceType,
            (Key
"LifecycleConfigName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lifecycleConfigName,
            (Key
"RoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleArn,
            (Key
"RootAccess" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RootAccess
rootAccess,
            (Key
"VolumeSizeInGB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
volumeSizeInGB,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"NotebookInstanceName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
notebookInstanceName
              )
          ]
      )

instance Data.ToPath UpdateNotebookInstance where
  toPath :: UpdateNotebookInstance -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery UpdateNotebookInstance where
  toQuery :: UpdateNotebookInstance -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateNotebookInstanceResponse' smart constructor.
data UpdateNotebookInstanceResponse = UpdateNotebookInstanceResponse'
  { -- | The response's http status code.
    UpdateNotebookInstanceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
$c/= :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
== :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
$c== :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
Prelude.Eq, ReadPrec [UpdateNotebookInstanceResponse]
ReadPrec UpdateNotebookInstanceResponse
Int -> ReadS UpdateNotebookInstanceResponse
ReadS [UpdateNotebookInstanceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNotebookInstanceResponse]
$creadListPrec :: ReadPrec [UpdateNotebookInstanceResponse]
readPrec :: ReadPrec UpdateNotebookInstanceResponse
$creadPrec :: ReadPrec UpdateNotebookInstanceResponse
readList :: ReadS [UpdateNotebookInstanceResponse]
$creadList :: ReadS [UpdateNotebookInstanceResponse]
readsPrec :: Int -> ReadS UpdateNotebookInstanceResponse
$creadsPrec :: Int -> ReadS UpdateNotebookInstanceResponse
Prelude.Read, Int -> UpdateNotebookInstanceResponse -> ShowS
[UpdateNotebookInstanceResponse] -> ShowS
UpdateNotebookInstanceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotebookInstanceResponse] -> ShowS
$cshowList :: [UpdateNotebookInstanceResponse] -> ShowS
show :: UpdateNotebookInstanceResponse -> String
$cshow :: UpdateNotebookInstanceResponse -> String
showsPrec :: Int -> UpdateNotebookInstanceResponse -> ShowS
$cshowsPrec :: Int -> UpdateNotebookInstanceResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateNotebookInstanceResponse x
-> UpdateNotebookInstanceResponse
forall x.
UpdateNotebookInstanceResponse
-> Rep UpdateNotebookInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNotebookInstanceResponse x
-> UpdateNotebookInstanceResponse
$cfrom :: forall x.
UpdateNotebookInstanceResponse
-> Rep UpdateNotebookInstanceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNotebookInstanceResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'updateNotebookInstanceResponse_httpStatus' - The response's http status code.
newUpdateNotebookInstanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateNotebookInstanceResponse
newUpdateNotebookInstanceResponse :: Int -> UpdateNotebookInstanceResponse
newUpdateNotebookInstanceResponse Int
pHttpStatus_ =
  UpdateNotebookInstanceResponse'
    { $sel:httpStatus:UpdateNotebookInstanceResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
updateNotebookInstanceResponse_httpStatus :: Lens.Lens' UpdateNotebookInstanceResponse Prelude.Int
updateNotebookInstanceResponse_httpStatus :: Lens' UpdateNotebookInstanceResponse Int
updateNotebookInstanceResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNotebookInstanceResponse' :: UpdateNotebookInstanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateNotebookInstanceResponse
s@UpdateNotebookInstanceResponse' {} Int
a -> UpdateNotebookInstanceResponse
s {$sel:httpStatus:UpdateNotebookInstanceResponse' :: Int
httpStatus = Int
a} :: UpdateNotebookInstanceResponse)

instance
  Prelude.NFData
    UpdateNotebookInstanceResponse
  where
  rnf :: UpdateNotebookInstanceResponse -> ()
rnf UpdateNotebookInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNotebookInstanceResponse' :: UpdateNotebookInstanceResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus