amazonka-core-1.4.0: 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 SessionToken Source

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

Constructors

SessionToken ByteString 

Environment

data AuthEnv Source

The authorisation environment.

data Auth Source

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

Instances

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

Logging

data LogLevel Source

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.

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

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

Signing

data Meta where Source

Signing algorithm specific metadata.

Constructors

Meta :: ToLog a => a -> Meta 

Instances

data Signer Source

Constructors

Signer 

Fields

sgSign :: forall a. Algorithm a
 
sgPresign :: forall a. Seconds -> Algorithm a
 

data Signed a Source

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 Service Source

Attributes and functions specific to an AWS service.

Requests

class AWSRequest a where Source

Specify how a request can be de/serialised.

Associated Types

type Rs a :: * Source

The successful, expected response associated with a request.

data Request a Source

An unsigned request.

Responses

type Response a = (Status, Rs a) Source

Retries

data Retry Source

Constants and predicates used to create a RetryPolicy.

Constructors

Exponential 

Fields

_retryBase :: !Double
 
_retryGrowth :: !Int
 
_retryAttempts :: !Int
 
_retryCheck :: ServiceError -> Maybe Text

Returns a descriptive name for logging if the request should be retried.

Errors

class AsError a where Source

Minimal complete definition

_Error

Methods

_Error :: Prism' a Error Source

A general Amazonka error.

_TransportError :: Prism' a HttpException Source

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

_SerializeError :: Prism' a SerializeError Source

A serialisation error occured when attempting to deserialise a response.

_ServiceError :: Prism' a ServiceError Source

A service specific error returned by the remote service.

data Error Source

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

HTTP Errors

Serialize Errors

Service Errors

Error Types

Regions

data Region Source

The sum of available AWS regions.

Constructors

Ireland

Europe / eu-west-1

Frankfurt

Europe / eu-central-1

Tokyo

Asia Pacific / ap-northeast-1

Singapore

Asia Pacific / ap-southeast-1

Sydney

Asia Pacific / ap-southeast-2

Beijing

China / cn-north-1

NorthVirginia

US / us-east-1

NorthCalifornia

US / us-west-1

Oregon

US / us-west-2

GovCloud

AWS GovCloud / us-gov-west-1

GovCloudFIPS

AWS GovCloud (FIPS 140-2) S3 Only / fips-us-gov-west-1

SaoPaulo

South America / sa-east-1

Endpoints

HTTP

type ClientRequest = Request Source

A convenience alias to avoid type ambiguity.

type ClientResponse = Response ResponseBody Source

A convenience alias encapsulating the common Response.

type ResponseBody = ResumableSource (ResourceT IO) ByteString Source

A convenience alias encapsulating the common Response body.

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

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

Seconds

Isomorphisms

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

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

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.