Uh oh!
There was an error while loading. Please reload this page.
Requester pays expose userProject - #2558
Conversation
…java into requester_pays
andreamlin
commented
Nov 1, 2017
PTAL |
| /** | ||
| * Returns an option for bucket's billing user project. This option is only used by the buckets with | ||
| * 'requester_pays' flag. | ||
| */ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| */ | ||
| List<Boolean> delete(Iterable<BlobId> blobIds); | ||
| /** |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| * | ||
| * <p>Example of getting the ACL entry for a specific user on a bucket. | ||
| * <pre> {@code | ||
| * String bucketName = "my_unique_bucket"; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| return Collections.unmodifiableList(results); | ||
| } | ||
| @Override |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| */ | ||
| RewriteResponse continueRewrite(RewriteResponse previousResponse); | ||
| /** |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| // Test listing a Requester Pays bucket. | ||
| Bucket remoteBucket = storage.get(BUCKET, Storage.BucketGetOption.fields(BucketField.ID)); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| StorageRoles.legacyBucketOwner(), | ||
| (Set<Identity>) newHashSet(projectOwner, projectEditor), | ||
| StorageRoles.legacyBucketReader(), newHashSet(projectViewer)); | ||
| (Set<Identity>) Sets.newHashSet(projectOwner, projectEditor), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
andreamlin
commented
Nov 3, 2017
Addressed all comments. PTAL |
| * String bucketName = "my_unique_bucket"; | ||
| * String userEmail = "google-cloud-java-tests@java-docs-samples-tests.iam.gserviceaccount.com"; | ||
| * Acl acl = storage.getAcl(bucketName, new User(userEmail)); | ||
| * BucketSourceOption userProjectOption = BucketSourceOption.userProject("myProject"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| * | ||
| * @throws StorageException upon failure | ||
| */ | ||
| Acl getAcl(String bucket, Entity entity, BucketSourceOption... options); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| * <pre> {@code | ||
| * String bucketName = "my_unique_bucket"; | ||
| * boolean deleted = storage.deleteAcl(bucketName, User.ofAllAuthenticatedUsers()); | ||
| * BucketSourceOption userProject = BucketSourceOption.userProject("myProject"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| Acl createAcl(String bucket, Acl acl, BucketSourceOption... options); | ||
| /** | ||
| * @see com.google.cloud.storage.Storage#createAcl(String bucket, Acl acl, BucketSourceOption... options) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| try { | ||
| storage.bucketAccessControls().delete(bucket, entity).execute(); | ||
| storage.bucketAccessControls().delete(bucket, entity) | ||
| .setUserProject(Option.USER_PROJECT.getString(options)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
andreamlin
commented
Nov 4, 2017
Replied to all comments. PTAL. |
vam-google
left a comment
There was a problem hiding this comment.
Overall LGTM, with few minor comments. Please address them before pushing (you don't have to request for another LGTM to push your changes).
| Acl updateAcl(String bucket, Acl acl, BucketSourceOption... options); | ||
| /** | ||
| * @see Storage#updateAcl(String, Acl, BucketSourceOption...) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| * // do something with ACL entry | ||
| * } | ||
| * }</pre> | ||
| * |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Expose userProject for the operations - storage.objects.list - storage.bucket.testIamPermissions - storage.bucketAccessControls.delete - storage.bucketAccessControls.get - storage.bucketAccessControls.insert - storage.bucketAccessControls.list - storage.bucketAccessControls.patch - storage.buckets.getIamPolicy - storage.buckets.setIamPolicy
…-info-reports-plugin to v3.6.2 (#2558)
Expose userProject for the operations - storage.objects.list - storage.bucket.testIamPermissions - storage.bucketAccessControls.delete - storage.bucketAccessControls.get - storage.bucketAccessControls.insert - storage.bucketAccessControls.list - storage.bucketAccessControls.patch - storage.buckets.getIamPolicy - storage.buckets.setIamPolicy
…to v2.39.0 (#2558) * chore(deps): update dependency com.google.cloud:google-cloud-storage to v2.39.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Expose userProject for the operations - storage.objects.list - storage.bucket.testIamPermissions - storage.bucketAccessControls.delete - storage.bucketAccessControls.get - storage.bucketAccessControls.insert - storage.bucketAccessControls.list - storage.bucketAccessControls.patch - storage.buckets.getIamPolicy - storage.buckets.setIamPolicy
Expose userProject for the operations