Skip to main content
Effective Date — May 7, 2026
As part of the IAM hierarchy simplification, a new format of the TIR APIs is now available. All endpoints that previously included /teams/:team_id segment will now follow a service-centric structure, with project_id now passed as a query parameter instead of a path segment. You can read more about this change

Set Bucket Lock Configuration

Apply a default governance retention to every object uploaded from now on. Existing objects, and objects already under a different policy, are unaffected.

Only available on a bucket created with object lock enabled.

PUT/datasets/{Dataset_Id}/lock/

Path parameters

  • Dataset_IdPathintegeroptional

    dataset id

Query parameters

  • project_idQueryintegerrequired

    Project ID

  • active_iamQueryintegeroptional

    Active IAM ID (To access contact person account) Find your Active IAM ID here

  • locationQuerystringrequired

    Location

Request body

application/json

object
lock_modestringrequiredGOVERNANCE

Retention mode applied to new objects. GOVERNANCE is the only supported mode.

exampleGOVERNANCE
retention_periodintegerrequired

Number of days a newly uploaded object is retained for, counted from its upload date.

example30

Responses

200Operation accepted.
object
codeinteger
example200
dataobject
errorsobject
messagestring
exampleOperation completed successfully
412The request was rejected. The message names the reason.
object
codeinteger
example412
errorsstring
exampleVersioning cannot be disabled while object lock is enabled