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