-- | Polls 'Network.AWS.ElastiCache.DescribeReplicationGroups' every 30 seconds until a
-- successful state is reached. An error is returned after 60 failed checks.
replicationGroupDeleted :: Wait DescribeReplicationGroups
replicationGroupDeleted =
    Wait
    { _waitName = "ReplicationGroupDeleted"
    , _waitAttempts = 60
    , _waitDelay = 30
    , _waitAcceptors = [ matchError
                             "ReplicationGroupNotFoundFault"
                             AcceptSuccess
                       , matchAny
                             "creating"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)
                       , matchAny
                             "modifying"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)
                       , matchAny
                             "rebooting"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)]
    }
replicationGroupDeleted :: Wait DescribeReplicationGroups
replicationGroupDeleted =
    Wait
    { _waitName = "ReplicationGroupDeleted"
    , _waitAttempts = 60
    , _waitDelay = 30
    , _waitAcceptors = [ matchError
                             "ReplicationGroupNotFoundFault"
                             AcceptSuccess
                       , matchAny
                             "creating"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)
                       , matchAny
                             "modifying"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)
                       , matchAny
                             "rebooting"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)]
    }
replicationGroupDeleted =
    Wait
    { _waitName = "ReplicationGroupDeleted"
    , _waitAttempts = 60
    , _waitDelay = 30
    , _waitAcceptors = [ matchError
                             "ReplicationGroupNotFoundFault"
                             AcceptSuccess
                       , matchAny
                             "creating"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)
                       , matchAny
                             "modifying"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)
                       , matchAny
                             "rebooting"
                             AcceptFailure
                             (folding (concatOf drgrsReplicationGroups) .
                              rgStatus . _Just . to toTextCI)]
    }