module Network.AWS.RDS.DescribeOrderableDBInstanceOptions
(
describeOrderableDBInstanceOptions
, DescribeOrderableDBInstanceOptions
, dodioEngineVersion
, dodioFilters
, dodioDBInstanceClass
, dodioLicenseModel
, dodioMaxRecords
, dodioMarker
, dodioVPC
, dodioEngine
, describeOrderableDBInstanceOptionsResponse
, DescribeOrderableDBInstanceOptionsResponse
, dodiorsOrderableDBInstanceOptions
, dodiorsMarker
, dodiorsStatus
) where
import Network.AWS.Pager
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data DescribeOrderableDBInstanceOptions = DescribeOrderableDBInstanceOptions'
{ _dodioEngineVersion :: !(Maybe Text)
, _dodioFilters :: !(Maybe [Filter])
, _dodioDBInstanceClass :: !(Maybe Text)
, _dodioLicenseModel :: !(Maybe Text)
, _dodioMaxRecords :: !(Maybe Int)
, _dodioMarker :: !(Maybe Text)
, _dodioVPC :: !(Maybe Bool)
, _dodioEngine :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeOrderableDBInstanceOptions
:: Text
-> DescribeOrderableDBInstanceOptions
describeOrderableDBInstanceOptions pEngine_ =
DescribeOrderableDBInstanceOptions'
{ _dodioEngineVersion = Nothing
, _dodioFilters = Nothing
, _dodioDBInstanceClass = Nothing
, _dodioLicenseModel = Nothing
, _dodioMaxRecords = Nothing
, _dodioMarker = Nothing
, _dodioVPC = Nothing
, _dodioEngine = pEngine_
}
dodioEngineVersion :: Lens' DescribeOrderableDBInstanceOptions (Maybe Text)
dodioEngineVersion = lens _dodioEngineVersion (\ s a -> s{_dodioEngineVersion = a});
dodioFilters :: Lens' DescribeOrderableDBInstanceOptions [Filter]
dodioFilters = lens _dodioFilters (\ s a -> s{_dodioFilters = a}) . _Default . _Coerce;
dodioDBInstanceClass :: Lens' DescribeOrderableDBInstanceOptions (Maybe Text)
dodioDBInstanceClass = lens _dodioDBInstanceClass (\ s a -> s{_dodioDBInstanceClass = a});
dodioLicenseModel :: Lens' DescribeOrderableDBInstanceOptions (Maybe Text)
dodioLicenseModel = lens _dodioLicenseModel (\ s a -> s{_dodioLicenseModel = a});
dodioMaxRecords :: Lens' DescribeOrderableDBInstanceOptions (Maybe Int)
dodioMaxRecords = lens _dodioMaxRecords (\ s a -> s{_dodioMaxRecords = a});
dodioMarker :: Lens' DescribeOrderableDBInstanceOptions (Maybe Text)
dodioMarker = lens _dodioMarker (\ s a -> s{_dodioMarker = a});
dodioVPC :: Lens' DescribeOrderableDBInstanceOptions (Maybe Bool)
dodioVPC = lens _dodioVPC (\ s a -> s{_dodioVPC = a});
dodioEngine :: Lens' DescribeOrderableDBInstanceOptions Text
dodioEngine = lens _dodioEngine (\ s a -> s{_dodioEngine = a});
instance AWSPager DescribeOrderableDBInstanceOptions
where
page rq rs
| stop (rs ^. dodiorsMarker) = Nothing
| stop (rs ^. dodiorsOrderableDBInstanceOptions) =
Nothing
| otherwise =
Just $ rq & dodioMarker .~ rs ^. dodiorsMarker
instance AWSRequest
DescribeOrderableDBInstanceOptions where
type Sv DescribeOrderableDBInstanceOptions = RDS
type Rs DescribeOrderableDBInstanceOptions =
DescribeOrderableDBInstanceOptionsResponse
request = postQuery
response
= receiveXMLWrapper
"DescribeOrderableDBInstanceOptionsResult"
(\ s h x ->
DescribeOrderableDBInstanceOptionsResponse' <$>
(x .@? "OrderableDBInstanceOptions" .!@ mempty >>=
may (parseXMLList "OrderableDBInstanceOption"))
<*> (x .@? "Marker")
<*> (pure (fromEnum s)))
instance ToHeaders DescribeOrderableDBInstanceOptions
where
toHeaders = const mempty
instance ToPath DescribeOrderableDBInstanceOptions
where
toPath = const "/"
instance ToQuery DescribeOrderableDBInstanceOptions
where
toQuery DescribeOrderableDBInstanceOptions'{..}
= mconcat
["Action" =:
("DescribeOrderableDBInstanceOptions" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"EngineVersion" =: _dodioEngineVersion,
"Filters" =:
toQuery (toQueryList "Filter" <$> _dodioFilters),
"DBInstanceClass" =: _dodioDBInstanceClass,
"LicenseModel" =: _dodioLicenseModel,
"MaxRecords" =: _dodioMaxRecords,
"Marker" =: _dodioMarker, "Vpc" =: _dodioVPC,
"Engine" =: _dodioEngine]
data DescribeOrderableDBInstanceOptionsResponse = DescribeOrderableDBInstanceOptionsResponse'
{ _dodiorsOrderableDBInstanceOptions :: !(Maybe [OrderableDBInstanceOption])
, _dodiorsMarker :: !(Maybe Text)
, _dodiorsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeOrderableDBInstanceOptionsResponse
:: Int
-> DescribeOrderableDBInstanceOptionsResponse
describeOrderableDBInstanceOptionsResponse pStatus_ =
DescribeOrderableDBInstanceOptionsResponse'
{ _dodiorsOrderableDBInstanceOptions = Nothing
, _dodiorsMarker = Nothing
, _dodiorsStatus = pStatus_
}
dodiorsOrderableDBInstanceOptions :: Lens' DescribeOrderableDBInstanceOptionsResponse [OrderableDBInstanceOption]
dodiorsOrderableDBInstanceOptions = lens _dodiorsOrderableDBInstanceOptions (\ s a -> s{_dodiorsOrderableDBInstanceOptions = a}) . _Default . _Coerce;
dodiorsMarker :: Lens' DescribeOrderableDBInstanceOptionsResponse (Maybe Text)
dodiorsMarker = lens _dodiorsMarker (\ s a -> s{_dodiorsMarker = a});
dodiorsStatus :: Lens' DescribeOrderableDBInstanceOptionsResponse Int
dodiorsStatus = lens _dodiorsStatus (\ s a -> s{_dodiorsStatus = a});