module Network.AWS.RDS.DescribeAccountAttributes
(
describeAccountAttributes
, DescribeAccountAttributes
, describeAccountAttributesResponse
, DescribeAccountAttributesResponse
, daarsAccountQuotas
, daarsStatus
) where
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data DescribeAccountAttributes =
DescribeAccountAttributes'
deriving (Eq,Read,Show,Data,Typeable,Generic)
describeAccountAttributes
:: DescribeAccountAttributes
describeAccountAttributes = DescribeAccountAttributes'
instance AWSRequest DescribeAccountAttributes where
type Sv DescribeAccountAttributes = RDS
type Rs DescribeAccountAttributes =
DescribeAccountAttributesResponse
request = postQuery
response
= receiveXMLWrapper "DescribeAccountAttributesResult"
(\ s h x ->
DescribeAccountAttributesResponse' <$>
(x .@? "AccountQuotas" .!@ mempty >>=
may (parseXMLList "AccountQuota"))
<*> (pure (fromEnum s)))
instance ToHeaders DescribeAccountAttributes where
toHeaders = const mempty
instance ToPath DescribeAccountAttributes where
toPath = const "/"
instance ToQuery DescribeAccountAttributes where
toQuery
= const
(mconcat
["Action" =:
("DescribeAccountAttributes" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString)])
data DescribeAccountAttributesResponse = DescribeAccountAttributesResponse'
{ _daarsAccountQuotas :: !(Maybe [AccountQuota])
, _daarsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeAccountAttributesResponse
:: Int
-> DescribeAccountAttributesResponse
describeAccountAttributesResponse pStatus_ =
DescribeAccountAttributesResponse'
{ _daarsAccountQuotas = Nothing
, _daarsStatus = pStatus_
}
daarsAccountQuotas :: Lens' DescribeAccountAttributesResponse [AccountQuota]
daarsAccountQuotas = lens _daarsAccountQuotas (\ s a -> s{_daarsAccountQuotas = a}) . _Default . _Coerce;
daarsStatus :: Lens' DescribeAccountAttributesResponse Int
daarsStatus = lens _daarsStatus (\ s a -> s{_daarsStatus = a});