{-# 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.StartNotebookInstance
(
startNotebookInstance
, StartNotebookInstance
, sNotebookInstanceName
, startNotebookInstanceResponse
, StartNotebookInstanceResponse
) 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
newtype StartNotebookInstance = StartNotebookInstance'
{ _sNotebookInstanceName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
startNotebookInstance
:: Text
-> StartNotebookInstance
startNotebookInstance pNotebookInstanceName_ =
StartNotebookInstance' {_sNotebookInstanceName = pNotebookInstanceName_}
sNotebookInstanceName :: Lens' StartNotebookInstance Text
sNotebookInstanceName = lens _sNotebookInstanceName (\ s a -> s{_sNotebookInstanceName = a})
instance AWSRequest StartNotebookInstance where
type Rs StartNotebookInstance =
StartNotebookInstanceResponse
request = postJSON sageMaker
response = receiveNull StartNotebookInstanceResponse'
instance Hashable StartNotebookInstance where
instance NFData StartNotebookInstance where
instance ToHeaders StartNotebookInstance where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("SageMaker.StartNotebookInstance" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StartNotebookInstance where
toJSON StartNotebookInstance'{..}
= object
(catMaybes
[Just
("NotebookInstanceName" .= _sNotebookInstanceName)])
instance ToPath StartNotebookInstance where
toPath = const "/"
instance ToQuery StartNotebookInstance where
toQuery = const mempty
data StartNotebookInstanceResponse =
StartNotebookInstanceResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
startNotebookInstanceResponse
:: StartNotebookInstanceResponse
startNotebookInstanceResponse = StartNotebookInstanceResponse'
instance NFData StartNotebookInstanceResponse where