module Network.AWS.ElasticBeanstalk.DeletePlatformVersion
(
deletePlatformVersion
, DeletePlatformVersion
, dpvPlatformARN
, deletePlatformVersionResponse
, DeletePlatformVersionResponse
, dpvrsPlatformSummary
, dpvrsResponseStatus
) where
import Network.AWS.ElasticBeanstalk.Types
import Network.AWS.ElasticBeanstalk.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeletePlatformVersion = DeletePlatformVersion'
{ _dpvPlatformARN :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePlatformVersion
:: DeletePlatformVersion
deletePlatformVersion = DeletePlatformVersion' {_dpvPlatformARN = Nothing}
dpvPlatformARN :: Lens' DeletePlatformVersion (Maybe Text)
dpvPlatformARN = lens _dpvPlatformARN (\ s a -> s{_dpvPlatformARN = a});
instance AWSRequest DeletePlatformVersion where
type Rs DeletePlatformVersion =
DeletePlatformVersionResponse
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper "DeletePlatformVersionResult"
(\ s h x ->
DeletePlatformVersionResponse' <$>
(x .@? "PlatformSummary") <*> (pure (fromEnum s)))
instance Hashable DeletePlatformVersion where
instance NFData DeletePlatformVersion where
instance ToHeaders DeletePlatformVersion where
toHeaders = const mempty
instance ToPath DeletePlatformVersion where
toPath = const "/"
instance ToQuery DeletePlatformVersion where
toQuery DeletePlatformVersion'{..}
= mconcat
["Action" =: ("DeletePlatformVersion" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"PlatformArn" =: _dpvPlatformARN]
data DeletePlatformVersionResponse = DeletePlatformVersionResponse'
{ _dpvrsPlatformSummary :: !(Maybe PlatformSummary)
, _dpvrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePlatformVersionResponse
:: Int
-> DeletePlatformVersionResponse
deletePlatformVersionResponse pResponseStatus_ =
DeletePlatformVersionResponse'
{_dpvrsPlatformSummary = Nothing, _dpvrsResponseStatus = pResponseStatus_}
dpvrsPlatformSummary :: Lens' DeletePlatformVersionResponse (Maybe PlatformSummary)
dpvrsPlatformSummary = lens _dpvrsPlatformSummary (\ s a -> s{_dpvrsPlatformSummary = a});
dpvrsResponseStatus :: Lens' DeletePlatformVersionResponse Int
dpvrsResponseStatus = lens _dpvrsResponseStatus (\ s a -> s{_dpvrsResponseStatus = a});
instance NFData DeletePlatformVersionResponse where