{-# 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.OpsWorks.StopStack
(
stopStack
, StopStack
, stoStackId
, stopStackResponse
, StopStackResponse
) where
import Network.AWS.Lens
import Network.AWS.OpsWorks.Types
import Network.AWS.OpsWorks.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype StopStack = StopStack'
{ _stoStackId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stopStack
:: Text
-> StopStack
stopStack pStackId_ =
StopStack'
{ _stoStackId = pStackId_
}
stoStackId :: Lens' StopStack Text
stoStackId = lens _stoStackId (\ s a -> s{_stoStackId = a});
instance AWSRequest StopStack where
type Rs StopStack = StopStackResponse
request = postJSON opsWorks
response = receiveNull StopStackResponse'
instance Hashable StopStack
instance NFData StopStack
instance ToHeaders StopStack where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OpsWorks_20130218.StopStack" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopStack where
toJSON StopStack'{..}
= object
(catMaybes [Just ("StackId" .= _stoStackId)])
instance ToPath StopStack where
toPath = const "/"
instance ToQuery StopStack where
toQuery = const mempty
data StopStackResponse =
StopStackResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
stopStackResponse
:: StopStackResponse
stopStackResponse = StopStackResponse'
instance NFData StopStackResponse