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