{-# 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.StartStack
(
startStack
, StartStack
, staStackId
, startStackResponse
, StartStackResponse
) 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 StartStack = StartStack'
{ _staStackId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
startStack
:: Text
-> StartStack
startStack pStackId_ =
StartStack'
{ _staStackId = pStackId_
}
staStackId :: Lens' StartStack Text
staStackId = lens _staStackId (\ s a -> s{_staStackId = a});
instance AWSRequest StartStack where
type Rs StartStack = StartStackResponse
request = postJSON opsWorks
response = receiveNull StartStackResponse'
instance Hashable StartStack
instance NFData StartStack
instance ToHeaders StartStack where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OpsWorks_20130218.StartStack" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StartStack where
toJSON StartStack'{..}
= object
(catMaybes [Just ("StackId" .= _staStackId)])
instance ToPath StartStack where
toPath = const "/"
instance ToQuery StartStack where
toQuery = const mempty
data StartStackResponse =
StartStackResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
startStackResponse
:: StartStackResponse
startStackResponse = StartStackResponse'
instance NFData StartStackResponse