CloudBox symbolic links

Updated at:

Symbolic links (symlinks) provide shortcuts to frequently used objects in an OSS on CloudBox bucket. After you create a symlink by calling the PutSymlink operation, you can use it to quickly access the target object.

Usage notes

  • PutSymlink does not validate whether the destination object exists, whether its storage class is valid, or whether you have access to it.

  • The ACL of the symlink and the destination object are checked only when operations such as GetObject access the destination object.

  • Request headers prefixed with x-oss-meta- are stored as user metadata of the symlink. Example: x-oss-meta-location. You can specify multiple metadata headers, but total metadata size cannot exceed 8 KB.

  • By default, if an object with the same name exists and you have access permissions, the new object overwrites the existing one. OSS returns 200 OK.

Procedure

Use an Alibaba Cloud SDK

You can create symbolic links by using the OSS SDK for Java, Python, or Go (Java SDK 3.15.0 or later, Python SDK V2 1.1.1 or later, or Go SDK V2 v1.2.1 or later). For OSS on CloudBox, the Python and Go SDKs are called in the same way as they are in public cloud OSS. For information about how to create a client, see SDK support. The following code examples use the Java, Python, and Go SDKs.

Use ossutil

To create a symbolic link by using ossutil, see put-symlink.

Use a REST API

If your program requires a high level of customization, you can send REST API requests directly. To do so, you must write code to calculate the signature. For more information, see PutSymlink.