amazonka-1.0.1: Comprehensive Amazon Web Services SDK

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Free

Description

Defines the core AST, logic and interpreters for AWS behaviour.

Synopsis

Documentation

data Command r where Source

Constructors

CheckF :: (Bool -> r) -> Command r 
DynF :: Dynamic -> (ByteString -> r) -> Command r 
MetaF :: Metadata -> (ByteString -> r) -> Command r 
UserF :: (Maybe ByteString -> r) -> Command r 
SignF :: (AWSPresigner (Sg s), AWSRequest a) => Service s -> UTCTime -> Seconds -> a -> (ClientRequest -> r) -> Command r 
SendF :: (AWSSigner (Sg s), AWSRequest a) => Service s -> a -> (Rs a -> r) -> Command r 
AwaitF :: (AWSSigner (Sg s), AWSRequest a) => Service s -> Wait a -> a -> (Rs a -> r) -> Command r 

send :: (MonadFree Command m, AWSRequest a) => a -> m (Rs a) Source

Send a request, returning the associated response if successful.

See: sendWith

sendWith Source

Arguments

:: (MonadFree Command m, AWSSigner (Sg s), AWSRequest a) 
=> (Service (Sv a) -> Service s)

Modify the default service configuration.

-> a

Request.

-> m (Rs a) 

A variant of send that allows modifying the default Service definition used to configure the request.

paginate :: (MonadFree Command m, AWSPager a) => a -> Source m (Rs a) Source

Repeatedly send a request, automatically setting markers and paginating over multiple responses while available.

See: paginateWith

paginateWith Source

Arguments

:: (MonadFree Command m, AWSSigner (Sg s), AWSPager a) 
=> (Service (Sv a) -> Service s)

Modify the default service configuration.

-> a

Initial request.

-> Source m (Rs a) 

A variant of paginate that allows modifying the default Service definition used to configure the request.

await :: (MonadFree Command m, AWSRequest a) => Wait a -> a -> m (Rs a) Source

Poll the API with the supplied request until a specific Wait condition is fulfilled.

See: awaitWith

awaitWith Source

Arguments

:: (MonadFree Command m, AWSSigner (Sg s), AWSRequest a) 
=> (Service (Sv a) -> Service s)

Modify the default service configuration.

-> Wait a

Polling, error and acceptance criteria.

-> a

Request to poll with.

-> m (Rs a) 

A variant of await that allows modifying the default Service definition used to configure the request.

presignURL Source

Arguments

:: (MonadFree Command m, AWSPresigner (Sg (Sv a)), AWSRequest a) 
=> UTCTime

Signing time.

-> Seconds

Expiry time.

-> a

Request to presign.

-> m ByteString 

Presign an URL that is valid from the specified time until the number of seconds expiry has elapsed.

See: presign, presignWith

presign Source

Arguments

:: (MonadFree Command m, AWSPresigner (Sg (Sv a)), AWSRequest a) 
=> UTCTime

Signing time.

-> Seconds

Expiry time.

-> a

Request to presign.

-> m ClientRequest 

Presign an HTTP request that is valid from the specified time until the number of seconds expiry has elapsed.

See: presignWith

presignWith Source

Arguments

:: (MonadFree Command m, AWSPresigner (Sg s), AWSRequest a) 
=> (Service (Sv a) -> Service s)

Function to modify the service configuration.

-> UTCTime

Signing time.

-> Seconds

Expiry time.

-> a

Request to presign.

-> m ClientRequest 

A variant of presign that allows specifying the Service definition used to configure the request.

isEC2 :: MonadFree Command m => m Bool Source

Test whether the underlying host is running on EC2. For IO based interpretations of MonadFree Command, this is memoised and any external check occurs for the first call only.

dynamic :: MonadFree Command m => Dynamic -> m ByteString Source

Retrieve the specified Dynamic data.

metadata :: MonadFree Command m => Metadata -> m ByteString Source

Retrieve the specified Metadata.

userdata :: MonadFree Command m => m (Maybe ByteString) Source

Retrieve the user data. Returns Nothing if no user data is assigned to the instance.