module Network.AWS.Route53.GetHealthCheckStatus
(
GetHealthCheckStatus
, getHealthCheckStatus
, ghcsHealthCheckId
, GetHealthCheckStatusResponse
, getHealthCheckStatusResponse
, ghcsrHealthCheckObservations
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestXML
import Network.AWS.Route53.Types
import qualified GHC.Exts
newtype GetHealthCheckStatus = GetHealthCheckStatus
{ _ghcsHealthCheckId :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
getHealthCheckStatus :: Text
-> GetHealthCheckStatus
getHealthCheckStatus p1 = GetHealthCheckStatus
{ _ghcsHealthCheckId = p1
}
ghcsHealthCheckId :: Lens' GetHealthCheckStatus Text
ghcsHealthCheckId =
lens _ghcsHealthCheckId (\s a -> s { _ghcsHealthCheckId = a })
newtype GetHealthCheckStatusResponse = GetHealthCheckStatusResponse
{ _ghcsrHealthCheckObservations :: List "HealthCheckObservation" HealthCheckObservation
} deriving (Eq, Show, Monoid, Semigroup)
instance GHC.Exts.IsList GetHealthCheckStatusResponse where
type Item GetHealthCheckStatusResponse = HealthCheckObservation
fromList = GetHealthCheckStatusResponse . GHC.Exts.fromList
toList = GHC.Exts.toList . _ghcsrHealthCheckObservations
getHealthCheckStatusResponse :: GetHealthCheckStatusResponse
getHealthCheckStatusResponse = GetHealthCheckStatusResponse
{ _ghcsrHealthCheckObservations = mempty
}
ghcsrHealthCheckObservations :: Lens' GetHealthCheckStatusResponse [HealthCheckObservation]
ghcsrHealthCheckObservations =
lens _ghcsrHealthCheckObservations
(\s a -> s { _ghcsrHealthCheckObservations = a })
. _List
instance ToPath GetHealthCheckStatus where
toPath GetHealthCheckStatus{..} = mconcat
[ "/2013-04-01/healthcheck/"
, toText _ghcsHealthCheckId
, "/status"
]
instance ToQuery GetHealthCheckStatus where
toQuery = const mempty
instance ToHeaders GetHealthCheckStatus
instance ToXMLRoot GetHealthCheckStatus where
toXMLRoot = const (namespaced ns "GetHealthCheckStatus" [])
instance ToXML GetHealthCheckStatus
instance AWSRequest GetHealthCheckStatus where
type Sv GetHealthCheckStatus = Route53
type Rs GetHealthCheckStatus = GetHealthCheckStatusResponse
request = get
response = xmlResponse
instance FromXML GetHealthCheckStatusResponse where
parseXML x = GetHealthCheckStatusResponse
<$> x .@? "HealthCheckObservations" .!@ mempty