File locks¶
-
class
b2sdk.v1.
LegalHold
[source]¶ Enum holding information about legalHold switch in a file.
-
ON
= 'on'¶ legal hold set to “on”
-
OFF
= 'off'¶ legal hold set to “off”
-
UNSET
= None¶ server default, as for now it is functionally equivalent to OFF
-
UNKNOWN
= 'unknown'¶ the client is not authorized to read legal hold settings
-
-
class
b2sdk.v1.
FileRetentionSetting
[source]¶ Represent file retention settings, i.e. whether the file is retained, in which mode and until when
-
class
b2sdk.v1.
RetentionMode
[source]¶ Enum class representing retention modes set in files and buckets
-
GOVERNANCE
= 'governance'¶ retention settings for files in this mode can be modified by clients with appropriate application key capabilities
-
COMPLIANCE
= 'compliance'¶ retention settings for files in this mode can only be modified by extending the retention dates by clients with appropriate application key capabilities
-
NONE
= None¶ retention not set
-
UNKNOWN
= 'unknown'¶ the client is not authorized to read retention settings
-
-
class
b2sdk.v1.
BucketRetentionSetting
[source]¶ Represent bucket’s default file retention settings, i.e. whether the files should be retained, in which mode and for how long
-
class
b2sdk.v1.
RetentionPeriod
[source]¶ Represent a time period (either in days or in years) that is used as a default for bucket retention
-
KNOWN_UNITS
= ['days', 'years']¶
-
__init__
(years: Optional[int] = None, days: Optional[int] = None)[source]¶ Create a retention period, provide exactly one of: days, years
-
-
class
b2sdk.v1.
FileLockConfiguration
[source]¶ Represent bucket’s file lock configuration, i.e. whether the file lock mechanism is enabled and default file retention
-
b2sdk.v1.
UNKNOWN_BUCKET_RETENTION
¶ Commonly used “unknown” default bucket retention setting
-
b2sdk.v1.
UNKNOWN_FILE_LOCK_CONFIGURATION
¶ Commonly used “unknown” bucket file lock setting
-
b2sdk.v1.
NO_RETENTION_BUCKET_SETTING
¶ Commonly used “no retention” default bucket retention
-
b2sdk.v1.
NO_RETENTION_FILE_SETTING
¶ Commonly used “no retention” file setting
-
b2sdk.v1.
UNKNOWN_FILE_RETENTION_SETTING
¶ Commonly used “unknown” file retention setting