LockDurationDetails

class oci.file_storage.models.LockDurationDetails(**kwargs)

Bases: object

Details for setting a retention date or legal hold.

Attributes

LOCK_MODE_COMPLIANCE A constant which can be used with the lock_mode property of a LockDurationDetails.
LOCK_MODE_GOVERNANCE A constant which can be used with the lock_mode property of a LockDurationDetails.
cool_off_duration Gets the cool_off_duration of this LockDurationDetails.
lock_duration [Required] Gets the lock_duration of this LockDurationDetails.
lock_mode [Required] Gets the lock_mode of this LockDurationDetails.

Methods

__init__(**kwargs) Initializes a new LockDurationDetails object with values from keyword arguments.
LOCK_MODE_COMPLIANCE = 'COMPLIANCE'

A constant which can be used with the lock_mode property of a LockDurationDetails. This constant has a value of “COMPLIANCE”

LOCK_MODE_GOVERNANCE = 'GOVERNANCE'

A constant which can be used with the lock_mode property of a LockDurationDetails. This constant has a value of “GOVERNANCE”

__init__(**kwargs)

Initializes a new LockDurationDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • cool_off_duration (int) – The value to assign to the cool_off_duration property of this LockDurationDetails.
  • lock_duration (int) – The value to assign to the lock_duration property of this LockDurationDetails.
  • lock_mode (str) – The value to assign to the lock_mode property of this LockDurationDetails. Allowed values for this property are: “GOVERNANCE”, “COMPLIANCE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
cool_off_duration

Gets the cool_off_duration of this LockDurationDetails. For snapshots in compliance mode, a cooling-off period (measured in days) begins. During this time, you can still edit or remove the lock. Once this period ends, the snapshot becomes immutable until the specified retention date expires, permanently preventing any deletion or modification. The cool off duration can be set for a minimum of 0 days and a maximum of 365. It defaults to 14 days if not set.

Returns:The cool_off_duration of this LockDurationDetails.
Return type:int
lock_duration

[Required] Gets the lock_duration of this LockDurationDetails. The retention period (measured in days) defines how long a snapshot remains locked, preventing user modifications or deletions. In governance mode this period can be adjusted, but in compliance mode it becomes permanent after a cool-off period. Snapshots can be locked for a minimum of 0 days and a maximum of 36,500 days. A value of 0 days stands for an indefinite retention period and it is used for a legal hold.

Returns:The lock_duration of this LockDurationDetails.
Return type:int
lock_mode

[Required] Gets the lock_mode of this LockDurationDetails. Can be GOVERNANCE or COMPLIANCE. GOVERNANCE MODE: locks snapshots based on either a retention period or a legal hold. COMPLIANCE MODE: the customer can only remove the snapshot during its cooling-off period. Once that time ends, the snapshot becomes immutable; customers cannot delete or modify it until its set retention date passes. After the snapshot is locked, customers can only increase its retention period.

Allowed values for this property are: “GOVERNANCE”, “COMPLIANCE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lock_mode of this LockDurationDetails.
Return type:str