-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Amazon Web Services (AWS) for Haskell -- -- Bindings for Amazon Web Services (AWS), with the aim of supporting all -- AWS services. To see a high level overview of the library, see the -- README at -- https://github.com/aristidb/aws/blob/master/README.org. @package aws @version 0.6.2 module Aws.Core -- | A response with metadata. Can also contain an error response, or an -- internal error, via Attempt. -- -- Response forms a Writer-like monad. data Response m a Response :: m -> (Attempt a) -> Response m a -- | An empty response with some metadata. tellMetadata :: m -> Response m () -- | Add metadata to an IORef (using mappend). tellMetadataRef :: Monoid m => IORef m -> m -> IO () -- | A full HTTP response parser. Takes HTTP status, response headers, and -- response body. type HTTPResponseConsumer a = Status -> ResponseHeaders -> ResumableSource (ResourceT IO) ByteString -> ResourceT IO a -- | Class for types that AWS HTTP responses can be parsed into. -- -- The request is also passed for possibly required additional metadata. -- -- Note that for debugging, there is an instance for ByteString. class Monoid (ResponseMetadata resp) => ResponseConsumer req resp where type family ResponseMetadata resp responseConsumer :: ResponseConsumer req resp => req -> IORef (ResponseMetadata resp) -> HTTPResponseConsumer resp -- | An error that occurred during XML parsing / validation. newtype XmlException XmlException :: String -> XmlException xmlErrorMessage :: XmlException -> String -- | An error that occurred during header parsing / validation. newtype HeaderException HeaderException :: String -> HeaderException headerErrorMessage :: HeaderException -> String -- | An error that occurred during form parsing / validation. newtype FormException FormException :: String -> FormException formErrorMesage :: FormException -> String -- | Parse a two-digit hex number. readHex2 :: [Char] -> Maybe Word8 -- | A specific element (case-insensitive, ignoring namespace - sadly -- necessary), extracting only the textual contents. elContent :: Text -> Cursor -> [Text] -- | Like elContent, but extracts Strings instead of -- Text. elCont :: Text -> Cursor -> [String] -- | Extract the first element from a parser result list, and throw an -- XmlException if the list is empty. force :: Failure XmlException m => String -> [a] -> m a -- | Extract the first element from a monadic parser result list, and throw -- an XmlException if the list is empty. forceM :: Failure XmlException m => String -> [m a] -> m a -- | Read an integer from a Text, throwing an XmlException on -- failure. textReadInt :: (Failure XmlException m, Num a) => Text -> m a -- | Read an integer from a String, throwing an XmlException -- on failure. readInt :: (Failure XmlException m, Num a) => String -> m a -- | Create a complete HTTPResponseConsumer from a simple function -- that takes a Cursor to XML in the response body. -- -- This function is highly recommended for any services that parse -- relatively short XML responses. (If status and response headers are -- required, simply take them as function parameters, and pass them -- through to this function.) xmlCursorConsumer :: Monoid m => (Cursor -> Response m a) -> IORef m -> HTTPResponseConsumer a -- | A pre-signed medium-level request object. data SignedQuery SignedQuery :: Method -> Protocol -> ByteString -> Int -> ByteString -> Query -> Maybe UTCTime -> Maybe ByteString -> Maybe ByteString -> Maybe MD5 -> RequestHeaders -> RequestHeaders -> Maybe (RequestBody (ResourceT IO)) -> ByteString -> SignedQuery -- | Request method. sqMethod :: SignedQuery -> Method -- | Protocol to be used. sqProtocol :: SignedQuery -> Protocol -- | HTTP host. sqHost :: SignedQuery -> ByteString -- | IP port. sqPort :: SignedQuery -> Int -- | HTTP path. sqPath :: SignedQuery -> ByteString -- | Query string list (used with Get and PostQuery). sqQuery :: SignedQuery -> Query -- | Request date/time. sqDate :: SignedQuery -> Maybe UTCTime -- | Authorization string (if applicable), for Authorization -- header.. sqAuthorization :: SignedQuery -> Maybe ByteString -- | Request body content type. sqContentType :: SignedQuery -> Maybe ByteString -- | Request body content MD5. sqContentMd5 :: SignedQuery -> Maybe MD5 -- | Additional Amazon amz headers. sqAmzHeaders :: SignedQuery -> RequestHeaders -- | Additional non-amz headers. sqOtherHeaders :: SignedQuery -> RequestHeaders -- | Request body (used with Post and Put). sqBody :: SignedQuery -> Maybe (RequestBody (ResourceT IO)) -- | String to sign. Note that the string is already signed, this is passed -- mostly for debugging purposes. sqStringToSign :: SignedQuery -> ByteString -- | Create a HTTP request from a SignedQuery object. queryToHttpRequest :: SignedQuery -> Request (ResourceT IO) -- | Create a URI fro a SignedQuery object. -- -- Unused / incompatible fields will be silently ignored. queryToUri :: SignedQuery -> ByteString -- | Whether to restrict the signature validity with a plain timestamp, or -- with explicit expiration (absolute or relative). data TimeInfo -- | Use a simple timestamp to let AWS check the request validity. Timestamp :: TimeInfo -- | Let requests expire at a specific fixed time. ExpiresAt :: UTCTime -> TimeInfo fromExpiresAt :: TimeInfo -> UTCTime -- | Let requests expire a specific number of seconds after they were -- generated. ExpiresIn :: NominalDiffTime -> TimeInfo fromExpiresIn :: TimeInfo -> NominalDiffTime -- | Like TimeInfo, but with all relative times replaced by absolute -- UTC. data AbsoluteTimeInfo AbsoluteTimestamp :: UTCTime -> AbsoluteTimeInfo fromAbsoluteTimestamp :: AbsoluteTimeInfo -> UTCTime AbsoluteExpires :: UTCTime -> AbsoluteTimeInfo fromAbsoluteExpires :: AbsoluteTimeInfo -> UTCTime -- | Just the UTC time value. fromAbsoluteTimeInfo :: AbsoluteTimeInfo -> UTCTime -- | Convert TimeInfo to AbsoluteTimeInfo given the current -- UTC time. makeAbsoluteTimeInfo :: TimeInfo -> UTCTime -> AbsoluteTimeInfo -- | Data that is always required for signing requests. data SignatureData SignatureData :: AbsoluteTimeInfo -> UTCTime -> Credentials -> SignatureData -- | Expiration or timestamp. signatureTimeInfo :: SignatureData -> AbsoluteTimeInfo -- | Current time. signatureTime :: SignatureData -> UTCTime -- | Access credentials. signatureCredentials :: SignatureData -> Credentials -- | Create signature data using the current system time. signatureData :: TimeInfo -> Credentials -> IO SignatureData -- | A signable request object. Assembles together the Query, and -- signs it in one go. class SignQuery r where type family ServiceConfiguration r :: * signQuery :: SignQuery r => r -> ServiceConfiguration r -> SignatureData -> SignedQuery -- | Supported crypto hashes for the signature. data AuthorizationHash HmacSHA1 :: AuthorizationHash HmacSHA256 :: AuthorizationHash -- | Authorization hash identifier as expected by Amazon. amzHash :: AuthorizationHash -> ByteString -- | Create a signature. Usually, AWS wants a specifically constructed -- string to be signed. -- -- The signature is a HMAC-based hash of the string and the secret access -- key. signature :: Credentials -> AuthorizationHash -> ByteString -> ByteString -- | queryList f prefix xs constructs a query list from a list of -- elements xs, using a common prefix prefix, and a -- transformer function f. -- -- A dot (.) is interspersed between prefix and generated key. -- -- Example: -- -- queryList swap "pfx" [("a", "b"), ("c", "d")] evaluates to -- [("pfx.b", "a"), ("pfx.d", "c")] (except with ByteString -- instead of String, of course). queryList :: (a -> [(ByteString, ByteString)]) -> ByteString -> [a] -> [(ByteString, ByteString)] -- | A "true"/"false" boolean as requested by some services. awsBool :: Bool -> ByteString -- | "true" awsTrue :: ByteString -- | "false" awsFalse :: ByteString -- | Format time according to a format string, as a ByteString. fmtTime :: String -> UTCTime -> ByteString -- | Format time in RFC 822 format. fmtRfc822Time :: UTCTime -> ByteString rfc822Time :: String -- | Format time in yyyy-mm-ddThh-mm-ss format. fmtAmzTime :: UTCTime -> ByteString -- | Format time as seconds since the Unix epoch. fmtTimeEpochSeconds :: UTCTime -> ByteString -- | Parse HTTP-date (section 3.3.1 of RFC 2616) parseHttpDate :: String -> Maybe UTCTime -- | Associates a request type and a response type in a bi-directional way. -- -- This allows the type-checker to infer the response type when given the -- request type and vice versa. -- -- Note that the actual request generation and response parsing resides -- in SignQuery and ResponseConsumer respectively. class (SignQuery r, ResponseConsumer r a) => Transaction r a | r -> a, a -> r -- | AWS access credentials. data Credentials Credentials :: ByteString -> ByteString -> Credentials -- | AWS Access Key ID. accessKeyID :: Credentials -> ByteString -- | AWS Secret Access Key. secretAccessKey :: Credentials -> ByteString -- | The file where access credentials are loaded, when using -- loadCredentialsDefault. -- -- Value: <user directory>/.aws-keys credentialsDefaultFile :: MonadIO io => io FilePath -- | The key to be used in the access credential file that is loaded, when -- using loadCredentialsDefault. -- -- Value: default credentialsDefaultKey :: Text -- | Load credentials from a (text) file given a key name. -- -- The file consists of a sequence of lines, each in the following -- format: -- --
-- keyName awsKeyID awsKeySecret --loadCredentialsFromFile :: MonadIO io => FilePath -> Text -> io (Maybe Credentials) -- | Load credentials from the environment variables -- AWS_ACCESS_KEY_ID and AWS_ACCESS_KEY_SECRET (or -- AWS_SECRET_ACCESS_KEY), if possible. loadCredentialsFromEnv :: MonadIO io => io (Maybe Credentials) -- | Load credentials from environment variables if possible, or -- alternatively from a file with a given key name. -- -- See loadCredentialsFromEnv and loadCredentialsFromFile -- for details. loadCredentialsFromEnvOrFile :: MonadIO io => FilePath -> Text -> io (Maybe Credentials) -- | Load credentials from environment variables if possible, or -- alternative from the default file with the default key name. -- -- Default file: <user directory>/.aws-keys Default -- key name: default -- -- See loadCredentialsFromEnv and loadCredentialsFromFile -- for details. loadCredentialsDefault :: MonadIO io => io (Maybe Credentials) -- | Default configuration for a specific service. class DefaultServiceConfiguration config where debugConfiguration = defaultConfiguration debugConfigurationUri = defaultConfigurationUri defaultConfiguration :: DefaultServiceConfiguration config => config defaultConfigurationUri :: DefaultServiceConfiguration config => config debugConfiguration :: DefaultServiceConfiguration config => config debugConfigurationUri :: DefaultServiceConfiguration config => config -- | Protocols supported by AWS. Currently, all AWS services use the HTTP -- or HTTPS protocols. data Protocol HTTP :: Protocol HTTPS :: Protocol -- | The default port to be used for a protocol if no specific port is -- specified. defaultPort :: Protocol -> Int -- | Request method. Not all request methods are supported by all services. data Method -- | GET method. Put all request parameters in a query string and HTTP -- headers. Get :: Method -- | POST method. Put all request parameters in a query string and HTTP -- headers, but send the query string as a POST payload PostQuery :: Method -- | POST method. Sends a service- and request-specific request body. Post :: Method -- | PUT method. Put :: Method -- | DELETE method. Delete :: Method -- | HTTP method associated with a request method. httpMethod :: Method -> Method instance Typeable XmlException instance Typeable HeaderException instance Typeable FormException instance (Show m, Show a) => Show (Response m a) instance Functor (Response m) instance Show Credentials instance Show Protocol instance Show Method instance Eq Method instance Show TimeInfo instance Show AbsoluteTimeInfo instance Show AuthorizationHash instance Show XmlException instance Show HeaderException instance Show FormException instance Exception FormException instance Exception HeaderException instance Exception XmlException instance ResponseConsumer r (Response ByteString) instance (Monoid m, Exception e) => Failure e (Response m) instance Monoid m => Monad (Response m) module Aws.S3.Core data S3Authorization S3AuthorizationHeader :: S3Authorization S3AuthorizationQuery :: S3Authorization data RequestStyle -- | Requires correctly setting region endpoint, but allows non-DNS -- compliant bucket names in the US standard region. PathStyle :: RequestStyle -- | Bucket name must be DNS compliant. BucketStyle :: RequestStyle VHostStyle :: RequestStyle data S3Configuration S3Configuration :: Protocol -> ByteString -> RequestStyle -> Int -> Bool -> NominalDiffTime -> S3Configuration s3Protocol :: S3Configuration -> Protocol s3Endpoint :: S3Configuration -> ByteString s3RequestStyle :: S3Configuration -> RequestStyle s3Port :: S3Configuration -> Int s3UseUri :: S3Configuration -> Bool s3DefaultExpiry :: S3Configuration -> NominalDiffTime s3EndpointUsClassic :: ByteString s3EndpointUsWest :: ByteString s3EndpointEu :: ByteString s3EndpointApSouthEast :: ByteString s3EndpointApNorthEast :: ByteString s3 :: Protocol -> ByteString -> Bool -> S3Configuration type ErrorCode = Text data S3Error S3Error :: Status -> ErrorCode -> Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe ByteString -> S3Error s3StatusCode :: S3Error -> Status s3ErrorCode :: S3Error -> ErrorCode s3ErrorMessage :: S3Error -> Text s3ErrorResource :: S3Error -> Maybe Text s3ErrorHostId :: S3Error -> Maybe Text s3ErrorAccessKeyId :: S3Error -> Maybe Text s3ErrorStringToSign :: S3Error -> Maybe ByteString data S3Metadata S3Metadata :: Maybe Text -> Maybe Text -> S3Metadata s3MAmzId2 :: S3Metadata -> Maybe Text s3MRequestId :: S3Metadata -> Maybe Text data S3Query S3Query :: Method -> Maybe ByteString -> Maybe ByteString -> Query -> Query -> Maybe ByteString -> Maybe MD5 -> RequestHeaders -> RequestHeaders -> Maybe (RequestBody (ResourceT IO)) -> S3Query s3QMethod :: S3Query -> Method s3QBucket :: S3Query -> Maybe ByteString s3QObject :: S3Query -> Maybe ByteString s3QSubresources :: S3Query -> Query s3QQuery :: S3Query -> Query s3QContentType :: S3Query -> Maybe ByteString s3QContentMd5 :: S3Query -> Maybe MD5 s3QAmzHeaders :: S3Query -> RequestHeaders s3QOtherHeaders :: S3Query -> RequestHeaders s3QRequestBody :: S3Query -> Maybe (RequestBody (ResourceT IO)) s3SignQuery :: S3Query -> S3Configuration -> SignatureData -> SignedQuery s3ResponseConsumer :: HTTPResponseConsumer a -> IORef S3Metadata -> HTTPResponseConsumer a s3XmlResponseConsumer :: (Cursor -> Response S3Metadata a) -> IORef S3Metadata -> HTTPResponseConsumer a s3BinaryResponseConsumer :: HTTPResponseConsumer a -> IORef S3Metadata -> HTTPResponseConsumer a s3ErrorResponseConsumer :: HTTPResponseConsumer a type CanonicalUserId = Text data UserInfo UserInfo :: CanonicalUserId -> Text -> UserInfo userId :: UserInfo -> CanonicalUserId userDisplayName :: UserInfo -> Text parseUserInfo :: Failure XmlException m => Cursor -> m UserInfo data CannedAcl AclPrivate :: CannedAcl AclPublicRead :: CannedAcl AclPublicReadWrite :: CannedAcl AclAuthenticatedRead :: CannedAcl AclBucketOwnerRead :: CannedAcl AclBucketOwnerFullControl :: CannedAcl AclLogDeliveryWrite :: CannedAcl writeCannedAcl :: CannedAcl -> Text data StorageClass Standard :: StorageClass ReducedRedundancy :: StorageClass parseStorageClass :: Failure XmlException m => Text -> m StorageClass writeStorageClass :: StorageClass -> Text type Bucket = Text data BucketInfo BucketInfo :: Bucket -> UTCTime -> BucketInfo bucketName :: BucketInfo -> Bucket bucketCreationDate :: BucketInfo -> UTCTime type Object = Text data ObjectInfo ObjectInfo :: Text -> UTCTime -> Text -> Integer -> StorageClass -> UserInfo -> ObjectInfo objectKey :: ObjectInfo -> Text objectLastModified :: ObjectInfo -> UTCTime objectETag :: ObjectInfo -> Text objectSize :: ObjectInfo -> Integer objectStorageClass :: ObjectInfo -> StorageClass objectOwner :: ObjectInfo -> UserInfo parseObjectInfo :: Failure XmlException m => Cursor -> m ObjectInfo data ObjectMetadata ObjectMetadata :: Bool -> Text -> UTCTime -> Maybe Text -> [(Text, Text)] -> Maybe Text -> Maybe Text -> ObjectMetadata omDeleteMarker :: ObjectMetadata -> Bool omETag :: ObjectMetadata -> Text omLastModified :: ObjectMetadata -> UTCTime omVersionId :: ObjectMetadata -> Maybe Text omUserMetadata :: ObjectMetadata -> [(Text, Text)] omMissingUserMetadata :: ObjectMetadata -> Maybe Text omServerSideEncryption :: ObjectMetadata -> Maybe Text parseObjectMetadata :: Failure HeaderException m => ResponseHeaders -> m ObjectMetadata type LocationConstraint = Text locationUsClassic, locationApNorthEast, locationApSouthEast, locationEu, locationUsWest :: LocationConstraint instance Typeable S3Error instance Typeable S3Metadata instance Show S3Authorization instance Show RequestStyle instance Show S3Configuration instance Show S3Error instance Show S3Metadata instance Show UserInfo instance Show CannedAcl instance Show StorageClass instance Show BucketInfo instance Show ObjectInfo instance Show ObjectMetadata instance Show S3Query instance Monoid S3Metadata instance Exception S3Error instance DefaultServiceConfiguration S3Configuration module Aws.S3.Commands.DeleteObject data DeleteObject DeleteObject :: Text -> Bucket -> DeleteObject doObjectName :: DeleteObject -> Text doBucket :: DeleteObject -> Bucket data DeleteObjectResponse DeleteObjectResponse :: DeleteObjectResponse instance Transaction DeleteObject DeleteObjectResponse instance ResponseConsumer DeleteObject DeleteObjectResponse instance SignQuery DeleteObject module Aws.S3.Commands.GetBucket data GetBucket GetBucket :: Bucket -> Maybe Text -> Maybe Text -> Maybe Int -> Maybe Text -> GetBucket gbBucket :: GetBucket -> Bucket gbDelimiter :: GetBucket -> Maybe Text gbMarker :: GetBucket -> Maybe Text gbMaxKeys :: GetBucket -> Maybe Int gbPrefix :: GetBucket -> Maybe Text getBucket :: Bucket -> GetBucket data GetBucketResponse GetBucketResponse :: Bucket -> Maybe Text -> Maybe Text -> Maybe Int -> Maybe Text -> [ObjectInfo] -> [Text] -> GetBucketResponse gbrName :: GetBucketResponse -> Bucket gbrDelimiter :: GetBucketResponse -> Maybe Text gbrMarker :: GetBucketResponse -> Maybe Text gbrMaxKeys :: GetBucketResponse -> Maybe Int gbrPrefix :: GetBucketResponse -> Maybe Text gbrContents :: GetBucketResponse -> [ObjectInfo] gbrCommonPrefixes :: GetBucketResponse -> [Text] instance Show GetBucket instance Show GetBucketResponse instance Transaction GetBucket GetBucketResponse instance ResponseConsumer r GetBucketResponse instance SignQuery GetBucket module Aws.S3.Commands.GetObject data GetObject a GetObject :: Bucket -> Object -> HTTPResponseConsumer a -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> GetObject a goBucket :: GetObject a -> Bucket goObjectName :: GetObject a -> Object goResponseConsumer :: GetObject a -> HTTPResponseConsumer a goVersionId :: GetObject a -> Maybe Text goResponseContentType :: GetObject a -> Maybe Text goResponseContentLanguage :: GetObject a -> Maybe Text goResponseExpires :: GetObject a -> Maybe Text goResponseCacheControl :: GetObject a -> Maybe Text goResponseContentDisposition :: GetObject a -> Maybe Text goResponseContentEncoding :: GetObject a -> Maybe Text getObject :: Bucket -> Text -> HTTPResponseConsumer a -> GetObject a data GetObjectResponse a GetObjectResponse :: ObjectMetadata -> a -> GetObjectResponse a instance Show a => Show (GetObjectResponse a) instance Transaction (GetObject a) (GetObjectResponse a) instance ResponseConsumer (GetObject a) (GetObjectResponse a) instance SignQuery (GetObject a) module Aws.S3.Commands.GetService data GetService GetService :: GetService data GetServiceResponse GetServiceResponse :: UserInfo -> [BucketInfo] -> GetServiceResponse gsrOwner :: GetServiceResponse -> UserInfo gsrBuckets :: GetServiceResponse -> [BucketInfo] instance Show GetServiceResponse instance Transaction GetService GetServiceResponse instance SignQuery GetService instance ResponseConsumer r GetServiceResponse module Aws.S3.Commands.PutBucket data PutBucket PutBucket :: Bucket -> Maybe CannedAcl -> LocationConstraint -> PutBucket pbBucket :: PutBucket -> Bucket pbCannedAcl :: PutBucket -> Maybe CannedAcl pbLocationConstraint :: PutBucket -> LocationConstraint data PutBucketResponse PutBucketResponse :: PutBucketResponse instance Show PutBucket instance Show PutBucketResponse instance Transaction PutBucket PutBucketResponse instance ResponseConsumer r PutBucketResponse instance SignQuery PutBucket module Aws.S3.Commands.PutObject data PutObject PutObject :: Text -> Bucket -> Maybe ByteString -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe MD5 -> Maybe Int -> Maybe CannedAcl -> Maybe StorageClass -> RequestBody (ResourceT IO) -> [(Text, Text)] -> PutObject poObjectName :: PutObject -> Text poBucket :: PutObject -> Bucket poContentType :: PutObject -> Maybe ByteString poCacheControl :: PutObject -> Maybe Text poContentDisposition :: PutObject -> Maybe Text poContentEncoding :: PutObject -> Maybe Text poContentMD5 :: PutObject -> Maybe MD5 poExpires :: PutObject -> Maybe Int poAcl :: PutObject -> Maybe CannedAcl poStorageClass :: PutObject -> Maybe StorageClass poRequestBody :: PutObject -> RequestBody (ResourceT IO) poMetadata :: PutObject -> [(Text, Text)] putObject :: Bucket -> Text -> RequestBody (ResourceT IO) -> PutObject data PutObjectResponse PutObjectResponse :: Maybe Text -> PutObjectResponse porVersionId :: PutObjectResponse -> Maybe Text instance Show PutObjectResponse instance Transaction PutObject PutObjectResponse instance ResponseConsumer PutObject PutObjectResponse instance SignQuery PutObject module Aws.S3.Commands module Aws.S3 module Aws.SimpleDb.Core type ErrorCode = String data SdbError SdbError :: Status -> ErrorCode -> String -> SdbError sdbStatusCode :: SdbError -> Status sdbErrorCode :: SdbError -> ErrorCode sdbErrorMessage :: SdbError -> String data SdbMetadata SdbMetadata :: Maybe Text -> Maybe Text -> SdbMetadata requestId :: SdbMetadata -> Maybe Text boxUsage :: SdbMetadata -> Maybe Text data SdbConfiguration SdbConfiguration :: Protocol -> Method -> ByteString -> Int -> SdbConfiguration sdbiProtocol :: SdbConfiguration -> Protocol sdbiHttpMethod :: SdbConfiguration -> Method sdbiHost :: SdbConfiguration -> ByteString sdbiPort :: SdbConfiguration -> Int sdbUsEast :: ByteString sdbUsWest :: ByteString sdbEuWest :: ByteString sdbApSoutheast :: ByteString sdbApNortheast :: ByteString sdbHttpGet :: ByteString -> SdbConfiguration sdbHttpPost :: ByteString -> SdbConfiguration sdbHttpsGet :: ByteString -> SdbConfiguration sdbHttpsPost :: ByteString -> SdbConfiguration sdbSignQuery :: [(ByteString, ByteString)] -> SdbConfiguration -> SignatureData -> SignedQuery sdbResponseConsumer :: (Cursor -> Response SdbMetadata a) -> IORef SdbMetadata -> HTTPResponseConsumer a class SdbFromResponse a sdbFromResponse :: SdbFromResponse a => Cursor -> Response SdbMetadata a sdbCheckResponseType :: Failure XmlException m => a -> Text -> Cursor -> m a decodeBase64 :: Failure XmlException m => Cursor -> m Text data Attribute a ForAttribute :: Text -> a -> Attribute a attributeName :: Attribute a -> Text attributeData :: Attribute a -> a readAttribute :: Failure XmlException m => Cursor -> m (Attribute Text) data SetAttribute SetAttribute :: Text -> Bool -> SetAttribute setAttribute :: SetAttribute -> Text isReplaceAttribute :: SetAttribute -> Bool attributeQuery :: (a -> [(ByteString, ByteString)]) -> Attribute a -> [(ByteString, ByteString)] addAttribute :: Text -> Text -> Attribute SetAttribute replaceAttribute :: Text -> Text -> Attribute SetAttribute setAttributeQuery :: SetAttribute -> [(ByteString, ByteString)] data DeleteAttribute DeleteAttribute :: DeleteAttribute ValuedDeleteAttribute :: Text -> DeleteAttribute deleteAttributeValue :: DeleteAttribute -> Text deleteAttributeQuery :: DeleteAttribute -> [(ByteString, ByteString)] data ExpectedAttribute ExpectedValue :: Text -> ExpectedAttribute expectedAttributeValue :: ExpectedAttribute -> Text ExpectedExists :: Bool -> ExpectedAttribute expectedAttributeExists :: ExpectedAttribute -> Bool expectedValue :: Text -> Text -> Attribute ExpectedAttribute expectedExists :: Text -> Bool -> Attribute ExpectedAttribute expectedAttributeQuery :: ExpectedAttribute -> [(ByteString, ByteString)] data Item a Item :: Text -> a -> Item a itemName :: Item a -> Text itemData :: Item a -> a readItem :: Failure XmlException m => Cursor -> m (Item [Attribute Text]) itemQuery :: (a -> [(ByteString, ByteString)]) -> Item a -> [(ByteString, ByteString)] instance Typeable SdbError instance Typeable SdbMetadata instance Show SdbError instance Show SdbMetadata instance Show SdbConfiguration instance Show a => Show (Attribute a) instance Show SetAttribute instance Show DeleteAttribute instance Show ExpectedAttribute instance Show a => Show (Item a) instance DefaultServiceConfiguration SdbConfiguration instance Monoid SdbMetadata instance Exception SdbError module Aws.SimpleDb.Commands.Attributes data GetAttributes GetAttributes :: Text -> Maybe Text -> Bool -> Text -> GetAttributes gaItemName :: GetAttributes -> Text gaAttributeName :: GetAttributes -> Maybe Text gaConsistentRead :: GetAttributes -> Bool gaDomainName :: GetAttributes -> Text data GetAttributesResponse GetAttributesResponse :: [Attribute Text] -> GetAttributesResponse garAttributes :: GetAttributesResponse -> [Attribute Text] getAttributes :: Text -> Text -> GetAttributes data PutAttributes PutAttributes :: Text -> [Attribute SetAttribute] -> [Attribute ExpectedAttribute] -> Text -> PutAttributes paItemName :: PutAttributes -> Text paAttributes :: PutAttributes -> [Attribute SetAttribute] paExpected :: PutAttributes -> [Attribute ExpectedAttribute] paDomainName :: PutAttributes -> Text data PutAttributesResponse PutAttributesResponse :: PutAttributesResponse putAttributes :: Text -> [Attribute SetAttribute] -> Text -> PutAttributes data DeleteAttributes DeleteAttributes :: Text -> [Attribute DeleteAttribute] -> [Attribute ExpectedAttribute] -> Text -> DeleteAttributes daItemName :: DeleteAttributes -> Text daAttributes :: DeleteAttributes -> [Attribute DeleteAttribute] daExpected :: DeleteAttributes -> [Attribute ExpectedAttribute] daDomainName :: DeleteAttributes -> Text data DeleteAttributesResponse DeleteAttributesResponse :: DeleteAttributesResponse deleteAttributes :: Text -> [Attribute DeleteAttribute] -> Text -> DeleteAttributes data BatchPutAttributes BatchPutAttributes :: [Item [Attribute SetAttribute]] -> Text -> BatchPutAttributes bpaItems :: BatchPutAttributes -> [Item [Attribute SetAttribute]] bpaDomainName :: BatchPutAttributes -> Text data BatchPutAttributesResponse BatchPutAttributesResponse :: BatchPutAttributesResponse batchPutAttributes :: [Item [Attribute SetAttribute]] -> Text -> BatchPutAttributes data BatchDeleteAttributes BatchDeleteAttributes :: [Item [Attribute DeleteAttribute]] -> Text -> BatchDeleteAttributes bdaItems :: BatchDeleteAttributes -> [Item [Attribute DeleteAttribute]] bdaDomainName :: BatchDeleteAttributes -> Text data BatchDeleteAttributesResponse BatchDeleteAttributesResponse :: BatchDeleteAttributesResponse batchDeleteAttributes :: [Item [Attribute DeleteAttribute]] -> Text -> BatchDeleteAttributes instance Show GetAttributes instance Show GetAttributesResponse instance Show PutAttributes instance Show PutAttributesResponse instance Show DeleteAttributes instance Show DeleteAttributesResponse instance Show BatchPutAttributes instance Show BatchPutAttributesResponse instance Show BatchDeleteAttributes instance Show BatchDeleteAttributesResponse instance Transaction BatchDeleteAttributes BatchDeleteAttributesResponse instance ResponseConsumer r BatchDeleteAttributesResponse instance SignQuery BatchDeleteAttributes instance Transaction BatchPutAttributes BatchPutAttributesResponse instance ResponseConsumer r BatchPutAttributesResponse instance SignQuery BatchPutAttributes instance Transaction DeleteAttributes DeleteAttributesResponse instance ResponseConsumer r DeleteAttributesResponse instance SignQuery DeleteAttributes instance Transaction PutAttributes PutAttributesResponse instance ResponseConsumer r PutAttributesResponse instance SignQuery PutAttributes instance Transaction GetAttributes GetAttributesResponse instance ResponseConsumer r GetAttributesResponse instance SignQuery GetAttributes module Aws.SimpleDb.Commands.Domain data CreateDomain CreateDomain :: Text -> CreateDomain cdDomainName :: CreateDomain -> Text data CreateDomainResponse CreateDomainResponse :: CreateDomainResponse createDomain :: Text -> CreateDomain data DeleteDomain DeleteDomain :: Text -> DeleteDomain ddDomainName :: DeleteDomain -> Text data DeleteDomainResponse DeleteDomainResponse :: DeleteDomainResponse deleteDomain :: Text -> DeleteDomain data DomainMetadata DomainMetadata :: Text -> DomainMetadata dmDomainName :: DomainMetadata -> Text data DomainMetadataResponse DomainMetadataResponse :: UTCTime -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> DomainMetadataResponse dmrTimestamp :: DomainMetadataResponse -> UTCTime dmrItemCount :: DomainMetadataResponse -> Integer dmrAttributeValueCount :: DomainMetadataResponse -> Integer dmrAttributeNameCount :: DomainMetadataResponse -> Integer dmrItemNamesSizeBytes :: DomainMetadataResponse -> Integer dmrAttributeValuesSizeBytes :: DomainMetadataResponse -> Integer dmrAttributeNamesSizeBytes :: DomainMetadataResponse -> Integer domainMetadata :: Text -> DomainMetadata data ListDomains ListDomains :: Maybe Int -> Maybe Text -> ListDomains ldMaxNumberOfDomains :: ListDomains -> Maybe Int ldNextToken :: ListDomains -> Maybe Text data ListDomainsResponse ListDomainsResponse :: [Text] -> Maybe Text -> ListDomainsResponse ldrDomainNames :: ListDomainsResponse -> [Text] ldrNextToken :: ListDomainsResponse -> Maybe Text listDomains :: ListDomains instance Show CreateDomain instance Show CreateDomainResponse instance Show DeleteDomain instance Show DeleteDomainResponse instance Show DomainMetadata instance Show DomainMetadataResponse instance Show ListDomains instance Show ListDomainsResponse instance Transaction ListDomains ListDomainsResponse instance ResponseConsumer r ListDomainsResponse instance SignQuery ListDomains instance Transaction DomainMetadata DomainMetadataResponse instance ResponseConsumer r DomainMetadataResponse instance SignQuery DomainMetadata instance Transaction DeleteDomain DeleteDomainResponse instance ResponseConsumer r DeleteDomainResponse instance SignQuery DeleteDomain instance Transaction CreateDomain CreateDomainResponse instance ResponseConsumer r CreateDomainResponse instance SignQuery CreateDomain module Aws.SimpleDb.Commands.Select data Select Select :: Text -> Bool -> Maybe Text -> Select sSelectExpression :: Select -> Text sConsistentRead :: Select -> Bool sNextToken :: Select -> Maybe Text data SelectResponse SelectResponse :: [Item [Attribute Text]] -> Maybe Text -> SelectResponse srItems :: SelectResponse -> [Item [Attribute Text]] srNextToken :: SelectResponse -> Maybe Text select :: Text -> Select instance Show Select instance Show SelectResponse instance Transaction Select SelectResponse instance ResponseConsumer r SelectResponse instance SignQuery Select module Aws.SimpleDb.Commands module Aws.SimpleDb module Aws.Sqs.Core type ErrorCode = Text data SqsError SqsError :: Status -> ErrorCode -> Text -> Text -> Maybe Text -> Maybe SqsMetadata -> SqsError sqsStatusCode :: SqsError -> Status sqsErrorCode :: SqsError -> ErrorCode sqsErrorType :: SqsError -> Text sqsErrorMessage :: SqsError -> Text sqsErrorDetail :: SqsError -> Maybe Text sqsErrorMetadata :: SqsError -> Maybe SqsMetadata SqsXmlError :: Text -> Maybe SqsMetadata -> SqsError sqsXmlErrorMessage :: SqsError -> Text sqsXmlErrorMetadata :: SqsError -> Maybe SqsMetadata data SqsMetadata SqsMetadata :: Maybe Text -> Maybe Text -> SqsMetadata sqsMAmzId2 :: SqsMetadata -> Maybe Text sqsMRequestId :: SqsMetadata -> Maybe Text data SqsAuthorization SqsAuthorizationHeader :: SqsAuthorization SqsAuthorizationQuery :: SqsAuthorization data Endpoint Endpoint :: ByteString -> LocationConstraint -> [LocationConstraint] -> Endpoint endpointHost :: Endpoint -> ByteString endpointDefaultLocationConstraint :: Endpoint -> LocationConstraint endpointAllowedLocationConstraints :: Endpoint -> [LocationConstraint] data SqsConfiguration SqsConfiguration :: Protocol -> Endpoint -> Int -> Bool -> NominalDiffTime -> SqsConfiguration sqsProtocol :: SqsConfiguration -> Protocol sqsEndpoint :: SqsConfiguration -> Endpoint sqsPort :: SqsConfiguration -> Int sqsUseUri :: SqsConfiguration -> Bool sqsDefaultExpiry :: SqsConfiguration -> NominalDiffTime sqsEndpointUsClassic :: Endpoint sqsEndpointUsWest :: Endpoint sqsEndpointEu :: Endpoint sqsEndpointApSouthEast :: Endpoint sqsEndpointApNorthEast :: Endpoint sqs :: Protocol -> Endpoint -> Bool -> SqsConfiguration data SqsQuery SqsQuery :: Maybe QueueName -> Query -> SqsQuery sqsQueueName :: SqsQuery -> Maybe QueueName sqsQuery :: SqsQuery -> Query sqsSignQuery :: SqsQuery -> SqsConfiguration -> SignatureData -> SignedQuery sqsResponseConsumer :: HTTPResponseConsumer a -> IORef SqsMetadata -> HTTPResponseConsumer a sqsXmlResponseConsumer :: (Cursor -> Response SqsMetadata a) -> IORef SqsMetadata -> HTTPResponseConsumer a sqsErrorResponseConsumer :: HTTPResponseConsumer a data QueueName QueueName :: Text -> Text -> QueueName qName :: QueueName -> Text qAccountNumber :: QueueName -> Text printQueueName :: QueueName -> Text data QueueAttribute QueueAll :: QueueAttribute ApproximateNumberOfMessages :: QueueAttribute ApproximateNumberOfMessagesNotVisible :: QueueAttribute VisibilityTimeout :: QueueAttribute CreatedTimestamp :: QueueAttribute LastModifiedTimestamp :: QueueAttribute Policy :: QueueAttribute MaximumMessageSize :: QueueAttribute MessageRetentionPeriod :: QueueAttribute QueueArn :: QueueAttribute data MessageAttribute MessageAll :: MessageAttribute SenderId :: MessageAttribute SentTimestamp :: MessageAttribute ApproximateReceiveCount :: MessageAttribute ApproximateFirstReceiveTimestamp :: MessageAttribute data SqsPermission PermissionAll :: SqsPermission PermissionSendMessage :: SqsPermission PermissionReceiveMessage :: SqsPermission PermissionDeleteMessage :: SqsPermission PermissionChangeMessageVisibility :: SqsPermission PermissionGetQueueAttributes :: SqsPermission parseQueueAttribute :: Failure XmlException m => Text -> m QueueAttribute printQueueAttribute :: QueueAttribute -> Text parseMessageAttribute :: Failure XmlException m => Text -> m MessageAttribute printMessageAttribute :: MessageAttribute -> Text printPermission :: SqsPermission -> Text newtype ReceiptHandle ReceiptHandle :: Text -> ReceiptHandle newtype MessageId MessageId :: Text -> MessageId printReceiptHandle :: ReceiptHandle -> Text instance Typeable SqsError instance Show SqsMetadata instance Show SqsError instance Show SqsAuthorization instance Show Endpoint instance Show SqsConfiguration instance Show QueueName instance Show QueueAttribute instance Enum QueueAttribute instance Eq QueueAttribute instance Show MessageAttribute instance Eq MessageAttribute instance Enum MessageAttribute instance Show SqsPermission instance Enum SqsPermission instance Eq SqsPermission instance Show ReceiptHandle instance Eq ReceiptHandle instance Show MessageId instance Eq MessageId instance DefaultServiceConfiguration SqsConfiguration instance Monoid SqsMetadata instance Exception SqsError module Aws.Sqs.Commands.Message data SendMessage SendMessage :: Text -> QueueName -> SendMessage smMessage :: SendMessage -> Text smQueueName :: SendMessage -> QueueName data SendMessageResponse SendMessageResponse :: Text -> MessageId -> SendMessageResponse smrMD5OfMessageBody :: SendMessageResponse -> Text smrMessageId :: SendMessageResponse -> MessageId data DeleteMessage DeleteMessage :: ReceiptHandle -> QueueName -> DeleteMessage dmReceiptHandle :: DeleteMessage -> ReceiptHandle dmQueueName :: DeleteMessage -> QueueName data DeleteMessageResponse DeleteMessageResponse :: DeleteMessageResponse data ReceiveMessage ReceiveMessage :: Maybe Int -> [MessageAttribute] -> Maybe Int -> QueueName -> ReceiveMessage rmVisibilityTimeout :: ReceiveMessage -> Maybe Int rmAttributes :: ReceiveMessage -> [MessageAttribute] rmMaxNumberOfMessages :: ReceiveMessage -> Maybe Int rmQueueName :: ReceiveMessage -> QueueName data Message Message :: Text -> ReceiptHandle -> Text -> Text -> [(MessageAttribute, Text)] -> Message mMessageId :: Message -> Text mReceiptHandle :: Message -> ReceiptHandle mMD5OfBody :: Message -> Text mBody :: Message -> Text mAttributes :: Message -> [(MessageAttribute, Text)] data ReceiveMessageResponse ReceiveMessageResponse :: [Message] -> ReceiveMessageResponse rmrMessages :: ReceiveMessageResponse -> [Message] readMessageAttribute :: Failure XmlException m => Cursor -> m (MessageAttribute, Text) readMessage :: Cursor -> [Message] formatMAttributes :: [MessageAttribute] -> [(ByteString, Maybe ByteString)] data ChangeMessageVisibility ChangeMessageVisibility :: ReceiptHandle -> Int -> QueueName -> ChangeMessageVisibility cmvReceiptHandle :: ChangeMessageVisibility -> ReceiptHandle cmvVisibilityTimeout :: ChangeMessageVisibility -> Int cmvQueueName :: ChangeMessageVisibility -> QueueName data ChangeMessageVisibilityResponse ChangeMessageVisibilityResponse :: ChangeMessageVisibilityResponse instance Show SendMessage instance Show SendMessageResponse instance Show DeleteMessage instance Show DeleteMessageResponse instance Show ReceiveMessage instance Show Message instance Show ReceiveMessageResponse instance Show ChangeMessageVisibility instance Show ChangeMessageVisibilityResponse instance Transaction ChangeMessageVisibility ChangeMessageVisibilityResponse instance SignQuery ChangeMessageVisibility instance ResponseConsumer r ChangeMessageVisibilityResponse instance Transaction ReceiveMessage ReceiveMessageResponse instance SignQuery ReceiveMessage instance ResponseConsumer r ReceiveMessageResponse instance Transaction DeleteMessage DeleteMessageResponse instance SignQuery DeleteMessage instance ResponseConsumer r DeleteMessageResponse instance Transaction SendMessage SendMessageResponse instance SignQuery SendMessage instance ResponseConsumer r SendMessageResponse module Aws.Sqs.Commands.Permission data AddPermission AddPermission :: Text -> [(Text, SqsPermission)] -> QueueName -> AddPermission apLabel :: AddPermission -> Text apPermissions :: AddPermission -> [(Text, SqsPermission)] apQueueName :: AddPermission -> QueueName data AddPermissionResponse AddPermissionResponse :: AddPermissionResponse formatPermissions :: [(Text, SqsPermission)] -> [QueryItem] data RemovePermission RemovePermission :: Text -> QueueName -> RemovePermission rpLabel :: RemovePermission -> Text rpQueueName :: RemovePermission -> QueueName data RemovePermissionResponse RemovePermissionResponse :: RemovePermissionResponse instance Show AddPermission instance Show AddPermissionResponse instance Show RemovePermission instance Show RemovePermissionResponse instance Transaction RemovePermission RemovePermissionResponse instance SignQuery RemovePermission instance ResponseConsumer r RemovePermissionResponse instance Transaction AddPermission AddPermissionResponse instance SignQuery AddPermission instance ResponseConsumer r AddPermissionResponse module Aws.Sqs.Commands.Queue data CreateQueue CreateQueue :: Maybe Int -> Text -> CreateQueue cqDefaultVisibilityTimeout :: CreateQueue -> Maybe Int cqQueueName :: CreateQueue -> Text data CreateQueueResponse CreateQueueResponse :: Text -> CreateQueueResponse cqrQueueUrl :: CreateQueueResponse -> Text data DeleteQueue DeleteQueue :: QueueName -> DeleteQueue dqQueueName :: DeleteQueue -> QueueName data DeleteQueueResponse DeleteQueueResponse :: DeleteQueueResponse data ListQueues ListQueues :: Maybe Text -> ListQueues lqQueueNamePrefix :: ListQueues -> Maybe Text data ListQueuesResponse ListQueuesResponse :: [Text] -> ListQueuesResponse lqrQueueUrls :: ListQueuesResponse -> [Text] instance Show CreateQueue instance Show CreateQueueResponse instance Show DeleteQueue instance Show DeleteQueueResponse instance Show ListQueues instance Show ListQueuesResponse instance Transaction ListQueues ListQueuesResponse instance SignQuery ListQueues instance ResponseConsumer r ListQueuesResponse instance Transaction DeleteQueue DeleteQueueResponse instance SignQuery DeleteQueue instance ResponseConsumer r DeleteQueueResponse instance Transaction CreateQueue CreateQueueResponse instance SignQuery CreateQueue instance ResponseConsumer r CreateQueueResponse module Aws.Sqs.Commands.QueueAttributes data GetQueueAttributes GetQueueAttributes :: QueueName -> [QueueAttribute] -> GetQueueAttributes gqaQueueName :: GetQueueAttributes -> QueueName gqaAttributes :: GetQueueAttributes -> [QueueAttribute] data GetQueueAttributesResponse GetQueueAttributesResponse :: [(QueueAttribute, Text)] -> GetQueueAttributesResponse gqarAttributes :: GetQueueAttributesResponse -> [(QueueAttribute, Text)] parseAttributes :: Cursor -> [(QueueAttribute, Text)] formatAttributes :: [QueueAttribute] -> [(ByteString, Maybe ByteString)] data SetQueueAttributes SetQueueAttributes :: QueueAttribute -> Text -> QueueName -> SetQueueAttributes sqaAttribute :: SetQueueAttributes -> QueueAttribute sqaValue :: SetQueueAttributes -> Text sqaQueueName :: SetQueueAttributes -> QueueName data SetQueueAttributesResponse SetQueueAttributesResponse :: SetQueueAttributesResponse instance Show GetQueueAttributes instance Show GetQueueAttributesResponse instance Show SetQueueAttributes instance Show SetQueueAttributesResponse instance Transaction SetQueueAttributes SetQueueAttributesResponse instance SignQuery SetQueueAttributes instance ResponseConsumer r SetQueueAttributesResponse instance Transaction GetQueueAttributes GetQueueAttributesResponse instance SignQuery GetQueueAttributes instance ResponseConsumer r GetQueueAttributesResponse module Aws.Sqs.Commands module Aws.Sqs module Aws.Ses.Core data SesError SesError :: Status -> Text -> Text -> SesError sesStatusCode :: SesError -> Status sesErrorCode :: SesError -> Text sesErrorMessage :: SesError -> Text data SesMetadata SesMetadata :: Maybe Text -> SesMetadata requestId :: SesMetadata -> Maybe Text data SesConfiguration SesConfiguration :: Method -> ByteString -> SesConfiguration sesiHttpMethod :: SesConfiguration -> Method sesiHost :: SesConfiguration -> ByteString sesUsEast :: ByteString sesHttpsGet :: ByteString -> SesConfiguration sesHttpsPost :: ByteString -> SesConfiguration sesSignQuery :: [(ByteString, ByteString)] -> SesConfiguration -> SignatureData -> SignedQuery sesResponseConsumer :: (Cursor -> Response SesMetadata a) -> IORef SesMetadata -> HTTPResponseConsumer a -- | A raw e-mail. data RawMessage RawMessage :: ByteString -> RawMessage rawMessageData :: RawMessage -> ByteString -- | The destinations of an e-mail. data Destination Destination :: [EmailAddress] -> [EmailAddress] -> [EmailAddress] -> Destination destinationBccAddresses :: Destination -> [EmailAddress] destinationCcAddresses :: Destination -> [EmailAddress] destinationToAddresses :: Destination -> [EmailAddress] -- | An e-mail address. type EmailAddress = Text -- | The sender's e-mail address. data Sender Sender :: EmailAddress -> Sender senderAddress :: Sender -> EmailAddress -- | Write a data type as a list of query parameters. sesAsQuery :: SesAsQuery a => a -> [(ByteString, ByteString)] instance Typeable SesError instance Typeable SesMetadata instance Typeable RawMessage instance Typeable Destination instance Typeable Sender instance Show SesError instance Show SesMetadata instance Show SesConfiguration instance Eq RawMessage instance Ord RawMessage instance Show RawMessage instance Eq Destination instance Ord Destination instance Show Destination instance Eq Sender instance Ord Sender instance Show Sender instance SesAsQuery Sender instance Monoid Destination instance SesAsQuery Destination instance SesAsQuery RawMessage instance SesAsQuery a => SesAsQuery (Maybe a) instance DefaultServiceConfiguration SesConfiguration instance Monoid SesMetadata instance Exception SesError module Aws.Ses.Commands.SendRawEmail -- | Send a raw e-mail message. data SendRawEmail SendRawEmail :: Maybe Destination -> RawMessage -> Maybe Sender -> SendRawEmail srmDestinations :: SendRawEmail -> Maybe Destination srmRawMessage :: SendRawEmail -> RawMessage srmSource :: SendRawEmail -> Maybe Sender -- | The response sent back by Amazon SES after a SendRawEmail -- command. data SendRawEmailResponse SendRawEmailResponse :: Text -> SendRawEmailResponse srmrMessageId :: SendRawEmailResponse -> Text instance Typeable SendRawEmail instance Typeable SendRawEmailResponse instance Eq SendRawEmail instance Ord SendRawEmail instance Show SendRawEmail instance Eq SendRawEmailResponse instance Ord SendRawEmailResponse instance Show SendRawEmailResponse instance Transaction SendRawEmail SendRawEmailResponse instance ResponseConsumer SendRawEmail SendRawEmailResponse instance SignQuery SendRawEmail module Aws.Ses.Commands module Aws.Ses module Aws.Aws -- | The severity of a log message, in rising order. data LogLevel Debug :: LogLevel Info :: LogLevel Warning :: LogLevel Error :: LogLevel -- | The interface for any logging function. Takes log level and a log -- message, and can perform an arbitrary IO action. type Logger = LogLevel -> Text -> IO () -- | The default logger defaultLog minLevel, which prints log -- messages above level minLevel to stderr. defaultLog :: LogLevel -> Logger -- | The configuration for an AWS request. You can use multiple -- configurations in parallel, even over the same HTTP connection -- manager. data Configuration Configuration :: TimeInfo -> Credentials -> Logger -> Configuration -- | Whether to restrict the signature validity with a plain timestamp, or -- with explicit expiration (absolute or relative). timeInfo :: Configuration -> TimeInfo -- | AWS access credentials. credentials :: Configuration -> Credentials -- | The error / message logger. logger :: Configuration -> Logger -- | The default configuration, with credentials loaded from environment -- variable or configuration file (see loadCredentialsDefault). baseConfiguration :: MonadIO io => io Configuration -- | Debug configuration, which avoids using HTTPS for some queries. DO NOT -- USE THIS IN PRODUCTION! dbgConfiguration :: MonadIO io => io Configuration -- | Run an AWS transaction, with HTTP manager and metadata wrapped in a -- Response. -- -- All errors are caught and wrapped in the Response value. -- -- Usage (with existing Manager): resp <- aws cfg -- serviceCfg manager request aws :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> r -> io (Response (ResponseMetadata a) a) -- | Run an AWS transaction, with HTTP manager and metadata returned in an -- IORef. -- -- Errors are not caught, and need to be handled with exception handlers. -- -- Usage (with existing Manager): ref <- newIORef mempty; -- resp <- awsRef cfg serviceCfg manager request awsRef :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> IORef (ResponseMetadata a) -> r -> io a -- | Run an AWS transaction, without HTTP manager and with metadata -- wrapped in a Response. -- -- Note that this is potentially less efficient than using aws, -- because HTTP connections cannot be re-used. -- -- All errors are caught and wrapped in the Response value. -- -- Usage: resp <- simpleAws cfg serviceCfg request simpleAws :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> r -> io (Response (ResponseMetadata a) a) -- | Run an AWS transaction, without HTTP manager and with metadata -- returned in an IORef. -- -- Errors are not caught, and need to be handled with exception handlers. -- -- Usage: ref <- newIORef mempty; resp <- simpleAwsRef cfg -- serviceCfg request simpleAwsRef :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> IORef (ResponseMetadata a) -> r -> io a -- | Run an AWS transaction, without enforcing that response and request -- type form a valid transaction pair. -- -- This is especially useful for debugging and development, you should -- not have to use it in production. -- -- All errors are caught and wrapped in the Response value. unsafeAws :: (ResponseConsumer r a, Monoid (ResponseMetadata a), SignQuery r, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> r -> io (Response (ResponseMetadata a) a) -- | Run an AWS transaction, without enforcing that response and request -- type form a valid transaction pair. -- -- This is especially useful for debugging and development, you should -- not have to use it in production. -- -- Errors are not caught, and need to be handled with exception handlers. unsafeAwsRef :: (ResponseConsumer r a, Monoid (ResponseMetadata a), SignQuery r, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> IORef (ResponseMetadata a) -> r -> io a -- | Run a URI-only AWS transaction. Returns a URI that can be sent -- anywhere. Does not work with all requests. -- -- Usage: uri <- awsUri cfg request awsUri :: (SignQuery request, MonadIO io) => Configuration -> ServiceConfiguration request -> request -> io ByteString instance Show LogLevel instance Eq LogLevel instance Ord LogLevel module Aws -- | The severity of a log message, in rising order. data LogLevel Debug :: LogLevel Info :: LogLevel Warning :: LogLevel Error :: LogLevel -- | The interface for any logging function. Takes log level and a log -- message, and can perform an arbitrary IO action. type Logger = LogLevel -> Text -> IO () -- | The default logger defaultLog minLevel, which prints log -- messages above level minLevel to stderr. defaultLog :: LogLevel -> Logger -- | The configuration for an AWS request. You can use multiple -- configurations in parallel, even over the same HTTP connection -- manager. data Configuration Configuration :: TimeInfo -> Credentials -> Logger -> Configuration -- | Whether to restrict the signature validity with a plain timestamp, or -- with explicit expiration (absolute or relative). timeInfo :: Configuration -> TimeInfo -- | AWS access credentials. credentials :: Configuration -> Credentials -- | The error / message logger. logger :: Configuration -> Logger -- | The default configuration, with credentials loaded from environment -- variable or configuration file (see loadCredentialsDefault). baseConfiguration :: MonadIO io => io Configuration -- | Debug configuration, which avoids using HTTPS for some queries. DO NOT -- USE THIS IN PRODUCTION! dbgConfiguration :: MonadIO io => io Configuration -- | Run an AWS transaction, with HTTP manager and metadata wrapped in a -- Response. -- -- All errors are caught and wrapped in the Response value. -- -- Usage (with existing Manager): resp <- aws cfg -- serviceCfg manager request aws :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> r -> io (Response (ResponseMetadata a) a) -- | Run an AWS transaction, with HTTP manager and metadata returned in an -- IORef. -- -- Errors are not caught, and need to be handled with exception handlers. -- -- Usage (with existing Manager): ref <- newIORef mempty; -- resp <- awsRef cfg serviceCfg manager request awsRef :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> IORef (ResponseMetadata a) -> r -> io a -- | Run an AWS transaction, without HTTP manager and with metadata -- wrapped in a Response. -- -- Note that this is potentially less efficient than using aws, -- because HTTP connections cannot be re-used. -- -- All errors are caught and wrapped in the Response value. -- -- Usage: resp <- simpleAws cfg serviceCfg request simpleAws :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> r -> io (Response (ResponseMetadata a) a) -- | Run an AWS transaction, without HTTP manager and with metadata -- returned in an IORef. -- -- Errors are not caught, and need to be handled with exception handlers. -- -- Usage: ref <- newIORef mempty; resp <- simpleAwsRef cfg -- serviceCfg request simpleAwsRef :: (Transaction r a, MonadIO io) => Configuration -> ServiceConfiguration r -> IORef (ResponseMetadata a) -> r -> io a -- | Run an AWS transaction, without enforcing that response and request -- type form a valid transaction pair. -- -- This is especially useful for debugging and development, you should -- not have to use it in production. -- -- All errors are caught and wrapped in the Response value. unsafeAws :: (ResponseConsumer r a, Monoid (ResponseMetadata a), SignQuery r, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> r -> io (Response (ResponseMetadata a) a) -- | Run an AWS transaction, without enforcing that response and request -- type form a valid transaction pair. -- -- This is especially useful for debugging and development, you should -- not have to use it in production. -- -- Errors are not caught, and need to be handled with exception handlers. unsafeAwsRef :: (ResponseConsumer r a, Monoid (ResponseMetadata a), SignQuery r, MonadIO io) => Configuration -> ServiceConfiguration r -> Manager -> IORef (ResponseMetadata a) -> r -> io a -- | Run a URI-only AWS transaction. Returns a URI that can be sent -- anywhere. Does not work with all requests. -- -- Usage: uri <- awsUri cfg request awsUri :: (SignQuery request, MonadIO io) => Configuration -> ServiceConfiguration request -> request -> io ByteString -- | A full HTTP response parser. Takes HTTP status, response headers, and -- response body. type HTTPResponseConsumer a = Status -> ResponseHeaders -> ResumableSource (ResourceT IO) ByteString -> ResourceT IO a -- | A response with metadata. Can also contain an error response, or an -- internal error, via Attempt. -- -- Response forms a Writer-like monad. data Response m a Response :: m -> (Attempt a) -> Response m a -- | An error that occurred during XML parsing / validation. newtype XmlException XmlException :: String -> XmlException xmlErrorMessage :: XmlException -> String -- | An error that occurred during header parsing / validation. newtype HeaderException HeaderException :: String -> HeaderException headerErrorMessage :: HeaderException -> String -- | An error that occurred during form parsing / validation. newtype FormException FormException :: String -> FormException formErrorMesage :: FormException -> String -- | Default configuration for a specific service. class DefaultServiceConfiguration config where debugConfiguration = defaultConfiguration debugConfigurationUri = defaultConfigurationUri defaultConfiguration :: DefaultServiceConfiguration config => config defaultConfigurationUri :: DefaultServiceConfiguration config => config debugConfiguration :: DefaultServiceConfiguration config => config debugConfigurationUri :: DefaultServiceConfiguration config => config -- | Whether to restrict the signature validity with a plain timestamp, or -- with explicit expiration (absolute or relative). data TimeInfo -- | Use a simple timestamp to let AWS check the request validity. Timestamp :: TimeInfo -- | Let requests expire at a specific fixed time. ExpiresAt :: UTCTime -> TimeInfo fromExpiresAt :: TimeInfo -> UTCTime -- | Let requests expire a specific number of seconds after they were -- generated. ExpiresIn :: NominalDiffTime -> TimeInfo fromExpiresIn :: TimeInfo -> NominalDiffTime -- | Associates a request type and a response type in a bi-directional way. -- -- This allows the type-checker to infer the response type when given the -- request type and vice versa. -- -- Note that the actual request generation and response parsing resides -- in SignQuery and ResponseConsumer respectively. class (SignQuery r, ResponseConsumer r a) => Transaction r a | r -> a, a -> r -- | AWS access credentials. data Credentials Credentials :: ByteString -> ByteString -> Credentials -- | AWS Access Key ID. accessKeyID :: Credentials -> ByteString -- | AWS Secret Access Key. secretAccessKey :: Credentials -> ByteString -- | The file where access credentials are loaded, when using -- loadCredentialsDefault. -- -- Value: <user directory>/.aws-keys credentialsDefaultFile :: MonadIO io => io FilePath -- | The key to be used in the access credential file that is loaded, when -- using loadCredentialsDefault. -- -- Value: default credentialsDefaultKey :: Text -- | Load credentials from a (text) file given a key name. -- -- The file consists of a sequence of lines, each in the following -- format: -- --
-- keyName awsKeyID awsKeySecret --loadCredentialsFromFile :: MonadIO io => FilePath -> Text -> io (Maybe Credentials) -- | Load credentials from the environment variables -- AWS_ACCESS_KEY_ID and AWS_ACCESS_KEY_SECRET (or -- AWS_SECRET_ACCESS_KEY), if possible. loadCredentialsFromEnv :: MonadIO io => io (Maybe Credentials) -- | Load credentials from environment variables if possible, or -- alternatively from a file with a given key name. -- -- See loadCredentialsFromEnv and loadCredentialsFromFile -- for details. loadCredentialsFromEnvOrFile :: MonadIO io => FilePath -> Text -> io (Maybe Credentials) -- | Load credentials from environment variables if possible, or -- alternative from the default file with the default key name. -- -- Default file: <user directory>/.aws-keys Default -- key name: default -- -- See loadCredentialsFromEnv and loadCredentialsFromFile -- for details. loadCredentialsDefault :: MonadIO io => io (Maybe Credentials)