Skip to content

ObjectLifecycleRule

An object lifecycle rule. Objects under prefix (or every object, when all_objects is set) on any of branches are expired once their recorded age exceeds expire_after_days. Exactly one of prefix and all_objects must be set.

Properties

Name Type Description Notes
id str Identifier of the rule, unique within the repository. Lowercase alphanumeric characters and hyphens only.
branches List[str] Exact names of the branches the rule applies to. No wildcards.
prefix str Literal key prefix the rule matches. Required unless `all_objects` is set. [optional]
all_objects bool Opt in to a repository-wide rule matching every object. When set, `prefix` must be omitted. An omitted `prefix` on its own does not mean \"all objects\". [optional] [default to False]
expire_after_days int Days since the object's last modification time as recorded in lakeFS, after which the object is expired.
description str [optional]

Example

from lakefs_enterprise_sdk.models.object_lifecycle_rule import ObjectLifecycleRule

# TODO update the JSON string below
json = "{}"
# create an instance of ObjectLifecycleRule from a JSON string
object_lifecycle_rule_instance = ObjectLifecycleRule.from_json(json)
# print the JSON string representation of the object
print ObjectLifecycleRule.to_json()

# convert the object into a dict
object_lifecycle_rule_dict = object_lifecycle_rule_instance.to_dict()
# create an instance of ObjectLifecycleRule from a dict
object_lifecycle_rule_form_dict = object_lifecycle_rule.from_dict(object_lifecycle_rule_dict)