module Network.AWS.RDS.ApplyPendingMaintenanceAction
(
applyPendingMaintenanceAction
, ApplyPendingMaintenanceAction
, apmaResourceIdentifier
, apmaApplyAction
, apmaOptInType
, applyPendingMaintenanceActionResponse
, ApplyPendingMaintenanceActionResponse
, apmarsResourcePendingMaintenanceActions
, apmarsResponseStatus
) 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 ApplyPendingMaintenanceAction = ApplyPendingMaintenanceAction'
{ _apmaResourceIdentifier :: !Text
, _apmaApplyAction :: !Text
, _apmaOptInType :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applyPendingMaintenanceAction
:: Text
-> Text
-> Text
-> ApplyPendingMaintenanceAction
applyPendingMaintenanceAction pResourceIdentifier_ pApplyAction_ pOptInType_ =
ApplyPendingMaintenanceAction'
{ _apmaResourceIdentifier = pResourceIdentifier_
, _apmaApplyAction = pApplyAction_
, _apmaOptInType = pOptInType_
}
apmaResourceIdentifier :: Lens' ApplyPendingMaintenanceAction Text
apmaResourceIdentifier = lens _apmaResourceIdentifier (\ s a -> s{_apmaResourceIdentifier = a});
apmaApplyAction :: Lens' ApplyPendingMaintenanceAction Text
apmaApplyAction = lens _apmaApplyAction (\ s a -> s{_apmaApplyAction = a});
apmaOptInType :: Lens' ApplyPendingMaintenanceAction Text
apmaOptInType = lens _apmaOptInType (\ s a -> s{_apmaOptInType = a});
instance AWSRequest ApplyPendingMaintenanceAction
where
type Rs ApplyPendingMaintenanceAction =
ApplyPendingMaintenanceActionResponse
request = postQuery rDS
response
= receiveXMLWrapper
"ApplyPendingMaintenanceActionResult"
(\ s h x ->
ApplyPendingMaintenanceActionResponse' <$>
(x .@? "ResourcePendingMaintenanceActions") <*>
(pure (fromEnum s)))
instance ToHeaders ApplyPendingMaintenanceAction
where
toHeaders = const mempty
instance ToPath ApplyPendingMaintenanceAction where
toPath = const "/"
instance ToQuery ApplyPendingMaintenanceAction where
toQuery ApplyPendingMaintenanceAction'{..}
= mconcat
["Action" =:
("ApplyPendingMaintenanceAction" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"ResourceIdentifier" =: _apmaResourceIdentifier,
"ApplyAction" =: _apmaApplyAction,
"OptInType" =: _apmaOptInType]
data ApplyPendingMaintenanceActionResponse = ApplyPendingMaintenanceActionResponse'
{ _apmarsResourcePendingMaintenanceActions :: !(Maybe ResourcePendingMaintenanceActions)
, _apmarsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applyPendingMaintenanceActionResponse
:: Int
-> ApplyPendingMaintenanceActionResponse
applyPendingMaintenanceActionResponse pResponseStatus_ =
ApplyPendingMaintenanceActionResponse'
{ _apmarsResourcePendingMaintenanceActions = Nothing
, _apmarsResponseStatus = pResponseStatus_
}
apmarsResourcePendingMaintenanceActions :: Lens' ApplyPendingMaintenanceActionResponse (Maybe ResourcePendingMaintenanceActions)
apmarsResourcePendingMaintenanceActions = lens _apmarsResourcePendingMaintenanceActions (\ s a -> s{_apmarsResourcePendingMaintenanceActions = a});
apmarsResponseStatus :: Lens' ApplyPendingMaintenanceActionResponse Int
apmarsResponseStatus = lens _apmarsResponseStatus (\ s a -> s{_apmarsResponseStatus = a});