• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (Python SDK)
  4. Data Types
  5. Lifecycle Rule of a Bucket

Lifecycle Rule of a Bucket

Namespace

Class

Module

Rule

com.obs.models.rule

Parameter Description

Field

Type

Optional or Mandatory

Description

id

str

Optional when used as a request parameter

Rule ID. It is a 1-255 character string.

prefix

str

Mandatory when used as a request parameter

Object name prefix identifying one or more objects to which the rule applies The value can be empty, indicating that the rule applies to all objects in the bucket.

status

str

Mandatory when used as a request parameter

Whether this rule is enabled. Possible values are:

  • Enabled
  • Disabled

transition

Transition

or

list of Transition

Optional when used as a request parameter

Object transition policy

expiration

Expiration

Optional when used as a request parameter

Expiration time of the object

noncurrentVersionTransition

NoncurrentVersionTransition

or

list of NoncurrentVersionTransition

Optional when used as a request parameter

Transition policy of the noncurrent object version

noncurrentVersionExpiration

NoncurrentVersionExpiration

Optional when used as a request parameter

Expiration time of a noncurrent object version

NOTE:

Transition, expiration, noncurrentVersionTransition, and noncurrentVersionExpiration cannot be all null.