google-cloud-dotnet icon indicating copy to clipboard operation
google-cloud-dotnet copied to clipboard

storage: support object retention feature

Open JesseLovelace opened this issue 1 year ago • 1 comments

Please implement the object retention feature. The following operations must be supported:

  • Create a bucket with object retention enabled by using the enableObjectRetention bucket create boolean option at bucket create time
  • Get the object retention enabled status of a bucket
  • Create an object with retention enabled (on an retention enabled bucket) by populating the retention object at object create time (retention object has the fields mode which can be Unlocked or Locked, and retainUntilTime which is a timestamp)
  • Update retention for an existing object with a patch operation, by passing the overrideUnlockedRetention boolean patch option
  • Get the retention policy of an object
  • Remove retention for an existing object the same way as above

Details in go/gcs-object-retention-client-request

You can use the java implementation as a reference.

The kokoro test project should be allowlisted shortly, let me know if you need access to an allowlisted project for your own testing.

We're aiming to get this in by the November code freeze, let me know if you need any help.

JesseLovelace avatar Oct 27 '23 20:10 JesseLovelace

Note: For this one we might need to add options to UploadObjectOptions. All other operations should be supported out of the box as we expose the underlying library types.

amanda-tarafa avatar Oct 27 '23 21:10 amanda-tarafa