module Network.AWS.RDS.DescribeEngineDefaultParameters
(
describeEngineDefaultParameters
, DescribeEngineDefaultParameters
, dedpFilters
, dedpMarker
, dedpMaxRecords
, dedpDBParameterGroupFamily
, describeEngineDefaultParametersResponse
, DescribeEngineDefaultParametersResponse
, dedprsResponseStatus
, dedprsEngineDefaults
) where
import Network.AWS.Lens
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 DescribeEngineDefaultParameters = DescribeEngineDefaultParameters'
{ _dedpFilters :: !(Maybe [Filter])
, _dedpMarker :: !(Maybe Text)
, _dedpMaxRecords :: !(Maybe Int)
, _dedpDBParameterGroupFamily :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeEngineDefaultParameters
:: Text
-> DescribeEngineDefaultParameters
describeEngineDefaultParameters pDBParameterGroupFamily_ =
DescribeEngineDefaultParameters'
{ _dedpFilters = Nothing
, _dedpMarker = Nothing
, _dedpMaxRecords = Nothing
, _dedpDBParameterGroupFamily = pDBParameterGroupFamily_
}
dedpFilters :: Lens' DescribeEngineDefaultParameters [Filter]
dedpFilters = lens _dedpFilters (\ s a -> s{_dedpFilters = a}) . _Default . _Coerce;
dedpMarker :: Lens' DescribeEngineDefaultParameters (Maybe Text)
dedpMarker = lens _dedpMarker (\ s a -> s{_dedpMarker = a});
dedpMaxRecords :: Lens' DescribeEngineDefaultParameters (Maybe Int)
dedpMaxRecords = lens _dedpMaxRecords (\ s a -> s{_dedpMaxRecords = a});
dedpDBParameterGroupFamily :: Lens' DescribeEngineDefaultParameters Text
dedpDBParameterGroupFamily = lens _dedpDBParameterGroupFamily (\ s a -> s{_dedpDBParameterGroupFamily = a});
instance AWSPager DescribeEngineDefaultParameters
where
page rq rs
| stop
(rs ^? dedprsEngineDefaults . edMarker . _Just)
= Nothing
| stop (rs ^. dedprsEngineDefaults . edParameters) =
Nothing
| otherwise =
Just $ rq &
dedpMarker .~
rs ^? dedprsEngineDefaults . edMarker . _Just
instance AWSRequest DescribeEngineDefaultParameters
where
type Rs DescribeEngineDefaultParameters =
DescribeEngineDefaultParametersResponse
request = postQuery rds
response
= receiveXMLWrapper
"DescribeEngineDefaultParametersResult"
(\ s h x ->
DescribeEngineDefaultParametersResponse' <$>
(pure (fromEnum s)) <*> (x .@ "EngineDefaults"))
instance Hashable DescribeEngineDefaultParameters
instance NFData DescribeEngineDefaultParameters
instance ToHeaders DescribeEngineDefaultParameters
where
toHeaders = const mempty
instance ToPath DescribeEngineDefaultParameters where
toPath = const "/"
instance ToQuery DescribeEngineDefaultParameters
where
toQuery DescribeEngineDefaultParameters'{..}
= mconcat
["Action" =:
("DescribeEngineDefaultParameters" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"Filters" =:
toQuery (toQueryList "Filter" <$> _dedpFilters),
"Marker" =: _dedpMarker,
"MaxRecords" =: _dedpMaxRecords,
"DBParameterGroupFamily" =:
_dedpDBParameterGroupFamily]
data DescribeEngineDefaultParametersResponse = DescribeEngineDefaultParametersResponse'
{ _dedprsResponseStatus :: !Int
, _dedprsEngineDefaults :: !EngineDefaults
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeEngineDefaultParametersResponse
:: Int
-> EngineDefaults
-> DescribeEngineDefaultParametersResponse
describeEngineDefaultParametersResponse pResponseStatus_ pEngineDefaults_ =
DescribeEngineDefaultParametersResponse'
{ _dedprsResponseStatus = pResponseStatus_
, _dedprsEngineDefaults = pEngineDefaults_
}
dedprsResponseStatus :: Lens' DescribeEngineDefaultParametersResponse Int
dedprsResponseStatus = lens _dedprsResponseStatus (\ s a -> s{_dedprsResponseStatus = a});
dedprsEngineDefaults :: Lens' DescribeEngineDefaultParametersResponse EngineDefaults
dedprsEngineDefaults = lens _dedprsEngineDefaults (\ s a -> s{_dedprsEngineDefaults = a});
instance NFData
DescribeEngineDefaultParametersResponse