File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,22 +22,22 @@ def run_quickstart():
2222 # Your Google Cloud Platform project ID
2323 project_id = 'YOUR_PROJECT_ID'
2424
25- # The "global" zone lists all keys. It can be a specific zone if desired .
26- zone = 'global'
25+ # Lists keys in the "global" location .
26+ location = 'global'
2727
2828 # Instantiates a client
2929 kms_client = discovery .build ('cloudkms' , 'v1beta1' )
3030
3131 # The resource name of the location associated with the KeyRings
32- parent = 'projects/{}/locations/{}' .format (project_id , zone )
32+ parent = 'projects/{}/locations/{}' .format (project_id , location )
3333
3434 # Lists key rings
3535 request = kms_client .projects ().locations ().keyRings ().list (parent = parent )
3636 response = request .execute ()
3737
38- if 'key_rings ' in response and len ( response ['key_rings' ]) :
38+ if 'keyRings ' in response and response ['keyRings' ] :
3939 print ('Key rings:' )
40- for key_ring in response ['key_rings ' ]:
40+ for key_ring in response ['keyRings ' ]:
4141 print (key_ring ['name' ])
4242 else :
4343 print ('No key rings found.' )
You can’t perform that action at this time.
0 commit comments