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