-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum LegalHold extends Enum<LegalHold>
S3 Legal Holds
With Object Lock you can also place a legal hold on an object version. Like a retention period, a legal hold prevents an object version from being overwritten or deleted. However, a legal hold doesn't have an associated retention period and remains in effect until removed. Legal holds can be freely placed and removed by any user who has the
s3:PutObjectLegalHoldpermission.Legal holds are independent of retention periods. As long as the bucket that contains the object has Object Lock enabled, you can place and remove legal holds regardless of whether the specified object version has a retention period set. Placing a legal hold on an object version doesn't affect the retention mode or retention period for that object version.
For example, suppose that you place a legal hold on an object version while the object version is also protected by a retention period. If the retention period expires, the object doesn't lose its WORM protection. Rather, the legal hold continues to protect the object until an authorized user explicitly removes it. Similarly, if you remove a legal hold while an object version has a retention period in effect, the object version remains protected until the retention period expires.
To use Object Lock, you must enable it for a bucket. You can also optionally configure a default retention mode and period that applies to new objects that are placed in the bucket.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classLegalHold.Companion
-
Method Summary
Modifier and Type Method Description StringtoString()final LegalHoldvalueOf(String value)Returns the enum constant of this type with the specified name. final Array<LegalHold>values()Returns an array containing the constants of this enum type, in the order they're declared. final BooleangetAsBool()-
-
Method Detail
-
valueOf
final LegalHold valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<LegalHold> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
-
-
-