Skip to content

Commit

Permalink
docs: update iam policy sample user to be consistent with other langu…
Browse files Browse the repository at this point in the history
…ages (#3429)

* docs: update iam policy sample user to be consistent with other language samples

* fix format

* 🦉 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>
  • Loading branch information
PhongChuong and gcf-owl-bot[bot] authored Aug 15, 2024
1 parent 16f350c commit 2fc15b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.43.0')
implementation platform('com.google.cloud:libraries-bom:26.44.0')
implementation 'com.google.cloud:google-cloud-bigquery'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public static void createIamPolicy(String datasetName, String tableName) {
Policy policy = bigquery.getIamPolicy(tableId);
policy
.toBuilder()
.addIdentity(Role.of("roles/bigquery.dataViewer"), Identity.allUsers())
.addIdentity(
Role.of("roles/bigquery.dataViewer"),
Identity.user("[email protected]"))
.build();
bigquery.setIamPolicy(tableId, policy);
System.out.println("Iam policy created successfully");
Expand Down

0 comments on commit 2fc15b3

Please sign in to comment.