Apply Object Lock retention settings and/or a legal hold to a specific file version.
The bucket must have Object Lock enabled. Three inputs drive this command:
retention-mode
compliance
governance
none
retention-until
2027-01-01T00:00:00Z
legal-hold
on
off
bypass-governance
At least one of retention-mode / legal-hold must be supplied.
The target file version is resolved by name (latest visible version).
Apply Object Lock retention settings and/or a legal hold to a specific file version.
The bucket must have Object Lock enabled. Three inputs drive this command:
retention-mode:compliance|governance|none. Required ifretention-untilis set.retention-until: ISO 8601 timestamp (e.g.2027-01-01T00:00:00Z). Required ifretention-modeiscomplianceorgovernance.legal-hold:on|off. Independent of retention; can be set on its own or alongside retention.bypass-governance(bool): allows shortening a governance retention.At least one of
retention-mode/legal-holdmust be supplied.The target file version is resolved by name (latest visible version).