module Network.AWS.DynamoDB.Waiters where
import Network.AWS.DynamoDB.DescribeTable
import Network.AWS.DynamoDB.Types
import Network.AWS.Waiters
tableExists :: Wait DescribeTable
tableExists = Wait
{ _waitName = "TableExists"
, _waitAttempts = 25
, _waitDelay = 20
, _waitAcceptors =
[ matchAll TSActive AcceptSuccess
(dtrTable . tdTableStatus)
, matchError "ResourceNotFoundException" AcceptRetry
]
}
tableNotExists :: Wait DescribeTable
tableNotExists = Wait
{ _waitName = "TableNotExists"
, _waitAttempts = 25
, _waitDelay = 20
, _waitAcceptors =
[ matchError "ResourceNotFoundException" AcceptSuccess
]
}