ObjectProtection / Action / add_legal_hold
add_legal_hold#
- S3.ObjectProtection.add_legal_hold(**kwargs)#
Add a legal hold on an object. The legal hold identifiers are stored in the object metadata along with the timestamp of when they are POSTed to the object. The presence of any legal hold identifiers prevents the modification or deletion of the object data, even if the retention period has expired. Legal Holds can only be added to objects in a bucket with a protection policy. Otherwise a 400 error will be returned.
See also: AWS API Documentation
Request Syntax
response = object_protection.add_legal_hold( RetentionLegalHoldId='string' )
- Parameters:
RetentionLegalHoldId (string) – [REQUIRED]
- Returns:
None