class Google::Apis::StorageV1::Bucket::RetentionPolicy
The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage. buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.
Attributes
Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. Corresponds to the JSON property `effectiveTime` @return [DateTime]
Once locked, an object retention policy cannot be modified. Corresponds to the JSON property `isLocked` @return [Boolean]
Once locked, an object retention policy cannot be modified. Corresponds to the JSON property `isLocked` @return [Boolean]
The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. Corresponds to the JSON property `retentionPeriod` @return [Fixnum]
Public Class Methods
# File lib/google/apis/storage_v1/classes.rb, line 672 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/storage_v1/classes.rb, line 677 def update!(**args) @effective_time = args[:effective_time] if args.key?(:effective_time) @is_locked = args[:is_locked] if args.key?(:is_locked) @retention_period = args[:retention_period] if args.key?(:retention_period) end