-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: Bucket lock lockRetentionPolicy does not return Bucket Attrs (FR: Storage V2) #1159
Comments
Two questions:
|
Yes, it also surfaces the available response from this RPC.
Yes, per the Discovery Doc it returns a Bucket JSON resource in the response. "lockRetentionPolicy": {
"id": "storage.buckets.lockRetentionPolicy",
"path": "b/{bucket}/lockRetentionPolicy",
"httpMethod": "POST",
"description": "Locks retention policy on a bucket.",
"parameters": {
"bucket": {
"type": "string",
"description": "Name of a bucket.",
"required": true,
"location": "path"
},
"ifMetagenerationMatch": {
"type": "string",
"description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.",
"required": true,
"format": "int64",
"location": "query"
},
"userProject": {
"type": "string",
"description": "The project to be billed for this request. Required for Requester Pays buckets.",
"location": "query"
}
},
"parameterOrder": [
"bucket",
"ifMetagenerationMatch"
],
"response": {
"$ref": "Bucket"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_write"
]
}, |
We can't make breaking changes to a stable package. We could either (1) write a new function, if you think it's worth it, or (2) make this an FR for v2 of the storage client. |
Thanks both, let's mark it as FR for v2. Current implementation doesn't block developers. |
Hello @frankyn, I see this is marked as feature request for the v2 version of the storage client. Unless am mistaken but we aren't going to be working on that anytime soon, can this issue then be closed or perhaps documented elsewhere as a feature request or do we keep it open for the v2 wishlist, whenever v2 is worked on? |
We may want to fix it if that's the case. I haven't heard any plans about v2 either. Is it a real thing? |
No, but we have several bugs of this ilk where we talk about things we'd like if we were to start going down a v2 road. |
Hi @jadekler,
At the moment I'm unable to get the Bucket Attrs returns after locking a retention policy and have to perform a subsequent
bucket.Attrs()
request after locking a retention policy. This will help reduce the number of requests made to one instead of two.Existing Behavior:
Expected behavior:
The text was updated successfully, but these errors were encountered: