Updates the Object Lock retention settings for an existing file
Modifies the Object Lock retention settings for an existing file. After enabling file retention for a file in an Object Lock-enabled bucket, any attempts to delete the file or make any changes to it before the end of the retention period will fail.
File retention settings can be configured in either governance or compliance mode. For files protected in governance mode, file retention settings can be deleted or the retention period shortened only by clients with the appropriate application key capability (i.e.,
bypassGovernance). File retention settings for files protected in compliance mode cannot removed by any user, but their retention dates can be extended by clients with appropriate application key capabilities.
This API endpoint can be called using a
GET request by converting the parameters in the request body to query parameters.
An account authorization token, obtained from b2_authorize_account.
The token must have the
The name of the file.
Specifies the file retention settings for Backblaze B2 to use for this file. See Object Lock for details.
Must be specified and set to true if deleting an existing governance mode retention setting or shortening an existing governance mode retention period. See Object Lock for details.
The request succeeded.
The response headers include the Content-Type that was specified when the file was uploaded. They also include the X-Bz-FileName and X-Bz-Content-Sha1 headers, plus X-Bz-Info-* headers for any custom file info that was provided with the upload. The X-Bz-FileName uses percent-encoding, as if it were a URL parameter.
The unique identifier for this version of this file.
The name of this file.
The updated file retention settings.
|400||bad_request||The request had the wrong fields or illegal values, or the bucket is not Object Lock-enabled. The message returned with the error will describe the problem.|
|400||metadata_exceeded||This operation is not allowed because of the current file metadata size. If needed, use b2_copy_file with |
The numeric HTTP status code. Always matches the status in the HTTP response.
A single-identifier code that identifies the error.
A human-readable message, in English, saying what went wrong.
|403||access_denied||The auth token used is valid, but does not authorize this call with these parameters. The capabilities of an auth token are determined by the application key used with b2_authorize_account.|
|403||cap_exceeded||Usage cap exceeded.|
|405||method_not_allowed||This operation is not allowed because the specified file is a "hide marker."|