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.
3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 |
# File 'lib/aws-sdk-s3/object.rb', line 3164 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 |