Class: Google::Cloud::Kms::V1::CryptoKeyVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb

Overview

A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.

An ENABLED version can be used for cryptographic operations.

For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.

Defined Under Namespace

Modules: CryptoKeyVersionAlgorithm, CryptoKeyVersionState, CryptoKeyVersionView

Instance Attribute Summary collapse

Instance Attribute Details

#algorithmGoogle::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm

Returns Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#attestationGoogle::Cloud::Kms::V1::KeyOperationAttestation

Returns Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

Returns:



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#create_timeGoogle::Protobuf::Timestamp

Returns Output only. The time at which this CryptoKeyVersion was created.

Returns:



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#destroy_event_timeGoogle::Protobuf::Timestamp

Returns Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

Returns:



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#destroy_timeGoogle::Protobuf::Timestamp

Returns Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

Returns:



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#generate_timeGoogle::Protobuf::Timestamp

Returns Output only. The time this CryptoKeyVersion's key material was generated.

Returns:



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#nameString

Returns Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

Returns:

  • (String)

    Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#protection_levelGoogle::Cloud::Kms::V1::ProtectionLevel

Returns Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

Returns:



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end

#stateGoogle::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState

Returns The current state of the CryptoKeyVersion.



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 249

class CryptoKeyVersion
  # The algorithm of the
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
  # parameters must be used for each cryptographic operation.
  #
  # The
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
  # algorithm is usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
  #
  # Algorithms beginning with "RSA_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "RSA_SIGN_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # For PSS, the salt length used is equal to the length of digest
  # algorithm. For example,
  # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
  # will use PSS with a salt length of 256 bits or 32 bytes.
  #
  # Algorithms beginning with "RSA_DECRYPT_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
  #
  # The fields in the name after "RSA_DECRYPT_" correspond to the following
  # parameters: padding algorithm, modulus bit length, and digest algorithm.
  #
  # Algorithms beginning with "EC_SIGN_" are usable with
  # {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
  #
  # The fields in the name after "EC_SIGN_" correspond to the following
  # parameters: elliptic curve, digest algorithm.
  module CryptoKeyVersionAlgorithm
    # Not specified.
    CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0

    # Creates symmetric encryption keys.
    GOOGLE_SYMMETRIC_ENCRYPTION = 1

    # RSASSA-PSS 2048 bit key with a SHA256 digest.
    RSA_SIGN_PSS_2048_SHA256 = 2

    # RSASSA-PSS 3072 bit key with a SHA256 digest.
    RSA_SIGN_PSS_3072_SHA256 = 3

    # RSASSA-PSS 4096 bit key with a SHA256 digest.
    RSA_SIGN_PSS_4096_SHA256 = 4

    # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_2048_SHA256 = 5

    # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_3072_SHA256 = 6

    # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
    RSA_SIGN_PKCS1_4096_SHA256 = 7

    # RSAES-OAEP 2048 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_2048_SHA256 = 8

    # RSAES-OAEP 3072 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_3072_SHA256 = 9

    # RSAES-OAEP 4096 bit key with a SHA256 digest.
    RSA_DECRYPT_OAEP_4096_SHA256 = 10

    # ECDSA on the NIST P-256 curve with a SHA256 digest.
    EC_SIGN_P256_SHA256 = 12

    # ECDSA on the NIST P-384 curve with a SHA384 digest.
    EC_SIGN_P384_SHA384 = 13
  end

  # The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion},
  # indicating if it can be used.
  module CryptoKeyVersionState
    # Not specified.
    CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0

    # This version is still being generated. It may not be used, enabled,
    # disabled, or destroyed yet. Cloud KMS will automatically mark this
    # version
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # as soon as the version is ready.
    PENDING_GENERATION = 5

    # This version may be used for cryptographic operations.
    ENABLED = 1

    # This version may not be used, but the key material is still available,
    # and the version can be placed back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED}
    # state.
    DISABLED = 2

    # This version is destroyed, and the key material is no longer stored.
    # A version may not leave this state once entered.
    DESTROYED = 3

    # This version is scheduled for destruction, and will be destroyed soon.
    # Call
    # {Google::Cloud::Kms::V1::KeyManagementService::RestoreCryptoKeyVersion RestoreCryptoKeyVersion}
    # to put it back into the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED}
    # state.
    DESTROY_SCHEDULED = 4
  end

  # A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s.
  # Controls the level of detail returned for
  # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}
  # and
  # {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
  module CryptoKeyVersionView
    # Default view for each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not
    # include the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
    CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0

    # Provides all fields in each
    # {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
    # {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
    FULL = 1
  end
end