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_IdPathintegeroptionaldataset id
Query parameters
project_idQueryintegerrequiredProject ID
active_iamQueryintegeroptionalActive IAM ID (To access contact person account) Find your Active IAM ID here
locationQuerystringrequiredLocation
Request body
application/json
Retention mode applied to new objects. GOVERNANCE is the only supported mode.
example
GOVERNANCENumber of days a newly uploaded object is retained for, counted from its upload date.
example
30Responses
200Operation accepted.
example
200example
Operation completed successfully412The request was rejected. The message names the reason.
example
412example
Versioning cannot be disabled while object lock is enabled