In S3, renaming an object requires copying the object and then deleting the source object. VAST Cluster supports renaming an object using a single copy request which specifies to replace the object with its copy.
The rename operation moves the object with its ACL and metadata.
Renaming Semantics and Directory Management
Source names and destination names may include double slashes and leading slashes, with the following implications in terms of directories and regular objects:
Source Name | Destination Name | Rename Operation |
|---|---|---|
mybucket/a | mybucket/b |
|
mybucket/a/ | mybucket/b |
|
mybucket/a/ | mybucket/b/ |
|
mybucket/a// | mybucket/b// |
|
How to Make a Rename Object Request
To rename an object, include the following header in a CopyObject request:
x-amz-copy-disposition: replace
If this header is included in the request, then:
The optional x-amz-metadata-directive header may not be used to specify that you want to replace object metadata with metadata provided in the request. Only copying object metadata from the source object is allowed.
The following headers are not allowed:
x-amz-aclx-amz-grant-full-control
x-amz-grant-read
x-amz-grant-read-acp
x-amz-grant-write-acp