Class: Aws::S3::Object::Collection
- Inherits:
-
Resources::Collection
- Object
- Resources::Collection
- Aws::S3::Object::Collection
- Defined in:
- lib/aws-sdk-s3/object.rb
Batch Actions collapse
Instance Method Details
#batch_delete!(options = {}) ⇒ void
This method returns an undefined value.
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 |
# File 'lib/aws-sdk-s3/object.rb', line 1105 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.key } end batch[0].client.delete_objects(params) end nil end |