feat(Storage): Added sample to print bucket default acl#1692
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
saranshdhingra
left a comment
There was a problem hiding this comment.
Small change, otherwise LGTM.
| use Google\Cloud\Storage\StorageClient; | ||
|
|
||
| /** | ||
| * Print all entities and roles for a bucket's Default ACL. |
There was a problem hiding this comment.
| * Print all entities and roles for a bucket's Default ACL. | |
| * Print the default object ACL for a bucket. | |
| * Read more at https://cloud.google.com/storage/docs/access-control/create-manage-lists#defaultobjects |
|
@yash30201 Before merging please contact the Storage owners to understand why that is the case. |
| * | ||
| * @param string $bucketName The name of your Cloud Storage bucket. | ||
| */ | ||
| function print_bucket_default_acl($bucketName) |
There was a problem hiding this comment.
| function print_bucket_default_acl($bucketName) | |
| function print_bucket_default_acl(string $bucketName): void { |
Use this as a reference. Same for the other 2 PRs.
Thanks for pointing this out. I previously did discover this and found that this sample is for adding more roles to the default ACL so that this modified ACL becomes the new default one. It serves a different purpose than just printing the default ACL and isn't related to this sample. Moreover, I think that the error on that C# sample is wrong region tag(as that sample seems to be just doing the work of this sample instead of that one). I also discovered some issues like this in PHP samples, plan to rectify them later. |
Accepted then changed in Accepted reviewer changes commit
Wrote sample and unit test for fetching and printing bucket's default ACL.