8000 Update comments for IAM samples (#9512) · suztomo/java-docs-samples@37004b9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 37004b9

Browse files
Update comments for IAM samples (GoogleCloudPlatform#9512)
* Update DeleteServiceAccountKey.java * Update DisableServiceAccountKey.java * Update EnableServiceAccountKey.java * Update GetServiceAccountPolicy.java * Update SetServiceAccountPolicy.java * Update SetServiceAccountPolicy.java * Update Quickstart.java
1 parent e8d2e0b commit 37004b9

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

iam/snippets/src/main/java/DeleteServiceAccountKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void deleteKey(String projectId, String accountName,
4141
//Construct the service account email.
4242
//You can modify the ".iam.gserviceaccount.com" to match the service account name in which
4343
//you want to delete the key.
44-
//See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys?hl=en#deleting
44+
//See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys#deleting
4545

4646
String accountEmail = String.format("%s@%s.iam.gserviceaccount.com", accountName, projectId);
4747

iam/snippets/src/main/java/DisableServiceAccountKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void disableServiceAccountKey(String projectId,
3737
// Construct the service account email.
3838
// You can modify the ".iam.gserviceaccount.com" to match the service account name in which
3939
// you want to disable the key.
40-
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys?hl=en#disabling
40+
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys#disabling
4141
String email = String.format("%s@%s.iam.gserviceaccount.com", accountName, projectId);
4242
String name = String.format("projects/%s/serviceAccounts/%s/keys/%s", projectId, email, key);
4343

iam/snippets/src/main/java/EnableServiceAccountKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void enableServiceAccountKey(String projectId,
3737
// Construct the service account email.
3838
// You can modify the ".iam.gserviceaccount.com" to match the service account name in which
3939
// you want to enable the key.
40-
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys?hl=en#enabling
40+
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys#enabling
4141
String email = String.format("%s@%s.iam.gserviceaccount.com", accountName, projectId);
4242
String name = String.format("projects/%s/serviceAccounts/%s/keys/%s", projectId, email, key);
4343

iam/snippets/src/main/java/GetServiceAccountPolicy.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ public static void main(String[] args) throws IOException {
3535
public static Policy getPolicy(String projectId, String serviceAccount) throws IOException {
3636

3737
// Construct the service account email.
38-
// You can modify the ".iam.gserviceaccount.com" to match the service account name in which
39-
// you want to delete the key.
40-
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys?hl=en#deleting
41-
38+
// You can modify the ".iam.gserviceaccount.com" to match the name of the service account
39+
// whose allow policy you want to get.
4240
String serviceAccountEmail = serviceAccount + "@" + projectId + ".iam.gserviceaccount.com";
4341

4442
// Initialize client that will be used to send requests.

iam/snippets/src/main/java/Quickstart.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ public static void quickstart(String projectId, String serviceAccount,
4848
String member, String role) throws IOException {
4949

5050
// Construct the service account email.
51-
// You can modify the ".iam.gserviceaccount.com" to match the service account name in which
52-
// you want to delete the key.
53-
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys?hl=en#deleting
54-
51+
// You can modify the ".iam.gserviceaccount.com" to match the name of the service account
52+
// to use for authentication.
5553
serviceAccount = serviceAccount + "@" + projectId + ".iam.gserviceaccount.com";
5654

5755
// Initialize client that will be used to send requests.

iam/snippets/src/main/java/SetServiceAccountPolicy.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ public static Policy setServiceAccountPolicy(Policy policy, String projectId,
4141
String serviceAccount) throws IOException {
4242

4343
// Construct the service account email.
44-
// You can modify the ".iam.gserviceaccount.com" to match the service account name in which
45-
// you want to delete the key.
46-
// See, https://cloud.google.com/iam/docs/creating-managing-service-account-keys?hl=en#deleting
47-
44+
// You can modify the ".iam.gserviceaccount.com" to match the name of the service account
45+
// whose allow policy you want to set.
4846
String accountEmail = String.format("%s@%s.iam.gserviceaccount.com", serviceAccount, projectId);
4947

5048
// Initialize client that will be used to send requests.

0 commit comments

Comments
 (0)
0