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

Safe HaskellNone
LanguageHaskell2010

Network.AWS.Types

Contents

Synopsis

Authentication

Credentials

newtype SecretKey Source

Secret key credential.

Constructors

SecretKey ByteString 

newtype SecurityToken Source

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

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

Services

type Abbrev = Text Source

Abbreviated service name.

class (AWSSigner (Sg a), Show (Er a)) => AWSService a where Source

The properties (such as endpoint) for a service, as well as it's associated signing algorithm and error types.

Associated Types

type Sg a :: * Source

Signing algorithm supported by the service.

type Er a :: * Source

The general service error.

data Service a Source

Attributes specific to an AWS service.

Endpoints

endpoint :: Service a -> Region -> Endpoint Source

Determine the full host address and credential scope for a Service within the specified Region.

Errors

data ServiceError a Source

An error type representing the subset of errors that can be directly attributed to this library.

class AWSError a where Source

Instances

Signing

class AWSSigner v where Source

Methods

signed :: (AWSService (Sv a), v ~ Sg (Sv a)) => AuthEnv -> Region -> Request a -> TimeLocale -> UTCTime -> Signed a v Source

class AWSPresigner v where Source

Methods

presigned :: (AWSService (Sv a), v ~ Sg (Sv a)) => AuthEnv -> Region -> Request a -> TimeLocale -> UTCTime -> UTCTime -> Signed a v Source

Instances

data Signed a v where Source

A signed ClientRequest and associated metadata specific to the signing algorithm that was used.

Constructors

Signed :: ToBuilder (Meta v) => Meta v -> ClientRequest -> Signed a v 

data family Meta v :: * Source

Signing metadata data specific to a signing algorithm.

Note: this is used for test and debug purposes, or is otherwise ignored.

Requests

class (AWSService (Sv a), AWSSigner (Sg (Sv a))) => AWSRequest a where Source

Specify how a request can be de/serialised.

Associated Types

type Sv a :: * Source

The service definition for a request.

type Rs a :: * Source

The successful, expected response associated with a request.

class AWSRequest a => AWSPager a where Source

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

Methods

page :: a -> Rs a -> Maybe a Source

data Request a Source

An unsigned request.

Instances

rqHeaders :: forall a a. Lens (Request a) (Request a) [Header] [Header] Source

rqQuery :: forall a a. Lens (Request a) (Request a) Query Query Source

rqBody :: forall a a. Lens (Request a) (Request a) RqBody RqBody Source

Responses

type Response a = Either (ServiceError (Er (Sv a))) (Rs a) Source

An alias for the common response Either containing a service error in the Left case, or the expected response in the Right.

data Empty Source

Constructors

Empty 

Instances

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

Query Actions

newtype Action Source

A service's query action.

Constructors

Action Text 

Convenience

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 :: ClientRequest Source

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