Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype AccessKey = AccessKey ByteString
- newtype SecretKey = SecretKey ByteString
- newtype SecurityToken = SecurityToken ByteString
- data AuthEnv = AuthEnv {}
- data Auth
- withAuth :: MonadIO m => Auth -> (AuthEnv -> m a) -> m a
- data Logger
- debug :: MonadIO m => Logger -> Text -> m ()
- type Abbrev = Text
- class (AWSSigner (Sg a), Show (Er a)) => AWSService a where
- data Service a = Service {}
- data Endpoint
- newtype Host = Host ByteString
- endpoint :: Service a -> Region -> Host
- global :: Endpoint
- regional :: Endpoint
- custom :: ByteString -> Endpoint
- data ServiceError a
- _HttpError :: forall a. Prism' (ServiceError a) HttpException
- _SerializerError :: forall a. Prism' (ServiceError a) (Abbrev, String)
- _ServiceError :: forall a. Prism' (ServiceError a) (Abbrev, Status, a)
- _Errors :: forall a. Prism' (ServiceError a) [ServiceError a]
- class AWSError a where
- awsError :: a -> ServiceError String
- class AWSSigner v where
- class AWSPresigner v where
- data Signed a v where
- Signed :: Show (Meta v) => {
- _sgMeta :: Meta v
- _sgRequest :: ClientRequest
- Signed :: Show (Meta v) => {
- data family Meta v :: *
- sgMeta :: Lens' (Signed a v) (Meta v)
- sgRequest :: Lens' (Signed a v) ClientRequest
- class (AWSService (Sv a), AWSSigner (Sg (Sv a))) => AWSRequest a where
- type Sv a :: *
- type Rs a :: *
- request :: a -> Request a
- response :: MonadResource m => a -> Either HttpException ClientResponse -> m (Response a)
- class AWSRequest a => AWSPager a where
- data Request a = Request {
- _rqMethod :: !StdMethod
- _rqPath :: ByteString
- _rqQuery :: Query
- _rqHeaders :: [Header]
- _rqBody :: RqBody
- rqMethod :: forall a a. Lens (Request a) (Request a) StdMethod StdMethod
- rqHeaders :: forall a a. Lens (Request a) (Request a) [Header] [Header]
- rqPath :: forall a a. Lens (Request a) (Request a) ByteString ByteString
- rqQuery :: forall a a. Lens (Request a) (Request a) Query Query
- rqBody :: forall a a. Lens (Request a) (Request a) RqBody RqBody
- type Response a = Either (ServiceError (Er (Sv a))) (Rs a)
- data Empty = Empty
- data Region
- data Zone = Zone {}
- zRegion :: Lens' Zone Region
- zSuffix :: Lens' Zone Char
- newtype Action = Action Text
- type ClientRequest = Request
- type ClientResponse = Response ResponseBody
- type ResponseBody = ResumableSource (ResourceT IO) ByteString
- clientRequest :: ClientRequest
Authentication
Credentials
Access key credential.
Secret key credential.
newtype SecurityToken Source
A security token used by STS to temporarily authorise access to an AWS resource.
Environment
The authorisation environment.
An authorisation environment containing AWS credentials and potentially a reference which can be refreshed out-of-band as they expire.
Logger
debug :: MonadIO m => Logger -> Text -> m () Source
Log a message using the debug logger, or if none is specified noop.
Services
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.
Signing algorithm supported by the service.
The general service error.
Attributes specific to an AWS service.
Endpoints
The scope for a service's endpoint.
endpoint :: Service a -> Region -> Host Source
Determine the full host address for a 'Service within the given Region
.
custom :: ByteString -> Endpoint Source
Errors
data ServiceError a Source
An error type representing the subset of errors that can be directly attributed to this library.
HttpError HttpException | |
SerializerError Abbrev String | |
ServiceError Abbrev Status a | |
Errors [ServiceError a] |
Show a => Show (ServiceError a) | |
(Show a, Typeable * a) => Exception (ServiceError a) | |
Monoid (ServiceError a) | |
Show a => AWSError (ServiceError a) | |
Typeable (* -> *) ServiceError |
_HttpError :: forall a. Prism' (ServiceError a) HttpException Source
_SerializerError :: forall a. Prism' (ServiceError a) (Abbrev, String) Source
_ServiceError :: forall a. Prism' (ServiceError a) (Abbrev, Status, a) Source
_Errors :: forall a. Prism' (ServiceError a) [ServiceError a] Source
awsError :: a -> ServiceError String Source
Show a => AWSError (ServiceError a) |
Signing
class AWSPresigner v where Source
A signed ClientRequest
and associated metadata specific to the signing
algorithm that was used.
Signed :: Show (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.
sgRequest :: Lens' (Signed a v) ClientRequest Source
Requests
class (AWSService (Sv a), AWSSigner (Sg (Sv a))) => AWSRequest a where Source
Specify how a request can be de/serialised.
The service definition for a request.
The successful, expected response associated with a request.
request :: a -> Request a Source
response :: MonadResource m => a -> Either HttpException ClientResponse -> m (Response a) Source
class AWSRequest a => AWSPager a where Source
Specify how an AWSRequest
and it's associated Rs
response can generate
a subsequent request, if available.
An unsigned request.
rqPath :: forall a a. Lens (Request a) (Request a) ByteString ByteString Source
Responses
Regions
The sum of available AWS regions.
Ireland | Europe / eu-west-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 |
An availability zone.
Shared
A service's query action.
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.