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