aws-sdk-0.11.1: AWS SDK for Haskell

Safe HaskellNone

AWS.EC2.Util

Synopsis

Documentation

list :: Monad m => EC2 m (ResumableSource m a) -> EC2 m [a]Source

head :: Monad m => EC2 m (ResumableSource m a) -> EC2 m (Maybe a)Source

each :: Monad m => (a -> m b) -> EC2 m (ResumableSource m a) -> EC2 m ()Source

eachp :: Monad m => (a -> m b) -> EC2 m (ResumableSource m a) -> EC2 m ()Source

parallel each

waitSource

Arguments

:: (MonadIO m, Functor m) 
=> (a -> Bool)

condition

-> (Text -> EC2 m [a])

DescribeResources

-> Text

Resource Id

-> EC2 m a 

Wait for condition.

 import AWS.EC2
 import AWS.EC2.Types
 import AWS.EC2.Util (list, wait)
 
 waitForAvailable :: (MonadIO m, Functor m)
     => Text -- ^ ImageId
     -> EC2 m a
 waitForAvailable = wait
     (\img -> imageImageState img == ImageAvailable)
     (\imgId -> list (describeImages [imgId] [] [] []))

count :: Monad m => EC2 m (ResumableSource m a) -> EC2 m IntSource

Count resources.

findTagSource

Arguments

:: Text

resourceKey

-> [ResourceTag]

TagSet

-> Maybe ResourceTag 

sleep :: MonadIO m => Int -> EC2 m ()Source

retrySource

Arguments

:: forall m a . (MonadBaseControl IO m, MonadResource m) 
=> Int

sleep count

-> Int

number of retry

-> EC2 m a 
-> EC2 m a