amazonka-1.6.1: Comprehensive Amazon Web Services SDK.

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

Control.Monad.Trans.AWS

Contents

Description

The AWST transformer provides the environment required to perform AWS operations. The transformer is intended to be used directly or embedded as a layer within a transformer stack.

Network.AWS contains an IO specialised version of AWST with a typeclass to assist in automatically lifting operations.

Synopsis

Running AWS Actions

data AWST' r m a Source #

Instances
MonadAWS AWS Source # 
Instance details

Defined in Network.AWS

Methods

liftAWS :: AWS a -> AWS a Source #

Monad m => MonadReader r (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

ask :: AWST' r m r #

local :: (r -> r) -> AWST' r m a -> AWST' r m a #

reader :: (r -> a) -> AWST' r m a #

MonadState s m => MonadState s (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

get :: AWST' r m s #

put :: s -> AWST' r m () #

state :: (s -> (a, s)) -> AWST' r m a #

MonadError e m => MonadError e (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

throwError :: e -> AWST' r m a #

catchError :: AWST' r m a -> (e -> AWST' r m a) -> AWST' r m a #

MonadWriter w m => MonadWriter w (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

writer :: (a, w) -> AWST' r m a #

tell :: w -> AWST' r m () #

listen :: AWST' r m a -> AWST' r m (a, w) #

pass :: AWST' r m (a, w -> w) -> AWST' r m a #

MonadBase b m => MonadBase b (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

liftBase :: b α -> AWST' r m α #

MonadBaseControl b m => MonadBaseControl b (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Associated Types

type StM (AWST' r m) a :: Type #

Methods

liftBaseWith :: (RunInBase (AWST' r m) b -> b a) -> AWST' r m a #

restoreM :: StM (AWST' r m) a -> AWST' r m a #

MonadTrans (AWST' r) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

lift :: Monad m => m a -> AWST' r m a #

MonadTransControl (AWST' r) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Associated Types

type StT (AWST' r) a :: Type #

Methods

liftWith :: Monad m => (Run (AWST' r) -> m a) -> AWST' r m a #

restoreT :: Monad m => m (StT (AWST' r) a) -> AWST' r m a #

MFunctor (AWST' r :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

hoist :: Monad m => (forall a. m a -> n a) -> AWST' r m b -> AWST' r n b #

Monad m => Monad (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

(>>=) :: AWST' r m a -> (a -> AWST' r m b) -> AWST' r m b #

(>>) :: AWST' r m a -> AWST' r m b -> AWST' r m b #

return :: a -> AWST' r m a #

fail :: String -> AWST' r m a #

Functor m => Functor (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

fmap :: (a -> b) -> AWST' r m a -> AWST' r m b #

(<$) :: a -> AWST' r m b -> AWST' r m a #

Applicative m => Applicative (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

pure :: a -> AWST' r m a #

(<*>) :: AWST' r m (a -> b) -> AWST' r m a -> AWST' r m b #

liftA2 :: (a -> b -> c) -> AWST' r m a -> AWST' r m b -> AWST' r m c #

(*>) :: AWST' r m a -> AWST' r m b -> AWST' r m b #

(<*) :: AWST' r m a -> AWST' r m b -> AWST' r m a #

Alternative m => Alternative (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

empty :: AWST' r m a #

(<|>) :: AWST' r m a -> AWST' r m a -> AWST' r m a #

some :: AWST' r m a -> AWST' r m [a] #

many :: AWST' r m a -> AWST' r m [a] #

MonadPlus m => MonadPlus (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

mzero :: AWST' r m a #

mplus :: AWST' r m a -> AWST' r m a -> AWST' r m a #

MonadIO m => MonadIO (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

liftIO :: IO a -> AWST' r m a #

MonadUnliftIO m => MonadUnliftIO (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

askUnliftIO :: AWST' r m (UnliftIO (AWST' r m)) #

withRunInIO :: ((forall a. AWST' r m a -> IO a) -> IO b) -> AWST' r m b #

MonadResource m => MonadResource (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

liftResourceT :: ResourceT IO a -> AWST' r m a #

MonadThrow m => MonadThrow (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

throwM :: Exception e => e -> AWST' r m a #

MonadActive m => MonadActive (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

monadActive :: AWST' r m Bool #

MonadCatch m => MonadCatch (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

catch :: Exception e => AWST' r m a -> (e -> AWST' r m a) -> AWST' r m a #

MonadMask m => MonadMask (AWST' r m) Source # 
Instance details

Defined in Control.Monad.Trans.AWS

Methods

mask :: ((forall a. AWST' r m a -> AWST' r m a) -> AWST' r m b) -> AWST' r m b #

uninterruptibleMask :: ((forall a. AWST' r m a -> AWST' r m a) -> AWST' r m b) -> AWST' r m b #

generalBracket :: AWST' r m a -> (a -> ExitCase b -> AWST' r m c) -> (a -> AWST' r m b) -> AWST' r m (b, c) #

type StT (AWST' r) a Source # 
Instance details

Defined in Control.Monad.Trans.AWS

type StT (AWST' r) a = StT (ReaderT r :: (Type -> Type) -> Type -> Type) a
type StM (AWST' r m) a Source # 
Instance details

Defined in Control.Monad.Trans.AWS

type StM (AWST' r m) a = ComposeSt (AWST' r) m a

runAWST :: HasEnv r => r -> AWST' r m a -> m a Source #

Run an AWST action with the specified environment.

runResourceT :: MonadUnliftIO m => ResourceT m a -> m a #

Unwrap a ResourceT transformer, and call all registered release actions.

Note that there is some reference counting involved due to resourceForkIO. If multiple threads are sharing the same collection of resources, only the last call to runResourceT will deallocate the resources.

NOTE Since version 1.2.0, this function will throw a ResourceCleanupException if any of the cleanup functions throw an exception.

Since: resourcet-0.3.0

type AWSConstraint r m = (MonadThrow m, MonadCatch m, MonadResource m, MonadReader r m, HasEnv r) Source #

An alias for the constraints required to send requests, which AWST implicitly fulfils.

Authentication and Environment

newEnv Source #

Arguments

:: (Applicative m, MonadIO m, MonadCatch m) 
=> Credentials

Credential discovery mechanism.

-> m Env 

Creates a new environment with a new Manager without debug logging and uses getAuth to expand/discover the supplied Credentials. Lenses from HasEnv can be used to further configure the resulting Env.

Since: 1.5.0 - The region is now retrieved from the AWS_REGION environment variable (identical to official SDKs), or defaults to us-east-1. You can override the Env region by using envRegion, or the current operation's region by using within.

Since: 1.3.6 - The default logic for retrying HttpExceptions now uses retryConnectionFailure to retry specific connection failure conditions up to 3 times. Previously only service specific errors were automatically retried. This can be reverted to the old behaviour by resetting the Env using envRetryCheck lens to (\_ _ -> False).

Throws AuthError when environment variables or IAM profiles cannot be read.

See: newEnvWith.

data Env Source #

The environment containing the parameters required to make AWS requests.

class HasEnv a where Source #

Minimal complete definition

environment

Methods

environment :: Lens' a Env Source #

envRegion :: Lens' a Region Source #

The current region.

envLogger :: Lens' a Logger Source #

The function used to output log messages.

envRetryCheck :: Lens' a (Int -> HttpException -> Bool) Source #

The function used to determine if an HttpException should be retried.

envOverride :: Lens' a (Dual (Endo Service)) Source #

The currently applied overrides to all Service configuration.

envManager :: Lens' a Manager Source #

The Manager used to create and manage open HTTP connections.

envAuth :: Lens' a Auth Source #

The credentials used to sign requests for authentication with AWS.

envEC2 :: Getter a (IORef (Maybe Bool)) Source #

A memoised predicate for whether the underlying host is an EC2 instance.

Credential Discovery

data Credentials Source #

Determines how AuthN/AuthZ information is retrieved.

Constructors

FromKeys AccessKey SecretKey

Explicit access and secret keys. See fromKeys.

FromSession AccessKey SecretKey SessionToken

Explicit access key, secret key and a session token. See fromSession.

FromEnv Text Text (Maybe Text) (Maybe Text)

Lookup specific environment variables for access key, secret key, an optional session token, and an optional region, respectively.

FromProfile Text

An IAM Profile name to lookup from the local EC2 instance-data. Environment variables to lookup for the access key, secret key and optional session token.

FromFile Text FilePath

A credentials profile name (the INI section) and the path to the AWS credentials file.

FromContainer

Obtain credentials by attempting to contact the ECS container agent at http://169.254.170.2 using the path in envContainerCredentialsURI. See IAM Roles for Tasks in the AWS documentation for more information.

Discover

Attempt credentials discovery via the following steps:

  • Read the envAccessKey, envSecretKey, and envRegion from the environment if they are set.
  • Read the credentials file if credFile exists.
  • Obtain credentials from the ECS container agent if envContainerCredentialsURI is set.
  • Retrieve the first available IAM profile and read the Region from the instance identity document, if running on EC2.

An attempt is made to resolve http://instance-data rather than directly retrieving http://169.254.169.254 for IAM profile information. This assists in ensuring the DNS lookup terminates promptly if not running on EC2.

Instances
Eq Credentials Source # 
Instance details

Defined in Network.AWS.Auth

Show Credentials Source # 
Instance details

Defined in Network.AWS.Auth

ToLog Credentials Source # 
Instance details

Defined in Network.AWS.Auth

Methods

build :: Credentials -> Builder #

AuthN/AuthZ information is handled similarly to other AWS SDKs. You can read some of the options available here.

When running on an EC2 instance and using FromProfile or Discover, a thread is forked which transparently handles the expiry and subsequent refresh of IAM profile information. See fromProfileName for more information.

Supported Regions

data Region #

The available AWS regions.

Constructors

NorthVirginia

US East ('us-east-1').

Ohio

US East ('us-east-2').

NorthCalifornia

US West ('us-west-1').

Oregon

US West ('us-west-2').

Montreal

Canada ('ca-central-1').

Tokyo

Asia Pacific ('ap-northeast-1').

Seoul

Asia Pacific ('ap-northeast-2').

Mumbai

Asia Pacific ('ap-south-1').

Singapore

Asia Pacific ('ap-southeast-1').

Sydney

Asia Pacific ('ap-southeast-2').

SaoPaulo

South America ('sa-east-1').

Ireland

EU ('eu-west-1').

London

EU ('eu-west-2').

Frankfurt

EU ('eu-central-1').

GovCloud

US GovCloud ('us-gov-west-1').

GovCloudFIPS

US GovCloud FIPS (S3 Only, 'fips-us-gov-west-1').

Beijing

China ('cn-north-1').

Instances
Bounded Region 
Instance details

Defined in Network.AWS.Types

Enum Region 
Instance details

Defined in Network.AWS.Types

Eq Region 
Instance details

Defined in Network.AWS.Types

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

Data Region 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Region -> c Region #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Region #

toConstr :: Region -> Constr #

dataTypeOf :: Region -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Region) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Region) #

gmapT :: (forall b. Data b => b -> b) -> Region -> Region #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Region -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Region -> r #

gmapQ :: (forall d. Data d => d -> u) -> Region -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Region -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Region -> m Region #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Region -> m Region #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Region -> m Region #

Ord Region 
Instance details

Defined in Network.AWS.Types

Read Region 
Instance details

Defined in Network.AWS.Types

Show Region 
Instance details

Defined in Network.AWS.Types

Generic Region 
Instance details

Defined in Network.AWS.Types

Associated Types

type Rep Region :: Type -> Type #

Methods

from :: Region -> Rep Region x #

to :: Rep Region x -> Region #

Hashable Region 
Instance details

Defined in Network.AWS.Types

Methods

hashWithSalt :: Int -> Region -> Int #

hash :: Region -> Int #

ToJSON Region 
Instance details

Defined in Network.AWS.Types

FromJSON Region 
Instance details

Defined in Network.AWS.Types

FromXML Region 
Instance details

Defined in Network.AWS.Types

ToXML Region 
Instance details

Defined in Network.AWS.Types

Methods

toXML :: Region -> XML #

ToLog Region 
Instance details

Defined in Network.AWS.Types

Methods

build :: Region -> Builder #

ToByteString Region 
Instance details

Defined in Network.AWS.Types

Methods

toBS :: Region -> ByteString #

FromText Region 
Instance details

Defined in Network.AWS.Types

Methods

parser :: Parser Region #

ToText Region 
Instance details

Defined in Network.AWS.Types

Methods

toText :: Region -> Text #

NFData Region 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: Region -> () #

type Rep Region 
Instance details

Defined in Network.AWS.Types

type Rep Region = D1 (MetaData "Region" "Network.AWS.Types" "amazonka-core-1.6.1-FZORvxk9gh76fGemhSgXQL" False) ((((C1 (MetaCons "NorthVirginia" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ohio" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "NorthCalifornia" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Oregon" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Montreal" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Tokyo" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Seoul" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Mumbai" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "Singapore" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Sydney" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "SaoPaulo" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ireland" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "London" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Frankfurt" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "GovCloud" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "GovCloudFIPS" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Beijing" PrefixI False) (U1 :: Type -> Type))))))

Sending Requests

To send a request you need to create a value of the desired operation type using the relevant constructor, as well as any further modifications of default/optional parameters using the appropriate lenses. This value can then be sent using send or paginate and the library will take care of serialisation/authentication and so forth.

The default Service configuration for a request contains retry configuration that is used to determine if a request can safely be retried and what kind of back off/on strategy should be used. (Usually exponential.) Typically services define retry strategies that handle throttling, general server errors and transport errors. Streaming requests are never retried.

send :: (AWSConstraint r m, AWSRequest a) => a -> m (Rs a) Source #

Send a request, returning the associated response if successful.

Throws LogLevel.

Pagination

Some AWS operations return results that are incomplete and require subsequent requests in order to obtain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the ListObjects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.

Operations that have an AWSPager instance can transparently perform subsequent requests, correctly setting Markers and other request facets to iterate through the entire result set of a truncated API operation. Operations which support this have an additional note in the documentation.

Many operations have the ability to filter results on the server side. See the individual operation parameters for details.

paginate :: (AWSConstraint r m, AWSPager a) => a -> ConduitM () (Rs a) m () Source #

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

Throws LogLevel.

Waiters

Waiters poll by repeatedly sending a request until some remote success condition configured by the Wait specification is fulfilled. The Wait specification determines how many attempts should be made, in addition to delay and retry strategies. Error conditions that are not handled by the Wait configuration will be thrown, or the first successful response that fulfills the success condition will be returned.

Wait specifications can be found under the Network.AWS.{ServiceName}.Waiters namespace for services which support await.

await :: (AWSConstraint r m, AWSRequest a) => Wait a -> a -> m Accept Source #

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

Throws LogLevel.

Service Configuration

When a request is sent, various values such as the endpoint, retry strategy, timeout and error handlers are taken from the associated Service for a request. For example, DynamoDB will use the dynamoDB configuration when sending PutItem, Query and all other operations.

You can modify a specific Service's default configuration by using configure or reconfigure. To modify all configurations simultaneously, see override.

An example of how you might alter default configuration using these mechanisms is demonstrated below. Firstly, the default dynamoDB service is configured to use non-SSL localhost as the endpoint:

let dynamo :: Service
    dynamo = setEndpoint False "localhost" 8000 dynamoDB

The updated configuration is then passed to the Env during setup:

e <- newEnv Discover <&> configure dynamo
runResourceT . runAWS e $ do
    -- This S3 operation will communicate with remote AWS APIs.
    x <- send listBuckets

    -- DynamoDB operations will communicate with localhost:8000.
    y <- send listTables

    -- Any operations for services other than DynamoDB, are not affected.
    ...

You can also scope the Endpoint modifications (or any other Service configuration) to specific actions:

e <- newEnv Discover
runResourceT . runAWS e $ do
    -- Service operations here will communicate with AWS, even DynamoDB.
    x <- send listTables

    reconfigure dynamo $ do
       -- In here, DynamoDB operations will communicate with localhost:8000,
       -- with operations for services not being affected.
       ...

Functions such as within, once, and timeout likewise modify the underlying configuration for all service requests within their respective scope.

Overriding Defaults

configure :: HasEnv a => Service -> a -> a Source #

Configure a specific service. All requests belonging to the supplied service will use this configuration instead of the default.

It's suggested you use a modified version of the default service, such as Network.AWS.DynamoDB.dynamoDB.

See: reconfigure.

override :: HasEnv a => (Service -> Service) -> a -> a Source #

Provide a function which will be added to the existing stack of overrides applied to all service configuration.

To override a specific service, it's suggested you use either configure or reconfigure with a modified version of the default service, such as Network.AWS.DynamoDB.dynamoDB.

Scoped Actions

reconfigure :: (MonadReader r m, HasEnv r) => Service -> m a -> m a Source #

Scope an action such that all requests belonging to the supplied service will use this configuration instead of the default.

It's suggested you use a modified version of the default service, such as Network.AWS.DynamoDB.dynamoDB.

See: configure.

within :: (MonadReader r m, HasEnv r) => Region -> m a -> m a Source #

Scope an action within the specific Region.

once :: (MonadReader r m, HasEnv r) => m a -> m a Source #

Scope an action such that any retry logic for the Service is ignored and any requests will at most be sent once.

timeout :: (MonadReader r m, HasEnv r) => Seconds -> m a -> m a Source #

Scope an action such that any HTTP response will use this timeout value.

Default timeouts are chosen by considering:

Streaming

Streaming comes in two flavours. HashedBody represents a request that requires a precomputed SHA256 hash, or a ChunkedBody type for those services that can perform incremental signing and do not require the entire payload to be hashed (such as S3). The type signatures for request smart constructors advertise which respective body type is required, denoting the underlying signing capabilities.

ToHashedBody and ToBody typeclass instances are available to construct the streaming bodies, automatically calculating any hash or size as needed for types such as Text, ByteString, or Aeson's Value type. To read files and other IO primitives, functions such as hashedFile, chunkedFile, or hashedBody should be used.

For responses that contain streaming bodies (such as GetObject), you can use sinkBody to connect the response body to a conduit compatible sink.

Request Bodies

class ToHashedBody a where #

Anything that can be safely converted to a HashedBody.

Methods

toHashed :: a -> HashedBody #

Convert a value to a hashed request body.

Instances
ToHashedBody ByteString 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody ByteString 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody Text 
Instance details

Defined in Network.AWS.Data.Body

Methods

toHashed :: Text -> HashedBody #

ToHashedBody Value 
Instance details

Defined in Network.AWS.Data.Body

Methods

toHashed :: Value -> HashedBody #

ToHashedBody Element 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody Base64 
Instance details

Defined in Network.AWS.Data.Base64

ToHashedBody HashedBody 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody QueryString 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody String 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody Text 
Instance details

Defined in Network.AWS.Data.Body

Methods

toHashed :: Text -> HashedBody #

ToHashedBody (HashMap Text Value) 
Instance details

Defined in Network.AWS.Data.Body

hashedFile Source #

Arguments

:: MonadIO m 
=> FilePath

The file path to read.

-> m HashedBody 

Construct a HashedBody from a FilePath, calculating the SHA256 hash and file size.

Note: While this function will perform in constant space, it will enumerate the entirety of the file contents _twice_. Firstly to calculate the SHA256 and lastly to stream the contents to the socket during sending.

See: ToHashedBody.

hashedBody Source #

Arguments

:: Digest SHA256

A SHA256 hash of the file contents.

-> Integer

The size of the stream in bytes.

-> ConduitM () ByteString (ResourceT IO) () 
-> HashedBody 

Construct a HashedBody from a Source, manually specifying the SHA256 hash and file size. It's left up to the caller to calculate these correctly, otherwise AWS will return signing errors.

See: ToHashedBody.

Chunked Request Bodies

class ToBody a where #

Anything that can be converted to a streaming request Body.

Minimal complete definition

Nothing

Methods

toBody :: a -> RqBody #

Convert a value to a request body.

Instances
ToBody ByteString 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: ByteString -> RqBody #

ToBody ByteString 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: ByteString -> RqBody #

ToBody Text 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: Text -> RqBody #

ToBody Value 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: Value -> RqBody #

ToBody Element 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: Element -> RqBody #

ToBody Base64 
Instance details

Defined in Network.AWS.Data.Base64

Methods

toBody :: Base64 -> RqBody #

ToBody ChunkedBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: ChunkedBody -> RqBody #

ToBody HashedBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: HashedBody -> RqBody #

ToBody RqBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: RqBody -> RqBody #

ToBody QueryString 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: QueryString -> RqBody #

ToBody String 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: String -> RqBody #

ToBody Text 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: Text -> RqBody #

ToHashedBody a => ToBody (Maybe a) 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: Maybe a -> RqBody #

ToBody (HashMap Text Value) 
Instance details

Defined in Network.AWS.Data.Body

newtype ChunkSize #

Specifies the transmitted size of the 'Transfer-Encoding' chunks.

See: defaultChunk.

Constructors

ChunkSize Int 
Instances
Enum ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Eq ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Integral ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Num ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Ord ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Real ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Show ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

ToLog ChunkSize 
Instance details

Defined in Network.AWS.Data.Body

Methods

build :: ChunkSize -> Builder #

defaultChunkSize :: ChunkSize #

The default chunk size of 128 KB. The minimum chunk size accepted by AWS is 8 KB, unless the entirety of the request is below this threshold.

A chunk size of 64 KB or higher is recommended for performance reasons.

chunkedFile :: MonadIO m => ChunkSize -> FilePath -> m RqBody Source #

Construct a ChunkedBody from a FilePath, where the contents will be read and signed incrementally in chunks if the target service supports it.

Will intelligently revert to HashedBody if the file is smaller than the specified ChunkSize.

See: ToBody.

unsafeChunkedBody Source #

Arguments

:: ChunkSize

The idealized size of chunks that will be yielded downstream.

-> Integer

The size of the stream in bytes.

-> ConduitM () ByteString (ResourceT IO) () 
-> RqBody 

Unsafely construct a ChunkedBody.

This function is marked unsafe because it does nothing to enforce the chunk size. Typically for conduit IO functions, it's whatever ByteString's defaultBufferSize is, around 32 KB. If the chunk size is less than 8 KB, the request will error. 64 KB or higher chunk size is recommended for performance reasons.

Note that it will always create a chunked body even if the request is too small.

See: ToBody.

Response Bodies

sinkBody :: MonadIO m => RsBody -> ConduitM ByteString Void (ResourceT IO) a -> m a Source #

Connect a Sink to a response stream.

File Size and MD5/SHA256

getFileSize :: MonadIO m => FilePath -> m Integer Source #

Convenience function for obtaining the size of a file.

sinkMD5 :: Monad m => ConduitM ByteString o m (Digest MD5) Source #

Incrementally calculate a MD5 Digest.

sinkSHA256 :: Monad m => ConduitM ByteString o m (Digest SHA256) Source #

Incrementally calculate a SHA256 Digest.

Presigning Requests

Presigning requires the Service signer to be an instance of AWSPresigner. Not all signing algorithms support this.

presignURL Source #

Arguments

:: (MonadIO m, MonadReader r m, HasEnv r, 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.

presign Source #

Arguments

:: (MonadIO m, MonadReader r m, HasEnv r, 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.

EC2 Instance Metadata

Metadata can be retrieved from the underlying host assuming that you're running the code on an EC2 instance or have a compatible instance-data endpoint available.

isEC2 :: (MonadIO m, MonadReader r m, HasEnv r) => m Bool Source #

Test whether the underlying host is running on EC2. This is memoised and any external check occurs for the first invocation only.

dynamic :: (MonadIO m, MonadThrow m, MonadReader r m, HasEnv r) => Dynamic -> m ByteString Source #

Retrieve the specified Dynamic data.

Throws HttpException.

metadata :: (MonadIO m, MonadThrow m, MonadReader r m, HasEnv r) => Metadata -> m ByteString Source #

Retrieve the specified Metadata.

Throws HttpException.

userdata :: (MonadIO m, MonadCatch m, MonadReader r m, HasEnv r) => m (Maybe ByteString) Source #

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

Throws HttpException.

data Dynamic Source #

Constructors

FWS

Value showing whether the customer has enabled detailed one-minute monitoring in CloudWatch.

Valid values: enabled | disabled.

Document

JSON containing instance attributes, such as instance-id, private IP address, etc. See: identity, InstanceDocument.

PKCS7

Used to verify the document's authenticity and content against the signature.

Signature 
Instances
Eq Dynamic Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

Methods

(==) :: Dynamic -> Dynamic -> Bool #

(/=) :: Dynamic -> Dynamic -> Bool #

Ord Dynamic Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

Show Dynamic Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

ToText Dynamic Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

Methods

toText :: Dynamic -> Text #

data Metadata Source #

Constructors

AMIId

The AMI ID used to launch the instance.

AMILaunchIndex

If you started more than one instance at the same time, this value indicates the order in which the instance was launched. The value of the first instance launched is 0.

AMIManifestPath

The path to the AMI's manifest file in Amazon S3. If you used an Amazon EBS-backed AMI to launch the instance, the returned result is unknown.

AncestorAMIIds

The AMI IDs of any instances that were rebundled to create this AMI. This value will only exist if the AMI manifest file contained an ancestor-amis key.

BlockDevice !Mapping

See: Mapping

Hostname

The private hostname of the instance. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).

IAM !Info

See: Info

InstanceAction

Notifies the instance that it should reboot in preparation for bundling. Valid values: none | shutdown | bundle-pending.

InstanceId

The ID of this instance.

InstanceType

The type of instance.

See: InstanceType

KernelId

The ID of the kernel launched with this instance, if applicable.

LocalHostname

The private DNS hostname of the instance. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).

LocalIPV4

The private IP address of the instance. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).

MAC

The instance's media access control (MAC) address. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).

Network !Text !Interface

See: Interface

AvailabilityZone

The Availability Zone in which the instance launched.

ProductCodes

Product codes associated with the instance, if any.

PublicHostname

The instance's public DNS. If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true. For more information, see Using DNS with Your VPC.

PublicIPV4

The public IP address. If an Elastic IP address is associated with the instance, the value returned is the Elastic IP address.

OpenSSHKey

Public key. Only available if supplied at instance launch time.

RAMDiskId

The ID of the RAM disk specified at launch time, if applicable.

ReservationId

ID of the reservation.

SecurityGroups

The names of the security groups applied to the instance.

Instances
Eq Metadata Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

Ord Metadata Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

Show Metadata Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

ToText Metadata Source # 
Instance details

Defined in Network.AWS.EC2.Metadata

Methods

toText :: Metadata -> Text #

Running Asynchronous Actions

Requests can be sent asynchronously, but due to guarantees about resource closure require the use of lifted-async.

The following example demonstrates retrieving two objects from S3 concurrently:

import Control.Concurrent.Async.Lifted
import Control.Lens
import Control.Monad.Trans.AWS
import Network.AWS.S3

do x   <- async . send $ getObject "bucket" "prefix/object-foo"
   y   <- async . send $ getObject "bucket" "prefix/object-bar"
   foo <- wait x
   bar <- wait y
   ...

See: Control.Concurrent.Async.Lifted

Handling Errors

Errors are thrown by the library using MonadThrow (unless Control.Monad.Error.AWS is used). Sub-errors of the canonical LogLevel type can be caught using trying or catching and the appropriate AsError Prism:

trying _Error          (send $ ListObjects "bucket-name") :: Either LogLevel          ListObjectsResponse
trying _TransportError (send $ ListObjects "bucket-name") :: Either HttpException  ListObjectsResponse
trying _SerializeError (send $ ListObjects "bucket-name") :: Either SerializeError ListObjectsResponse
trying _ServiceError   (send $ ListObjects "bucket-name") :: Either ServiceError   ListObjectsResponse

Many of the individual amazonka-* libraries export compatible Getters for matching service specific error codes and messages in the style above. See the Error Matchers heading in each respective library for details.

class AsError a where #

Minimal complete definition

_Error

Methods

_Error :: Prism' a Error #

A general Amazonka error.

_TransportError :: Prism' a HttpException #

An error occured while communicating over HTTP with a remote service.

_SerializeError :: Prism' a SerializeError #

A serialisation error occured when attempting to deserialise a response.

_ServiceError :: Prism' a ServiceError #

A service specific error returned by the remote service.

class AsAuthError a where Source #

Minimal complete definition

_AuthError

Methods

_AuthError :: Prism' a AuthError Source #

A general authentication error.

_RetrievalError :: Prism' a HttpException Source #

An error occured while communicating over HTTP with the local metadata endpoint.

_MissingEnvError :: Prism' a Text Source #

The named environment variable was not found.

_InvalidEnvError :: Prism' a Text Source #

An error occured parsing named environment variable's value.

_MissingFileError :: Prism' a FilePath Source #

The specified credentials file could not be found.

_InvalidFileError :: Prism' a Text Source #

An error occured parsing the credentials file.

_InvalidIAMError :: Prism' a Text Source #

The specified IAM profile could not be found or deserialised.

trying :: MonadCatch m => Getting (First a) SomeException a -> m r -> m (Either a r) #

A variant of try that takes a ReifiedPrism (or any ReifiedFold) to select which exceptions are caught (c.f. tryJust, catchJust). If the Exception does not match the predicate, it is re-thrown.

trying :: MonadCatch m => Prism'     SomeException a -> m r -> m (Either a r)
trying :: MonadCatch m => Lens'      SomeException a -> m r -> m (Either a r)
trying :: MonadCatch m => Traversal' SomeException a -> m r -> m (Either a r)
trying :: MonadCatch m => Iso'       SomeException a -> m r -> m (Either a r)
trying :: MonadCatch m => ReifiedGetter     SomeException a -> m r -> m (Either a r)
trying :: MonadCatch m => ReifiedFold       SomeException a -> m r -> m (Either a r)

catching :: MonadCatch m => Getting (First a) SomeException a -> m r -> (a -> m r) -> m r #

Catch exceptions that match a given ReifiedPrism (or any ReifiedFold, really).

>>> catching _AssertionFailed (assert False (return "uncaught")) $ \ _ -> return "caught"
"caught"
catching :: MonadCatch m => Prism' SomeException a     -> m r -> (a -> m r) -> m r
catching :: MonadCatch m => Lens' SomeException a      -> m r -> (a -> m r) -> m r
catching :: MonadCatch m => Traversal' SomeException a -> m r -> (a -> m r) -> m r
catching :: MonadCatch m => Iso' SomeException a       -> m r -> (a -> m r) -> m r
catching :: MonadCatch m => ReifiedGetter SomeException a     -> m r -> (a -> m r) -> m r
catching :: MonadCatch m => ReifiedFold SomeException a       -> m r -> (a -> m r) -> m r

Building Error Prisms

_MatchServiceError :: AsError a => Service -> ErrorCode -> Getting (First ServiceError) a ServiceError #

Provides a generalised prism for catching a specific service error identified by the opaque service abbreviation and error code.

This can be used if the generated error prisms provided by Network.AWS.ServiceName.Types do not cover all the thrown error codes. For example to define a new error prism:

{-# LANGUAGE OverloadedStrings #-}

import Network.AWS.S3 (ServiceError, s3)

_NoSuchBucketPolicy :: AsError a => Getting (First ServiceError) a ServiceError
_NoSuchBucketPolicy = _MatchServiceError s3 "NoSuchBucketPolicy"

With example usage being:

>>> import Control.Exception.Lens (trying)
>>> :t trying _NoSuchBucketPolicy
MonadCatch m => m a -> m (Either ServiceError a)

Logging

The exposed logging interface is a primitive Logger function which gets threaded through service calls and serialisation routines. This allows the library to output useful information and diagnostics.

The newLogger function can be used to construct a simple logger which writes output to a Handle, but in most production code you should probably consider using a more robust logging library such as tiny-log or fast-logger.

type Logger = LogLevel -> Builder -> IO () #

A function threaded through various request and serialisation routines to log informational and debug messages.

data LogLevel #

Constructors

Info

Info messages supplied by the user - this level is not emitted by the library.

Error

Error messages only.

Debug

Useful debug information + info + error levels.

Trace

Includes potentially sensitive signing metadata, and non-streaming response bodies.

Instances
Enum LogLevel 
Instance details

Defined in Network.AWS.Types

Eq LogLevel 
Instance details

Defined in Network.AWS.Types

Data LogLevel 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LogLevel -> c LogLevel #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LogLevel #

toConstr :: LogLevel -> Constr #

dataTypeOf :: LogLevel -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LogLevel) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LogLevel) #

gmapT :: (forall b. Data b => b -> b) -> LogLevel -> LogLevel #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LogLevel -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LogLevel -> r #

gmapQ :: (forall d. Data d => d -> u) -> LogLevel -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LogLevel -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LogLevel -> m LogLevel #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LogLevel -> m LogLevel #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LogLevel -> m LogLevel #

Ord LogLevel 
Instance details

Defined in Network.AWS.Types

Show LogLevel 
Instance details

Defined in Network.AWS.Types

ToByteString LogLevel 
Instance details

Defined in Network.AWS.Types

Methods

toBS :: LogLevel -> ByteString #

FromText LogLevel 
Instance details

Defined in Network.AWS.Types

ToText LogLevel 
Instance details

Defined in Network.AWS.Types

Methods

toText :: LogLevel -> Text #

Constructing a Logger

newLogger :: MonadIO m => LogLevel -> Handle -> m Logger Source #

This is a primitive logger which can be used to log builds to a Handle.

Note: A more sophisticated logging library such as tinylog or fast-logger should be used in production code.

Endpoints

data Endpoint #

Instances
Eq Endpoint 
Instance details

Defined in Network.AWS.Types

Data Endpoint 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Endpoint -> c Endpoint #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Endpoint #

toConstr :: Endpoint -> Constr #

dataTypeOf :: Endpoint -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Endpoint) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Endpoint) #

gmapT :: (forall b. Data b => b -> b) -> Endpoint -> Endpoint #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Endpoint -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Endpoint -> r #

gmapQ :: (forall d. Data d => d -> u) -> Endpoint -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Endpoint -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Endpoint -> m Endpoint #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Endpoint -> m Endpoint #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Endpoint -> m Endpoint #

Show Endpoint 
Instance details

Defined in Network.AWS.Types

setEndpoint #

Arguments

:: Bool

Whether to use HTTPS (ie. SSL).

-> ByteString

The hostname to connect to.

-> Int

The port number to connect to.

-> Service

The service configuration to override.

-> Service 

A convenience function for overriding the Service Endpoint.

See: serviceEndpoint.

Re-exported Types

_Default :: Monoid a => Iso' (Maybe a) a #

Invalid Iso, should be a Prism but exists for ease of composition with the current 'Lens . Iso' chaining to hide internal types from the user.

_Coerce :: (Coercible a b, Coercible b a) => Iso' a b #

withAuth :: MonadIO m => Auth -> (AuthEnv -> m a) -> m a #

expiration :: Lens' AuthEnv (Maybe UTCTime) #

The date on which the current credentials expire.

sessionToken :: Lens' AuthEnv (Maybe SessionToken) #

The token that users must pass to the service API to use the temporary credentials.

secretAccessKey :: Lens' AuthEnv SecretKey #

The secret access key that can be used to sign requests.

accessKeyId :: Lens' AuthEnv AccessKey #

The access key ID that identifies the temporary security credentials.

clientRequest :: Endpoint -> Maybe Seconds -> ClientRequest #

Construct a ClientRequest using common parameters such as TLS and prevent throwing errors when receiving erroneous status codes in respones.

errorCode :: Text -> ErrorCode #

Construct an ErrorCode.

type ClientRequest = Request #

A convenience alias to avoid type ambiguity.

type ClientResponse = Response ResponseBody #

A convenience alias encapsulating the common Response.

type ResponseBody = ConduitM () ByteString (ResourceT IO) () #

A convenience alias encapsulating the common Response body.

data Abbrev #

Abbreviated service name.

Instances
Eq Abbrev 
Instance details

Defined in Network.AWS.Types

Methods

(==) :: Abbrev -> Abbrev -> Bool #

(/=) :: Abbrev -> Abbrev -> Bool #

Ord Abbrev 
Instance details

Defined in Network.AWS.Types

Show Abbrev 
Instance details

Defined in Network.AWS.Types

IsString Abbrev 
Instance details

Defined in Network.AWS.Types

Methods

fromString :: String -> Abbrev #

FromJSON Abbrev 
Instance details

Defined in Network.AWS.Types

FromXML Abbrev 
Instance details

Defined in Network.AWS.Types

ToLog Abbrev 
Instance details

Defined in Network.AWS.Types

Methods

build :: Abbrev -> Builder #

FromText Abbrev 
Instance details

Defined in Network.AWS.Types

Methods

parser :: Parser Abbrev #

ToText Abbrev 
Instance details

Defined in Network.AWS.Types

Methods

toText :: Abbrev -> Text #

newtype ErrorCode #

Constructors

ErrorCode Text 
Instances
Eq ErrorCode 
Instance details

Defined in Network.AWS.Types

Ord ErrorCode 
Instance details

Defined in Network.AWS.Types

Show ErrorCode 
Instance details

Defined in Network.AWS.Types

IsString ErrorCode 
Instance details

Defined in Network.AWS.Types

FromJSON ErrorCode 
Instance details

Defined in Network.AWS.Types

FromXML ErrorCode 
Instance details

Defined in Network.AWS.Types

ToLog ErrorCode 
Instance details

Defined in Network.AWS.Types

Methods

build :: ErrorCode -> Builder #

FromText ErrorCode 
Instance details

Defined in Network.AWS.Types

ToText ErrorCode 
Instance details

Defined in Network.AWS.Types

Methods

toText :: ErrorCode -> Text #

newtype ErrorMessage #

Constructors

ErrorMessage Text 

newtype RequestId #

Constructors

RequestId Text 
Instances
Eq RequestId 
Instance details

Defined in Network.AWS.Types

Ord RequestId 
Instance details

Defined in Network.AWS.Types

Show RequestId 
Instance details

Defined in Network.AWS.Types

IsString RequestId 
Instance details

Defined in Network.AWS.Types

FromJSON RequestId 
Instance details

Defined in Network.AWS.Types

FromXML RequestId 
Instance details

Defined in Network.AWS.Types

ToLog RequestId 
Instance details

Defined in Network.AWS.Types

Methods

build :: RequestId -> Builder #

FromText RequestId 
Instance details

Defined in Network.AWS.Types

ToText RequestId 
Instance details

Defined in Network.AWS.Types

Methods

toText :: RequestId -> Text #

data Error #

An error type representing errors that can be attributed to this library.

data SerializeError #

Constructors

SerializeError' 

Fields

Instances
Eq SerializeError 
Instance details

Defined in Network.AWS.Types

Show SerializeError 
Instance details

Defined in Network.AWS.Types

ToLog SerializeError 
Instance details

Defined in Network.AWS.Types

class AsError a where #

Minimal complete definition

_Error

Methods

_Error :: Prism' a Error #

A general Amazonka error.

_TransportError :: Prism' a HttpException #

An error occured while communicating over HTTP with a remote service.

_SerializeError :: Prism' a SerializeError #

A serialisation error occured when attempting to deserialise a response.

_ServiceError :: Prism' a ServiceError #

A service specific error returned by the remote service.

data Endpoint #

Instances
Eq Endpoint 
Instance details

Defined in Network.AWS.Types

Data Endpoint 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Endpoint -> c Endpoint #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Endpoint #

toConstr :: Endpoint -> Constr #

dataTypeOf :: Endpoint -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Endpoint) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Endpoint) #

gmapT :: (forall b. Data b => b -> b) -> Endpoint -> Endpoint #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Endpoint -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Endpoint -> r #

gmapQ :: (forall d. Data d => d -> u) -> Endpoint -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Endpoint -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Endpoint -> m Endpoint #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Endpoint -> m Endpoint #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Endpoint -> m Endpoint #

Show Endpoint 
Instance details

Defined in Network.AWS.Types

type Logger = LogLevel -> Builder -> IO () #

A function threaded through various request and serialisation routines to log informational and debug messages.

data Retry #

Constants and predicates used to create a RetryPolicy.

Constructors

Exponential 

Fields

data Meta where #

Signing algorithm specific metadata.

Constructors

Meta :: forall a. ToLog a => a -> Meta 
Instances
ToLog Meta 
Instance details

Defined in Network.AWS.Types

Methods

build :: Meta -> Builder #

data Signed a #

A signed ClientRequest and associated metadata specific to the signing algorithm, tagged with the initial request type to be able to obtain the associated response, 'Rs a'.

Constructors

Signed 

type Algorithm a = Request a -> AuthEnv -> Region -> UTCTime -> Signed a #

data Signer #

Constructors

Signer 

Fields

data Service #

Attributes and functions specific to an AWS service.

data Request a #

An unsigned request.

type Response a = (Status, Rs a) #

class AWSRequest a where #

Specify how a request can be de/serialised.

Associated Types

type Rs a :: Type #

The successful, expected response associated with a request.

Methods

request :: a -> Request a #

response :: (MonadResource m, MonadThrow m) => Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) #

newtype AccessKey #

An access key ID.

For example: AKIAIOSFODNN7EXAMPLE

See: Understanding and Getting Your Security Credentials.

Constructors

AccessKey ByteString 
Instances
Eq AccessKey 
Instance details

Defined in Network.AWS.Types

Data AccessKey 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AccessKey -> c AccessKey #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AccessKey #

toConstr :: AccessKey -> Constr #

dataTypeOf :: AccessKey -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AccessKey) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AccessKey) #

gmapT :: (forall b. Data b => b -> b) -> AccessKey -> AccessKey #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AccessKey -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AccessKey -> r #

gmapQ :: (forall d. Data d => d -> u) -> AccessKey -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AccessKey -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AccessKey -> m AccessKey #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AccessKey -> m AccessKey #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AccessKey -> m AccessKey #

Read AccessKey 
Instance details

Defined in Network.AWS.Types

Show AccessKey 
Instance details

Defined in Network.AWS.Types

IsString AccessKey 
Instance details

Defined in Network.AWS.Types

Hashable AccessKey 
Instance details

Defined in Network.AWS.Types

ToJSON AccessKey 
Instance details

Defined in Network.AWS.Types

FromJSON AccessKey 
Instance details

Defined in Network.AWS.Types

FromXML AccessKey 
Instance details

Defined in Network.AWS.Types

ToXML AccessKey 
Instance details

Defined in Network.AWS.Types

Methods

toXML :: AccessKey -> XML #

ToLog AccessKey 
Instance details

Defined in Network.AWS.Types

Methods

build :: AccessKey -> Builder #

ToQuery AccessKey 
Instance details

Defined in Network.AWS.Types

ToByteString AccessKey 
Instance details

Defined in Network.AWS.Types

Methods

toBS :: AccessKey -> ByteString #

FromText AccessKey 
Instance details

Defined in Network.AWS.Types

ToText AccessKey 
Instance details

Defined in Network.AWS.Types

Methods

toText :: AccessKey -> Text #

NFData AccessKey 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: AccessKey -> () #

newtype SecretKey #

Secret access key credential.

For example: wJalrXUtnFEMIK7MDENGbPxRfiCYEXAMPLEKE

See: Understanding and Getting Your Security Credentials.

Constructors

SecretKey ByteString 
Instances
Eq SecretKey 
Instance details

Defined in Network.AWS.Types

Data SecretKey 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SecretKey -> c SecretKey #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SecretKey #

toConstr :: SecretKey -> Constr #

dataTypeOf :: SecretKey -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SecretKey) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SecretKey) #

gmapT :: (forall b. Data b => b -> b) -> SecretKey -> SecretKey #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SecretKey -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SecretKey -> r #

gmapQ :: (forall d. Data d => d -> u) -> SecretKey -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SecretKey -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SecretKey -> m SecretKey #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SecretKey -> m SecretKey #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SecretKey -> m SecretKey #

IsString SecretKey 
Instance details

Defined in Network.AWS.Types

Hashable SecretKey 
Instance details

Defined in Network.AWS.Types

ToJSON SecretKey 
Instance details

Defined in Network.AWS.Types

FromJSON SecretKey 
Instance details

Defined in Network.AWS.Types

FromXML SecretKey 
Instance details

Defined in Network.AWS.Types

ToXML SecretKey 
Instance details

Defined in Network.AWS.Types

Methods

toXML :: SecretKey -> XML #

ToByteString SecretKey 
Instance details

Defined in Network.AWS.Types

Methods

toBS :: SecretKey -> ByteString #

FromText SecretKey 
Instance details

Defined in Network.AWS.Types

ToText SecretKey 
Instance details

Defined in Network.AWS.Types

Methods

toText :: SecretKey -> Text #

NFData SecretKey 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: SecretKey -> () #

newtype SessionToken #

A session token used by STS to temporarily authorise access to an AWS resource.

See: Temporary Security Credentials.

Constructors

SessionToken ByteString 
Instances
Eq SessionToken 
Instance details

Defined in Network.AWS.Types

Data SessionToken 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SessionToken -> c SessionToken #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SessionToken #

toConstr :: SessionToken -> Constr #

dataTypeOf :: SessionToken -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SessionToken) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SessionToken) #

gmapT :: (forall b. Data b => b -> b) -> SessionToken -> SessionToken #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SessionToken -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SessionToken -> r #

gmapQ :: (forall d. Data d => d -> u) -> SessionToken -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SessionToken -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SessionToken -> m SessionToken #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SessionToken -> m SessionToken #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SessionToken -> m SessionToken #

IsString SessionToken 
Instance details

Defined in Network.AWS.Types

Hashable SessionToken 
Instance details

Defined in Network.AWS.Types

ToJSON SessionToken 
Instance details

Defined in Network.AWS.Types

FromJSON SessionToken 
Instance details

Defined in Network.AWS.Types

FromXML SessionToken 
Instance details

Defined in Network.AWS.Types

ToXML SessionToken 
Instance details

Defined in Network.AWS.Types

Methods

toXML :: SessionToken -> XML #

ToByteString SessionToken 
Instance details

Defined in Network.AWS.Types

FromText SessionToken 
Instance details

Defined in Network.AWS.Types

ToText SessionToken 
Instance details

Defined in Network.AWS.Types

Methods

toText :: SessionToken -> Text #

NFData SessionToken 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: SessionToken -> () #

data AuthEnv #

The AuthN/AuthZ credential environment.

Instances
Eq AuthEnv 
Instance details

Defined in Network.AWS.Types

Methods

(==) :: AuthEnv -> AuthEnv -> Bool #

(/=) :: AuthEnv -> AuthEnv -> Bool #

Data AuthEnv 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AuthEnv -> c AuthEnv #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AuthEnv #

toConstr :: AuthEnv -> Constr #

dataTypeOf :: AuthEnv -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AuthEnv) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AuthEnv) #

gmapT :: (forall b. Data b => b -> b) -> AuthEnv -> AuthEnv #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AuthEnv -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AuthEnv -> r #

gmapQ :: (forall d. Data d => d -> u) -> AuthEnv -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AuthEnv -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AuthEnv -> m AuthEnv #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AuthEnv -> m AuthEnv #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AuthEnv -> m AuthEnv #

Show AuthEnv 
Instance details

Defined in Network.AWS.Types

Generic AuthEnv 
Instance details

Defined in Network.AWS.Types

Associated Types

type Rep AuthEnv :: Type -> Type #

Methods

from :: AuthEnv -> Rep AuthEnv x #

to :: Rep AuthEnv x -> AuthEnv #

FromJSON AuthEnv 
Instance details

Defined in Network.AWS.Types

FromXML AuthEnv 
Instance details

Defined in Network.AWS.Types

ToLog AuthEnv 
Instance details

Defined in Network.AWS.Types

Methods

build :: AuthEnv -> Builder #

NFData AuthEnv 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: AuthEnv -> () #

type Rep AuthEnv 
Instance details

Defined in Network.AWS.Types

data Auth #

An authorisation environment containing AWS credentials, and potentially a reference which can be refreshed out-of-band as temporary credentials expire.

Instances
ToLog Auth 
Instance details

Defined in Network.AWS.Types

Methods

build :: Auth -> Builder #

data Region #

The available AWS regions.

Constructors

NorthVirginia

US East ('us-east-1').

Ohio

US East ('us-east-2').

NorthCalifornia

US West ('us-west-1').

Oregon

US West ('us-west-2').

Montreal

Canada ('ca-central-1').

Tokyo

Asia Pacific ('ap-northeast-1').

Seoul

Asia Pacific ('ap-northeast-2').

Mumbai

Asia Pacific ('ap-south-1').

Singapore

Asia Pacific ('ap-southeast-1').

Sydney

Asia Pacific ('ap-southeast-2').

SaoPaulo

South America ('sa-east-1').

Ireland

EU ('eu-west-1').

London

EU ('eu-west-2').

Frankfurt

EU ('eu-central-1').

GovCloud

US GovCloud ('us-gov-west-1').

GovCloudFIPS

US GovCloud FIPS (S3 Only, 'fips-us-gov-west-1').

Beijing

China ('cn-north-1').

Instances
Bounded Region 
Instance details

Defined in Network.AWS.Types

Enum Region 
Instance details

Defined in Network.AWS.Types

Eq Region 
Instance details

Defined in Network.AWS.Types

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

Data Region 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Region -> c Region #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Region #

toConstr :: Region -> Constr #

dataTypeOf :: Region -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Region) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Region) #

gmapT :: (forall b. Data b => b -> b) -> Region -> Region #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Region -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Region -> r #

gmapQ :: (forall d. Data d => d -> u) -> Region -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Region -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Region -> m Region #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Region -> m Region #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Region -> m Region #

Ord Region 
Instance details

Defined in Network.AWS.Types

Read Region 
Instance details

Defined in Network.AWS.Types

Show Region 
Instance details

Defined in Network.AWS.Types

Generic Region 
Instance details

Defined in Network.AWS.Types

Associated Types

type Rep Region :: Type -> Type #

Methods

from :: Region -> Rep Region x #

to :: Rep Region x -> Region #

Hashable Region 
Instance details

Defined in Network.AWS.Types

Methods

hashWithSalt :: Int -> Region -> Int #

hash :: Region -> Int #

ToJSON Region 
Instance details

Defined in Network.AWS.Types

FromJSON Region 
Instance details

Defined in Network.AWS.Types

FromXML Region 
Instance details

Defined in Network.AWS.Types

ToXML Region 
Instance details

Defined in Network.AWS.Types

Methods

toXML :: Region -> XML #

ToLog Region 
Instance details

Defined in Network.AWS.Types

Methods

build :: Region -> Builder #

ToByteString Region 
Instance details

Defined in Network.AWS.Types

Methods

toBS :: Region -> ByteString #

FromText Region 
Instance details

Defined in Network.AWS.Types

Methods

parser :: Parser Region #

ToText Region 
Instance details

Defined in Network.AWS.Types

Methods

toText :: Region -> Text #

NFData Region 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: Region -> () #

type Rep Region 
Instance details

Defined in Network.AWS.Types

type Rep Region = D1 (MetaData "Region" "Network.AWS.Types" "amazonka-core-1.6.1-FZORvxk9gh76fGemhSgXQL" False) ((((C1 (MetaCons "NorthVirginia" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ohio" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "NorthCalifornia" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Oregon" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Montreal" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Tokyo" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Seoul" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Mumbai" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "Singapore" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Sydney" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "SaoPaulo" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ireland" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "London" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Frankfurt" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "GovCloud" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "GovCloudFIPS" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Beijing" PrefixI False) (U1 :: Type -> Type))))))

newtype Seconds #

An integral value representing seconds.

Constructors

Seconds Int 
Instances
Bounded Seconds 
Instance details

Defined in Network.AWS.Types

Enum Seconds 
Instance details

Defined in Network.AWS.Types

Eq Seconds 
Instance details

Defined in Network.AWS.Types

Methods

(==) :: Seconds -> Seconds -> Bool #

(/=) :: Seconds -> Seconds -> Bool #

Integral Seconds 
Instance details

Defined in Network.AWS.Types

Data Seconds 
Instance details

Defined in Network.AWS.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seconds -> c Seconds #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Seconds #

toConstr :: Seconds -> Constr #

dataTypeOf :: Seconds -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Seconds) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds) #

gmapT :: (forall b. Data b => b -> b) -> Seconds -> Seconds #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seconds -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seconds -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seconds -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seconds -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seconds -> m Seconds #

Num Seconds 
Instance details

Defined in Network.AWS.Types

Ord Seconds 
Instance details

Defined in Network.AWS.Types

Read Seconds 
Instance details

Defined in Network.AWS.Types

Real Seconds 
Instance details

Defined in Network.AWS.Types

Show Seconds 
Instance details

Defined in Network.AWS.Types

Generic Seconds 
Instance details

Defined in Network.AWS.Types

Associated Types

type Rep Seconds :: Type -> Type #

Methods

from :: Seconds -> Rep Seconds x #

to :: Rep Seconds x -> Seconds #

Hashable Seconds 
Instance details

Defined in Network.AWS.Types

Methods

hashWithSalt :: Int -> Seconds -> Int #

hash :: Seconds -> Int #

ToLog Seconds 
Instance details

Defined in Network.AWS.Types

Methods

build :: Seconds -> Builder #

ToQuery Seconds 
Instance details

Defined in Network.AWS.Types

ToByteString Seconds 
Instance details

Defined in Network.AWS.Types

Methods

toBS :: Seconds -> ByteString #

FromText Seconds 
Instance details

Defined in Network.AWS.Types

ToText Seconds 
Instance details

Defined in Network.AWS.Types

Methods

toText :: Seconds -> Text #

NFData Seconds 
Instance details

Defined in Network.AWS.Types

Methods

rnf :: Seconds -> () #

type Rep Seconds 
Instance details

Defined in Network.AWS.Types

type Rep Seconds = D1 (MetaData "Seconds" "Network.AWS.Types" "amazonka-core-1.6.1-FZORvxk9gh76fGemhSgXQL" True) (C1 (MetaCons "Seconds" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data HttpException #

An exception which may be generated by this library

Since: http-client-0.5.0

data Accept #

Instances
Eq Accept 
Instance details

Defined in Network.AWS.Waiter

Methods

(==) :: Accept -> Accept -> Bool #

(/=) :: Accept -> Accept -> Bool #

Show Accept 
Instance details

Defined in Network.AWS.Waiter

ToLog Accept 
Instance details

Defined in Network.AWS.Waiter

Methods

build :: Accept -> Builder #

data Wait a #

Timing and acceptance criteria to check fulfillment of a remote operation.

class AWSRequest a => AWSPager a where #

Specify how an AWSRequest and it's associated Rs response can generate a subsequent request, if available.

Methods

page :: a -> Rs a -> Maybe a #

data RqBody #

Invariant: only services that support _both_ standard and chunked signing expose RqBody as a parameter.

Instances
Show RqBody 
Instance details

Defined in Network.AWS.Data.Body

IsString RqBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

fromString :: String -> RqBody #

ToBody RqBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: RqBody -> RqBody #

data HashedBody #

An opaque request body containing a SHA256 hash.

Instances
Show HashedBody 
Instance details

Defined in Network.AWS.Data.Body

IsString HashedBody 
Instance details

Defined in Network.AWS.Data.Body

ToHashedBody HashedBody 
Instance details

Defined in Network.AWS.Data.Body

ToBody HashedBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: HashedBody -> RqBody #

data ChunkedBody #

An opaque request body which will be transmitted via Transfer-Encoding: chunked.

Invariant: Only services that support chunked encoding can accept a ChunkedBody. (Currently S3.) This is enforced by the type signatures emitted by the generator.

Instances
Show ChunkedBody 
Instance details

Defined in Network.AWS.Data.Body

ToBody ChunkedBody 
Instance details

Defined in Network.AWS.Data.Body

Methods

toBody :: ChunkedBody -> RqBody #

data RsBody #

A streaming, exception safe response body.

Instances
Show RsBody 
Instance details

Defined in Network.AWS.Data.Body