

# Operations
<a name="SDB_API_Operations"></a>

**Topics**
+ [BatchDeleteAttributes](SDB_API_BatchDeleteAttributes.md)
+ [BatchPutAttributes](SDB_API_BatchPutAttributes.md)
+ [CreateDomain](SDB_API_CreateDomain.md)
+ [DeleteAttributes](SDB_API_DeleteAttributes.md)
+ [DeleteDomain](SDB_API_DeleteDomain.md)
+ [DomainMetadata](SDB_API_DomainMetadata.md)
+ [GetAttributes](SDB_API_GetAttributes.md)
+ [GetExport](SDB_API_GetExport.md)
+ [ListDomains](SDB_API_ListDomains.md)
+ [ListExports](SDB_API_ListExports.md)
+ [PutAttributes](SDB_API_PutAttributes.md)
+ [Select](SDB_API_Select.md)
+ [StartDomainExport](SDB_API_StartDomainExport.md)

# BatchDeleteAttributes
<a name="SDB_API_BatchDeleteAttributes"></a>

## Description
<a name="SDB_API_BatchDeleteAttributes_Description"></a>

Performs multiple `DeleteAttributes` operations in a single call, which reduces round trips and latencies. This enables Amazon SimpleDB to optimize requests, which generally yields better throughput. 

**Note**  
If you specify `BatchDeleteAttributes` without attributes or values, all the attributes for the item are deleted.   
`BatchDeleteAttributes` is an idempotent operation; running it multiple times on the same item or attribute *doesn't* result in an error.  
The `BatchDeleteAttributes` operation succeeds or fails in its entirety. There are no partial deletes.  
You can execute multiple `BatchDeleteAttributes` operations and other operations in parallel. However, large numbers of concurrent `BatchDeleteAttributes` calls can result in Service Unavailable (503) responses.   
This operation is vulnerable to exceeding the maximum URL size when making a REST request using the HTTP GET method.  
This operation does not support conditions using `Expected.Name`, `Expected.Value`, or `Expected.Exists`.

The following limitations are enforced for this operation:
+ 1 MB request size
+ 25 item limit per `BatchDeleteAttributes` operation

## Request Parameters
<a name="SDB_API_BatchDeleteAttributes_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  Item.Y.ItemName  |   The name of the item.   Type: String.   Default: None.   |  Yes  | 
|  `Item.Y.Attribute.X.Name`  |   The name of the attribute for the specified item. *Y* or *X* can be any positive integer or 0. If you specify `BatchDeleteAttributes` without attribute names or values, all the attributes for the item are deleted.  Type: String.   Default: None.   |  No  | 
|  `Item.Y.Attribute.X.Value`  |   The value of the attribute for the specified item. *Y* or *X* can be any positive integer or 0. If an attribute value is specified, then the corresponding attribute name is required.  Type: String.   Default: None.   |  Yes  | 
|  DomainName  |   The name of the domain in which to perform the operation.   Type: String   Default: None.   |  Yes  | 

## Response Elements
<a name="SDB_API_BatchDeleteAttributes_CommonResponseElements"></a>

See [Common Response Elements](SDB_API_CommonResponseElements.md).

## Special Errors
<a name="SDB_API_BatchDeleteAttributes_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  AttributeDoesNotExist  |  Attribute ("\$1 name \$1 ") does not exist. | 
|  DuplicateItemName  |  Item item\$1name was specified more than once.  | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid.The empty string is an illegal attribute name. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Item is invalid. Value exceeds max length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Value is invalid. Value exceeds maximum length of 1024. | 
|  InvalidWSDLVersion  |  Parameter (" \$1 parameterName \$1") is only supported in WSDL version 2009-04-15 or beyond. Please upgrade to new version. | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  MissingParameter  |  The request must contain the parameter ItemName. | 
|  MissingParameter  |  The request must contain the attribute Name, if an attribute Value is specified.  | 
|  NoSuchDomain  |  The specified domain does not exist. | 
|  `NumberSubmittedItemsExceeded`  |  Too many items in a single call. Up to 25 items per call allowed. | 
|  `NumberSubmittedAttributesExceeded`  |  Too many attributes for item itemName in a single call. Up to 256 attributes per call allowed.  | 

## Examples
<a name="SDB_API_BatchDeleteAttributes_Examples"></a>

### Sample Request
<a name="SDB_API_BatchDeleteAttributes_Examples_Request"></a>

In this example, the Jumbo Fez and Petite Fez have sold out in several colors. The following sample deletes the `red`, `brick`, and `garnet` values from the `color` attribute of the `JumboFez` item, and the `pink` and `fuchsia` values from the `color` attribute of the `PetiteFez` item.

```
https://sdb.amazonaws.com/
?Action=BatchDeleteAttributes
&Item.1.ItemName=JumboFez
&Item.1.Attribute.1.name=color&
&Item.1.Attribute.1.value=red&
&Item.1.Attribute.2.name=color&
&Item.1.Attribute.2.value=brick&
&Item.1.Attribute.3.name=color&
&Item.1.Attribute.3.value=garnet&
&Item.2.ItemName=PetiteFez
&Item.2.Attribute.1.name=color&
&Item.2.Attribute.1.value=pink&
&Item.2.Attribute.2.name=color&
&Item.2.Attribute.2.value=fuchsia&
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A07-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_BatchDeleteAttributes_Examples_Response"></a>

```
<BatchDeleteAttributesResponse">
  <ResponseMetadata>
    <RequestId>05ae667c-cfac-41a8-ab37-a9c897c4c3ca</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</BatchDeleteAttributesResponse>
