-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add IAM doc snippets #1609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IAM doc snippets #1609
Conversation
Add IAM service account keys snippets
Add IAM quickstart
Add IAM service account snippets
.gitignore
Outdated
@@ -20,3 +20,5 @@ secrets.tar | |||
junit.xml | |||
credentials.dat | |||
.nox | |||
env/ | |||
.vscode/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please add final CR
iam/api-client/grantable_roles.py
Outdated
|
||
# [START iam_view_grantable_roles] | ||
def view_grantable_roles(full_resource_name): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please remove the blank lines right after the def: here and elsewhere.
resource = '//cloudresourcemanager.googleapis.com/projects/' + project | ||
grantable_roles.view_grantable_roles(resource) | ||
out, _ = capsys.readouterr() | ||
assert 'Title:' in out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: add final CR
iam/api-client/service_accounts.py
Outdated
name=resource, body=service_account).execute() | ||
|
||
print( | ||
'Updated display name for ' + service_account['email'] + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please string formatting (for instance .format()) rather than addition, here and ideally everywhere else, or at least everywhere with more than two components.
.gitignore
Outdated
@@ -20,3 +20,5 @@ secrets.tar | |||
junit.xml | |||
credentials.dat | |||
.nox | |||
env/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid adding env/ to gitignore; I'd recommend putting your env folder one level up so it's not under git as part of development workflow.
Addressed all feedback |
No description provided.