6f9eacfd1d5f6ebf961d134f538e7613c0b9fc25,kms/api-client/snippets.py,,get_key_ring_policy,#Any#Any#Any#,278

Before Change


        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]

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

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: GoogleCloudPlatform/python-docs-samples
Commit Name: 1bddafd3102e4e0841d78673581c3ead8f68a7c8
Time: 2019-05-20
Author: amancuso@google.com
File Name: dataproc/submit_job_to_cluster.py
Class Name:
Method Name: list_clusters_with_details


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 14995eb1b0921a5afbfb094993aeb0485f3f4d55
Time: 2019-10-18
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: get_config_versions