Updated on 2024-01-16 GMT+08:00

Overview (SDK for Java)

If you have any questions during development, post them on the Issues page of GitHub.

OBS allows you to set lifecycle rules for a bucket to automatically transit the storage class of the objects and delete expired objects, so as to optimize storage and save the space. You can set multiple lifecycle rules based on the prefix. A lifecycle rule must contain:

  • Rule ID, which uniquely identifies the rule
  • Prefix of objects that are under the control of this rule
  • Transition policy of an object of the latest version, which can be specified in either mode:
    1. How many days after the object is created
    2. Transition date
  • Expiration time of an object of the latest version, which can be specified in either mode:
    1. How many days after the object is created
    2. Expiration date
  • Transition policy of a noncurrent object version, which can be specified in the following mode:
    • How many days after an object version becomes a noncurrent one
  • Expiration time of a noncurrent object version, which can be specified in the following mode:
    • How many days after the object becomes a noncurrent object version
  • Identifier specifying whether the setting is effective

For more information, see Lifecycle Management.