Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.733 kb
import qualified Aws
import qualified Aws.SimpleDb as Sdb
import Data.Attempt
import Control.Exception
import qualified Data.Text as T
import qualified Data.Text.IO as T
main :: IO ()
main = do
{- Load configuration -}
cfg <- Aws.baseConfiguration
let sdbCfg = Aws.defServiceConfig
putStrLn "Making request..."
{- Make request -}
let req = Sdb.listDomains { Sdb.ldMaxNumberOfDomains = Just 10 }
Aws.Response _metadata resp <- Aws.simpleAws cfg sdbCfg req
{- Analyze response -}
case resp of
Success (Sdb.ListDomainsResponse names _token) -> do
putStrLn "First 10 domains:"
mapM_ (T.putStrLn . T.cons '\t') names
Failure err -> print (toException err)
Jump to Line
Something went wrong with that request. Please try again.