tencent cloud

Feedback

GET Object Retention

Last updated: 2024-02-27 10:15:42

    Function Description

    This interface is used to obtain the object lock mode and retention period.

    Request

    Request Example

    GET /<object-key>?retention HTTP/1.1
    Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
    Date: GMT Date
    Authorization: Auth String
    Note:
    Host: <BucketName-APPID>.cos.<Region>.myqcloud.com. <BucketName-APPID> indicates the storage bucket name suffixed with APPID, such as examplebucket-1250000000. For details, refer to Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions. <Region> indicates the available regions of COS. For details, refer to Regions and Access Endpoints.
    Authorization: Auth String (for details, refer toRequest Signature).

    Request Headers

    This interface only returns common response headers. For details, refer to Common Request Headers.

    Request Body

    The request body is empty.

    Response

    Response Headers

    This interface only returns common response headers. For more information, refer to Common Response Headers.

    Response Body

    <Retention>
    <Mode>COMPLIANCE</Mode>
    <RetainUntilDate>timestamp</RetainUntilDate>
    </Retention>
    The specific data is described as follows:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Retention
    None
    Period.
    Container
    Mode
    Retention
    Object lock mode. Only the enumerated value COMPLIANCE is supported.
    Enum
    RetainUntilDate
    Retention
    Specific to date.
    String Date

    Error Codes

    This interface adheres to unified error responses and error codes. For more details, refer to Error Codes.

    Examples

    Request

    GET /temp.txt?retention HTTP/1.1
    Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
    Authorization: Auth String

    Response

    HTTP/1.1 200 OK
    Content-Type: application/xml
    Content-Length: 87
    Connection: keep-alive
    Date: Fri, 09 Dec 2022 08:35:49 GMT
    Server: tencent-cos
    x-cos-request-id: NjM5MmYzNjVfMjBkMDM4MGJfMWM2ND****
    
    <Retention>
    <Mode>COMPLIANCE</Mode>
    <RetainUntilDate>2022-12-10T08:34:48.000Z</RetainUntilDate>
    </Retention>
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support