Skip to content

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

@athakor

Description

@athakor

* <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")); 

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions