From 3780815ebc96a1814fbe8308e0e5265d1b720635 Mon Sep 17 00:00:00 2001 From: Mike Prieto Date: Thu, 7 Mar 2024 12:57:21 -0500 Subject: [PATCH] test: Change policy member in SetPolicy examples (#1943) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: Change policy member in SetTopicPolicyExample * test: Change policy member in SetSubscriptionPolicyExample * style: Format SetTopic/SubscriptionPolicyExample * 🦉 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 --- README.md | 6 +++--- .../src/main/java/pubsub/SetSubscriptionPolicyExample.java | 5 ++++- .../src/main/java/pubsub/SetTopicPolicyExample.java | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 70e7b9caa..b94a1cb89 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,13 @@ implementation 'com.google.cloud:google-cloud-pubsub' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-pubsub:1.127.0' +implementation 'com.google.cloud:google-cloud-pubsub:1.127.1' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.127.0" +libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.127.1" ``` @@ -409,7 +409,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.127.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.127.1 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/samples/snippets/src/main/java/pubsub/SetSubscriptionPolicyExample.java b/samples/snippets/src/main/java/pubsub/SetSubscriptionPolicyExample.java index f0a449de8..f5b19f685 100644 --- a/samples/snippets/src/main/java/pubsub/SetSubscriptionPolicyExample.java +++ b/samples/snippets/src/main/java/pubsub/SetSubscriptionPolicyExample.java @@ -46,7 +46,10 @@ public static void setSubscriptionPolicyExample(String projectId, String subscri // Create new role -> members binding Binding binding = - Binding.newBuilder().setRole("roles/pubsub.editor").addMembers("allUsers").build(); + Binding.newBuilder() + .setRole("roles/pubsub.editor") + .addMembers("domain:google.com") + .build(); // Add new binding to updated policy Policy updatedPolicy = Policy.newBuilder(oldPolicy).addBindings(binding).build(); diff --git a/samples/snippets/src/main/java/pubsub/SetTopicPolicyExample.java b/samples/snippets/src/main/java/pubsub/SetTopicPolicyExample.java index 7e987c218..6a2359e8c 100644 --- a/samples/snippets/src/main/java/pubsub/SetTopicPolicyExample.java +++ b/samples/snippets/src/main/java/pubsub/SetTopicPolicyExample.java @@ -44,7 +44,10 @@ public static void setTopicPolicyExample(String projectId, String topicId) throw // Create new role -> members binding Binding binding = - Binding.newBuilder().setRole("roles/pubsub.editor").addMembers("allUsers").build(); + Binding.newBuilder() + .setRole("roles/pubsub.editor") + .addMembers("domain:google.com") + .build(); // Add new binding to updated policy Policy updatedPolicy = Policy.newBuilder(oldPolicy).addBindings(binding).build();