Promo Center

50% off for new user

Direct Mail-46% off

Learn More
This topic was translated by AI and is currently in queue for revision by our editors. Alibaba Cloud does not guarantee the accuracy of AI-translated content. Request expedited revision

GetSymlink

Updated at: 2025-02-18 03:29

Invoke the GetSymlink operation to retrieve a symbolic link. You must have read permission for the symbolic link to perform this operation.

Versioning

By default, the GetSymlink operation retrieves the most recent version of the symbolic link. To access a specific version, you can specify the version ID. If the current version is a delete marker, OSS will return a 404 Not Found status and include x-oss-delete-marker = true and x-oss-version-id in the response header. A delete marker contains no data, so the response does not include information about the object the symbolic link points to.

Request syntax

GET /ObjectName?symlink HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

All headers in a DescribeRegions request are common request headers. For more information, see Common request headers.

Response headers

Name

Type

Sample value

Description

Name

Type

Sample value

Description

x-oss-symlink-target

String

example.jpg

The target object to which the symbolic link points.

Examples

  • Sample Request

    GET /link-to-oss.jpg?symlink HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 24 Feb 2012 06:38:30 GMT
    Authorization: OSS qn6q**************:77Dv****************

    Sample Response

    HTTP/1.1 200 OK
    Server: AliyunOSS
    Date: Fri, 24 Feb 2012 06:38:30 GMT
    Last-Modified: Fri, 24 Feb 2012 06:07:48 GMT
    Content-Length: 0
    Connection: keep-alive
    x-oss-request-id: 5650BD72207FB30443962F9A
    x-oss-symlink-target: example.jpg
    ETag: "A797938C31D59EDD08D86188F6D5****"
  • Sample Request for Retrieving a Symbolic Link by Specifying Version ID

    GET /link-to-oss.jpg?symlink&versionId=CAEQNRiBgMClj7qD0BYiIDQ5Y2QyMjc3NGZkODRlMTU5M2VkY2U3MWRiNGRh**** HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Tue, 09 Apr 2019 06:50:48 GMT
    Authorization: OSS qn6q**************:77Dv****************

    Sample Response

    HTTP/1.1 200 OK
    Server: AliyunOSS
    Date: Tue, 09 Apr 2019 06:50:48 GMT
    Last-Modified: Tue, 09 Apr 2019 06:50:48 GMT
    Content-Length: 0
    Connection: keep-alive
    x-oss-version-id: CAEQNRiBgMClj7qD0BYiIDQ5Y2QyMjc3NGZkODRlMTU5M2VkY2U3MWRiNGRh****
    x-oss-request-id: 5CAC40C8B7AEADE01700064D
    x-oss-symlink-target: example.jpg
    ETag: "40CF4D450730DCCD1A78566FAE35****"

SDKs

SDKs compatible with the GetSymlink operation include the following:

Command line tool ossutil

For the ossutil command related to the GetSymlink operation, see get-symlink.

Error codes

Error code

HTTP status code

Description

Error code

HTTP status code

Description

NoSuchKey

404

The specified file does not exist.

NotSymlink

400

The symbolic link does not exist.

  • On this page (1)
  • Versioning
  • Request syntax
  • Request headers
  • Response headers
  • Examples
  • SDKs
  • Command line tool ossutil
  • Error codes
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare