aristidb / aws

Amazon Web Services for Haskell
BSD 3-Clause "New" or "Revised" License
238 stars 107 forks source link

PutBucket versioning #254

Closed joeyh closed 5 years ago

joeyh commented 5 years ago

aws already supports versioned objects, but it is not able to create a bucket with versioning enabled. https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html is the API for that.

This would involve adding a new field to PutBucket, which could simply be "pbVersioningEnabled :: Bool" and when it's enabled, add the neccessary XML to the request body.

If that seems like a reasonable design, I'll have a go at implementing it.

aristidb commented 5 years ago

Seems reasonable enough. Please have a go.

joeyh commented 5 years ago

I missed that PUT /?versioning only works with an existing bucket; it cannot be used when creating a new bucket.

So, this will need to be part of a new module rather than PutBucket.