```

## Related Actions
<a name="SDB_API_BatchDeleteAttributes_Related_Actions"></a>
+  [DeleteAttributes](SDB_API_DeleteAttributes.md) 
+  [GetAttributes](SDB_API_GetAttributes.md) 

# BatchPutAttributes
<a name="SDB_API_BatchPutAttributes"></a>

## Description
<a name="SDB_API_BatchPutAttributes_Description"></a>

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. 

 You can specify attributes and values for items using a combination of the `Item.Y.Attribute.X.Name` and `Item.Y.Attribute.X.Value` parameters. To specify attributes and values for the first item, you use `Item.1.Attribute.1.Name` and `Item.1.Attribute.1.Value` for the first attribute, `Item.1.Attribute.2.Name` and `Item.1.Attribute.2.Value` for the second attribute, and so on. 

 To specify attributes and values for the second item, you use `Item.2.Attribute.1.Name` and `Item.2.Attribute.1.Value` for the first attribute, `Item.2.Attribute.2.Name` and `Item.2.Attribute.2.Value` for the second attribute, and so on. 

Amazon SimpleDB uniquely identifies attributes in an item by their name/value combinations. 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 `Item.Y.Attribute.X.Name` and `Item.Y.Attribute.X.Value` are the same.

Optionally, you can supply the `Replace` parameter for each individual attribute. Setting this value to `true` causes the new attribute value to replace the existing attribute value(s) if any exist. Otherwise, Amazon SimpleDB simply inserts the attribute values. For example, if an item has the attributes `{ 'a', '1' }`, `{ 'b', '2'}`, and `{ 'b', '3' }` and the requester calls `BatchPutAttributes` using the attributes `{ 'b', '4' }` with the `Replace` parameter set to `true`, the final attributes of the item are changed to `{ 'a', '1' }` and `{ 'b', '4' }`. This occurs because the new `'b'` attribute replaces the old value. 

**Note**  
You cannot specify an empty string as an item or attribute name.  
The `BatchPutAttributes` operation succeeds or fails in its entirety. There are no partial puts.  
You can execute multiple `BatchPutAttributes` operations and other operations in parallel. However, large numbers of concurrent `BatchPutAttributes` calls can result in Service Unavailable (503) responses.   
This operation is vulnerable to exceeding the maximum URL size when making a REST request using the HTTP GET method.  
This operation does not support conditions using `Expected.Name`, `Expected.Value`, or `Expected.Exists`.

The following limitations are enforced for this operation:
+ 256 attribute name-value pairs per item
+ 1 MB request size
+ 1 billion attributes per domain
+ 10 GB of total user data storage per domain
+ 25 item limit per `BatchPutAttributes` operation

## Request Parameters
<a name="SDB_API_BatchPutAttributes_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  Item.Y.ItemName  |   The name of the item.   Type: String.   Default: None.   |  Yes  | 
|  `Item.Y.Attribute.X.Name`  |   The name of the attribute for the specified item. Y or X can be any positive integer or 0.  Type: String.   Default: None.   |  Yes  | 
|  `Item.Y.Attribute.X.Value`  |   The value of the attribute for the specified item. Y or X can be any positive integer or 0.  Type: String.   Default: None.   |  Yes  | 
|  `Item.Y.Attribute.X.Replace`  |   Flag to specify whether to replace the Attribute/Value or to add a new Attribute/Value. The `replace` parameter is more resource intensive than non-replace operations and is not recommended unless required. Y or X can be any positive integer or 0. To reduce the request size and latencies, we recommend that you do not specify this request parameter at all.  Type: Boolean.   Default: `false`.   |  No  | 
|  DomainName  |   The name of the domain in which to perform the operation.   Type: String   Default: None.   |  Yes  | 

**Note**  
When using eventually consistent reads, a [GetAttributes](SDB_API_GetAttributes.md) or [Select](SDB_API_Select.md) request (read) immediately after a [DeleteAttributes](SDB_API_DeleteAttributes.md) or [PutAttributes](SDB_API_PutAttributes.md) request (write) might not return the updated data. Some items might be updated before others, despite the fact that the operation never partially succeeds. A consistent read always reflects all writes that received a successful response prior to the read. For more information, see [Consistency](ConsistencySummary.md).

## Response Elements
<a name="SDB_API_BatchPutAttributes_CommonResponseElements"></a>

See [Common Response Elements](SDB_API_CommonResponseElements.md).

## Special Errors
<a name="SDB_API_BatchPutAttributes_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  DuplicateItemName  |  Item item\$1name was specified more than once.  | 
|  InvalidParameterValue  |  Value value for parameter Name is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value value for parameter Value is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value value for parameter Item is invalid. Value exceeds max length of 1024. | 
|  InvalidParameterValue  |  Value value for parameter Replace is invalid. The Replace flag should be either true or false. | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  MissingParameter  |  The request must contain the parameter ItemName. | 
|  MissingParameter  |  Attribute.Value missing for Attribute.Name=attribute\$1name. | 
|  MissingParameter  |  Attribute.Name missing for Attribute.Value=attribute\$1name. | 
|  MissingParameter  |  No attributes for item item\$1name. | 
|  NoSuchDomain  |  The specified domain does not exist. | 
|  NumberItemAttributesExceeded  |  Too many attributes in this item.  | 
|  NumberDomainAttributesExceeded  |  Too many attributes in this domain.  | 
|  NumberDomainBytesExceeded  |  Too many bytes in this domain.  | 
|  `NumberSubmittedItemsExceeded`  |  Too many items in a single call. Up to 25 items per call allowed. | 
|  `NumberSubmittedAttributesExceeded`  |  Too many attributes for item itemName in a single call. Up to 256 attributes per call allowed.  | 

## Examples
<a name="SDB_API_BatchPutAttributes_Examples"></a>

### Sample Request
<a name="SDB_API_BatchPutAttributes_Examples_Request"></a>

The following example uses `BatchPutAttributes` on `Shirt1`, which has attributes `(Color=Blue)`, `(Size=Med)`, and `(Price=0014.99)` in `MyDomain`. If `Shirt1` already had the `Price` attribute, this operation would replace the values for that attribute. Otherwise, a new (additional) `Price` attribute is created with the value 0014.99.

 The example also uses `BatchPutAttributes` on `Shirt2` which has attributes `(Color=Red)`, `(Size=Large)`, and `(Price=0019.99)`. 

```
https://sdb.amazonaws.com/
?Action=BatchPutAttributes
&Item.1.ItemName=Shirt1
&Item.1.Attribute.1.Name=Color
&Item.1.Attribute.1.Value=Blue
&Item.1.Attribute.2.Name=Size
&Item.1.Attribute.2.Value=Med
&Item.1.Attribute.3.Name=Price
&Item.1.Attribute.3.Value=0014.99
&Item.1.Attribute.3.Replace=true
&Item.2.ItemName=Shirt2
&Item.2.Attribute.1.Name=Color
&Item.2.Attribute.1.Value=Red
&Item.2.Attribute.2.Name=Size
&Item.2.Attribute.2.Value=Large
&Item.2.Attribute.3.Name=Price
&Item.2.Attribute.3.Value=0019.99
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2009-01-12T15%3A03%3A05-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_BatchPutAttributes_Examples_Response"></a>

```
<BatchPutAttributesResponse>
  <ResponseMetadata>
    <RequestId>490206ce-8292-456c-a00f-61b335eb202b</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</BatchPutAttributesResponse>
```

## Related Actions
<a name="SDB_API_BatchPutAttributes_Related_Actions"></a>
+  [PutAttributes](SDB_API_PutAttributes.md) 
+  [DeleteAttributes](SDB_API_DeleteAttributes.md) 
+  [GetAttributes](SDB_API_GetAttributes.md) 

# CreateDomain
<a name="SDB_API_CreateDomain"></a>

## Description
<a name="SDB_API_CreateDomain_Description"></a>

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. 

