!      !"!"#$!"%BAn error from an S3 request, either at the network layer, or from  S3 itself. &AWSError code message% constructs an error message from S3  itself. See   Hhttp://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorCodeList.html * for a detailed list of possible codes. ''Connection error at the network layer. (?A result from processing a request to S3. Either some success  value, or a %. )Pretty print an error message. %&'()%'&&'() AAn Amazon Web Services connection. Everything needed to connect  and authenticate requests. Service provider hostname Service provider port number Access Key ID Secret Access Key *&Hostname used for connecting to Amazon's production S3 service (s3.amazonaws.com). &Hostname used for connecting to Amazon's production SimpleDB service (sdb.amazonaws.com). +)Port number used for connecting to Amazon's production S3 service (80). )Port number used for connecting to Amazon's production SimpleDB service (80). >Create an AWSConnection to Amazon from credentials. Uses the  production service. Access Key ID Secret Access Key Connection to Amazon S3 ;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  ,. ;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.    +-)An action to be performed using SimpleDB ./*Connection and authentication information 0'Query parameters (requires a prefix of ?) 1!Additional header fields to send 2 Body of action, if sending data 3Type of action, 4, 5, etc. 6 Transform an .-% into an HTTP request. Does not add A authentication or date information, so it is not suitable for  sending directly to AWS. Action to transform 'Action represented as an HTTP Request. 7Create 89 objects from an action. :Inspect HTTP body, and add a Content-Length header with the  correct length. ;2Add AWS authentication header to an HTTP request.  Action with authentication data Request to transform Authenticated request <=2Sign a string using the given authentication data  Action with authentication data String to sign Base-64 encoded signature >@Generate text that will be signed and subsequently added to the  request. ?(Extract header data needed for signing. @Combine same-named headers. A2Headers with same name should have values merged. B"Group headers with the same name. CSort by key name. DMake 89* easier to work with, and lowercase keys. E2Determine if a header belongs in the StringToSign F*is the first list a prefix of the second? G'Prefix used by Amazon metadata headers H0Extract resource name, as required for signing. I Add a date string to a request. Request to modify  Date string, in RFC 2616 format  Timestamp Request with date header added J%Add an expiration date to a request. K$Attach an HTTP header to a request. L8Get hostname to connect to. Needed for european buckets M/Get current time in HTTP 1.1 format (RFC 2616) + Numeric time zones should be used, but I'd rather not subvert the E intent of ctTZName, so we stick with the name format. Otherwise,  we could send +0000 instead of GMT.  see:   #http://www.ietf.org/rfc/rfc2616.txt   #http://www.ietf.org/rfc/rfc1123.txt   "http://www.ietf.org/rfc/rfc822.txt NO'Convenience for dealing with HMAC-SHA1 PFConstruct the request specified by an SimpleDBAction, send to Amazon, 6 and return the response. Todo: add MD5 signature. QR#Construct a pre-signed URI, but don't act on it. This is useful E for when an expiration date has been set, and the URI needs to be  passed on to a client. Action with resource "Expiration time, in seconds since # 00:00:00 UTC on January 1, 1970 URI of resource S=Inspect a response for network errors, HTTP error codes, and  Amazon error messages. I We need the original action in case we get a 307 (temporary redirect) T=Find the errors embedded in an XML message body from Amazon. UFind children of Error entity, use their Code and Message  entities to create an &. VNDecode a mime string, we know about quoted printable and base64 encoded UTF-8 + S3 may convert quoted printable to base64 WXYZ[-./0123P-./0123./0123P 5Domain name limits: 3-255 characters (a-z, A-Z, 0-9, '_', \, and ]) ^_The  createDomain@ operation creates a new domain. The domain name must be unique T among the domains associated with the Access Key ID provided in the request. The   createDomain6 operation might take 10 or more seconds to complete. The  listDomains@ operation lists all domains associated with the Access Key ID. `The  listDomains@ operation lists all domains associated with the Access Key ID. 2 It returns domain names up to the limit set by . A NextToken & is returned if there are more than  domains. Calling  listDomains'  successive times with the  NextToken returns up to  more domain  names each time. abThe  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. The  putAttributes6 operation creates or replaces attributes in an item. > Attributes are uniquely identified in an item by their name/value combination. 6 For example, a single item can have the attributes [" first_name" := " first_value"]  and [" first_name" := " second_value"](. However, it cannot have two attribute 9 instances where both the name and value are the same.  See also . The  putAttributes6 operation creates or replaces attributes in an item. > Attributes are uniquely identified in an item by their name/value combination. 6 For example, a single item can have the attributes [" first_name" := " first_value"]  and [" first_name" := " second_value"](. However, it cannot have two attribute 9 instances where both the name and value are the same. This command differs from ) by taking a list of attribute keys that + are to be replaced instead of appended. 1Keys for the attributes that should be replaced.  With the batchPutAttributes% operation, you can perform multiple  putAttribute P operations in a single call. This helps you yield savings in round trips and P latencies, and enables Amazon SimpleDB to optimize requests, which generally  yields better throughput.  See also .  With the batchPutAttributes% operation, you can perform multiple  putAttribute P operations in a single call. This helps you yield savings in round trips and P latencies, and enables Amazon SimpleDB to optimize requests, which generally  yields better throughput.  See also . The selectE operation returns a set of Attributes for ItemNames that match the  select expression. select2 is similar to the standard SQL SELECT statement. T The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB V automatically adjusts the number of items returned per page to enforce this limit. T For example, even if you ask to retrieve 2500 items, but each individual item is T 10 kB in size, the system returns 100 items and an appropriate next token so you % can get the next page of results. cdSReturns all of the attributes associated with the item. Optionally, the attributes V returned can be limited to one or more specified attribute name parameters. If the U item does not exist on the replica that was accessed for this operation, an empty S set is returned. The system does not return an error as it cannot guarantee the * item does not exist on other replicas. ef VDeletes one or more attributes associated with the item. If all attributes of an item % are deleted, the item is deleted.       !  !   g      !"#$%&'()*+,-./01234456789:;<:;=>?:@A:@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc1de1fghijklmnopq hSimpleDB-0.3Network.AWS.SimpleDBNetwork.AWS.ArrowUtilsNetwork.AWS.AWSResultNetwork.AWS.AWSConnectionNetwork.AWS.AuthenticationNetwork.AWS.Actions AWSConnectionawsHostawsPort awsAccessKey awsSecretKeydefaultAmazonSimpleDBHostdefaultAmazonSimpleDBPortamazonSimpleDBConnectionamazonConnectionFromEnvamazonConnectionFromEnv'ItemitemNameitemAttributes Attribute:=AttributeValue AttributeKeyItemNameSelectExpressionMaxNumberOfDomains DomainName createDomain listDomains deleteDomain putAttributesputAttributes'batchPutAttributesbatchPutAttributes'select getAttributesdeleteAttributessplitunsplitatTagtextReqErrorAWSError NetworkError AWSResultprettyReqErrordefaultAmazonS3HostdefaultAmazonS3Portbase Data.MaybeNothingSimpleDBAction sdbConnectionsdbQuery sdbMetaDatasdbBody sdbOperation HTTP-4000.0.9Network.HTTP.BasePUTGETrequestFromActionheadersFromActionNetwork.HTTP.HeadersHeaderaddContentLengthHeaderaddAuthenticationHeader appendQuery makeSignature stringToSigncanonicalizeHeaderscombineHeadersmergeSameHeaders groupHeaders sortHeadersheaderToLCKeyValue isAmzHeaderisPrefix amzHeadercanonicalizeResource addDateToReqaddExpirationToReqaddHeaderToReq sdbHostnamehttpCurrentDatehttpCurrentTimestamp string2words runAction runAction' preSignedURIcreateAWSResultparseRestErrorXML mimeDecode mimeDecodeQP mimeDecodeQP' mimeDecodeB64 mimeEncodeQP mimeEncodeQP' reservedCharGHC.Num-GHC.Base. attributeKeyattributeValue listDomains'parseDomainListXMLprocessDomainsparseSelectResponseXMLprocessSelectResponseparseAttributesXMLprocessAttributesResponse