63ea9b2637ce8e478c854b68d8af7ca42e19abcf,iam/api-client/quickstart.py,,quickstart,#,18
Before Change
// If using pylint, disable weak-typing warnings
// pylint: disable=no-member
response = service.roles().list().execute()
roles = response["roles"]
// Process the response
for role in roles:
print("Title: " + role["title"])
print("Name: " + role["name"])
if "description" in role:
print("Description: " + role["description"])
print("")
// [END iam_quickstart]
if __name__ == "__main__":
quickstart()
After Change
modify_policy_add_role(crm_service, project_id, role, member)
// Gets the project"s policy and prints all members with the "Log Writer" role.
policy = get_policy(crm_service, project_id)
binding = next(b for b in policy["bindings"] if b["role"] == role)
print(f"Role: {(binding["role"])}")
print("Members: ")
for m in binding["members"]:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 63ea9b2637ce8e478c854b68d8af7ca42e19abcf
Time: 2020-09-22
Author: 35782177+melaniedejong@users.noreply.github.com
File Name: iam/api-client/quickstart.py
Class Name:
Method Name: quickstart
Project Name: jazzband/django-debug-toolbar
Commit Name: 6768be17c4a9bd151fa90363c559bd15aeb395e7
Time: 2013-10-21
Author: aymeric.augustin@m4x.org
File Name: debug_toolbar/utils/__init__.py
Class Name:
Method Name: omit_path
Project Name: google/language-resources
Commit Name: cb86068c8b304e61d2591cf435bff1fa37fd4100
Time: 2016-06-13
Author: mjansche@google.com
File Name: my/text_to_symbols.py
Class Name:
Method Name: TextToSymbols