**Note**  
`CreateDomain` is an idempotent operation; running it multiple times using the same domain name will *not* result in an error response.   
You can create up to 250 domains per account.  
If you require additional domains, go to [https://console.aws.amazon.com/support/home\$1/case/create?issueType=service-limit-increase&limitType=service-code-simpledb-domains](https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-simpledb-domains).

## Request Parameters
<a name="SDB_API_CreateDomain_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  DomainName  |   The name of the domain to create. The name can range between 3 and 255 characters and can contain the following characters: a-z, A-Z, 0-9, '\$1', '-', and '.'.  Type: String  |  Yes  | 

## Response Elements
<a name="SDB_API_CreateDomain_CommonResponseElements"></a>

See [Common Response Elements](SDB_API_CommonResponseElements.md).

## Special Errors
<a name="SDB_API_CreateDomain_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter DomainName is invalid. | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  NumberDomainsExceeded  |  Number of domains limit exceeded. | 

## Examples
<a name="SDB_API_CreateDomain_Examples"></a>

### Sample Request
<a name="SDB_API_CreateDomain_Examples_Request"></a>

```
https://sdb.amazonaws.com/
?Action=CreateDomain
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A01%3A28-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_CreateDomain_Examples_Response"></a>

```
<CreateDomainResponse>
  <ResponseMetadata>
    <RequestId>2a1305a2-ed1c-43fc-b7c4-e6966b5e2727</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</CreateDomainResponse>
```

## Related Actions
<a name="SDB_API_CreateDomain_Related_Actions"></a>
+  [DeleteDomain](SDB_API_DeleteDomain.md) 
+  [ListDomains](SDB_API_ListDomains.md) 

# DeleteAttributes
<a name="SDB_API_DeleteAttributes"></a>

## Description
<a name="SDB_API_DeleteAttributes_Description"></a>

Deletes one or more attributes associated with the item. If all attributes of an item are deleted, the item is deleted.

**Note**  
If you specify `DeleteAttributes` without attributes or values, all the attributes for the item are deleted.   
Unless you specify conditions, the `DeleteAttributes` is an idempotent operation; running it multiple times on the same item or attribute does *not* result in an error response.  
Conditional deletes are useful for only deleting items and attributes if specific conditions are met. If the conditions are met, Amazon SimpleDB performs the delete. Otherwise, the data is not deleted.   
When using eventually consistent reads, a [GetAttributes](SDB_API_GetAttributes.md) or [Select](SDB_API_Select.md) request (read) immediately after a [DeleteAttributes](#SDB_API_DeleteAttributes) or [PutAttributes](SDB_API_PutAttributes.md) request (write) might not return the updated data. A consistent read always reflects all writes that received a successful response prior to the read. For more information, see [Consistency](ConsistencySummary.md).  
You can perform the expected conditional check on one attribute per operation.

## Request Parameters
<a name="SDB_API_DeleteAttributes_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  ItemName  |  The name of the item. Type: String  |  Yes  | 
|  `Attribute.X.Name`  |  The name of the attribute. X can be any positive integer or 0. If you specify `DeleteAttributes` without attribute names or values, all the attributes for the item are deleted. Type: String  |  No  | 
|  `Attribute.X.Value`  |  The name of the attribute value (for multi-valued attributes). X can be any positive integer or 0. If an attribute value is specified, then the corresponding attribute name is required. Type: String  |  No  | 
|  DomainName  |  The name of the domain in which to perform the operation.  Type: String   |  Yes  | 
|  `Expected.Name`  |  Name of the attribute to check.  Type: String.  Conditions: Must be used with the expected value or expected exists parameter.   When used with the expected value parameter, you specify the value to check.   When expected exists is set to `true` and it is used with the expected value parameter, it performs similarly to just using the expected value parameter. When expected exists is set to `false`, the operation is performed if the expected attribute is not present.   Can only be used with single-valued attributes.   | Conditional | 
|  `Expected.Value`  |  Value of the attribute to check. Type: String.  Conditions: Must be used with the expected name parameter. Can be used with the expected exists parameter if that parameter is set to `true`.   Can only be used with single-valued attributes.  | Conditional | 
|  `Expected.Exists`  |  Flag to test the existence of an attribute while performing conditional updates. Type: Boolean.  Conditions: Must be used with the expected name parameter. When set to `true`, this must be used with the expected value parameter. When set to `false`, this cannot be used with the expected value parameter.   Can only be used with single-valued attributes.  | Conditional | 

## Response Elements
<a name="SDB_API_DeleteAttributes_CommonResponseElements"></a>

See [Common Response Elements](SDB_API_CommonResponseElements.md).

## Special Errors
<a name="SDB_API_DeleteAttributes_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  AttributeDoesNotExist  |  Attribute ("\$1 name \$1 ") does not exist. | 
|  ConditionalCheckFailed  |  Conditional check failed. Attribute (" \$1 name \$1 ") value exists.  | 
|  ConditionalCheckFailed  |  Conditional check failed. Attribute ("\$1 name \$1") value is ("\$1 value \$1") but was expected ("\$1 expValue \$1"). | 
|  ExistsAndExpectedValue  |  Expected.Exists=false and Expected.Value cannot be specified together. | 
|  IncompleteExpectedExpression  |  If Expected.Exists=true or unspecified, then Expected.Value has to be specified. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Expected.Exists is invalid. Expected.Exists should be either true or false.  | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid.The empty string is an illegal attribute name. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Value is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Item is invalid. Value exceeds max length of 1024. | 
|  InvalidWSDLVersion  |  Parameter (" \$1 parameterName \$1") is only supported in WSDL version 2009-04-15 or beyond. Please upgrade to new version. | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  MissingParameter  |  The request must contain the parameter ItemName. | 
|  MissingParameter  |  The request must contain the attribute Name, if an attribute Value is specified.  | 
|  MultipleExistsConditions  |  Only one Exists condition can be specified. | 
|  MultipleExpectedNames  |  Only one Expected.Name can be specified. | 
|  MultipleExpectedValues  |  Only one Expected.Value can be specified. | 
|  MultiValuedAttribute  |  Attribute (" \$1 name \$1 ") is multi-valued. Conditional check can only be performed on a single-valued attribute. | 
|  NoSuchDomain  |  The specified domain does not exist. | 

## Examples
<a name="SDB_API_DeleteAttributes_Examples"></a>

### Sample Request
<a name="SDB_API_DeleteAttributes_Examples_Request"></a>

In this example, the Jumbo Fez has sold out in several colors. The following deletes the `red`, `brick`, and `garnet` values from the `color` attribute of the `JumboFez` item.

```
https://sdb.amazonaws.com/
?Action=DeleteAttributes
&Attribute.1.Name=color
&Attribute.1.Value=red
&Attribute.2.Name=color
&Attribute.2.Value=brick
&Attribute.3.Name=color
&Attribute.3.Value=garnet
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&ItemName=JumboFez
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A07-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_DeleteAttributes_Examples_Response"></a>

```
<DeleteAttributesResponse">
  <ResponseMetadata>
    <RequestId>05ae667c-cfac-41a8-ab37-a9c897c4c3ca</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</DeleteAttributesResponse>
```

### Sample Request
<a name="SDB_API_DeleteAttributes_Examples_Request2"></a>

In this example, the Micro Fez has sold out. The following deletes the Micro Fez if the quantity reaches 0

**Note**  
For more examples of conditional operations, see [Conditionally Putting and Deleting Data](ConditionalPutDelete.md).

```
https://sdb.amazonaws.com/
?Action=DeleteAttributes
&ItemName=MicroFez
&Expected.Name=quantity
&Expected.Value=0
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A07-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_DeleteAttributes_Examples_Response2"></a>

```
<DeleteAttributesResponse>
  <ResponseMetadata>
    <RequestId>05ae667c-cfac-41a8-ab37-a9c897c4c3ca</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</DeleteAttributesResponse>
```

## Related Actions
<a name="SDB_API_DeleteAttributes_Related_Actions"></a>
+  [BatchDeleteAttributes](SDB_API_BatchDeleteAttributes.md) 
+  [GetAttributes](SDB_API_GetAttributes.md) 
+  [PutAttributes](SDB_API_PutAttributes.md) 

# DeleteDomain
<a name="SDB_API_DeleteDomain"></a>

## Description
<a name="SDB_API_DeleteDomain_Description"></a>

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. 

**Note**  
Running `DeleteDomain` on a domain that does not exist or running the function multiple times using the same domain name will *not* result in an error response.

**Important**  
Domain deletion is blocked while any export for that domain is in PENDING or IN\$1PROGRESS status. Ensure all exports have completed (SUCCEEDED or FAILED status) before attempting to delete a domain. You can use the `ListExports` operation to check for active exports.

## Request Parameters
<a name="SDB_API_DeleteDomain_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  DomainName  |   The name of the domain to delete.   Type: String   |  Yes  | 

## Response Elements
<a name="SDB_API_DeleteDomain_CommonResponseElements"></a>

See [Common Response Elements](SDB_API_CommonResponseElements.md).

## Special Errors
<a name="SDB_API_DeleteDomain_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 

## Examples
<a name="SDB_API_DeleteDomain_Examples"></a>

### Sample Request
<a name="SDB_API_DeleteDomain_Examples_Request"></a>

```
https://sdb.amazonaws.com/
?Action=DeleteDomain
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A02%3A20-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_DeleteDomain_Examples_Response"></a>

```
<DeleteDomainResponse>
  <ResponseMetadata>
    <RequestId>c522638b-31a2-4d69-b376-8c5428744704</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</DeleteDomainResponse>
```

## Related Actions
<a name="SDB_API_DeleteDomain_Related_Actions"></a>
+  [CreateDomain](SDB_API_CreateDomain.md) 
+  [ListDomains](SDB_API_ListDomains.md) 

# DomainMetadata
<a name="SDB_API_DomainMetadata"></a>

## Description
<a name="SDB_API_DomainMetadata_Description"></a>

Returns information about the domain, including when the domain was created, the number of items and attributes, and the size of attribute names and values.

## Request Parameters
<a name="SDB_API_DomainMetadata_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  DomainName  |   The name of the domain for which to display metadata.   Type: String   |  Yes  | 

## Response Elements
<a name="SDB_API_DomainMetadata_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  Timestamp  |  The data and time when metadata was calculated in Epoch (UNIX) time. | 
|  ItemCount  |  The number of all items in the domain.  | 
|  AttributeValueCount  |  The number of all attribute name/value pairs in the domain.  | 
|  AttributeNameCount  |  The number of unique attribute names in the domain.  | 
|  ItemNamesSizeBytes  |  The total size of all item names in the domain, in bytes.  | 
|  AttributeValuesSizeBytes  |  The total size of all attribute values, in bytes.  | 
|  AttributeNamesSizeBytes  |  The total size of all unique attribute names, in bytes.  | 

## Special Errors
<a name="SDB_API_DomainMetadata_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  NoSuchDomain  |  The specified domain does not exist. | 

## Examples
<a name="SDB_API_DomainMetadata_Examples"></a>

### Sample Request
<a name="SDB_API_DomainMetadata_Examples_Request"></a>

```
https://sdb.amazonaws.com/
?Action=DomainMetadata
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A07-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_DomainMetadata_Examples_Response"></a>

```
<DomainMetadataResponse>
  <DomainMetadataResult>
    <ItemCount>195078</ItemCount>
    <ItemNamesSizeBytes>2586634</ItemNamesSizeBytes>
    <AttributeNameCount >12</AttributeNameCount >
    <AttributeNamesSizeBytes>120</AttributeNamesSizeBytes>
    <AttributeValueCount>3690416</AttributeValueCount>
    <AttributeValuesSizeBytes>50149756</AttributeValuesSizeBytes>
    <Timestamp>1225486466</Timestamp>
  </DomainMetadataResult>
  <ResponseMetadata>
    	<RequestId>b1e8f1f7-42e9-494c-ad09-2674e557526d</RequestId>
    	<BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</DomainMetadataResponse>
```

## Related Actions
<a name="SDB_API_DomainMetadata_Related_Actions"></a>
+  [CreateDomain](SDB_API_CreateDomain.md) 
+  [ListDomains](SDB_API_ListDomains.md) 

# GetAttributes
<a name="SDB_API_GetAttributes"></a>

## Description
<a name="SDB_API_GetAttributes_Description"></a>

Returns all of the attributes associated with the item. Optionally, the attributes returned can be limited to one or more specified attribute name parameters.

Amazon SimpleDB keeps multiple copies of each domain. When data is written or updated, all copies of the data are updated. However, it takes time for the update to propagate to all storage locations. The data will eventually be consistent, but an immediate read might not show the change. If eventually consistent reads are not acceptable for your application, use `ConsistentRead`. Although this operation might take longer than a standard read, it always returns the last updated value. 

**Note**  
If the item does not exist on the replica that was accessed for this operation, an empty set is returned.   
If you specify `GetAttributes` without any attribute names, all the attributes for the item are returned. 

## Request Parameters
<a name="SDB_API_GetAttributes_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  ItemName  |  The name of the item.  |  Yes  | 
|  AttributeName  |  The name of the attribute.  |  No  | 
|  DomainName  |   The name of the domain in which to perform the operation.   Type: String   |  Yes  | 
|  ConsistentRead  |   When set to `true`, ensures that the most recent data is returned. For more information, see [Consistency](ConsistencySummary.md)  Type: Boolean   Default: `false`   |  No | 

## Response Elements
<a name="SDB_API_GetAttributes_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  <Attribute><Name>... </Name><Value>... </Value></Attribute>  |  The name of the attribute and value.  | 

## Special Errors
<a name="SDB_API_GetAttributes_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Item is invalid. Value exceeds max length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter ConsistentRead is invalid. The ConsistentRead flag should be either true or false. | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  MissingParameter  |  The request must contain the parameter ItemName. | 
|  NoSuchDomain  |  The specified domain does not exist. | 

## Examples
<a name="SDB_API_GetAttributes_Examples"></a>

### Sample Request
<a name="SDB_API_GetAttributes_Examples_Request"></a>

```
https://sdb.amazonaws.com/
?Action=GetAttributes
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&ItemName=Item123
&ConsistentRead=true
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A07-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_GetAttributes_Examples_Response"></a>

```
<GetAttributesResponse>
  <GetAttributesResult>
    <Attribute><Name>Color</Name><Value>Blue</Value></Attribute>
    <Attribute><Name>Size</Name><Value>Med</Value></Attribute>
    <Attribute><Name>Price</Name><Value>14</Value></Attribute>
  </GetAttributesResult>
  <ResponseMetadata>
    <RequestId>b1e8f1f7-42e9-494c-ad09-2674e557526d</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</GetAttributesResponse>
```

### Sample Request
<a name="SDB_API_GetAttributes_Examples_Request2"></a>

```
https://sdb.amazonaws.com/
?Action=GetAttributes
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&ItemName=Item123
&AttributeName.0=Color
&AttributeName.1=Size
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A07-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_GetAttributes_Examples_Response2"></a>

```
<GetAttributesResponse>
  <GetAttributesResult>
    <Attribute><Name>Color</Name><Value>Blue</Value></Attribute>
    <Attribute><Name>Size</Name><Value>Med</Value></Attribute>
  </GetAttributesResult>
  <ResponseMetadata>
    <RequestId>b1e8f1f7-42e9-494c-ad09-2674e557526d</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</GetAttributesResponse>
```

## Related Actions
<a name="SDB_API_GetAttributes_Related_Actions"></a>
+  [DeleteAttributes](SDB_API_DeleteAttributes.md) 
+  [PutAttributes](SDB_API_PutAttributes.md) 

# GetExport
<a name="SDB_API_GetExport"></a>

## Description
<a name="SDB_API_GetExport_Description"></a>

Returns information about an export from Amazon SimpleDB to Amazon S3. Use this operation to track the status and details of an export.

The `exportDataCutoffTime` represents when domain processing begins, not when the export was requested. Exports are not point-in-time snapshots. All data inserted before this timestamp is included, but data inserted after this timestamp is not included. For existing items, updates or deletions after the cutoff may not be reflected in the export.

## Request Parameters
<a name="SDB_API_GetExport_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  exportArn  |  The unique Amazon Resource Name (ARN) of the export, returned by the StartDomainExport operation. Type: String  |  Yes  | 

## Response Elements
<a name="SDB_API_GetExport_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  exportArn  | The unique Amazon Resource Name (ARN) of the export. | 
|  clientToken  | The client token used to create the export. | 
|  exportStatus  | The current state of the export. Valid values: PENDING \$1 IN\$1PROGRESS \$1 SUCCEEDED \$1 FAILED | 
|  domainName  | The name of the Amazon SimpleDB domain. | 
|  requestedAt  | The timestamp when the export was initiated. | 
|  s3Bucket  | The name of the Amazon S3 bucket. | 
|  s3BucketOwner  | The AWS account ID that owns the Amazon S3 bucket. | 
|  exportDataCutoffTime  | The cutoff timestamp for data inclusion. All data inserted before this timestamp is included in the export. | 
|  failureCode  | The error code if the export status is FAILED. | 
|  failureMessage  | The error message if the export status is FAILED. | 

## Special Errors
<a name="SDB_API_GetExport_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  MissingParameter  | The request must contain the parameter exportArn. | 
|  InvalidParameterValue  | The specified export ARN is invalid. | 

## Examples
<a name="SDB_API_GetExport_Examples"></a>

**Note**  
The new Export APIs don't support sending requests using `query parameters`. This is shown in the following code example.

```
import software.amazon.awssdk.services.simpledbv2.SimpleDbV2Client;
import software.amazon.awssdk.services.simpledbv2.model.GetExportRequest;
import software.amazon.awssdk.services.simpledbv2.model.GetExportResponse;
import software.amazon.awssdk.services.simpledbv2.model.SimpleDbV2Exception;
import software.amazon.awssdk.regions.Region;

public class SimpleDBGetExportExample {

    private SimpleDbV2Client simpleDbClient;

    public SimpleDBGetExportExample(Region region) {
        this.simpleDbClient = SimpleDbV2Client.builder()
            .region(region)
            .build();
    }

    /**
     * Retrieves information about a domain export.
     *
     * @param exportArn the ARN of the export to retrieve
     * @return the export response containing export details
     * @throws SimpleDbV2Exception if the operation fails
     */
    public GetExportResponse getExport(String exportArn) {
        try {
            GetExportRequest request = GetExportRequest.builder()
                .exportArn(exportArn)
                .build();

            GetExportResponse response = simpleDbClient.getExport(request);

            System.out.println("Export ARN: " + response.exportArn());
            System.out.println("Export Status: " + response.exportStatus());
            System.out.println("Domain Name: " + response.domainName());
            System.out.println("Requested At: " + response.requestedAt());

            return response;

        } catch (SimpleDbV2Exception e) {
            System.err.println("Error Code: " + e.awsErrorDetails().errorCode());
            System.err.println("Error Message: " + e.awsErrorDetails().errorMessage());
            System.err.println("HTTP Status Code: " + e.statusCode());
            throw e;
        }
    }
}
```

## Related Actions
<a name="SDB_API_GetExport_Related_Actions"></a>
+  [StartDomainExport](SDB_API_StartDomainExport.md) 
+  [ListExports](SDB_API_ListExports.md) 

# ListDomains
<a name="SDB_API_ListDomains"></a>

## Description
<a name="SDB_API_ListDomains_Description"></a>

The `ListDomains` operation lists all domains associated with the Access Key ID. It returns domain names up to the limit set by `MaxNumberOfDomains`. A `NextToken` is returned if there are more than `MaxNumberOfDomains` domains. Calling `ListDomains` successive times with the `NextToken` returns up to `MaxNumberOfDomains` more domain names each time.

## Request Parameters
<a name="SDB_API_ListDomains_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  MaxNumberOfDomains  |   The maximum number of domain names you want returned.   Type: String   The range is 1 to 100.   The default setting is 100.   |  No  | 
|  NextToken  |  String that tells Amazon SimpleDB where to start the next list of domain names.  |  No  | 

## Response Elements
<a name="SDB_API_ListDomains_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  DomainName  |  Domain names that match the expression.  | 
|  NextToken  |  An opaque token indicating that there are more than MaxNumberOfDomains domains still available.  | 

## Special Errors
<a name="SDB_API_ListDomains_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter MaxNumberOfDomains is invalid. MaxNumberOfDomains must be between 1 and 100. | 
|  InvalidNextToken  |  The specified next token is not valid. | 

## Examples
<a name="SDB_API_ListDomains_Examples"></a>

### Sample Request
<a name="SDB_API_ListDomains_Examples_Request"></a>

```
https://sdb.amazonaws.com/
?Action=ListDomains
&AWSAccessKeyId=[valid access key id]
&MaxNumberOfDomains=2
&NextToken=[valid next token]
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A02%3A19-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_ListDomains_Examples_Response"></a>

```
<ListDomainsResponse>
  <ListDomainsResult>
    <DomainName>Domain1-200706011651</DomainName>
    <DomainName>Domain2-200706011652</DomainName>
    <NextToken>TWV0ZXJpbmdUZXN0RG9tYWluMS0yMDA3MDYwMTE2NTY=</NextToken>
  </ListDomainsResult>
  <ResponseMetadata>
    <RequestId>eb13162f-1b95-4511-8b12-489b86acfd28</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</ListDomainsResponse>
```

## Related Actions
<a name="SDB_API_ListDomains_Related_Actions"></a>
+  [CreateDomain](SDB_API_CreateDomain.md) 
+  [DeleteDomain](SDB_API_DeleteDomain.md) 

# ListExports
<a name="SDB_API_ListExports"></a>

## Description
<a name="SDB_API_ListExports_Description"></a>

Lists all exports created in an AWS account. Results are paginated and can be filtered by domain name. Returns exports created within the past 3 months.

## Request Parameters
<a name="SDB_API_ListExports_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  domainName  |  Filter exports by domain name. If not specified, returns exports for all domains. Type: String  |  No  | 
|  maxResults  |  The maximum number of exports to return in a single call. Type: Integer  |  No  | 
|  nextToken  |  The pagination token from a previous ListExports response. Use this to retrieve the next page of results. Type: String  |  No  | 

## Response Elements
<a name="SDB_API_ListExports_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  exportSummaries  | A list of export summaries. | 
|  exportSummaries[].exportArn  | The unique Amazon Resource Name (ARN) of the export. | 
|  exportSummaries[].exportStatus  | The current state of the export. Valid values: PENDING \$1 IN\$1PROGRESS \$1 SUCCEEDED \$1 FAILED | 
|  exportSummaries[].domainName  | The name of the Amazon SimpleDB domain. | 
|  nextToken  | The token to use for retrieving the next page of results. Present only if more results are available. | 

## Special Errors
<a name="SDB_API_ListExports_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  InvalidParameterValue  | One or more parameter values are invalid. | 

## Examples
<a name="SDB_API_ListExports_Examples"></a>

**Note**  
The new Export APIs don't support sending requests using `query parameters`. This is shown in the following code example.

```
import software.amazon.awssdk.services.simpledbv2.SimpleDbV2Client;
import software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest;
import software.amazon.awssdk.services.simpledbv2.model.ListExportsResponse;
import software.amazon.awssdk.services.simpledbv2.model.ExportSummary;
import software.amazon.awssdk.services.simpledbv2.model.SimpleDbV2Exception;
import software.amazon.awssdk.regions.Region;

public class SimpleDBListExportsExample {

    private SimpleDbV2Client simpleDbClient;

    public SimpleDBListExportsExample(Region region) {
        this.simpleDbClient = SimpleDbV2Client.builder()
            .region(region)
            .build();
    }

    /**
     * Lists all exports in the account.
     *
     * @param domainName optional domain name to filter exports (can be null)
     * @param maxResults optional maximum number of results to return (can be null)
     * @param nextToken optional pagination token from previous response (can be null)
     * @return the list exports response
     * @throws SimpleDbV2Exception if the operation fails
     */
    public ListExportsResponse listExports(String domainName, Integer maxResults, String nextToken) {
        try {
            ListExportsRequest.Builder requestBuilder = ListExportsRequest.builder();

            if (domainName != null && !domainName.isEmpty()) {
                requestBuilder.domainName(domainName);
            }
            if (maxResults != null) {
                requestBuilder.maxResults(maxResults);
            }
            if (nextToken != null && !nextToken.isEmpty()) {
                requestBuilder.nextToken(nextToken);
            }

            ListExportsRequest request = requestBuilder.build();
            ListExportsResponse response = simpleDbClient.listExports(request);

            System.out.println("Exports found: " + response.exportSummaries().size());
            for (ExportSummary summary : response.exportSummaries()) {
                System.out.println("Export ARN: " + summary.exportArn());
                System.out.println("Status: " + summary.exportStatus());
                System.out.println("Domain: " + summary.domainName());
                System.out.println("---");
            }

            if (response.nextToken() != null) {
                System.out.println("More results available. Next token: " + response.nextToken());
            }

            return response;

        } catch (SimpleDbV2Exception e) {
            System.err.println("Error Code: " + e.awsErrorDetails().errorCode());
            System.err.println("Error Message: " + e.awsErrorDetails().errorMessage());
            System.err.println("HTTP Status Code: " + e.statusCode());
            throw e;
        }
    }
}
```

## Related Actions
<a name="SDB_API_ListExports_Related_Actions"></a>
+  [StartDomainExport](SDB_API_StartDomainExport.md) 
+  [GetExport](SDB_API_GetExport.md) 

# PutAttributes
<a name="SDB_API_PutAttributes"></a>

## Description
<a name="SDB_API_PutAttributes_Description"></a>

The `PutAttributes` operation creates or replaces attributes in an item. You specify new attributes using a combination of the `Attribute.X.Name` and `Attribute.X.Value` parameters. You specify the first attribute by the parameters `Attribute.1.Name` and `Attribute.1.Value`, the second attribute by the parameters `Attribute.2.Name` and `Attribute.2.Value`, and so on. 

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 `Attribute.X.Name` and `Attribute.X.Value` are the same.

Optionally, the requester can supply the `Replace` parameter for each individual attribute. Setting this value to `true` causes the new attribute value to replace the existing attribute value(s). For example, if an item has the attributes `{ 'a', '1' }`, `{ 'b', '2'}` and `{ 'b', '3' }` and the requester calls `PutAttributes` using the attributes `{ 'b', '4' }` with the `Replace` parameter set to `true`, the final attributes of the item are changed to `{ 'a', '1' }` and `{ 'b', '4' }`, which replaces the previous values of the `'b'` attribute with the new value. 

Conditional updates are useful for ensuring multiple processes do not overwrite each other. To prevent this from occurring, you can specify the expected attribute name and value. If they match, Amazon SimpleDB performs the update. Otherwise, the update does not occur. 

**Note**  
Using `PutAttributes` to replace attribute values that do not exist will *not* result in an error response.  
You cannot specify an empty string as an attribute name.  
When using eventually consistent reads, a [GetAttributes](SDB_API_GetAttributes.md) or [Select](SDB_API_Select.md) request (read) immediately after a [DeleteAttributes](SDB_API_DeleteAttributes.md) or [PutAttributes](#SDB_API_PutAttributes) request (write) might not return the updated data. A consistent read always reflects all writes that received a successful response prior to the read. For more information, see [Consistency](ConsistencySummary.md).  
You can perform the expected conditional check on one attribute per operation.

The following limitations are enforced for this operation:
+ 256 total attribute name-value pairs per item
+ One billion attributes per domain
+ 10 GB of total user data storage per domain

## Request Parameters
<a name="SDB_API_PutAttributes_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  `Attribute.X.Name`  |   The name of the attribute. X can be any positive integer or 0.  Type: String.   |  Yes  | 
|  `Attribute.X.Value`  |   The value of the attribute. X can be any positive integer or 0.  Type: String.   |  Yes  | 
|  ItemName  |   The name of the item.   Type: String.   |  Yes  | 
|  `Attribute.X.Replace`  |   Flag to specify whether to replace the Attribute/Value or to add a new Attribute/Value. X can be any positive integer or 0.  Type: Boolean.   Default: `false`.   |  No  | 
|  DomainName  |   The name of the domain in which to perform the operation.   Type: String   |  Yes  | 
|  `Expected.Name`  |  Name of the attribute to check. Type: String.  Conditions: Must be used with the expected value or expected exists parameter.   When used with the expected value parameter, you specify the value to check.   When expected exists is set to `true` and it is used with the expected value parameter, it performs similarly to just using the expected value parameter. When expected exists is set to `false`, the operation is performed if the expected attribute is not present.   Can only be used with single-valued attributes.   | Conditional | 
|  `Expected.Value`  |  Value of the attribute to check. Type: String.  Conditions: Must be used with the expected name parameter. Can be used with the expected exists parameter if that parameter is set to `true`.   Can only be used with single-valued attributes.  | Conditional | 
|  `Expected.Exists`  |  Flag to test the existence of an attribute while performing conditional updates. Type: Boolean.  Conditions: Must be used with the expected name parameter. When set to `true`, this must be used with the expected value parameter. When set to `false`, this cannot be used with the expected value parameter.   Can only be used with single-valued attributes.  | Conditional | 

## Response Elements
<a name="SDB_API_PutAttributes_CommonResponseElements"></a>

See [Common Response Elements](SDB_API_CommonResponseElements.md).

## Special Errors
<a name="SDB_API_PutAttributes_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  AttributeDoesNotExist  |  Attribute ("\$1 name \$1 ") does not exist  | 
|  ConditionalCheckFailed  |  Conditional check failed. Attribute (" \$1 name \$1 ") value exists.  | 
|  ConditionalCheckFailed  |  Conditional check failed. Attribute ("\$1 name \$1") value is ("\$1 value \$1") but was expected ("\$1 expValue \$1")  | 
|  ExistsAndExpectedValue  |  Expected.Exists=false and Expected.Value cannot be specified together  | 
|  IncompleteExpectedExpression  |  If Expected.Exists=true or unspecified, then Expected.Value has to be specified  | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Expected.Exists is invalid. Expected.Exists should be either true or false.  | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid.The empty string is an illegal attribute name  | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Value is invalid. Value exceeds maximum length of 1024.  | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Name is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Value is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Item is invalid. Value exceeds max length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter Replace is invalid. The Replace flag should be either true or false. | 
|  InvalidWSDLVersion  |  Parameter (" \$1 parameterName \$1") is only supported in WSDL version 2009-04-15 or beyond. Please upgrade to new version  | 
|  MissingParameter  |  The request must contain the parameter Name  | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  MissingParameter  |  The request must contain the parameter ItemName. | 
|  MissingParameter  |  Attribute.Value missing for Attribute.Name='<attribute name>'. | 
|  MissingParameter  |  Attribute.Name missing for Attribute.Value='<attribute value>'. | 
|  MultipleExistsConditions  |  Only one Exists condition can be specified  | 
|  MultipleExpectedNames  |  Only one Expected.Name can be specified  | 
|  MultipleExpectedValues  |  Only one Expected.Value can be specified  | 
|  MultiValuedAttribute  |  Attribute (" \$1 name \$1 ") is multi-valued. Conditional check can only be performed on a single-valued attribute  | 
|  NoSuchDomain  |  The specified domain does not exist. | 
|  NumberItemAttributesExceeded  |  Too many attributes in this item.  | 
|  NumberDomainAttributesExceeded  |  Too many attributes in this domain.  | 
|  NumberDomainBytesExceeded  |  Too many bytes in this domain.  | 

## Examples
<a name="SDB_API_PutAttributes_Examples"></a>

### Sample Request
<a name="SDB_API_PutAttributes_Examples_Request"></a>

The following example uses `PutAttributes` on `Item123`, which has attributes `(Color=Blue)`, `(Size=Med)`, and `(Price=0014.99)` in `MyDomain`. If `Item123` already had the `Price` attribute, this operation would replace the values for that attribute.

```
https://sdb.amazonaws.com/
?Action=PutAttributes
&Attribute.1.Name=Color
&Attribute.1.Value=Blue
&Attribute.2.Name=Size
&Attribute.2.Value=Med
&Attribute.3.Name=Price
&Attribute.3.Value=0014.99
&Attribute.3.Replace=true
&AWSAccessKeyId=[valid access key id]
&DomainName=MyDomain
&ItemName=Item123
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A05-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_PutAttributes_Examples_Response"></a>

```
<PutAttributesResponse>
  <ResponseMetadata>
    <RequestId>490206ce-8292-456c-a00f-61b335eb202b</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</PutAttributesResponse>
```

### Sample Request
<a name="SDB_API_PutAttributes_Examples_Request2"></a>

The following example uses conditional updates to ensure that multiple processes do not overwrite each other’s settings. For example, if two people are buying the `JumboFez` item at the same time, the following ensures that the inventory is decremented correctly.

**Note**  
For more examples of conditional operations, see [Conditionally Putting and Deleting Data](ConditionalPutDelete.md).

```
https://sdb.amazonaws.com/
?Action=PutAttributes
&DomainName=MyDomain
&ItemName=JumboFez
&Attribute.1.Name=quantity
&Attribute.1.Value=14
&Attribute.1.Replace=true
&Expected.Name=quantity
&Expected.Value=15
&AWSAccessKeyId=[valid access key id]
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A05-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_PutAttributes_Examples_Response2"></a>

If the update condition is met, Amazon SimpleDB returns output similar to the following.

```
<PutAttributesResponse>
  <ResponseMetadata>
    <RequestId>490206ce-8292-456c-a00f-61b335eb202b</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</PutAttributesResponse>
```

In this example, one of the servers updates the value and the other receives an error. The server that receives the error resubmits the request specifying a value of 13 and an expected value of 14, ensuring that the inventory is correctly set.

## Related Actions
<a name="SDB_API_PutAttributes_Related_Actions"></a>
+  [DeleteAttributes](SDB_API_DeleteAttributes.md) 
+  [GetAttributes](SDB_API_GetAttributes.md) 

# Select
<a name="SDB_API_Select"></a>

## Description
<a name="SDB_API_Select_Description"></a>

The `Select` operation returns a set of `Attributes` for `ItemNames` that match the select expression. `Select` is similar to the standard SQL `SELECT` statement. 

Amazon SimpleDB keeps multiple copies of each domain. When data is written or updated, all copies of the data are updated. However, it takes time for the update to propagate to all storage locations. The data will eventually be consistent, but an immediate read might not show the change. If eventually consistent reads are not acceptable for your application, use `ConsistentRead`. Although this operation might take longer than a standard read, it always returns the last updated value. 

The total size of the response cannot exceed 1 MB. 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.

For information on how to construct select expressions, see [Using Select to Create Amazon SimpleDB Queries](UsingSelect.md).

**Note**  
Operations that run longer than 5 seconds return a time-out error response or a partial or empty result set. Partial and empty result sets contain a `NextToken` value, which allows you to continue the operation from where it left off.  
Responses larger than one megabyte return a partial result set.  
Your application should *not* excessively retry queries that return `QueryTimeout` errors. If you receive too many `QueryTimeout` errors, reduce the complexity of your query expression.   
When designing your application, keep in mind that Amazon SimpleDB does not guarantee how attributes are ordered in the returned response.  
For information about limits that affect Select, see [Limits](SDBLimits.md).  
The `select` operation is case-sensitive.

## Request Parameters
<a name="SDB_API_Select_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  SelectExpression  |  The expression used to query the domain.  Type: String  Default: None   |  Yes | 
|  ConsistentRead  |  When set to `true`, ensures that the most recent data is returned. For more information, see [Consistency](ConsistencySummary.md) Type: Boolean  Default: `false`   |  No | 
|  NextToken  |  String that tells Amazon SimpleDB where to start the next list of ItemNames.  Type: String  Default: None   |  No | 

## Response Elements
<a name="SDB_API_Select_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  <Item><Name>... </Name></Item>  |  Item names that match the select expression.  | 
|  <Attribute> <Name>...</Name> <Value>...</Value> </Attribute>  |  The name and value of the attribute.  | 
|  NextToken  |  An opaque token indicating that more than MaxNumberOfItems matched, the response size exceeded 1 megabyte, or the execution time exceeded 5 seconds.  | 

## Special Errors
<a name="SDB_API_Select_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter MaxNumberOfItems is invalid. MaxNumberOfItems must be between 1 and 2500. | 
|  InvalidParameterValue  | Value (" \$1 value \$1 ") for parameter AttributeName is invalid. Value exceeds maximum length of 1024. | 
|  InvalidParameterValue  |  Value (" \$1 value \$1 ") for parameter ConsistentRead is invalid. The ConsistentRead flag should be either true or false. | 
|  InvalidNextToken  |  The specified next token is not valid. | 
|  InvalidNumberPredicates  |  Too many predicates in the query expression. | 
|  InvalidNumberValueTests  |  Too many value tests per predicate in the query expression. | 
|  InvalidQueryExpression  |  The specified query expression syntax is not valid. | 
|  InvalidSortExpression  |  The sort attribute must be present in at least one of the predicates, and the predicate cannot contain the is null operator. | 
|  MissingParameter  |  The request must contain the parameter DomainName. | 
|  NoSuchDomain  |  The specified domain does not exist. | 
|  QueryTimeout  |  A timeout occurred when attempting to query domain <domain name> with query expression <query expression>. BoxUsage [<box usage value>]" | 
|  TooManyRequestedAttributes   |  Too many attributes requested.  | 

## Examples
<a name="SDB_API_Select_Examples"></a>

### Sample Request
<a name="SDB_API_Select_Examples_Request"></a>

```
https://sdb.amazonaws.com/
?Action=Select
&AWSAccessKeyId=[valid access key id]
&NextToken=[valid next token]
&SelectExpression=select%20Color%20from%20MyDomain%20where%20Color%20like%20%27Blue%25%27
&ConsistentRead=true
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-01-25T15%3A03%3A09-07%3A00
&Version=2009-04-15
&Signature=[valid signature]
```

### Sample Response
<a name="SDB_API_Select_Examples_Response"></a>

```
<SelectResponse>
  <SelectResult>
    <Item>
      <Name>Item_03</Name>
      <Attribute><Name>Category</Name><Value>Clothes</Value></Attribute>
      <Attribute><Name>Subcategory</Name><Value>Pants</Value></Attribute>
      <Attribute><Name>Name</Name><Value>Sweatpants</Value></Attribute>
      <Attribute><Name>Color</Name><Value>Blue</Value></Attribute>
      <Attribute><Name>Color</Name><Value>Yellow</Value></Attribute>
      <Attribute><Name>Color</Name><Value>Pink</Value></Attribute>
      <Attribute><Name>Size</Name><Value>Large</Value></Attribute>
    </Item>
    <Item>
      <Name>Item_06</Name>
      <Attribute><Name>Category</Name><Value>Motorcycle Parts</Value></Attribute>
      <Attribute><Name>Subcategory</Name><Value>Bodywork</Value></Attribute>
      <Attribute><Name>Name</Name><Value>Fender Eliminator</Value></Attribute>
      <Attribute><Name>Color</Name><Value>Blue</Value></Attribute>
      <Attribute><Name>Make</Name><Value>Yamaha</Value></Attribute>
      <Attribute><Name>Model</Name><Value>R1</Value></Attribute>
    </Item>
  </SelectResult>
  <ResponseMetadata>
    <RequestId>b1e8f1f7-42e9-494c-ad09-2674e557526d</RequestId>
    <BoxUsage>0.0000219907</BoxUsage>
  </ResponseMetadata>
</SelectResponse>
```

# StartDomainExport
<a name="SDB_API_StartDomainExport"></a>

## Description
<a name="SDB_API_StartDomainExport_Description"></a>

Initiates an export of data from an Amazon SimpleDB domain to an Amazon S3 bucket. The export process runs in the background and does not affect the performance of your active database. The exported data is stored in standard JSON format.

You can optionally encrypt the exported data in Amazon S3 by providing a customer managed AWS KMS key, or use the default encryption. The KMS key only encrypts the exported data artifacts in Amazon S3, not the Amazon S3 bucket or Amazon SimpleDB internal data storage.

**Note**  
If the export fails mid-process, no automatic cleanup occurs. Partial data may remain in the Amazon S3 bucket and must be manually removed.

## Request Parameters
<a name="SDB_API_StartDomainExport_RequestParameters"></a>


|  Name  |  Description  |  Required | 
| --- | --- | --- | 
|  clientToken  |  A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon SimpleDB ignores the request, but does not return an error. Type: String  |  Yes  | 
|  domainName  |  The name of the Amazon SimpleDB domain to export. Type: String  |  Yes  | 
|  s3Bucket  |  The name of the Amazon S3 bucket where the exported data will be stored. Type: String  |  Yes  | 
|  s3KeyPrefix  |  The prefix for Amazon S3 object keys of the export artifacts. If specified, data is written to `s3KeyPrefix/AWSSimpleDB/<exportId>/<domainName>/`. Type: String  |  No  | 
|  s3BucketOwner  |  The AWS account ID that owns the Amazon S3 bucket. Required for cross-account exports. Type: String  |  No  | 
|  s3SseAlgorithm  |  The server-side encryption algorithm to use for the exported data in Amazon S3. Type: String Valid values: `AES256` \$1 `KMS`  |  No  | 
|  s3SseKmsKeyId  |  The AWS KMS key ID to use for encryption. Required when `s3SseAlgorithm` is set to `KMS` and using a customer managed key. Type: String  |  No  | 

## Response Elements
<a name="SDB_API_StartDomainExport_ResponseElements"></a>


|  Name  |  Description  | 
| --- | --- | 
|  clientToken  | The client token provided in the request. | 
|  exportArn  | The unique Amazon Resource Name (ARN) for the export. | 
|  requestedAt  | The timestamp when the export was requested. | 

## Special Errors
<a name="SDB_API_StartDomainExport_SpecialErrors"></a>


|  Error  |  Description  | 
| --- | --- | 
|  MissingParameter  | The request must contain the required parameters. | 
|  NoSuchDomain  | The specified domain does not exist. | 
|  InvalidParameterValue  | One or more parameter values are invalid. | 

## Examples
<a name="SDB_API_StartDomainExport_Examples"></a>

**Note**  
The new Export APIs don't support sending requests using `query parameters`. This is shown in the following code example.

```
import software.amazon.awssdk.services.simpledbv2.SimpleDbV2Client;
import software.amazon.awssdk.services.simpledbv2.model.StartDomainExportRequest;
import software.amazon.awssdk.services.simpledbv2.model.StartDomainExportResponse;
import software.amazon.awssdk.services.simpledbv2.model.SimpleDbV2Exception;
import software.amazon.awssdk.regions.Region;

public class SimpleDBDomainExportExample {
    
    private SimpleDbV2Client simpleDbClient;
    
    public SimpleDBDomainExportExample(Region region) {
        this.simpleDbClient = SimpleDbV2Client.builder()
            .region(region)
            .build();
    }
    
    /**
     * Starts a domain export to S3 bucket.
     *
     * @param domainName the name of the SimpleDB domain to export
     * @param s3BucketName the S3 bucket name where export will be stored
     * @param s3BucketOwner the AWS account ID that owns the S3 bucket
     * @return the export ARN
     * @throws SimpleDbV2Exception if the export operation fails
     */
    public String startDomainExport(String domainName, String s3BucketName, String s3BucketOwner) {
        try {
            StartDomainExportRequest request = StartDomainExportRequest.builder()
                .domainName(domainName)
                .s3Bucket(s3BucketName)
                .s3BucketOwner(s3BucketOwner)
                .build();
            
            StartDomainExportResponse response = simpleDbClient.startDomainExport(request);
        
            System.out.println("Export ARN: " + response.exportArn());
            System.out.println("Requested At: " + response.requestedAt());
            
            return response.exportArn();
            
        } catch (SimpleDbV2Exception e) {
            System.err.println("Error Code: " + e.awsErrorDetails().errorCode());
            System.err.println("Error Message: " + e.awsErrorDetails().errorMessage());
            System.err.println("HTTP Status Code: " + e.statusCode());
            throw e;
        }
    }
}
```

## Related Actions
<a name="SDB_API_StartDomainExport_Related_Actions"></a>
+  [GetExport](SDB_API_GetExport.md) 
+  [ListExports](SDB_API_ListExports.md) 