6f9eacfd1d5f6ebf961d134f538e7613c0b9fc25,kms/api-client/snippets.py,,get_key_ring_policy,#Any#Any#Any#,278
Before Change
// 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"]:
After Change
// Print results
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]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 6f9eacfd1d5f6ebf961d134f538e7613c0b9fc25
Time: 2019-01-07
Author: d.sanche14@gmail.com
File Name: kms/api-client/snippets.py
Class Name:
Method Name: get_key_ring_policy
Project Name: googledatalab/pydatalab
Commit Name: 80e5340dddd58b061b3582f980fc3bc7fc4650b6
Time: 2017-10-13
Author: qimingj@users.noreply.github.com
File Name: google/datalab/contrib/mlworkbench/commands/_ml.py
Class Name:
Method Name: _transform
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 1bddafd3102e4e0841d78673581c3ead8f68a7c8
Time: 2019-05-20
Author: amancuso@google.com
File Name: dataproc/list_clusters.py
Class Name:
Method Name: list_clusters