Skip to content

Commit

Permalink
Update iam_modify_policy_add_role.py
Browse files Browse the repository at this point in the history
member -> principal
  • Loading branch information
melaniedejong authored Dec 20, 2024
1 parent 0489a1a commit af9c528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iam/cloud-client/snippets/iam_modify_policy_add_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@


# [START iam_modify_policy_add_role]
def modify_policy_add_role(policy: dict, role: str, member: str) -> dict:
def modify_policy_add_role(policy: dict, role: str, principal: str) -> dict:
"""Adds a new role binding to a policy."""

binding = {"role": role, "members": [member]}
binding = {"role": role, "members": [principal]}
policy["bindings"].append(binding)
print(policy)
return policy
Expand Down

0 comments on commit af9c528

Please sign in to comment.