-
Notifications
You must be signed in to change notification settings - Fork 93
Storage[docs] : Fix example of Storage#testIamPermissions #433
Copy link
Copy link
Closed
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.documentationImprovements or additions to documentationImprovements or additions to documentation
Description
java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java
Lines 3516 to 3532 in 05cbbda
| * <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")); Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.documentationImprovements or additions to documentationImprovements or additions to documentation