6f9eacfd1d5f6ebf961d134f538e7613c0b9fc25,kms/api-client/snippets.py,,create_key_ring,#Any#Any#Any#,24

Before Change


    parent = "projects/{}/locations/{}".format(project_id, location_id)

    // Create KeyRing
    request = kms_client.projects().locations().keyRings().create(
        parent=parent, body={}, keyRingId=key_ring_id)
    response = request.execute()

    print("Created KeyRing {}.".format(response["name"]))
// [END kms_create_keyring]

After Change



    // The keyring object template
    keyring_name = client.key_ring_path(project_id, location_id, key_ring_id)
    keyring = {"name": keyring_name}

    // Create a KeyRing
    response = client.create_key_ring(parent, key_ring_id, keyring)

    print("Created KeyRing {}.".format(response.name))
    return response
// [END kms_create_keyring]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: create_key_ring


Project Name: pantsbuild/pants
Commit Name: 4a9fe9d7db5a1ff19e6c6c338cfb57786acf4aa8
Time: 2014-11-21
Author: benjy@foursquare.com
File Name: src/python/pants/base/config.py
Class Name: Config
Method Name: Config_1


Project Name: HyperGAN/HyperGAN
Commit Name: e4fd7cb66ca799fcb11af9ec50ac778186d0a9d7
Time: 2017-06-03
Author: martyn@255bits.com
File Name: tests/discriminators/pyramid_discriminator_test.py
Class Name: PyramidDiscriminatorTest
Method Name: test_create