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