amazonka-core-1.4.5: Core data types and functionality for Amazonka libraries.

Copyright(c) 2013-2016 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.Types

Contents

Description

 

Synopsis

Authentication

Credentials

newtype SecretKey #

Secret key credential.

Constructors

SecretKey ByteString 

newtype SessionToken #

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

Constructors

SessionToken ByteString 

Environment

data AuthEnv #

The authorisation environment.

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 # 

Methods

build :: Auth -> Builder #

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

Logging

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 # 
Eq LogLevel # 
Data LogLevel # 

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 # 
Show LogLevel # 
ToText LogLevel # 

Methods

toText :: LogLevel -> Text #

FromText LogLevel # 
ToByteString LogLevel # 

Methods

toBS :: LogLevel -> ByteString #

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

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

Signing

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

data Meta where #

Signing algorithm specific metadata.

Constructors

Meta :: ToLog a => a -> Meta 

Instances

ToLog Meta # 

Methods

build :: Meta -> Builder #

data Signer #

Constructors

Signer 

Fields

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 

Service

data Abbrev #

Abbreviated service name.

data Service #

Attributes and functions specific to an AWS service.

Requests

class AWSRequest a where #

Specify how a request can be de/serialised.

Minimal complete definition

request, response

Associated Types

type Rs a :: * #

The successful, expected response associated with a request.

Methods

request :: a -> Request a #

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

data Request a #

An unsigned request.

Responses

type Response a = (Status, Rs a) #

Retries

data Retry #

Constants and predicates used to create a RetryPolicy.

Constructors

Exponential 

Fields

Errors

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.

HTTP Errors

Serialize Errors

Service Errors

Error Types

errorCode :: Text -> ErrorCode #

Construct an ErrorCode.

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').

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').

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

Eq Region # 

Methods

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

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

Data Region # 

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 # 
Read Region # 
Show Region # 
Generic Region # 

Associated Types

type Rep Region :: * -> * #

Methods

from :: Region -> Rep Region x #

to :: Rep Region x -> Region #

Hashable Region # 

Methods

hashWithSalt :: Int -> Region -> Int #

hash :: Region -> Int #

ToJSON Region # 
FromJSON Region # 
NFData Region # 

Methods

rnf :: Region -> () #

ToText Region # 

Methods

toText :: Region -> Text #

FromText Region # 

Methods

parser :: Parser Region #

ToByteString Region # 

Methods

toBS :: Region -> ByteString #

ToLog Region # 

Methods

build :: Region -> Builder #

ToXML Region # 

Methods

toXML :: Region -> XML #

FromXML Region # 
type Rep Region # 
type Rep Region = D1 (MetaData "Region" "Network.AWS.Types" "amazonka-core-1.4.5-CtGXkT5HnsGIBP2qSlUBs" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NorthVirginia" PrefixI False) U1) ((:+:) (C1 (MetaCons "Ohio" PrefixI False) U1) (C1 (MetaCons "NorthCalifornia" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Oregon" PrefixI False) U1) (C1 (MetaCons "Tokyo" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Seoul" PrefixI False) U1) (C1 (MetaCons "Mumbai" PrefixI False) U1)))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Singapore" PrefixI False) U1) (C1 (MetaCons "Sydney" PrefixI False) U1)) ((:+:) (C1 (MetaCons "SaoPaulo" PrefixI False) U1) (C1 (MetaCons "Ireland" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Frankfurt" PrefixI False) U1) (C1 (MetaCons "GovCloud" PrefixI False) U1)) ((:+:) (C1 (MetaCons "GovCloudFIPS" PrefixI False) U1) (C1 (MetaCons "Beijing" PrefixI False) U1)))))

Endpoints

data Endpoint #

Instances

Eq Endpoint # 
Data Endpoint # 

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 # 

HTTP

type ClientRequest = Request #

A convenience alias to avoid type ambiguity.

type ClientResponse = Response ResponseBody #

A convenience alias encapsulating the common Response.

type ResponseBody = ResumableSource (ResourceT IO) ByteString #

A convenience alias encapsulating the common Response body.

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.

Seconds

newtype Seconds #

An integral value representing seconds.

Constructors

Seconds Int 

Instances

Bounded Seconds # 
Enum Seconds # 
Eq Seconds # 

Methods

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

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

Integral Seconds # 
Data Seconds # 

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 # 
Ord Seconds # 
Read Seconds # 
Real Seconds # 
Show Seconds # 
Generic Seconds # 

Associated Types

type Rep Seconds :: * -> * #

Methods

from :: Seconds -> Rep Seconds x #

to :: Rep Seconds x -> Seconds #

Hashable Seconds # 

Methods

hashWithSalt :: Int -> Seconds -> Int #

hash :: Seconds -> Int #

NFData Seconds # 

Methods

rnf :: Seconds -> () #

ToText Seconds # 

Methods

toText :: Seconds -> Text #

ToByteString Seconds # 

Methods

toBS :: Seconds -> ByteString #

ToQuery Seconds # 
ToLog Seconds # 

Methods

build :: Seconds -> Builder #

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

Isomorphisms

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

_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.