Skip to content

LifecyclePolicy

A branch lifecycle policy. At least one of max_age or max_inactivity_time must be set; when both are set, a branch must exceed both thresholds to match.

Properties

Name Type Description Notes
id str Stable identifier used in evaluator output, error messages, and applier logs. Optional on PUT; the server assigns one when not provided. When provided, must be unique within the policies list and must not contain whitespace. [optional]
name_patterns List[str] Glob patterns or literal branch names matched against branch names; OR semantics across the list.
max_age int Seconds since branch creation. A branch is a candidate for deletion when its age exceeds this value. [optional]
max_inactivity_time int Seconds since the branch's last write. A branch is a candidate for deletion when its inactivity exceeds this value. [optional]
description str [optional]

Example

from lakefs_enterprise_sdk.models.lifecycle_policy import LifecyclePolicy

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

# convert the object into a dict
lifecycle_policy_dict = lifecycle_policy_instance.to_dict()
# create an instance of LifecyclePolicy from a dict
lifecycle_policy_form_dict = lifecycle_policy.from_dict(lifecycle_policy_dict)