Class: Aws::S3::Object::Collection
- Inherits:
-
Resources::Collection
- Object
- Resources::Collection
- Aws::S3::Object::Collection
- Defined in:
- gems/aws-sdk-s3/lib/aws-sdk-s3/object.rb,
gems/aws-sdk-s3/lib/aws-sdk-s3/customizations/object.rb
Batch Actions collapse
-
#batch_delete!(options = {}) ⇒ void
(also: #delete)
Methods inherited from Resources::Collection
Instance Method Details
#batch_delete!(options = {}) ⇒ void Also known as: delete
This method returns an undefined value.
3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 |
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/object.rb', line 3426 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 Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do batch[0].client.delete_objects(params) end end nil end |