@@ -25,7 +25,7 @@ def create_keyring(project_id, location, keyring):
2525 """Creates a KeyRing in the given location (e.g. global)."""
2626
2727 # Creates an API client for the KMS API.
28- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
28+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
2929
3030 # The resource name of the location associated with the KeyRing.
3131 parent = 'projects/{}/locations/{}' .format (project_id , location )
@@ -44,7 +44,7 @@ def create_cryptokey(project_id, location, keyring, cryptokey):
4444 """Creates a CryptoKey within a KeyRing in the given location."""
4545
4646 # Creates an API client for the KMS API.
47- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
47+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
4848
4949 # The resource name of the KeyRing associated with the CryptoKey.
5050 parent = 'projects/{}/locations/{}/keyRings/{}' .format (
@@ -68,7 +68,7 @@ def encrypt(project_id, location, keyring, cryptokey, plaintext_file_name,
6868 call to decrypt."""
6969
7070 # Creates an API client for the KMS API.
71- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
71+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
7272
7373 # The resource name of the CryptoKey.
7474 name = 'projects/{}/locations/{}/keyRings/{}/cryptoKeys/{}' .format (
@@ -101,7 +101,7 @@ def decrypt(project_id, location, keyring, cryptokey, encrypted_file_name,
101101 decrpyted_file_name."""
102102
103103 # Creates an API client for the KMS API.
104- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
104+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
105105
106106 # The resource name of the CryptoKey.
107107 name = 'projects/{}/locations/{}/keyRings/{}/cryptoKeys/{}' .format (
@@ -134,7 +134,7 @@ def disable_cryptokey_version(project_id, location, keyring, cryptokey,
134134 KeyRing."""
135135
136136 # Creates an API client for the KMS API.
137- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
137+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
138138
139139 # Construct the resource name of the CryptoKeyVersion.
140140 name = (
@@ -160,7 +160,7 @@ def destroy_cryptokey_version(
160160 KeyRing for destruction 24 hours in the future."""
161161
162162 # Creates an API client for the KMS API.
163- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
163+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
164164
165165 # Construct the resource name of the CryptoKeyVersion.
166166 name = (
@@ -185,7 +185,7 @@ def add_member_to_cryptokey_policy(
185185 (IAM) policy for a given CryptoKey associated with a KeyRing."""
186186
187187 # Creates an API client for the KMS API.
188- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
188+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
189189
190190 # The resource name of the CryptoKey.
191191 parent = 'projects/{}/locations/{}/keyRings/{}/cryptoKeys/{}' .format (
@@ -225,7 +225,7 @@ def get_keyring_policy(project_id, location, keyring):
225225 and prints out roles and the members assigned to those roles."""
226226
227227 # Creates an API client for the KMS API.
228- kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1beta1 ' )
228+ kms_client = googleapiclient .discovery .build ('cloudkms' , 'v1 ' )
229229
230230 # The resource name of the KeyRing.
231231 parent = 'projects/{}/locations/{}/keyRings/{}' .format (
0 commit comments