-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Core data types and functionality for Amazonka libraries. -- @package amazonka-core @version 1.3.2 module Network.AWS.Data.Crypto digestToBS :: ByteArrayAccess a => a -> ByteString digestToBase :: ByteArrayAccess a => Base -> a -> ByteString hmacSHA256 :: (ByteArrayAccess a, ByteArray b) => a -> b -> HMAC SHA256 hashSHA256 :: ByteArrayAccess a => a -> Digest SHA256 hashMD5 :: ByteArrayAccess a => a -> Digest MD5 -- | Hash a strict bytestring into a digest. hash :: (ByteArrayAccess ba, HashAlgorithm a) => ba -> Digest a -- | Hash a lazy bytestring into a digest. hashlazy :: HashAlgorithm a => ByteString -> Digest a -- | Initialize a new context for this hash algorithm hashInit :: HashAlgorithm a => Context a -- | run hashUpdates on one single bytestring and return the updated -- context. hashUpdate :: (ByteArrayAccess ba, HashAlgorithm a) => Context a -> ba -> Context a -- | Finalize a context and return a digest. hashFinalize :: HashAlgorithm a => Context a -> Digest a -- | Represent an HMAC that is a phantom type with the hash used to produce -- the mac. -- -- The Eq instance is constant time. data HMAC a :: * -> * -- | Represent a digest for a given hash algorithm. data Digest a :: * -> * -- | Class representing hashing algorithms. -- -- The interface presented here is update in place and lowlevel. the Hash -- module takes care of hidding the mutable interface properly. class HashAlgorithm a -- | SHA256 cryptographic hash algorithm data SHA256 :: * SHA256 :: SHA256 -- | MD5 cryptographic hash algorithm data MD5 :: * MD5 :: MD5 -- | Different bases that can be used -- -- See RFC4648 for details. In particular, Base64 can be standard -- or URL-safe. URL-safe encoding is often used in other -- specifications without padding characters. data Base :: * -- | similar to hexadecimal Base16 :: Base Base32 :: Base -- | standard Base64 Base64 :: Base -- | unpadded URL-safe Base64 Base64URLUnpadded :: Base -- | Base64 as used in OpenBSD password encoding (such as bcrypt) Base64OpenBSD :: Base module Network.AWS.Data.Text -- | A space efficient, packed, unboxed Unicode text type. data Text :: * class FromText a parser :: FromText a => Parser a fromText :: FromText a => Text -> Either String a -- | Fail parsing with a Text error. -- -- Constrained to the actual attoparsec monad to avoid exposing -- fail usage directly. fromTextError :: Text -> Parser a takeLowerText :: Parser Text takeText :: Parser Text class ToText a toText :: ToText a => a -> Text toTextCI :: ToText a => a -> CI Text showText :: ToText a => a -> String instance ToText Bool instance ToText (Digest a) instance ToText StdMethod instance ToText Double instance ToText Scientific instance ToText Natural instance ToText Integer instance ToText Int64 instance ToText Int instance ToText String instance ToText Char instance ToText ByteString instance ToText Text instance ToText a => ToText (CI a) instance FromText StdMethod instance FromText Bool instance FromText Double instance FromText Natural instance FromText Scientific instance FromText Integer instance FromText Int instance FromText Char instance FromText ByteString instance FromText Text module Network.AWS.Data.JSON -- | A type that can be converted from JSON, with the possibility of -- failure. -- -- When writing an instance, use empty, mzero, or -- fail to make a conversion fail, e.g. if an Object is -- missing a required key, or the value is of the wrong type. -- -- An example type and instance: -- --
--   {-# LANGUAGE OverloadedStrings #-}
--   
--   data Coord = Coord { x :: Double, y :: Double }
--   
--   instance FromJSON Coord where
--     parseJSON (Object v) = Coord    <$>
--                            v .: "x" <*>
--                            v .: "y"
--   
--     -- A non-Object value is of the wrong type, so use mzero to fail.
--     parseJSON _          = mzero
--   
-- -- Note the use of the OverloadedStrings language extension -- which enables Text values to be written as string literals. -- -- Instead of manually writing your FromJSON instance, there are -- three options to do it automatically: -- -- -- -- To use this, simply add a deriving Generic clause to -- your datatype and declare a FromJSON instance for your -- datatype without giving a definition for parseJSON. -- -- For example the previous example can be simplified to just: -- --
--   {-# LANGUAGE DeriveGeneric #-}
--   
--   import GHC.Generics
--   
--   data Coord = Coord { x :: Double, y :: Double } deriving Generic
--   
--   instance FromJSON Coord
--   
-- -- Note that, instead of using DefaultSignatures, it's also -- possible to parameterize the generic decoding using -- genericParseJSON applied to your encoding/decoding -- Options: -- --
--   instance FromJSON Coord where
--       parseJSON = genericParseJSON defaultOptions
--   
class FromJSON a parseJSON :: FromJSON a => Value -> Parser a parseJSONText :: FromText a => String -> Value -> Parser a -- | Like decode' but returns an error message when decoding fails. eitherDecode' :: FromJSON a => ByteString -> Either String a -- | withObject expected f value applies f to the -- Object when value is an Object and fails -- using typeMismatch expected otherwise. withObject :: String -> (Object -> Parser a) -> Value -> Parser a -- | Retrieve the value associated with the given key of an Object. -- The result is empty if the key is not present or the value -- cannot be converted to the desired type. -- -- This accessor is appropriate if the key and value must be -- present in an object for it to be valid. If the key and value are -- optional, use '(.:?)' instead. (.:) :: FromJSON a => Object -> Text -> Parser a -- | Retrieve the value associated with the given key of an Object. -- The result is Nothing if the key is not present, or -- empty if the value cannot be converted to the desired type. -- -- This accessor is most useful if the key and value can be absent from -- an object without affecting its validity. If the key and value are -- mandatory, use '(.:)' instead. (.:?) :: FromJSON a => Object -> Text -> Parser (Maybe a) -- | Helper for use in combination with .:? to provide default -- values for optional JSON object fields. -- -- This combinator is most useful if the key and value can be absent from -- an object without affecting its validity and we know a default value -- to assign in that case. If the key and value are mandatory, use '(.:)' -- instead. -- -- Example usage: -- --
--   v1 <- o .:? "opt_field_with_dfl" .!= "default_val"
--   v2 <- o .:  "mandatory_field"
--   v3 <- o .:? "opt_field2"
--   
(.!=) :: Parser (Maybe a) -> a -> Parser a eitherParseJSON :: FromJSON a => Object -> Either String a (.:>) :: FromJSON a => Object -> Text -> Either String a (.?>) :: FromJSON a => Object -> Text -> Either String (Maybe a) -- | A type that can be converted to JSON. -- -- An example type and instance: -- -- @{-# LANGUAGE OverloadedStrings #-} -- -- data Coord = Coord { x :: Double, y :: Double } -- -- instance ToJSON Coord where toJSON (Coord x y) = object ["x" -- .= x, "y" .= y] @ -- -- Note the use of the OverloadedStrings language extension -- which enables Text values to be written as string literals. -- -- Instead of manually writing your ToJSON instance, there are -- three options to do it automatically: -- -- -- -- To use the latter option, simply add a deriving -- Generic clause to your datatype and declare a -- ToJSON instance for your datatype without giving a definition -- for toJSON. -- -- For example the previous example can be simplified to just: -- -- @{-# LANGUAGE DeriveGeneric #-} -- -- import GHC.Generics -- -- data Coord = Coord { x :: Double, y :: Double } deriving Generic -- -- instance ToJSON Coord @ -- -- Note that, instead of using DefaultSignatures, it's also -- possible to parameterize the generic encoding using -- genericToJSON applied to your encoding/decoding Options: -- --
--   instance ToJSON Coord where
--       toJSON = genericToJSON defaultOptions
--   
class ToJSON a toJSON :: ToJSON a => a -> Value toJSONText :: ToText a => a -> Value -- | A JSON value represented as a Haskell value. data Value :: * Object :: SrictNotUnpackedObject -> Value -- | Create a Value from a list of name/value Pairs. If -- duplicate keys arise, earlier keys and their associated values win. object :: [Pair] -> Value -- | Construct a Pair from a key and a value. (.=) :: ToJSON a => Text -> a -> Pair module Network.AWS.Data.ByteString -- | A space-efficient representation of a Word8 vector, supporting -- many efficient operations. -- -- A ByteString contains 8-bit bytes, or by using the operations -- from Data.ByteString.Char8 it can be interpreted as containing -- 8-bit characters. data ByteString :: * type LazyByteString = ByteString class ToByteString a where toBS = encodeUtf8 . toText toBS :: ToByteString a => a -> ByteString showBS :: ToByteString a => a -> String stripBS :: ByteString -> ByteString instance ToByteString a => ToByteString (CI a) instance ToByteString UTCTime instance ToByteString StdMethod instance ToByteString Double instance ToByteString Natural instance ToByteString Integer instance ToByteString Int instance ToByteString String instance ToByteString Text instance ToByteString LazyByteString instance ToByteString Builder instance ToByteString ByteString module Network.AWS.Data.Query data QueryString QList :: [QueryString] -> QueryString QPair :: ByteString -> QueryString -> QueryString QValue :: (Maybe ByteString) -> QueryString pair :: ToQuery a => ByteString -> a -> QueryString -> QueryString (=:) :: ToQuery a => ByteString -> a -> QueryString toQueryList :: (IsList a, ToQuery (Item a)) => ByteString -> a -> QueryString class ToQuery a where toQuery = toQuery . toText toQuery :: ToQuery a => a -> QueryString instance Typeable QueryString instance Eq QueryString instance Show QueryString instance Data QueryString instance ToQuery Bool instance ToQuery a => ToQuery (Maybe a) instance ToQuery Natural instance ToQuery Double instance ToQuery Integer instance ToQuery Int instance ToQuery Text instance ToQuery ByteString instance ToQuery Char instance (ToByteString k, ToQuery v) => ToQuery (k, v) instance ToQuery QueryString instance ToByteString QueryString instance IsString QueryString instance Monoid QueryString module Network.AWS.Data.XML (.@) :: FromXML a => [Node] -> Text -> Either String a (.@?) :: FromXML a => [Node] -> Text -> Either String (Maybe a) (@=) :: ToXML a => Name -> a -> XML decodeXML :: FromXML a => LazyByteString -> Either String a encodeXML :: ToElement a => a -> LazyByteString class FromXML a parseXML :: FromXML a => [Node] -> Either String a class ToElement a toElement :: ToElement a => a -> Element -- | Provides a way to make the operators for ToXML instance declaration be -- consistent WRT to single nodes or lists of nodes. data XML XNull :: XML XOne :: Node -> XML XMany :: [Node] -> XML listXMLNodes :: XML -> [Node] class ToXML a toXML :: ToXML a => a -> XML toXMLNodes :: ToXML a => a -> [Node] parseXMLList :: FromXML a => Text -> [Node] -> Either String [a] parseXMLText :: FromText a => String -> [Node] -> Either String a toXMLList :: (IsList a, ToXML (Item a)) => Name -> a -> XML toXMLText :: ToText a => a -> XML mkElement :: ToXML a => Name -> a -> Element withContent :: String -> [Node] -> Either String (Maybe Text) withElement :: Text -> ([Node] -> Either String a) -> [Node] -> Either String a -- | Find a specific named NodeElement, at the current depth in the node -- tree. -- -- Fails if absent. findElement :: Text -> [Node] -> Either String [Node] -- | Find the first specific named NodeElement, at any depth in the node -- tree. -- -- Fails if absent. firstElement :: Text -> [Node] -> Either String [Node] childNodesOf :: Text -> Node -> Maybe [Node] localName :: Node -> Maybe Text -- | An inefficient mechanism for retreiving the root element name of an -- XML document. rootElementName :: LazyByteString -> Maybe Text missingElement :: Text -> [Node] -> Maybe a -> Either String a instance Show XML instance ToXML Bool instance ToXML Double instance ToXML Natural instance ToXML Integer instance ToXML Int instance ToXML ByteString instance ToXML Text instance ToXML a => ToXML (Maybe a) instance ToXML XML instance Monoid XML instance ToElement Element instance FromXML Bool instance FromXML Double instance FromXML Natural instance FromXML Integer instance FromXML Int instance FromXML ByteString instance FromXML Char instance FromXML Text instance FromXML a => FromXML (Maybe a) instance FromXML [Node] module Network.AWS.Data.List1 newtype List1 a List1 :: NonEmpty a -> List1 a toNonEmpty :: List1 a -> NonEmpty a _List1 :: (Coercible a b, Coercible b a) => Iso' (List1 a) (NonEmpty b) parseXMLList1 :: FromXML a => Text -> [Node] -> Either String (List1 a) instance Typeable List1 instance Functor List1 instance Monad List1 instance Applicative List1 instance Foldable List1 instance Traversable List1 instance Semigroup (List1 a) instance Eq a => Eq (List1 a) instance Ord a => Ord (List1 a) instance Read a => Read (List1 a) instance Show a => Show (List1 a) instance Data a => Data (List1 a) instance Generic (List1 a) instance Datatype D1List1 instance Constructor C1_0List1 instance Selector S1_0_0List1 instance ToJSON a => ToJSON (List1 a) instance FromJSON a => FromJSON (List1 a) instance IsList (List1 a) module Network.AWS.Data.Headers (.#) :: FromText a => ResponseHeaders -> HeaderName -> Either String a (.#?) :: FromText a => ResponseHeaders -> HeaderName -> Either String (Maybe a) (=#) :: ToHeader a => HeaderName -> a -> [Header] hdr :: HeaderName -> ByteString -> [Header] -> [Header] class ToHeaders a where toHeaders = const mempty toHeaders :: ToHeaders a => a -> [Header] class ToHeader a where toHeader k = toHeader k . toText toHeader :: ToHeader a => HeaderName -> a -> [Header] hHost :: HeaderName hAMZToken :: HeaderName hAMZTarget :: HeaderName hAMZAlgorithm :: HeaderName hAMZCredential :: HeaderName hAMZExpires :: HeaderName hAMZSignedHeaders :: HeaderName hAMZContentSHA256 :: HeaderName hAMZDate :: HeaderName hMetaPrefix :: HeaderName hAMZRequestId :: HeaderName hAMZNRequestId :: HeaderName hAMZNErrorType :: HeaderName hAMZNAuth :: HeaderName hAMZDecodedContentLength :: HeaderName hTransferEncoding :: HeaderName hFormEncoded :: ByteString -- | Header name type HeaderName = CI ByteString -- | Header type Header = (HeaderName, ByteString) -- | HTTP Header names hContentType :: HeaderName instance ToText a => ToHeader (Maybe a) instance ToHeader ByteString instance ToHeader Text module Network.AWS.Data.Path type RawPath = Path NoEncoding type EscapedPath = Path Percent class ToPath a toPath :: ToPath a => a -> ByteString rawPath :: ToPath a => a -> Path NoEncoding escapePath :: Path a -> EscapedPath collapsePath :: Path a -> Path a instance Eq (Path a) instance Show (Path a) instance Eq Encoding instance Show Encoding instance ToByteString EscapedPath instance Monoid RawPath instance ToPath Text instance ToPath ByteString module Network.AWS.Data.Log class ToLog a build :: ToLog a => a -> Builder -- | Intercalate a list of Builders with newlines. buildLines :: [Builder] -> Builder instance ToLog (Response a) instance ToLog Request instance ToLog HttpException instance ToLog RequestBody instance ToLog HttpVersion instance ToLog [Header] instance ToLog Status instance ToLog Bool instance ToLog a => ToLog (Maybe a) instance ToLog a => ToLog (CI a) instance ToLog EscapedPath instance ToLog QueryString instance ToLog StdMethod instance ToLog [Char] instance ToLog Char instance ToLog Text instance ToLog Text instance ToLog Double instance ToLog Float instance ToLog UTCTime instance ToLog Word64 instance ToLog Word32 instance ToLog Word16 instance ToLog Word8 instance ToLog Word instance ToLog Integer instance ToLog Int64 instance ToLog Int32 instance ToLog Int16 instance ToLog Int8 instance ToLog Int instance ToLog ByteString instance ToLog ByteString instance ToLog Builder module Network.AWS.Data.Body -- | A streaming, exception safe response body. newtype RsBody RsBody :: ResumableSource (ResourceT IO) ByteString -> RsBody _streamBody :: RsBody -> ResumableSource (ResourceT IO) ByteString fuseStream :: RsBody -> Conduit ByteString (ResourceT IO) ByteString -> RsBody -- | Specifies the transmitted size of the 'Transfer-Encoding' chunks. -- -- See: defaultChunk. newtype ChunkSize ChunkSize :: Int -> 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. defaultChunkSize :: ChunkSize -- | 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. data ChunkedBody ChunkedBody :: !ChunkSize -> !Integer -> Source (ResourceT IO) ByteString -> ChunkedBody _chunkedSize :: ChunkedBody -> !ChunkSize _chunkedLength :: ChunkedBody -> !Integer _chunkedBody :: ChunkedBody -> Source (ResourceT IO) ByteString chunkedLength :: Lens' ChunkedBody Integer fuseChunks :: ChunkedBody -> Conduit ByteString (ResourceT IO) ByteString -> ChunkedBody fullChunks :: ChunkedBody -> Integer remainderBytes :: ChunkedBody -> Maybe Integer -- | An opaque request body containing a SHA256 hash. data HashedBody HashedStream :: (Digest SHA256) -> !Integer -> (Source (ResourceT IO) ByteString) -> HashedBody HashedBytes :: (Digest SHA256) -> ByteString -> HashedBody sha256Base16 :: HashedBody -> ByteString -- | Invariant: only services that support _both_ standard and chunked -- signing expose RqBody as a parameter. data RqBody Chunked :: ChunkedBody -> RqBody Hashed :: HashedBody -> RqBody md5Base64 :: RqBody -> Maybe ByteString isStreaming :: RqBody -> Bool toRequestBody :: RqBody -> RequestBody contentLength :: RqBody -> Integer -- | Anything that can be safely converted to a HashedBody. class ToHashedBody a toHashed :: ToHashedBody a => a -> HashedBody -- | Anything that can be converted to a streaming request Body. class ToBody a where toBody = Hashed . toHashed toBody :: ToBody a => a -> RqBody _Body :: ToBody a => AReview RqBody a instance Eq ChunkSize instance Ord ChunkSize instance Show ChunkSize instance Enum ChunkSize instance Num ChunkSize instance Real ChunkSize instance Integral ChunkSize instance Show RqBody instance ToBody QueryString instance ToBody Element instance ToBody Value instance ToBody (HashMap Text Value) instance ToBody Text instance ToBody Text instance ToBody ByteString instance ToBody ByteString instance ToBody String instance ToBody ChunkedBody instance ToBody HashedBody instance ToBody RqBody instance ToHashedBody (HashMap Text Value) instance ToHashedBody QueryString instance ToHashedBody Element instance ToHashedBody Value instance ToHashedBody Text instance ToHashedBody Text instance ToHashedBody ByteString instance ToHashedBody String instance ToHashedBody HashedBody instance ToHashedBody ByteString instance IsString RqBody instance IsString HashedBody instance Show HashedBody instance Show ChunkedBody instance ToLog ChunkSize instance Show RsBody module Network.AWS.Data.Map newtype Map k v Map :: HashMap k v -> Map k v toMap :: Map k v -> HashMap k v _Map :: (Coercible a b, Coercible b a) => Iso' (Map k a) (HashMap k b) parseXMLMap :: (Eq k, Hashable k, FromText k, FromXML v) => Text -> Text -> Text -> [Node] -> Either String (Map k v) parseHeadersMap :: FromText a => ByteString -> ResponseHeaders -> Either String (Map Text a) toQueryMap :: (Hashable k, Eq k, ToQuery k, ToQuery v) => ByteString -> ByteString -> ByteString -> Map k v -> QueryString instance Typeable Map instance Functor (Map k) instance Foldable (Map k) instance Traversable (Map k) instance (Eq k, Hashable k) => Monoid (Map k v) instance (Eq k, Hashable k) => Semigroup (Map k v) instance (Eq k, Eq v) => Eq (Map k v) instance (Eq k, Read k, Read v, Hashable k) => Read (Map k v) instance (Show k, Show v) => Show (Map k v) instance (Eq k, Data k, Data v, Hashable k) => Data (Map k v) instance Generic (Map k v) instance Datatype D1Map instance Constructor C1_0Map instance Selector S1_0_0Map instance (Eq k, Hashable k, ToByteString k, ToText v) => ToHeader (Map k v) instance (Eq k, Hashable k, ToText k, ToJSON v) => ToJSON (Map k v) instance (Eq k, Hashable k, FromText k, FromJSON v) => FromJSON (Map k v) instance (Hashable k, Eq k) => IsList (Map k v) module Network.AWS.Data.Numeric newtype Nat Nat :: Natural -> Nat unNat :: Nat -> Natural _Nat :: Iso' Nat Natural instance Typeable Nat instance Eq Nat instance Ord Nat instance Read Nat instance Show Nat instance Enum Nat instance Num Nat instance Real Nat instance Integral Nat instance Data Nat instance Generic Nat instance ToByteString Nat instance FromText Nat instance ToText Nat instance FromXML Nat instance ToXML Nat instance ToQuery Nat instance Datatype D1Nat instance Constructor C1_0Nat instance Selector S1_0_0Nat instance ToJSON Nat instance FromJSON Nat module Network.AWS.Data.Sensitive -- | Note: read . show /= isomorphic newtype Sensitive a Sensitive :: a -> Sensitive a desensitise :: Sensitive a -> a _Sensitive :: Iso' (Sensitive a) a instance Typeable Sensitive instance Eq a => Eq (Sensitive a) instance Ord a => Ord (Sensitive a) instance Read a => Read (Sensitive a) instance IsString a => IsString (Sensitive a) instance Monoid a => Monoid (Sensitive a) instance Data a => Data (Sensitive a) instance Generic (Sensitive a) instance ToByteString a => ToByteString (Sensitive a) instance FromText a => FromText (Sensitive a) instance ToText a => ToText (Sensitive a) instance FromXML a => FromXML (Sensitive a) instance ToXML a => ToXML (Sensitive a) instance ToQuery a => ToQuery (Sensitive a) instance ToJSON a => ToJSON (Sensitive a) instance FromJSON a => FromJSON (Sensitive a) instance Datatype D1Sensitive instance Constructor C1_0Sensitive instance Selector S1_0_0Sensitive instance Show (Sensitive a) module Network.AWS.Types -- | Access key credential. newtype AccessKey AccessKey :: ByteString -> AccessKey -- | Secret key credential. newtype SecretKey SecretKey :: ByteString -> SecretKey -- | A session token used by STS to temporarily authorise access to an AWS -- resource. newtype SessionToken SessionToken :: ByteString -> SessionToken -- | The authorisation environment. data AuthEnv AuthEnv :: !AccessKey -> !SecretKey -> Maybe SessionToken -> Maybe UTCTime -> AuthEnv _authAccess :: AuthEnv -> !AccessKey _authSecret :: AuthEnv -> !SecretKey _authToken :: AuthEnv -> Maybe SessionToken _authExpiry :: AuthEnv -> Maybe UTCTime -- | An authorisation environment containing AWS credentials, and -- potentially a reference which can be refreshed out-of-band as -- temporary credentials expire. data Auth Ref :: ThreadId -> (IORef AuthEnv) -> Auth Auth :: AuthEnv -> Auth withAuth :: MonadIO m => Auth -> (AuthEnv -> m a) -> m a data LogLevel -- | Info messages supplied by the user - this level is not emitted by the -- library. Info :: LogLevel -- | Error messages only. Error :: LogLevel -- | Useful debug information + info + error levels. Debug :: LogLevel -- | Includes potentially sensitive signing metadata, and non-streaming -- response bodies. Trace :: LogLevel -- | A function threaded through various request and serialisation routines -- to log informational and debug messages. type Logger = LogLevel -> Builder -> IO () type Algorithm a = Request a -> AuthEnv -> Region -> UTCTime -> Signed a -- | Signing algorithm specific metadata. data Meta Meta :: a -> Meta data Signer Signer :: (forall a. Algorithm a) -> (forall a. Seconds -> Algorithm a) -> Signer sgSign :: Signer -> forall a. Algorithm a sgPresign :: Signer -> forall a. Seconds -> Algorithm 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'. data Signed a Signed :: !Meta -> !ClientRequest -> Signed a sgMeta :: Signed a -> !Meta sgRequest :: Signed a -> !ClientRequest -- | Abbreviated service name. data Abbrev -- | Attributes and functions specific to an AWS service. data Service Service :: !Abbrev -> !Signer -> !ByteString -> !ByteString -> !(Region -> Endpoint) -> !(Maybe Seconds) -> !(Status -> Bool) -> !(Abbrev -> Status -> [Header] -> LazyByteString -> Error) -> !Retry -> Service _svcAbbrev :: Service -> !Abbrev _svcSigner :: Service -> !Signer _svcPrefix :: Service -> !ByteString _svcVersion :: Service -> !ByteString _svcEndpoint :: Service -> !(Region -> Endpoint) _svcTimeout :: Service -> !(Maybe Seconds) _svcCheck :: Service -> !(Status -> Bool) _svcError :: Service -> !(Abbrev -> Status -> [Header] -> LazyByteString -> Error) _svcRetry :: Service -> !Retry serviceSigner :: Lens' Service Signer serviceEndpoint :: Setter' Service Endpoint serviceTimeout :: Lens' Service (Maybe Seconds) serviceCheck :: Lens' Service (Status -> Bool) serviceRetry :: Lens' Service Retry -- | Specify how a request can be de/serialised. class AWSRequest a where type family Rs a :: * request :: AWSRequest a => a -> Request a response :: (AWSRequest a, MonadResource m) => Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) -- | An unsigned request. data Request a Request :: !Service -> !StdMethod -> !RawPath -> !QueryString -> ![Header] -> !RqBody -> Request a _rqService :: Request a -> !Service _rqMethod :: Request a -> !StdMethod _rqPath :: Request a -> !RawPath _rqQuery :: Request a -> !QueryString _rqHeaders :: Request a -> ![Header] _rqBody :: Request a -> !RqBody rqService :: Lens' (Request a) Service rqMethod :: Lens' (Request a) StdMethod rqHeaders :: Lens' (Request a) [Header] rqPath :: Lens' (Request a) RawPath rqQuery :: Lens' (Request a) QueryString rqBody :: Lens' (Request a) RqBody rqSign :: Algorithm a rqPresign :: Seconds -> Algorithm a type Response a = (Status, Rs a) -- | Constants and predicates used to create a RetryPolicy. data Retry Exponential :: !Double -> !Int -> !Int -> (ServiceError -> Maybe Text) -> Retry _retryBase :: Retry -> !Double _retryGrowth :: Retry -> !Int _retryAttempts :: Retry -> !Int -- | Returns a descriptive name for logging if the request should be -- retried. _retryCheck :: Retry -> ServiceError -> Maybe Text exponentBase :: Lens' Retry Double exponentGrowth :: Lens' Retry Int retryAttempts :: Lens' Retry Int retryCheck :: Lens' Retry (ServiceError -> Maybe Text) class AsError a where _TransportError = _Error . _TransportError _SerializeError = _Error . _SerializeError _ServiceError = _Error . _ServiceError _Error :: AsError a => Prism' a Error _TransportError :: AsError a => Prism' a HttpException _SerializeError :: AsError a => Prism' a SerializeError _ServiceError :: AsError a => Prism' a ServiceError -- | An error type representing errors that can be attributed to this -- library. data Error TransportError :: HttpException -> Error SerializeError :: SerializeError -> Error ServiceError :: ServiceError -> Error data HttpException :: * data SerializeError SerializeError' :: !Abbrev -> !Status -> String -> SerializeError _serializeAbbrev :: SerializeError -> !Abbrev _serializeStatus :: SerializeError -> !Status _serializeMessage :: SerializeError -> String serializeAbbrev :: Lens' SerializeError Abbrev serializeStatus :: Lens' SerializeError Status serializeMessage :: Lens' SerializeError String data ServiceError ServiceError' :: !Abbrev -> !Status -> [Header] -> !ErrorCode -> Maybe ErrorMessage -> Maybe RequestId -> ServiceError _serviceAbbrev :: ServiceError -> !Abbrev _serviceStatus :: ServiceError -> !Status _serviceHeaders :: ServiceError -> [Header] _serviceCode :: ServiceError -> !ErrorCode _serviceMessage :: ServiceError -> Maybe ErrorMessage _serviceRequestId :: ServiceError -> Maybe RequestId serviceAbbrev :: Lens' ServiceError Abbrev serviceStatus :: Lens' ServiceError Status serviceHeaders :: Lens' ServiceError [Header] serviceCode :: Lens' ServiceError ErrorCode serviceMessage :: Lens' ServiceError (Maybe ErrorMessage) serviceRequestId :: Lens' ServiceError (Maybe RequestId) data ErrorCode -- | Construct an ErrorCode. errorCode :: Text -> ErrorCode newtype ErrorMessage ErrorMessage :: Text -> ErrorMessage newtype RequestId RequestId :: Text -> RequestId -- | The sum of available AWS regions. data Region -- | Europe / eu-west-1 Ireland :: Region -- | Europe / eu-central-1 Frankfurt :: Region -- | Asia Pacific / ap-northeast-1 Tokyo :: Region -- | Asia Pacific / ap-southeast-1 Singapore :: Region -- | Asia Pacific / ap-southeast-2 Sydney :: Region -- | China / cn-north-1 Beijing :: Region -- | US / us-east-1 NorthVirginia :: Region -- | US / us-west-1 NorthCalifornia :: Region -- | US / us-west-2 Oregon :: Region -- | AWS GovCloud / us-gov-west-1 GovCloud :: Region -- | AWS GovCloud (FIPS 140-2) S3 Only / fips-us-gov-west-1 GovCloudFIPS :: Region -- | South America / sa-east-1 SaoPaulo :: Region data Endpoint Endpoint :: ByteString -> !Bool -> !Int -> ByteString -> Endpoint _endpointHost :: Endpoint -> ByteString _endpointSecure :: Endpoint -> !Bool _endpointPort :: Endpoint -> !Int _endpointScope :: Endpoint -> ByteString endpointHost :: Lens' Endpoint ByteString endpointPort :: Lens' Endpoint Int endpointSecure :: Lens' Endpoint Bool endpointScope :: Lens' Endpoint ByteString -- | A convenience alias to avoid type ambiguity. type ClientRequest = Request -- | A convenience alias encapsulating the common Response. type ClientResponse = Response ResponseBody -- | A convenience alias encapsulating the common Response body. type ResponseBody = ResumableSource (ResourceT IO) ByteString -- | Construct a ClientRequest using common parameters such as TLS -- and prevent throwing errors when receiving erroneous status codes in -- respones. clientRequest :: Endpoint -> Maybe Seconds -> ClientRequest -- | An integral value representing seconds. newtype Seconds Seconds :: Int -> Seconds seconds :: Seconds -> Int microseconds :: Seconds -> Int _Coerce :: (Coercible a b, Coercible b a) => Iso' a b -- | 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. _Default :: Monoid a => Iso' (Maybe a) a instance Typeable SerializeError instance Typeable ServiceError instance Typeable Error instance Typeable Endpoint instance Typeable LogLevel instance Typeable Region instance Typeable Seconds instance Eq Abbrev instance Ord Abbrev instance Show Abbrev instance IsString Abbrev instance FromXML Abbrev instance FromJSON Abbrev instance FromText Abbrev instance ToText Abbrev instance ToLog Abbrev instance Eq ErrorCode instance Ord ErrorCode instance Show ErrorCode instance ToText ErrorCode instance ToLog ErrorCode instance Eq ErrorMessage instance Ord ErrorMessage instance Show ErrorMessage instance IsString ErrorMessage instance FromXML ErrorMessage instance FromJSON ErrorMessage instance FromText ErrorMessage instance ToText ErrorMessage instance ToLog ErrorMessage instance Eq RequestId instance Ord RequestId instance Show RequestId instance IsString RequestId instance FromXML RequestId instance FromJSON RequestId instance FromText RequestId instance ToText RequestId instance ToLog RequestId instance Eq SerializeError instance Show SerializeError instance Eq ServiceError instance Show ServiceError instance Show Error instance Eq Endpoint instance Show Endpoint instance Data Endpoint instance Eq LogLevel instance Ord LogLevel instance Enum LogLevel instance Show LogLevel instance Data LogLevel instance Eq AccessKey instance Show AccessKey instance IsString AccessKey instance ToText AccessKey instance ToByteString AccessKey instance ToLog AccessKey instance Eq SecretKey instance IsString SecretKey instance ToText SecretKey instance ToByteString SecretKey instance Eq SessionToken instance IsString SessionToken instance ToText SessionToken instance ToByteString SessionToken instance Eq Region instance Ord Region instance Read Region instance Show Region instance Data Region instance Generic Region instance Eq Seconds instance Ord Seconds instance Read Seconds instance Show Seconds instance Enum Seconds instance Num Seconds instance Bounded Seconds instance Integral Seconds instance Real Seconds instance Data Seconds instance Generic Seconds instance ToQuery Seconds instance ToByteString Seconds instance ToText Seconds instance Datatype D1Region instance Constructor C1_0Region instance Constructor C1_1Region instance Constructor C1_2Region instance Constructor C1_3Region instance Constructor C1_4Region instance Constructor C1_5Region instance Constructor C1_6Region instance Constructor C1_7Region instance Constructor C1_8Region instance Constructor C1_9Region instance Constructor C1_10Region instance Constructor C1_11Region instance Datatype D1Seconds instance Constructor C1_0Seconds instance ToLog Seconds instance ToXML Region instance FromXML Region instance ToLog Region instance ToByteString Region instance ToText Region instance FromText Region instance Hashable Region instance ToLog Auth instance FromJSON AuthEnv instance ToLog AuthEnv instance ToLog Meta instance ToByteString LogLevel instance ToText LogLevel instance FromText LogLevel instance AsError Error instance AsError SomeException instance ToLog ServiceError instance ToLog SerializeError instance ToLog Error instance Exception Error instance FromText ErrorCode instance FromXML ErrorCode instance FromJSON ErrorCode instance IsString ErrorCode module Network.AWS.Endpoint -- | A convenience function for overriding the Service -- Endpoint. -- -- See: serviceEndpoint. setEndpoint :: Bool -> ByteString -> Int -> Service -> Service -- | Determine the full host address and credential scope within the -- specified Region. defaultEndpoint :: Service -> Region -> Endpoint module Network.AWS.Pager -- | Specify how an AWSRequest and it's associated Rs -- response can generate a subsequent request, if available. class AWSRequest a => AWSPager a page :: AWSPager a => a -> Rs a -> Maybe a -- | Generalise IsTruncated and other optional/required response pagination -- fields. class AWSTruncated a truncated :: AWSTruncated a => a -> Bool stop :: AWSTruncated a => a -> Bool choice :: (Alternative f, ToText a, ToText b) => (s -> f a) -> (s -> f b) -> Getter s (f Text) instance AWSTruncated (HashMap k v) instance AWSTruncated [a] instance AWSTruncated (Maybe Text) instance AWSTruncated (Maybe Bool) instance AWSTruncated (Maybe Int) instance AWSTruncated Bool module Network.AWS.Error statusSuccess :: Status -> Bool httpStatus :: AsError a => Getting (First Status) a Status hasStatus :: (Applicative f, Choice p) => Int -> Optic' p f ServiceError ServiceError hasCode :: (Applicative f, Choice p) => ErrorCode -> Optic' p f ServiceError ServiceError serviceError :: Abbrev -> Status -> [Header] -> Maybe ErrorCode -> Maybe ErrorMessage -> Maybe RequestId -> ServiceError getRequestId :: [Header] -> Maybe RequestId getErrorCode :: Status -> [Header] -> ErrorCode parseJSONError :: Abbrev -> Status -> [Header] -> LazyByteString -> Error parseXMLError :: Abbrev -> Status -> [Header] -> LazyByteString -> Error parseRESTError :: Abbrev -> Status -> [Header] -> a -> Error decodeError :: Abbrev -> Status -> [Header] -> LazyByteString -> Either String ServiceError -> Error module Network.AWS.Request head' :: ToRequest a => Service -> a -> Request a delete :: ToRequest a => Service -> a -> Request a get :: ToRequest a => Service -> a -> Request a post :: ToRequest a => Service -> a -> Request a put :: ToRequest a => Service -> a -> Request a postXML :: (ToRequest a, ToElement a) => Service -> a -> Request a postJSON :: (ToRequest a, ToJSON a) => Service -> a -> Request a postQuery :: ToRequest a => Service -> a -> Request a postBody :: (ToRequest a, ToBody a) => Service -> a -> Request a putXML :: (ToRequest a, ToElement a) => Service -> a -> Request a putJSON :: (ToRequest a, ToJSON a) => Service -> a -> Request a putBody :: (ToRequest a, ToBody a) => Service -> a -> Request a defaultRequest :: ToRequest a => Service -> a -> Request a contentMD5 :: Request a -> Request a requestHeaders :: Lens' Request RequestHeaders queryString :: Lens' Request ByteString requestURL :: ClientRequest -> ByteString module Network.AWS.Response receiveNull :: MonadResource m => Rs a -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) receiveEmpty :: MonadResource m => (Int -> ResponseHeaders -> () -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) receiveXMLWrapper :: MonadResource m => Text -> (Int -> ResponseHeaders -> [Node] -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) receiveXML :: MonadResource m => (Int -> ResponseHeaders -> [Node] -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) receiveJSON :: MonadResource m => (Int -> ResponseHeaders -> Object -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) receiveBody :: MonadResource m => (Int -> ResponseHeaders -> RsBody -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) deserialise :: MonadResource m => (LazyByteString -> Either String b) -> (Int -> ResponseHeaders -> b -> Either String (Rs a)) -> Logger -> Service -> Proxy a -> ClientResponse -> m (Response a) receive :: MonadResource m => (Int -> ResponseHeaders -> ResponseBody -> m (Either String (Rs a))) -> Service -> Proxy a -> ClientResponse -> m (Response a) sinkLBS :: MonadResource m => ResponseBody -> m LazyByteString module Network.AWS.Waiter type Acceptor a = Request a -> Either Error (Response a) -> Maybe Accept data Accept AcceptSuccess :: Accept AcceptFailure :: Accept AcceptRetry :: Accept -- | Timing and acceptance criteria to check fulfillment of a remote -- operation. data Wait a Wait :: ByteString -> !Int -> !Seconds -> [Acceptor a] -> Wait a _waitName :: Wait a -> ByteString _waitAttempts :: Wait a -> !Int _waitDelay :: Wait a -> !Seconds _waitAcceptors :: Wait a -> [Acceptor a] accept :: Wait a -> Acceptor a matchAll :: Eq b => b -> Accept -> Fold (Rs a) b -> Acceptor a matchAny :: Eq b => b -> Accept -> Fold (Rs a) b -> Acceptor a matchError :: ErrorCode -> Accept -> Acceptor a matchStatus :: Int -> Accept -> Acceptor a nonEmpty :: Fold a Text -> Fold a Bool instance Eq Accept instance Show Accept instance ToLog Accept module Network.AWS.Data.Base64 -- | Base64 encoded binary data. -- -- Encoding/decoding is automatically deferred to serialisation and -- deserialisation respectively. newtype Base64 Base64 :: ByteString -> Base64 unBase64 :: Base64 -> ByteString _Base64 :: Iso' Base64 ByteString instance Typeable Base64 instance Eq Base64 instance Read Base64 instance Ord Base64 instance Data Base64 instance Generic Base64 instance Datatype D1Base64 instance Constructor C1_0Base64 instance Selector S1_0_0Base64 instance ToJSON Base64 instance FromJSON Base64 instance ToXML Base64 instance FromXML Base64 instance ToQuery Base64 instance ToText Base64 instance Show Base64 instance ToByteString Base64 instance FromText Base64 module Network.AWS.Compat.Time -- | Parses a time value given a format string. Supports the same %-codes -- as formatTime, including %-, %_ and -- %0 modifiers. Leading and trailing whitespace is accepted. -- Case is not significant. Some variations in the input are accepted: -- -- parseTime :: ParseTime t => TimeLocale -> String -> String -> Maybe t module Network.AWS.Compat.Locale defaultTimeLocale :: TimeLocale -- | Construct format string according to ISO-8601. -- -- The Maybe String argument allows to supply an optional time -- specification. E.g.: -- --
--   iso8601DateFormat Nothing            == "%Y-%m-%d"           -- i.e. YYYY-MM-DD
--   iso8601DateFormat (Just "%H:%M:%S")  == "%Y-%m-%dT%H:%M:%S"  -- i.e. YYYY-MM-DDTHH:MM:SS
--   
iso8601DateFormat :: Maybe String -> String module Network.AWS.Data.Time data Format RFC822Format :: Format ISO8601Format :: Format BasicFormat :: Format AWSFormat :: Format POSIXFormat :: Format data Time :: Format -> * Time :: UTCTime -> Time a _Time :: Iso' (Time a) UTCTime -- | This is the simplest representation of UTC. It consists of the day -- number, and a time offset from midnight. Note that if a day has a leap -- second added to it, it will have 86401 seconds. data UTCTime :: * type RFC822 = Time RFC822Format type ISO8601 = Time ISO8601Format type BasicTime = Time BasicFormat type AWSTime = Time AWSFormat type POSIX = Time POSIXFormat instance Typeable Format instance Typeable Time instance Show (Time a) instance Read (Time a) instance Ord (Time a) instance Eq (Time a) instance Typeable 'POSIXFormat instance Typeable 'AWSFormat instance Typeable 'BasicFormat instance Typeable 'ISO8601Format instance Typeable 'RFC822Format instance Eq Format instance Read Format instance Show Format instance Data Format instance Generic Format instance Typeable $a => Data (Time $a) instance Generic (Time $a) instance Datatype D1Format instance Constructor C1_0Format instance Constructor C1_1Format instance Constructor C1_2Format instance Constructor C1_3Format instance Constructor C1_4Format instance Datatype D1Time instance Constructor C1_0Time instance ToJSON POSIX instance ToJSON BasicTime instance ToJSON AWSTime instance ToJSON ISO8601 instance ToJSON RFC822 instance ToXML POSIX instance ToXML BasicTime instance ToXML AWSTime instance ToXML ISO8601 instance ToXML RFC822 instance ToQuery AWSTime instance ToQuery BasicTime instance ToQuery ISO8601 instance ToQuery RFC822 instance ToByteString AWSTime instance ToByteString BasicTime instance ToByteString ISO8601 instance ToByteString RFC822 instance FromJSON POSIX instance FromJSON BasicTime instance FromJSON AWSTime instance FromJSON ISO8601 instance FromJSON RFC822 instance FromXML POSIX instance FromXML BasicTime instance FromXML AWSTime instance FromXML ISO8601 instance FromXML RFC822 instance ToText POSIX instance ToText AWSTime instance ToText BasicTime instance ToText ISO8601 instance ToText RFC822 instance FromText POSIX instance FromText ISO8601 instance FromText RFC822 instance FromText AWSTime instance FromText BasicTime instance TimeFormat AWSTime instance TimeFormat BasicTime instance TimeFormat ISO8601 instance TimeFormat RFC822 module Network.AWS.Prelude (.!@) :: Functor f => f (Maybe a) -> a -> f a may :: Applicative f => ([a] -> f b) -> [a] -> f (Maybe b) module Network.AWS.Sign.V2 v2 :: Signer instance ToLog V2 module Network.AWS.Sign.V4 data V4 V4 :: !UTCTime -> !Method -> !Path -> !Endpoint -> !Credential -> !CanonicalQuery -> !CanonicalRequest -> !CanonicalHeaders -> !SignedHeaders -> !StringToSign -> !Signature -> ![Header] -> !(Maybe Seconds) -> V4 metaTime :: V4 -> !UTCTime metaMethod :: V4 -> !Method metaPath :: V4 -> !Path metaEndpoint :: V4 -> !Endpoint metaCredential :: V4 -> !Credential metaCanonicalQuery :: V4 -> !CanonicalQuery metaCanonicalRequest :: V4 -> !CanonicalRequest metaCanonicalHeaders :: V4 -> !CanonicalHeaders metaSignedHeaders :: V4 -> !SignedHeaders metaStringToSign :: V4 -> !StringToSign metaSignature :: V4 -> !Signature metaHeaders :: V4 -> ![Header] metaTimeout :: V4 -> !(Maybe Seconds) v4 :: Signer