Help Center> OBS GO SDK> API Reference> Data Types> Lifecycle Rule of a Bucket
Updated on 2022-02-10 GMT+08:00

Lifecycle Rule of a Bucket

Type Definition

type LifecycleRule struct

Parameter Description

Field

Type

Optional or Mandatory

Description

ID

string

Optional when used as a request parameter

Rule ID. It is a string of 1 to 255 characters.

Prefix

string

Mandatory when used as a request parameter

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

Status

RuleStatusType

Mandatory when used as a request parameter

Whether the rule is enabled

Transitions

[]Transition

Optional when used as a request parameter

List of object transition policies

Expiration

Expiration

Optional when used as a request parameter

Expiration time of the object

NoncurrentVersionTransitions

[]NoncurrentVersionTransition

Optional when used as a request parameter

List of noncurrent object version transition policies

NoncurrentVersionExpiration

NoncurrentVersionExpiration

Optional when used as a request parameter

Expiration time of a noncurrent object version

Transitions, Expiration, NoncurrentVersionTransitions, and NoncurrentVersionExpiration cannot be all null.