S3 / Client / add_legal_hold
add_legal_hold#
- S3.Client.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 = client.add_legal_hold( Bucket='string', Key='string', RetentionLegalHoldId='string' )
- Parameters:
Bucket (string) – [REQUIRED]
Key (string) – [REQUIRED]
RetentionLegalHoldId (string) – [REQUIRED]
- Returns:
None