{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.SageMaker.UpdateNotebookInstance
(
updateNotebookInstance
, UpdateNotebookInstance
, uniInstanceType
, uniRoleARN
, uniNotebookInstanceName
, updateNotebookInstanceResponse
, UpdateNotebookInstanceResponse
, unirsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SageMaker.Types
import Network.AWS.SageMaker.Types.Product
data UpdateNotebookInstance = UpdateNotebookInstance'
{ _uniInstanceType :: !(Maybe InstanceType)
, _uniRoleARN :: !(Maybe Text)
, _uniNotebookInstanceName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateNotebookInstance
:: Text
-> UpdateNotebookInstance
updateNotebookInstance pNotebookInstanceName_ =
UpdateNotebookInstance'
{ _uniInstanceType = Nothing
, _uniRoleARN = Nothing
, _uniNotebookInstanceName = pNotebookInstanceName_
}
uniInstanceType :: Lens' UpdateNotebookInstance (Maybe InstanceType)
uniInstanceType = lens _uniInstanceType (\ s a -> s{_uniInstanceType = a})
uniRoleARN :: Lens' UpdateNotebookInstance (Maybe Text)
uniRoleARN = lens _uniRoleARN (\ s a -> s{_uniRoleARN = a})
uniNotebookInstanceName :: Lens' UpdateNotebookInstance Text
uniNotebookInstanceName = lens _uniNotebookInstanceName (\ s a -> s{_uniNotebookInstanceName = a})
instance AWSRequest UpdateNotebookInstance where
type Rs UpdateNotebookInstance =
UpdateNotebookInstanceResponse
request = postJSON sageMaker
response
= receiveEmpty
(\ s h x ->
UpdateNotebookInstanceResponse' <$>
(pure (fromEnum s)))
instance Hashable UpdateNotebookInstance where
instance NFData UpdateNotebookInstance where
instance ToHeaders UpdateNotebookInstance where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("SageMaker.UpdateNotebookInstance" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateNotebookInstance where
toJSON UpdateNotebookInstance'{..}
= object
(catMaybes
[("InstanceType" .=) <$> _uniInstanceType,
("RoleArn" .=) <$> _uniRoleARN,
Just
("NotebookInstanceName" .=
_uniNotebookInstanceName)])
instance ToPath UpdateNotebookInstance where
toPath = const "/"
instance ToQuery UpdateNotebookInstance where
toQuery = const mempty
newtype UpdateNotebookInstanceResponse = UpdateNotebookInstanceResponse'
{ _unirsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateNotebookInstanceResponse
:: Int
-> UpdateNotebookInstanceResponse
updateNotebookInstanceResponse pResponseStatus_ =
UpdateNotebookInstanceResponse' {_unirsResponseStatus = pResponseStatus_}
unirsResponseStatus :: Lens' UpdateNotebookInstanceResponse Int
unirsResponseStatus = lens _unirsResponseStatus (\ s a -> s{_unirsResponseStatus = a})
instance NFData UpdateNotebookInstanceResponse where