module Network.AWS.RDS.DescribeDBClusterParameters
(
describeDBClusterParameters
, DescribeDBClusterParameters
, ddcpFilters
, ddcpMaxRecords
, ddcpMarker
, ddcpSource
, ddcpDBClusterParameterGroupName
, describeDBClusterParametersResponse
, DescribeDBClusterParametersResponse
, ddcprsParameters
, ddcprsMarker
, ddcprsStatus
) 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 DescribeDBClusterParameters = DescribeDBClusterParameters'
{ _ddcpFilters :: !(Maybe [Filter])
, _ddcpMaxRecords :: !(Maybe Int)
, _ddcpMarker :: !(Maybe Text)
, _ddcpSource :: !(Maybe Text)
, _ddcpDBClusterParameterGroupName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeDBClusterParameters
:: Text
-> DescribeDBClusterParameters
describeDBClusterParameters pDBClusterParameterGroupName_ =
DescribeDBClusterParameters'
{ _ddcpFilters = Nothing
, _ddcpMaxRecords = Nothing
, _ddcpMarker = Nothing
, _ddcpSource = Nothing
, _ddcpDBClusterParameterGroupName = pDBClusterParameterGroupName_
}
ddcpFilters :: Lens' DescribeDBClusterParameters [Filter]
ddcpFilters = lens _ddcpFilters (\ s a -> s{_ddcpFilters = a}) . _Default . _Coerce;
ddcpMaxRecords :: Lens' DescribeDBClusterParameters (Maybe Int)
ddcpMaxRecords = lens _ddcpMaxRecords (\ s a -> s{_ddcpMaxRecords = a});
ddcpMarker :: Lens' DescribeDBClusterParameters (Maybe Text)
ddcpMarker = lens _ddcpMarker (\ s a -> s{_ddcpMarker = a});
ddcpSource :: Lens' DescribeDBClusterParameters (Maybe Text)
ddcpSource = lens _ddcpSource (\ s a -> s{_ddcpSource = a});
ddcpDBClusterParameterGroupName :: Lens' DescribeDBClusterParameters Text
ddcpDBClusterParameterGroupName = lens _ddcpDBClusterParameterGroupName (\ s a -> s{_ddcpDBClusterParameterGroupName = a});
instance AWSRequest DescribeDBClusterParameters where
type Sv DescribeDBClusterParameters = RDS
type Rs DescribeDBClusterParameters =
DescribeDBClusterParametersResponse
request = postQuery
response
= receiveXMLWrapper
"DescribeDBClusterParametersResult"
(\ s h x ->
DescribeDBClusterParametersResponse' <$>
(x .@? "Parameters" .!@ mempty >>=
may (parseXMLList "Parameter"))
<*> (x .@? "Marker")
<*> (pure (fromEnum s)))
instance ToHeaders DescribeDBClusterParameters where
toHeaders = const mempty
instance ToPath DescribeDBClusterParameters where
toPath = const "/"
instance ToQuery DescribeDBClusterParameters where
toQuery DescribeDBClusterParameters'{..}
= mconcat
["Action" =:
("DescribeDBClusterParameters" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"Filters" =:
toQuery (toQueryList "Filter" <$> _ddcpFilters),
"MaxRecords" =: _ddcpMaxRecords,
"Marker" =: _ddcpMarker, "Source" =: _ddcpSource,
"DBClusterParameterGroupName" =:
_ddcpDBClusterParameterGroupName]
data DescribeDBClusterParametersResponse = DescribeDBClusterParametersResponse'
{ _ddcprsParameters :: !(Maybe [Parameter])
, _ddcprsMarker :: !(Maybe Text)
, _ddcprsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeDBClusterParametersResponse
:: Int
-> DescribeDBClusterParametersResponse
describeDBClusterParametersResponse pStatus_ =
DescribeDBClusterParametersResponse'
{ _ddcprsParameters = Nothing
, _ddcprsMarker = Nothing
, _ddcprsStatus = pStatus_
}
ddcprsParameters :: Lens' DescribeDBClusterParametersResponse [Parameter]
ddcprsParameters = lens _ddcprsParameters (\ s a -> s{_ddcprsParameters = a}) . _Default . _Coerce;
ddcprsMarker :: Lens' DescribeDBClusterParametersResponse (Maybe Text)
ddcprsMarker = lens _ddcprsMarker (\ s a -> s{_ddcprsMarker = a});
ddcprsStatus :: Lens' DescribeDBClusterParametersResponse Int
ddcprsStatus = lens _ddcprsStatus (\ s a -> s{_ddcprsStatus = a});