OSS allows you to suspend versioning for a bucket so that no additional versions are generated for the objects in the bucket.

When versioning is suspended, you can still use the version ID to download, copy, or delete previous versions of an object.

Upload objects

When you upload an object to a versioning-suspended bucket, OSS assigns the version ID of null to the object. Each object can have only one null version.

  • When you perform the PutObject operation on an object in a versioning-suspended bucket, OSS automatically assigns the version ID of null to the object.. The following figure shows the process.
  • When an object in a versioning-suspended bucket has version 111111 and you perform the PutObject operation on the object, OSS assigns a null version as the current version to the object. Version 111111 is saved as a previous version. The following figure shows the process.
  • When an object in a versioning-suspended bucket has a null version and you perform the PutObject operation on the object, the previous null version is overwritten.

Download object versions

OSS allows you to download an object of the current or specified version from a versioning-suspended bucket.

Before you use the GetObject request to download an object, note that:
  • By default, the current version of the object is returned if the object version ID is not specified in the request. The following figure shows that the current null version is returned.
  • To download an object of a specified version, specify the object version ID in the GetObject request. The following figure shows that the specified version ID is 222222.

Delete object versions

Before you perform the DeleteObject operation on a versioning-suspended bucket, note that:

  • When the current version ID of an object in a versioning-suspended bucket is not null and you perform the DeleteObject operation on the object, OSS inserts a delete marker into the bucket. The delete marker becomes the current version. The version ID is null. The following figure shows the process.
  • When the current version of an object in a versioning-suspended bucket is null and you perform the DeleteObject operation on the object, OSS inserts a delete marker into the bucket. The delete marker becomes the current version. The version ID is null. OSS ensures that one object has only one null version. In this case, the original version is overwritten.
  • If you specify an object version ID in the DeleteObject request, the object of the specified version is permanently deleted. The following figure shows an example of how to delete version 333333.