Delete Markers

Last updated: 2020-06-12 10:31:14


    A delete marker is used to mark a versioned object as “deleted” in COS. It has an object key and version ID just like an object, but with the following differences:

    • Its content is empty.
    • It does not have ACL value.
    • To GET a delete marker will return a 404 error.
    • The only operation you can use on a delete marker is DELETE, and only the root account can issue such a request.

    Deleting a Delete Marker

    To permanently delete a delete marker, specify its version ID in a DELETE Object versionId request. If you use a DELETE request to delete a delete marker without specifying its version ID, COS will not delete the delete marker, but instead, insert another delete marker.

    The following figure shows how a simple DELETE on a delete marker removes nothing, but adds a new delete marker to the bucket.

    In a versioning-enabled bucket, a new delete marker has a unique version ID. Therefore, one object may have multiple delete markers in the same bucket. To delete a delete marker permanently, you must include its version ID in a DELETE Object versionId request.

    The following figure shows how you can permanently delete a delete marker with a DELETE Object versionId request.

    You can delete a delete marker only after the root account grants the DeleteObject permission.

    To permanently remove a delete marker:

    1. Set versionId to the ID of the version of the delete marker you want to remove.
    2. Send a DELETE Object versionId request.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback