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():
22
22
# Your Google Cloud Platform project ID
23
23
project_id = 'YOUR_PROJECT_ID'
24
24
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'
27
27
28
28
# Instantiates a client
29
29
kms_client = discovery .build ('cloudkms' , 'v1beta1' )
30
30
31
31
# 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 )
33
33
34
34
# Lists key rings
35
35
request = kms_client .projects ().locations ().keyRings ().list (parent = parent )
36
36
response = request .execute ()
37
37
38
- if 'key_rings ' in response and len ( response ['key_rings' ]) :
38
+ if 'keyRings ' in response and response ['keyRings' ] :
39
39
print ('Key rings:' )
40
- for key_ring in response ['key_rings ' ]:
40
+ for key_ring in response ['keyRings ' ]:
41
41
print (key_ring ['name' ])
42
42
else :
43
43
print ('No key rings found.' )
You can’t perform that action at this time.
0 commit comments