backblaze-labs/b2-action - v0.1.0
    Preparing search index...

    Function retentionCommand

    • 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 if retention-until is set.
      • retention-until: ISO 8601 timestamp (e.g. 2027-01-01T00:00:00Z). Required if retention-mode is compliance or governance.
      • 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-hold must be supplied.

      The target file version is resolved by name (latest visible version).

      Parameters

      Returns Promise<RetentionResult>