Class: Aws::S3::ObjectSummary::Collection
- Inherits:
-
Resources::Collection
- Object
- Resources::Collection
- Aws::S3::ObjectSummary::Collection
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-s3/object_summary.rb,
lib/aws-sdk-s3/customizations/object_summary.rb
Batch Actions collapse
- #batch_delete!(options = {}) ⇒ void (also: #delete)
Instance Method Details
#batch_delete!(options = {}) ⇒ void Also known as: delete
This method returns an undefined value.
2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 |
# File 'lib/aws-sdk-s3/object_summary.rb', line 2886 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 |