module Network.AWS.ElasticBeanstalk.DescribePlatformVersion
(
describePlatformVersion
, DescribePlatformVersion
, dPlatformARN
, describePlatformVersionResponse
, DescribePlatformVersionResponse
, drsPlatformDescription
, drsResponseStatus
) 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 DescribePlatformVersion = DescribePlatformVersion'
{ _dPlatformARN :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describePlatformVersion
:: DescribePlatformVersion
describePlatformVersion = DescribePlatformVersion' {_dPlatformARN = Nothing}
dPlatformARN :: Lens' DescribePlatformVersion (Maybe Text)
dPlatformARN = lens _dPlatformARN (\ s a -> s{_dPlatformARN = a});
instance AWSRequest DescribePlatformVersion where
type Rs DescribePlatformVersion =
DescribePlatformVersionResponse
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper "DescribePlatformVersionResult"
(\ s h x ->
DescribePlatformVersionResponse' <$>
(x .@? "PlatformDescription") <*>
(pure (fromEnum s)))
instance Hashable DescribePlatformVersion where
instance NFData DescribePlatformVersion where
instance ToHeaders DescribePlatformVersion where
toHeaders = const mempty
instance ToPath DescribePlatformVersion where
toPath = const "/"
instance ToQuery DescribePlatformVersion where
toQuery DescribePlatformVersion'{..}
= mconcat
["Action" =:
("DescribePlatformVersion" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"PlatformArn" =: _dPlatformARN]
data DescribePlatformVersionResponse = DescribePlatformVersionResponse'
{ _drsPlatformDescription :: !(Maybe PlatformDescription)
, _drsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describePlatformVersionResponse
:: Int
-> DescribePlatformVersionResponse
describePlatformVersionResponse pResponseStatus_ =
DescribePlatformVersionResponse'
{_drsPlatformDescription = Nothing, _drsResponseStatus = pResponseStatus_}
drsPlatformDescription :: Lens' DescribePlatformVersionResponse (Maybe PlatformDescription)
drsPlatformDescription = lens _drsPlatformDescription (\ s a -> s{_drsPlatformDescription = a});
drsResponseStatus :: Lens' DescribePlatformVersionResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});
instance NFData DescribePlatformVersionResponse where