{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.ECS.Waiters where
import Network.AWS.ECS.DescribeServices
import Network.AWS.ECS.DescribeTasks
import Network.AWS.ECS.DescribeTasks
import Network.AWS.ECS.Types
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Waiter
servicesInactive :: Wait DescribeServices
servicesInactive =
Wait
{ _waitName = "ServicesInactive"
, _waitAttempts = 40
, _waitDelay = 15
, _waitAcceptors = [ matchAny
"MISSING"
AcceptFailure
(folding (concatOf dssrsFailures) .
fReason . _Just . to toTextCI)
, matchAny
"INACTIVE"
AcceptSuccess
(folding (concatOf dssrsServices) .
csStatus . _Just . to toTextCI)]
}
tasksRunning :: Wait DescribeTasks
tasksRunning =
Wait
{ _waitName = "TasksRunning"
, _waitAttempts = 100
, _waitDelay = 6
, _waitAcceptors = [ matchAny
"STOPPED"
AcceptFailure
(folding (concatOf dtrsTasks) .
tLastStatus . _Just . to toTextCI)
, matchAny
"MISSING"
AcceptFailure
(folding (concatOf dtrsFailures) .
fReason . _Just . to toTextCI)
, matchAll
"RUNNING"
AcceptSuccess
(folding (concatOf dtrsTasks) .
tLastStatus . _Just . to toTextCI)]
}
tasksStopped :: Wait DescribeTasks
tasksStopped =
Wait
{ _waitName = "TasksStopped"
, _waitAttempts = 100
, _waitDelay = 6
, _waitAcceptors = [ matchAll
"STOPPED"
AcceptSuccess
(folding (concatOf dtrsTasks) .
tLastStatus . _Just . to toTextCI)]
}