@@ -29,14 +29,9 @@ def list_keys(project_id):
29
29
hmac_keys = storage_client .list_hmac_keys (project_id = project_id )
30
30
print ('HMAC Keys:' )
31
31
for hmac_key in hmac_keys :
32
- print ('The HMAC key metadata is:' )
33
- print ( 'Key ID: {}' . format ( hmac_key .id ))
32
+ print ('Service Account Email: {}' . format (
33
+ hmac_key .service_account_email ))
34
34
print ('Access ID: {}' .format (hmac_key .access_id ))
35
- print ('Project ID: {}' .format (hmac_key .project ))
36
- print ('State: {}' .format (hmac_key .state ))
37
- print ('Created At: {}' .format (hmac_key .time_created ))
38
- print ('Updated At: {}' .format (hmac_key .updated ))
39
- print ('Etag: {}' .format (hmac_key .etag ))
40
35
# [END storage_list_hmac_keys]
41
36
return hmac_keys
42
37
@@ -55,6 +50,7 @@ def create_key(project_id, service_account_email):
55
50
print ('The base64 encoded secret is {}' .format (secret ))
56
51
print ('Do not miss that secret, there is no API to recover it.' )
57
52
print ('The HMAC key metadata is:' )
53
+ print ('Service Account Email: {}' .format (hmac_key .service_account_email ))
58
54
print ('Key ID: {}' .format (hmac_key .id ))
59
55
print ('Access ID: {}' .format (hmac_key .access_id ))
60
56
print ('Project ID: {}' .format (hmac_key .project ))
@@ -78,6 +74,7 @@ def get_key(access_id, project_id):
78
74
access_id ,
79
75
project_id = project_id )
80
76
print ('The HMAC key metadata is:' )
77
+ print ('Service Account Email: {}' .format (hmac_key .service_account_email ))
81
78
print ('Key ID: {}' .format (hmac_key .id ))
82
79
print ('Access ID: {}' .format (hmac_key .access_id ))
83
80
print ('Project ID: {}' .format (hmac_key .project ))
@@ -103,6 +100,7 @@ def activate_key(access_id, project_id):
103
100
hmac_key .state = 'ACTIVE'
104
101
hmac_key .update ()
105
102
print ('The HMAC key metadata is:' )
103
+ print ('Service Account Email: {}' .format (hmac_key .service_account_email ))
106
104
print ('Key ID: {}' .format (hmac_key .id ))
107
105
print ('Access ID: {}' .format (hmac_key .access_id ))
108
106
print ('Project ID: {}' .format (hmac_key .project ))
@@ -129,6 +127,7 @@ def deactivate_key(access_id, project_id):
129
127
hmac_key .update ()
130
128
print ('The HMAC key is now inactive.' )
131
129
print ('The HMAC key metadata is:' )
130
+ print ('Service Account Email: {}' .format (hmac_key .service_account_email ))
132
131
print ('Key ID: {}' .format (hmac_key .id ))
133
132
print ('Access ID: {}' .format (hmac_key .access_id ))
134
133
print ('Project ID: {}' .format (hmac_key .project ))
0 commit comments