|
* <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"));
java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java
Lines 3516 to 3532 in 05cbbda
Use
bucketNameinstead ofbucketsame like below way :