Class: Aws::S3::ObjectVersion::Collection
- Inherits:
-
Resources::Collection
- Object
- Resources::Collection
- Aws::S3::ObjectVersion::Collection
- Defined in:
- lib/aws-sdk-s3/object_version.rb
Batch Actions collapse
Instance Method Details
#batch_delete!(options = {}) ⇒ void
This method returns an undefined value.
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'lib/aws-sdk-s3/object_version.rb', line 580 def batch_delete!( = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash() params[:bucket] = batch[0].bucket_name params[:delete] ||= {} params[:delete][:objects] ||= [] batch.each do |item| params[:delete][:objects] << { key: item.object_key, version_id: item.id } end batch[0].client.delete_objects(params) end nil end |