Skip to content
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[docs] : Fix example of Storage#testIamPermissions #433

Closed
athakor opened this issue Jul 15, 2020 · 0 comments · Fixed by #434
Closed

Storage[docs] : Fix example of Storage#testIamPermissions #433

athakor opened this issue Jul 15, 2020 · 0 comments · Fixed by #434
Assignees
Labels
api: storage Issues related to the googleapis/java-storage API. documentation Improvements or additions to documentation

Comments

@athakor
Copy link
Contributor

athakor commented Jul 15, 2020

* <pre>{@code
* String bucketName = "my-unique-bucket";
* List<Boolean> response =
* storage.testIamPermissions(
* bucket,
* ImmutableList.of("storage.buckets.get", "storage.buckets.getIamPolicy"));
* for (boolean hasPermission : response) {
* // Do something with permission test response
* }
* }</pre>
*
* @param bucket name of the bucket where the testIamPermissions operation takes place
* @param permissions list of permissions to test on the bucket
* @param options extra parameters to apply to this operation
* @throws StorageException upon failure
*/
List<Boolean> testIamPermissions(

Use bucketName instead of bucket same like below way :

List<Boolean> response = 
       storage.testIamPermissions( 
            bucketName, 
           ImmutableList.of("storage.buckets.get", "storage.buckets.getIamPolicy")); 
@athakor athakor added documentation Improvements or additions to documentation type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: storage Issues related to the googleapis/java-storage API. labels Jul 15, 2020
@athakor athakor self-assigned this Jul 15, 2020
@athakor athakor removed the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Jul 15, 2020
@athakor athakor changed the title Fix java doc example of Storage#testIamPermissions Fix example of Storage#testIamPermissions Jul 15, 2020
@athakor athakor changed the title Fix example of Storage#testIamPermissions Storage[docs] : Fix example of Storage#testIamPermissions Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant