Method: Aws::S3::Object#move_to

Defined in:
lib/aws-sdk-s3/customizations/object.rb

#move_to(target, options = {}) ⇒ void

This method returns an undefined value.

Copies and deletes the current object. The object will only be deleted if the copy operation succeeds.

Parameters:

  • target (S3::Object, String, Hash)

    Where to copy the object data to. ‘target` must be one of the following:

    • Aws::S3::Object

    • Hash - with ‘:bucket` and `:key`

    • String - formatted like ‘“target-bucket-name/target-key”`

See Also:



113
114
115
116
# File 'lib/aws-sdk-s3/customizations/object.rb', line 113

def move_to(target, options = {})
  copy_to(target, options)
  delete
end