Class: Aws::S3::ObjectVersion::Collection
- Inherits:
-
Resources::Collection
- Object
- Resources::Collection
- Aws::S3::ObjectVersion::Collection
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-s3/object_version.rb,
lib/aws-sdk-s3/customizations/object_version.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.
939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 |
# File 'lib/aws-sdk-s3/object_version.rb', line 939 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 Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do batch[0].client.delete_objects(params) end end nil end |