-
Notifications
You must be signed in to change notification settings - Fork 0
api.aws.dynamodb.batchWriteItem@v1
tristanls edited this page Dec 26, 2012
·
1 revision
Batch write item.
Since Version | 1.1.0 | ||
Scope | |||
accepts: | public | responds as: | ~crosstalk |
All parameters are optional, unless otherwise indicated.
awsAccessKeyId | AKIAIOSFODNN7EXAMPLE |
required AWS Access Key Id |
requestItems | { "table-name": [ REQUEST, REQUEST ], "table-name-2": [ ... ] } |
required The request items to process |
region | us-east-1 |
required Region where your DynamoDB is hosted |
secretAccessKey | wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY |
required AWS Secret Access Key |
item | { "attr1": "value1", "attr2": "value2" } |
required The item to put |
key | { "hashKeyElement": "hashKey", "rangeKeyElement" : "rangeKey" } |
required The key of item to delete (rangeKeyElement is optional depending on your table setup) |
responses | { "table-name": { consumedCapacityUnits : 3 }, ... } |
Consumed capacity units for successful requests |
unprocessedItems | { "table-name": [ ITEM, ITEM ], ... } |
Requests that failed. Some of these failures might be because you exceeded the provisioned throughput configured for the table or a transient failure such as a network error |
message | Error message |
Error message |
crosstalk.emit(
'~crosstalk.api.aws.dynamodb.batchWriteItem@v1',
{
awsAccessKeyId : "KEYNAME",
requestItems : {
"my-dynamodb-table": [{
putRequest : {
item : {
hash : "first hash",
range : "0.0.0"
}
}
},{
putRequest : {
item : {
hash : "first hash",
range : "0.0.1"
}
}
},{
...
}]
},
region : "us-east-1",
secretAccessKey : "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY",
},
'~crosstalk',
function ( error, response ) { /* ... */ }
);
{
"responses": {
"my-dynamodb-table": {
"consumedCapacityUnits": 3
}
},
"unprocessedItems": {
"my-dynamodb-table": [{
"putRequest": {
"item": {
"range": "0.0.3",
"hash": "first hash"
}
}
},{
"putRequest": {
"item": {
"range": "0.0.4",
"hash": "first hash"
}
}
}]
}
}
{
"message": "Error message"
}