set_legal_hold
Set or lift a legal hold on an object version to block deletion, reversible and stacks with retention.
Instructions
[WRITE][risk=medium] Turn a legal hold on/off. Reversible → prior hold state.
A legal hold blocks deletion with no date attached and is lifted by turning it off — the one WORM control that is reversible by design. It stacks with retention: lifting the hold does not make an object deletable while its retention still runs.
Args: bucket_name: Bucket name (must have object lock enabled). object_name: Object key (from bucket_objects). hold_on: True places the hold, False lifts it. version_id: Specific version; omit for the current version. dry_run: If True, preview (reading the current hold) without changing it. target: MinIO target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| dry_run | No | ||
| hold_on | Yes | ||
| version_id | No | ||
| bucket_name | Yes | ||
| object_name | Yes |