module Network.AWS.Route53.UpdateHealthCheck
(
updateHealthCheck
, UpdateHealthCheck
, uhcFailureThreshold
, uhcIPAddress
, uhcSearchString
, uhcHealthThreshold
, uhcResourcePath
, uhcHealthCheckVersion
, uhcInverted
, uhcFullyQualifiedDomainName
, uhcChildHealthChecks
, uhcPort
, uhcHealthCheckId
, updateHealthCheckResponse
, UpdateHealthCheckResponse
, uhcrsResponseStatus
, uhcrsHealthCheck
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data UpdateHealthCheck = UpdateHealthCheck'
{ _uhcFailureThreshold :: !(Maybe Nat)
, _uhcIPAddress :: !(Maybe Text)
, _uhcSearchString :: !(Maybe Text)
, _uhcHealthThreshold :: !(Maybe Nat)
, _uhcResourcePath :: !(Maybe Text)
, _uhcHealthCheckVersion :: !(Maybe Nat)
, _uhcInverted :: !(Maybe Bool)
, _uhcFullyQualifiedDomainName :: !(Maybe Text)
, _uhcChildHealthChecks :: !(Maybe [Text])
, _uhcPort :: !(Maybe Nat)
, _uhcHealthCheckId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateHealthCheck
:: Text
-> UpdateHealthCheck
updateHealthCheck pHealthCheckId_ =
UpdateHealthCheck'
{ _uhcFailureThreshold = Nothing
, _uhcIPAddress = Nothing
, _uhcSearchString = Nothing
, _uhcHealthThreshold = Nothing
, _uhcResourcePath = Nothing
, _uhcHealthCheckVersion = Nothing
, _uhcInverted = Nothing
, _uhcFullyQualifiedDomainName = Nothing
, _uhcChildHealthChecks = Nothing
, _uhcPort = Nothing
, _uhcHealthCheckId = pHealthCheckId_
}
uhcFailureThreshold :: Lens' UpdateHealthCheck (Maybe Natural)
uhcFailureThreshold = lens _uhcFailureThreshold (\ s a -> s{_uhcFailureThreshold = a}) . mapping _Nat;
uhcIPAddress :: Lens' UpdateHealthCheck (Maybe Text)
uhcIPAddress = lens _uhcIPAddress (\ s a -> s{_uhcIPAddress = a});
uhcSearchString :: Lens' UpdateHealthCheck (Maybe Text)
uhcSearchString = lens _uhcSearchString (\ s a -> s{_uhcSearchString = a});
uhcHealthThreshold :: Lens' UpdateHealthCheck (Maybe Natural)
uhcHealthThreshold = lens _uhcHealthThreshold (\ s a -> s{_uhcHealthThreshold = a}) . mapping _Nat;
uhcResourcePath :: Lens' UpdateHealthCheck (Maybe Text)
uhcResourcePath = lens _uhcResourcePath (\ s a -> s{_uhcResourcePath = a});
uhcHealthCheckVersion :: Lens' UpdateHealthCheck (Maybe Natural)
uhcHealthCheckVersion = lens _uhcHealthCheckVersion (\ s a -> s{_uhcHealthCheckVersion = a}) . mapping _Nat;
uhcInverted :: Lens' UpdateHealthCheck (Maybe Bool)
uhcInverted = lens _uhcInverted (\ s a -> s{_uhcInverted = a});
uhcFullyQualifiedDomainName :: Lens' UpdateHealthCheck (Maybe Text)
uhcFullyQualifiedDomainName = lens _uhcFullyQualifiedDomainName (\ s a -> s{_uhcFullyQualifiedDomainName = a});
uhcChildHealthChecks :: Lens' UpdateHealthCheck [Text]
uhcChildHealthChecks = lens _uhcChildHealthChecks (\ s a -> s{_uhcChildHealthChecks = a}) . _Default . _Coerce;
uhcPort :: Lens' UpdateHealthCheck (Maybe Natural)
uhcPort = lens _uhcPort (\ s a -> s{_uhcPort = a}) . mapping _Nat;
uhcHealthCheckId :: Lens' UpdateHealthCheck Text
uhcHealthCheckId = lens _uhcHealthCheckId (\ s a -> s{_uhcHealthCheckId = a});
instance AWSRequest UpdateHealthCheck where
type Rs UpdateHealthCheck = UpdateHealthCheckResponse
request = postXML route53
response
= receiveXML
(\ s h x ->
UpdateHealthCheckResponse' <$>
(pure (fromEnum s)) <*> (x .@ "HealthCheck"))
instance ToElement UpdateHealthCheck where
toElement
= mkElement
"{https://route53.amazonaws.com/doc/2013-04-01/}UpdateHealthCheckRequest"
instance ToHeaders UpdateHealthCheck where
toHeaders = const mempty
instance ToPath UpdateHealthCheck where
toPath UpdateHealthCheck'{..}
= mconcat
["/2013-04-01/healthcheck/", toBS _uhcHealthCheckId]
instance ToQuery UpdateHealthCheck where
toQuery = const mempty
instance ToXML UpdateHealthCheck where
toXML UpdateHealthCheck'{..}
= mconcat
["FailureThreshold" @= _uhcFailureThreshold,
"IPAddress" @= _uhcIPAddress,
"SearchString" @= _uhcSearchString,
"HealthThreshold" @= _uhcHealthThreshold,
"ResourcePath" @= _uhcResourcePath,
"HealthCheckVersion" @= _uhcHealthCheckVersion,
"Inverted" @= _uhcInverted,
"FullyQualifiedDomainName" @=
_uhcFullyQualifiedDomainName,
"ChildHealthChecks" @=
toXML
(toXMLList "ChildHealthCheck" <$>
_uhcChildHealthChecks),
"Port" @= _uhcPort]
data UpdateHealthCheckResponse = UpdateHealthCheckResponse'
{ _uhcrsResponseStatus :: !Int
, _uhcrsHealthCheck :: !HealthCheck
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateHealthCheckResponse
:: Int
-> HealthCheck
-> UpdateHealthCheckResponse
updateHealthCheckResponse pResponseStatus_ pHealthCheck_ =
UpdateHealthCheckResponse'
{ _uhcrsResponseStatus = pResponseStatus_
, _uhcrsHealthCheck = pHealthCheck_
}
uhcrsResponseStatus :: Lens' UpdateHealthCheckResponse Int
uhcrsResponseStatus = lens _uhcrsResponseStatus (\ s a -> s{_uhcrsResponseStatus = a});
uhcrsHealthCheck :: Lens' UpdateHealthCheckResponse HealthCheck
uhcrsHealthCheck = lens _uhcrsHealthCheck (\ s a -> s{_uhcrsHealthCheck = a});