module Network.AWS.EC2.DescribeSpotDatafeedSubscription
(
describeSpotDatafeedSubscription
, DescribeSpotDatafeedSubscription
, dsdsDryRun
, describeSpotDatafeedSubscriptionResponse
, DescribeSpotDatafeedSubscriptionResponse
, dsdsrsSpotDatafeedSubscription
, dsdsrsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeSpotDatafeedSubscription = DescribeSpotDatafeedSubscription'
{ _dsdsDryRun :: Maybe Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeSpotDatafeedSubscription
:: DescribeSpotDatafeedSubscription
describeSpotDatafeedSubscription =
DescribeSpotDatafeedSubscription'
{ _dsdsDryRun = Nothing
}
dsdsDryRun :: Lens' DescribeSpotDatafeedSubscription (Maybe Bool)
dsdsDryRun = lens _dsdsDryRun (\ s a -> s{_dsdsDryRun = a});
instance AWSRequest DescribeSpotDatafeedSubscription
where
type Rs DescribeSpotDatafeedSubscription =
DescribeSpotDatafeedSubscriptionResponse
request = postQuery eC2
response
= receiveXML
(\ s h x ->
DescribeSpotDatafeedSubscriptionResponse' <$>
(x .@? "spotDatafeedSubscription") <*>
(pure (fromEnum s)))
instance ToHeaders DescribeSpotDatafeedSubscription
where
toHeaders = const mempty
instance ToPath DescribeSpotDatafeedSubscription
where
toPath = const "/"
instance ToQuery DescribeSpotDatafeedSubscription
where
toQuery DescribeSpotDatafeedSubscription'{..}
= mconcat
["Action" =:
("DescribeSpotDatafeedSubscription" :: ByteString),
"Version" =: ("2015-04-15" :: ByteString),
"DryRun" =: _dsdsDryRun]
data DescribeSpotDatafeedSubscriptionResponse = DescribeSpotDatafeedSubscriptionResponse'
{ _dsdsrsSpotDatafeedSubscription :: !(Maybe SpotDatafeedSubscription)
, _dsdsrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeSpotDatafeedSubscriptionResponse
:: Int
-> DescribeSpotDatafeedSubscriptionResponse
describeSpotDatafeedSubscriptionResponse pResponseStatus_ =
DescribeSpotDatafeedSubscriptionResponse'
{ _dsdsrsSpotDatafeedSubscription = Nothing
, _dsdsrsResponseStatus = pResponseStatus_
}
dsdsrsSpotDatafeedSubscription :: Lens' DescribeSpotDatafeedSubscriptionResponse (Maybe SpotDatafeedSubscription)
dsdsrsSpotDatafeedSubscription = lens _dsdsrsSpotDatafeedSubscription (\ s a -> s{_dsdsrsSpotDatafeedSubscription = a});
dsdsrsResponseStatus :: Lens' DescribeSpotDatafeedSubscriptionResponse Int
dsdsrsResponseStatus = lens _dsdsrsResponseStatus (\ s a -> s{_dsdsrsResponseStatus = a});