project_id, location_id, key_ring_id)
// Get the current IAM policy.
request = kms_client.projects().locations().keyRings().getIamPolicy(
resource=parent)
response = request.execute()
if "bindings" in response.keys():
print("Printing IAM policy for resource {}:".format(parent))
for binding in response["bindings"]:
print("")
print("Role: {}".format(binding["role"]))
print("Members:")
for member in binding["members"]:
print(member)
print("")
After Change
print("Printing IAM policy for resource {}:".format(resource))
for b in policy.bindings:
for m in b.members:
print("Role: {} Member: {}".format(b.role, m))
return policy
// [END kms_get_keyring_policy]