hSimpleDB-0.3: Interface to Amazon's SimpleDB service.Source codeContentsIndex
Network.AWS.SimpleDB
Contents
Types
Actions
Constants
Function Types
Data Types
Synopsis
type DomainName = String
type MaxNumberOfDomains = Int
type SelectExpression = String
type ItemName = String
type AttributeKey = String
type AttributeValue = String
data Attribute = AttributeKey := AttributeValue
data Item = Item {
itemName :: ItemName
itemAttributes :: [Attribute]
}
createDomain :: AWSConnection -> DomainName -> IO ()
deleteDomain :: AWSConnection -> DomainName -> IO ()
listDomains :: AWSConnection -> IO [DomainName]
getAttributes :: AWSConnection -> DomainName -> ItemName -> [AttributeKey] -> IO Item
putAttributes :: AWSConnection -> DomainName -> Item -> IO ()
putAttributes' :: AWSConnection -> DomainName -> Item -> [AttributeKey] -> IO ()
batchPutAttributes :: AWSConnection -> DomainName -> [Item] -> IO ()
batchPutAttributes' :: AWSConnection -> DomainName -> [(Item, [AttributeKey])] -> IO ()
deleteAttributes :: AWSConnection -> DomainName -> Item -> IO ()
select :: AWSConnection -> SelectExpression -> IO [Item]
defaultAmazonSimpleDBHost :: String
defaultAmazonSimpleDBPort :: Int
amazonSimpleDBConnection :: String -> String -> AWSConnection
amazonConnectionFromEnv :: IO (Maybe AWSConnection)
amazonConnectionFromEnv' :: IO AWSConnection
data AWSConnection = AWSConnection {
awsHost :: String
awsPort :: Int
awsAccessKey :: String
awsSecretKey :: String
}
Types
type DomainName = StringSource
Domain name limits: 3-255 characters (a-z, A-Z, 0-9, '_', -, and .)
type MaxNumberOfDomains = IntSource
type SelectExpression = StringSource
type ItemName = StringSource
type AttributeKey = StringSource
type AttributeValue = StringSource
data Attribute Source
Constructors
AttributeKey := AttributeValue
show/hide Instances
data Item Source
Constructors
Item
itemName :: ItemName
itemAttributes :: [Attribute]
show/hide Instances
Actions
createDomain :: AWSConnection -> DomainName -> IO ()Source
The createDomain operation creates a new domain. The domain name must be unique among the domains associated with the Access Key ID provided in the request. The createDomain operation might take 10 or more seconds to complete.
deleteDomain :: AWSConnection -> DomainName -> IO ()Source
The deleteDomain operation deletes a domain. Any items (and their attributes) in the domain are deleted as well. The deleteDomain operation might take 10 or more seconds to complete.
listDomains :: AWSConnection -> IO [DomainName]Source
The listDomains operation lists all domains associated with the Access Key ID.
getAttributes :: AWSConnection -> DomainName -> ItemName -> [AttributeKey] -> IO ItemSource
Returns all of the attributes associated with the item. Optionally, the attributes returned can be limited to one or more specified attribute name parameters. If the item does not exist on the replica that was accessed for this operation, an empty set is returned. The system does not return an error as it cannot guarantee the item does not exist on other replicas.
putAttributes :: AWSConnection -> DomainName -> Item -> IO ()Source
The putAttributes operation creates or replaces attributes in an item. Attributes are uniquely identified in an item by their name/value combination. For example, a single item can have the attributes ["first_name" := "first_value"] and ["first_name" := "second_value"]. However, it cannot have two attribute instances where both the name and value are the same. See also putAttributes'.
putAttributes'Source
:: AWSConnection
-> DomainName
-> Item
-> [AttributeKey]Keys for the attributes that should be replaced.
-> IO ()

The putAttributes operation creates or replaces attributes in an item. Attributes are uniquely identified in an item by their name/value combination. For example, a single item can have the attributes ["first_name" := "first_value"] and ["first_name" := "second_value"]. However, it cannot have two attribute instances where both the name and value are the same.

This command differs from putAttributes by taking a list of attribute keys that are to be replaced instead of appended.

batchPutAttributes :: AWSConnection -> DomainName -> [Item] -> IO ()Source

With the batchPutAttributes operation, you can perform multiple putAttribute operations in a single call. This helps you yield savings in round trips and latencies, and enables Amazon SimpleDB to optimize requests, which generally yields better throughput.

See also putAttributes.

batchPutAttributes' :: AWSConnection -> DomainName -> [(Item, [AttributeKey])] -> IO ()Source

With the batchPutAttributes operation, you can perform multiple putAttribute operations in a single call. This helps you yield savings in round trips and latencies, and enables Amazon SimpleDB to optimize requests, which generally yields better throughput.

See also putAttributes'.

deleteAttributes :: AWSConnection -> DomainName -> Item -> IO ()Source
Deletes one or more attributes associated with the item. If all attributes of an item are deleted, the item is deleted.
select :: AWSConnection -> SelectExpression -> IO [Item]Source
The select operation returns a set of Attributes for ItemNames that match the select expression. select is similar to the standard SQL SELECT statement. The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB automatically adjusts the number of items returned per page to enforce this limit. For example, even if you ask to retrieve 2500 items, but each individual item is 10 kB in size, the system returns 100 items and an appropriate next token so you can get the next page of results.
Constants
defaultAmazonSimpleDBHost :: StringSource
Hostname used for connecting to Amazon's production SimpleDB service (sdb.amazonaws.com).
defaultAmazonSimpleDBPort :: IntSource
Port number used for connecting to Amazon's production SimpleDB service (80).
Function Types
amazonSimpleDBConnectionSource
:: StringAccess Key ID
-> StringSecret Access Key
-> AWSConnectionConnection to Amazon S3
Create an AWSConnection to Amazon from credentials. Uses the production service.
amazonConnectionFromEnv :: IO (Maybe AWSConnection)Source
Retrieve Access and Secret keys from environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively. Either variable being undefined or empty will result in Nothing.
amazonConnectionFromEnv' :: IO AWSConnectionSource
Retrieve Access and Secret keys from environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively. Either variable being undefined or empty will result in an exception.
Data Types
data AWSConnection Source
An Amazon Web Services connection. Everything needed to connect and authenticate requests.
Constructors
AWSConnection
awsHost :: StringService provider hostname
awsPort :: IntService provider port number
awsAccessKey :: StringAccess Key ID
awsSecretKey :: StringSecret Access Key
show/hide Instances
Produced by Haddock version 2.6.0