This chapter contains detailed descriptions of all Amazon SimpleDB operations, their request parameters, their response elements, any special errors, and examples of requests and responses. All sample requests and responses are shown in a protocol-neutral format that displays the common elements for both SOAP and REST requests.
This section describes parameters used by Amazon SimpleDB operations.
Some parameters are required by all operations and are not repeated in the documentation unless the usage is unique for that operation. Other parameters are conditional which indicates they are required for some operations and optional for others.
| Name | Description | Type |
|---|---|---|
Action
| Name of the action. | Required |
Attribute.X.Name
|
Name of attribute associated with an item. Required by PutAttributes. Optional for DeleteAttributes and GetAttributes.
| Conditional |
Attribute.X.Value
|
Value of attribute associated with an item. Required by PutAttributes. Optional for DeleteAttributes.
| Conditional |
AWSAccessKeyId
| For more information, see Request Authentication. | Required |
DomainName
| Name of the domain used in the operation. | Required |
ItemName
|
Unique identifier of an item. Required by PutAttributes, GetAttributes, and DeleteAttributes.
| Conditional |
MaxNumberOfDomains
|
The maximum number of domain names you want returned. Used by ListDomains. The range is 1 to 100. The default setting is 100.
| Optional |
MaxNumberOfItems
| Maximum number of ItemNames to return in the response. The range is 1 to 250. The default setting is 100. | Optional |
NextToken
| String that tells Amazon SimpleDB where to start the next list of domain or item names. Used by ListDomains and Query.
| Optional |
QueryExpression
| String that specifies the query that is executed against the domain. Used by the Query operation. | Optional |
Attribute.X.Replace
| Flag to specify whether to replace the attribute/value or to add a new attribute/value. Used by PutAttributes.
The default setting is false.
| Optional |
Signature
| For more information, see Authenticating REST Requests. | Required |
SignatureVersion
| For more information, see Authenticating REST Requests. | Required |
TimeStamp
| For more information, see Request Authentication. | Required |
Version
| Version of the API. The version of the API described in this document is 2007-11-07. | Required |
The following are specifications for Amazon SimpleDB user data:
User Data Specifications
Domain names—Allowed characters are a-z, A-Z, 0-9, '_', '-', and '.' . Domain names can be between 3 and 255 characters long.
Item names, attribute names, and attribute values—Allowed characters are all UTF-8 chars. These strings can be up to 1024 bytes long.
User data in query expressions must be enclosed in single quotes. If a single quote is used within the user data, it must be escaped using a backslash. If a backslash is used within user data, it must be escaped as well. Examples:
| Original String | Escaped String |
|---|---|
'John's AWS account'
|
'John\'s AWS account'
|
c:\path\constant
|
'c:\\path\\constant'
|
| Name | Description |
|---|---|
RequestId
| A unique ID for tracking the request. |
BoxUsage
| The measure of machine utilization for this request. This does not include storage or transfer usage. |
Request authentication errors are described in API Error Codes. All other errors are listed with the appropriate operations.
The following is an example of a CreateDomain request:
https://sdb.amazonaws.com/ ?Action=CreateDomain &AWSAccessKeyId=[valid access key id] &DomainName=domain1 &SignatureVersion=1 &Timestamp=2007-06-25T15%3A01%3A28-07%3A00 &Version=2007-11-07 &Signature=hvH87q32QzGbDba6bm9YUEVpiGQ%3D
<CreateDomainResponse xmlns="http://sdb.amazonaws.com/doc/2007-11-07">
<ResponseMetadata>
<RequestId>2a1305a2-ed1c-43fc-b7c4-e6966b5e2727</RequestId>
<BoxUsage>0.0000219907</BoxUsage>
</ResponseMetadata>
</CreateDomainResponse>