module Network.AWS.RDS.DescribePendingMaintenanceActions
(
describePendingMaintenanceActions
, DescribePendingMaintenanceActions
, dpmaFilters
, dpmaMaxRecords
, dpmaMarker
, dpmaResourceIdentifier
, describePendingMaintenanceActionsResponse
, DescribePendingMaintenanceActionsResponse
, dpmarsPendingMaintenanceActions
, dpmarsMarker
, dpmarsStatus
) 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 DescribePendingMaintenanceActions = DescribePendingMaintenanceActions'
{ _dpmaFilters :: !(Maybe [Filter])
, _dpmaMaxRecords :: !(Maybe Int)
, _dpmaMarker :: !(Maybe Text)
, _dpmaResourceIdentifier :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describePendingMaintenanceActions
:: DescribePendingMaintenanceActions
describePendingMaintenanceActions =
DescribePendingMaintenanceActions'
{ _dpmaFilters = Nothing
, _dpmaMaxRecords = Nothing
, _dpmaMarker = Nothing
, _dpmaResourceIdentifier = Nothing
}
dpmaFilters :: Lens' DescribePendingMaintenanceActions [Filter]
dpmaFilters = lens _dpmaFilters (\ s a -> s{_dpmaFilters = a}) . _Default . _Coerce;
dpmaMaxRecords :: Lens' DescribePendingMaintenanceActions (Maybe Int)
dpmaMaxRecords = lens _dpmaMaxRecords (\ s a -> s{_dpmaMaxRecords = a});
dpmaMarker :: Lens' DescribePendingMaintenanceActions (Maybe Text)
dpmaMarker = lens _dpmaMarker (\ s a -> s{_dpmaMarker = a});
dpmaResourceIdentifier :: Lens' DescribePendingMaintenanceActions (Maybe Text)
dpmaResourceIdentifier = lens _dpmaResourceIdentifier (\ s a -> s{_dpmaResourceIdentifier = a});
instance AWSRequest DescribePendingMaintenanceActions
where
type Sv DescribePendingMaintenanceActions = RDS
type Rs DescribePendingMaintenanceActions =
DescribePendingMaintenanceActionsResponse
request = postQuery
response
= receiveXMLWrapper
"DescribePendingMaintenanceActionsResult"
(\ s h x ->
DescribePendingMaintenanceActionsResponse' <$>
(x .@? "PendingMaintenanceActions" .!@ mempty >>=
may
(parseXMLList "ResourcePendingMaintenanceActions"))
<*> (x .@? "Marker")
<*> (pure (fromEnum s)))
instance ToHeaders DescribePendingMaintenanceActions
where
toHeaders = const mempty
instance ToPath DescribePendingMaintenanceActions
where
toPath = const "/"
instance ToQuery DescribePendingMaintenanceActions
where
toQuery DescribePendingMaintenanceActions'{..}
= mconcat
["Action" =:
("DescribePendingMaintenanceActions" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"Filters" =:
toQuery (toQueryList "Filter" <$> _dpmaFilters),
"MaxRecords" =: _dpmaMaxRecords,
"Marker" =: _dpmaMarker,
"ResourceIdentifier" =: _dpmaResourceIdentifier]
data DescribePendingMaintenanceActionsResponse = DescribePendingMaintenanceActionsResponse'
{ _dpmarsPendingMaintenanceActions :: !(Maybe [ResourcePendingMaintenanceActions])
, _dpmarsMarker :: !(Maybe Text)
, _dpmarsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describePendingMaintenanceActionsResponse
:: Int
-> DescribePendingMaintenanceActionsResponse
describePendingMaintenanceActionsResponse pStatus_ =
DescribePendingMaintenanceActionsResponse'
{ _dpmarsPendingMaintenanceActions = Nothing
, _dpmarsMarker = Nothing
, _dpmarsStatus = pStatus_
}
dpmarsPendingMaintenanceActions :: Lens' DescribePendingMaintenanceActionsResponse [ResourcePendingMaintenanceActions]
dpmarsPendingMaintenanceActions = lens _dpmarsPendingMaintenanceActions (\ s a -> s{_dpmarsPendingMaintenanceActions = a}) . _Default . _Coerce;
dpmarsMarker :: Lens' DescribePendingMaintenanceActionsResponse (Maybe Text)
dpmarsMarker = lens _dpmarsMarker (\ s a -> s{_dpmarsMarker = a});
dpmarsStatus :: Lens' DescribePendingMaintenanceActionsResponse Int
dpmarsStatus = lens _dpmarsStatus (\ s a -> s{_dpmarsStatus = a});