Skip to content

Commit 3780815

Browse files
test: Change policy member in SetPolicy examples (#1943)
* 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 <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 54762a9 commit 3780815

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ implementation 'com.google.cloud:google-cloud-pubsub'
5959
If you are using Gradle without BOM, add this to your dependencies:
6060

6161
```Groovy
62-
implementation 'com.google.cloud:google-cloud-pubsub:1.127.0'
62+
implementation 'com.google.cloud:google-cloud-pubsub:1.127.1'
6363
```
6464

6565
If you are using SBT, add this to your dependencies:
6666

6767
```Scala
68-
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.127.0"
68+
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.127.1"
6969
```
7070
<!-- {x-version-update-end} -->
7171

@@ -409,7 +409,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
409409
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html
410410
[stability-image]: https://img.shields.io/badge/stability-stable-green
411411
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg
412-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.127.0
412+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.127.1
413413
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
414414
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
415415
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

samples/snippets/src/main/java/pubsub/SetSubscriptionPolicyExample.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ public static void setSubscriptionPolicyExample(String projectId, String subscri
4646

4747
// Create new role -> members binding
4848
Binding binding =
49-
Binding.newBuilder().setRole("roles/pubsub.editor").addMembers("allUsers").build();
49+
Binding.newBuilder()
50+
.setRole("roles/pubsub.editor")
51+
.addMembers("domain:google.com")
52+
.build();
5053

5154
// Add new binding to updated policy
5255
Policy updatedPolicy = Policy.newBuilder(oldPolicy).addBindings(binding).build();

samples/snippets/src/main/java/pubsub/SetTopicPolicyExample.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public static void setTopicPolicyExample(String projectId, String topicId) throw
4444

4545
// Create new role -> members binding
4646
Binding binding =
47-
Binding.newBuilder().setRole("roles/pubsub.editor").addMembers("allUsers").build();
47+
Binding.newBuilder()
48+
.setRole("roles/pubsub.editor")
49+
.addMembers("domain:google.com")
50+
.build();
4851

4952
// Add new binding to updated policy
5053
Policy updatedPolicy = Policy.newBuilder(oldPolicy).addBindings(binding).build();

0 commit comments

Comments
 (0)