Aliyun OSS | 阿里云对象存储 icon

Aliyun OSS | 阿里云对象存储

管理阿里云 OSS 上的 Bucket、文件夹与文件 / Manage Aliyun OSS buckets, folders, and files.

File | 文件 → Copy | 复制

AI-generated

Summary

Copy an object/file within Aliyun OSS from a specified source bucket and key to a target bucket and key, optionally using default buckets from credentials if not provided.

Inputs

  • Source Bucket | 源 Bucket — Name of the source bucket where the original object resides. If left empty, the credential's default bucket is used.
  • Source Key | 源对象 Key (required) — The key (full path identifier) of the object to copy inside the source bucket.
  • Target Bucket | 目标 Bucket — Name of the destination bucket where the object will be copied to. If left empty, the credential's default bucket is used.
  • Target Key | 目标对象 Key (required) — The key (full path identifier) for the copied object in the target bucket.

Output shape

a single JSON object with success status and details about the source and target buckets and keys, plus the ETag of the copied object

The output JSON includes properties: success (boolean), sourceBucket, sourceKey, targetBucket, targetKey, and etag. This confirms the copy operation completed successfully.

Examples

Example 1: Copy object 'images/photo.jpg' from source bucket 'my-source-bucket' to target bucket 'my-target-bucket' with key 'backup/photo.jpg'.

Set 'Source Bucket' to 'my-source-bucket', 'Source Key' to 'images/photo.jpg', 'Target Bucket' to 'my-target-bucket', and 'Target Key' to 'backup/photo.jpg'. When run, the object will be copied within Aliyun OSS as specified.

Links

Discussion