b2_update_file_retention
Set or update a file version's retention policy in B2, choosing governance or compliance mode. Extend retain-until dates in compliance, or clear governance policies with bypass.
Instructions
Set or modify the retention policy on a specific file version in B2. Supports governance and compliance retention modes. In compliance mode, the retain-until date can only be extended. Requires the writeFileRetentions capability.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | The B2 file ID of the file to update. | |
| confirm | No | Confirm this irreversible/protection-removing operation. Required when the server destructive policy is 'confirm' (the default). | |
| fileName | Yes | The name of the file (required by the B2 API alongside fileId). | |
| fileRetention | Yes | Retention policy to apply, or { mode: null, retainUntilTimestamp: null } to clear. This is the flat shape B2's write API expects — do NOT include the read-only isClientAuthorizedToRead/value wrapper that b2_get_file_info returns. | |
| bypassGovernance | No | If true, allows overriding governance-mode retention. Requires bypassGovernance capability. |