Object Life Cycle Management
    • PDF

    Object Life Cycle Management

    • PDF

    Article Summary

    Available in Classic and VPC.

    This section describes the object life cycle management method that sets objects to be automatically deleted at a desired time. You can set the life cycle using the X-Delete-At or X-Delete-After headers in an object PUT (upload) request or POST request after upload. Even if you request and set the X-Delete-After header, it is converted to X-Delete-At and saved. To unset the lifecycle, use the X-Remove-Delete-At or X-Remove-Delete-After headers.

    NameApplication locationTypeDescription
    X-Delete-AtheaderintegerEnter the deletion time of the object (Unix Epoch timestamp)
    X-Delete-AfterheaderintegerDelete the object after the entered time (seconds)
    Note

    Life cycles can be applied on a per-object basis. If the object to set the life cycle thereof is uploaded to DLO or SLO, you must set the life cycle of the segment object and manifest object respectively.

    Caution

    Objects deleted by life cycle settings cannot be recovered.

    Set object life cycle (PUT)

    An example of setting the life cycle by including the X-Delete-At or X-Delete-After header in the object upload (PUT) request is as follows:

    Syntax

    PUT /v1/AUTH_{project_id}/{container}/{object}
    

    Request examples

    curl -i -X PUT -H "X-Delete-At: 1540520319" -H "X-Auth-Token: $token" -T "/FILE_PATH/OBJECT" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    or

    curl -i -X PUT -H "X-Delete-After: 3600" -H "X-Auth-Token: $token" -T "/FILE_PATH/OBJECT" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    Set object life cycle (POST)

    An example of setting the life cycle by including the X-Delete-At or X-Delete-After header in the object POST request is as follows:

    Syntax

    POST /v1/AUTH_{project_id}/{container}/{object}
    

    Request examples

    curl -i -X POST -H "X-Delete-At: 1540520319" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    or

    curl -i -X POST -H "X-Delete-After: 3600" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    View object life cycle

    Here's an example of how you can view the life cycle set for an object.

    Syntax

    HEAD /v1/AUTH_{project_id}/{container}/{object}
    

    Request examples

    curl -i -X HEAD -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    Response examples

    HTTP/1.1 200 OK
    Content-Length: 4
    X-Delete-At: 1540520319
    Accept-Ranges: bytes
    Last-Modified: Fri, 26 Oct 2018 02:25:30 GMT
    Etag: 098f6bcd4621d373cade4e832627b4f6
    X-Timestamp: 1540520729.75505
    Content-Type: text/html
    X-Trans-Id: txeaa0f1050fcf4cad9ccce-005bd27b8d
    X-Openstack-Request-Id: txeaa0f1050fcf4cad9ccce-005bd27b8d
    Date: Fri, 26 Oct 2018 02:27:25 GMT
    

    Release object life cycle

    You can release the lifecycle using the X-Remove-Delete-At or X-Remove-Delete-After headers. Header values ​​are not checked.
    Here's an example of how you can cancel the life cycle set on an object.

    Syntax

    POST /v1/AUTH_{project_id}/{container}/{object}
    

    Request examples

    curl -i -X POST -H "X-Remove-Delete-At: 1540520319" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    or

    curl -i -X POST -H "X-Remove-Delete-After: 3600" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
    

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.