Class: Aws::Record::Batch
- Inherits:
-
Object
- Object
- Aws::Record::Batch
- Extended by:
- ClientConfiguration
- Defined in:
- lib/aws-record/record/batch.rb
Class Method Summary collapse
-
.write(opts = {}, &block) ⇒ Aws::Record::BatchWrite
Provides a thin wrapper to the Aws::DynamoDB::Client#batch_write_item method.
Methods included from ClientConfiguration
configure_client, dynamodb_client
Class Method Details
.write(opts = {}, &block) ⇒ Aws::Record::BatchWrite
Provides a thin wrapper to the Aws::DynamoDB::Client#batch_write_item method. Up to 25 PutItem
or DeleteItem
operations are supported. A single rquest may write up to 16 MB of data, with each item having a write limit of 400 KB.
Note: this operation does not support dirty attribute handling, nor does it enforce safe write operations (i.e. update vs new record checks).
This call may partially execute write operations. Failed operations are returned as Aws::Record::BatchWrite#unprocessed_items (i.e. the table fails to meet requested write capacity). Any unprocessed items may be retried by calling Aws::Record::BatchWrite#execute! again. You can determine if the request needs to be retried by calling the Aws::Record::BatchWrite#complete? method - which returns true
when all operations have been completed.
Please see Batch Operations and Error Handling in the DynamoDB Developer Guide for more details.
74 75 76 77 78 |
# File 'lib/aws-record/record/batch.rb', line 74 def write(opts = {}, &block) batch = BatchWrite.new(client: _build_client(opts)) block.call(batch) batch.execute! end |