{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.ElastiCache.Waiters where
import Network.AWS.ElastiCache.DescribeCacheClusters
import Network.AWS.ElastiCache.DescribeCacheClusters
import Network.AWS.ElastiCache.DescribeReplicationGroups
import Network.AWS.ElastiCache.DescribeReplicationGroups
import Network.AWS.ElastiCache.Types
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Waiter
cacheClusterAvailable :: Wait DescribeCacheClusters
cacheClusterAvailable =
Wait
{ _waitName = "CacheClusterAvailable"
, _waitAttempts = 40
, _waitDelay = 15
, _waitAcceptors =
[ matchAll
"available"
AcceptSuccess
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"deleted"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"deleting"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"incompatible-network"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"restore-failed"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
]
}
cacheClusterDeleted :: Wait DescribeCacheClusters
cacheClusterDeleted =
Wait
{ _waitName = "CacheClusterDeleted"
, _waitAttempts = 40
, _waitDelay = 15
, _waitAcceptors =
[ matchAll
"deleted"
AcceptSuccess
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchError "CacheClusterNotFound" AcceptSuccess
, matchAny
"available"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"creating"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"incompatible-network"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"modifying"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"restore-failed"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
, matchAny
"snapshotting"
AcceptFailure
(folding (concatOf drsCacheClusters) .
ccCacheClusterStatus . _Just . to toTextCI)
]
}
replicationGroupDeleted :: Wait DescribeReplicationGroups
replicationGroupDeleted =
Wait
{ _waitName = "ReplicationGroupDeleted"
, _waitAttempts = 40
, _waitDelay = 15
, _waitAcceptors =
[ matchAll
"deleted"
AcceptSuccess
(folding (concatOf drgrsReplicationGroups) .
rgStatus . _Just . to toTextCI)
, matchAny
"available"
AcceptFailure
(folding (concatOf drgrsReplicationGroups) .
rgStatus . _Just . to toTextCI)
, matchError "ReplicationGroupNotFoundFault" AcceptSuccess
]
}
replicationGroupAvailable :: Wait DescribeReplicationGroups
replicationGroupAvailable =
Wait
{ _waitName = "ReplicationGroupAvailable"
, _waitAttempts = 40
, _waitDelay = 15
, _waitAcceptors =
[ matchAll
"available"
AcceptSuccess
(folding (concatOf drgrsReplicationGroups) .
rgStatus . _Just . to toTextCI)
, matchAny
"deleted"
AcceptFailure
(folding (concatOf drgrsReplicationGroups) .
rgStatus . _Just . to toTextCI)
]
}