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.
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 does not support conditions using Expected.X.Name
, Expected.X.Value
,
or Expected.X.Exists
.
The following limitations are enforced for this operation:
- 1 MB request size
- 25 item limit per BatchDeleteAttributes operation
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the domain in which the attributes are being deleted. |
|
|
Required |
Associative array of parameters which are treated as item-key-value and item-key-multivalue pairs (i.e. a key can have one or more values; think tags).
|
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Delete a series of item-key-value pairs.
// Instantiate $sdb = new AmazonSDB(); // Test data $response = $sdb->batch_delete_attributes('example-domain', array( 'item1' => array( 'key1' => 'value1', 'key2' => array( 'value1', 'value2', 'value3', ), 'key3' => array('value1'), ), 'item2' => array( 'key1' => 'value1', 'key2' => array( 'value1', 'value2', 'value3', ), 'key3' => array('value1'), ), 'item3' => array( 'key1' => 'value1', 'key2' => array( 'value1', 'value2', 'value3', ), 'key3' => array('value1'), ), )); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/sdb.class.php | Toggle source view (19 lines) | View on GitHub