Class: Google::Apis::KmsinventoryV1::GoogleCloudKmsV1CryptoKeyVersion

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/kmsinventory_v1/classes.rb,
lib/google/apis/kmsinventory_v1/representations.rb,
lib/google/apis/kmsinventory_v1/representations.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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudKmsV1CryptoKeyVersion

Returns a new instance of GoogleCloudKmsV1CryptoKeyVersion.



427
428
429
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 427

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#algorithmString

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports. Corresponds to the JSON property algorithm

Returns:

  • (String)


334
335
336
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 334

def algorithm
  @algorithm
end

#attestationGoogle::Apis::KmsinventoryV1::GoogleCloudKmsV1KeyOperationAttestation

Contains an HSM-generated attestation about a key operation. For more information, see Verifying attestations. Corresponds to the JSON property attestation



341
342
343
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 341

def attestation
  @attestation
end

#create_timeString

Output only. The time at which this CryptoKeyVersion was created. Corresponds to the JSON property createTime

Returns:

  • (String)


346
347
348
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 346

def create_time
  @create_time
end

#destroy_event_timeString

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED. Corresponds to the JSON property destroyEventTime

Returns:

  • (String)


352
353
354
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 352

def destroy_event_time
  @destroy_event_time
end

#destroy_timeString

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED. Corresponds to the JSON property destroyTime

Returns:

  • (String)


358
359
360
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 358

def destroy_time
  @destroy_time
end

#external_destruction_failure_reasonString

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED. Corresponds to the JSON property externalDestructionFailureReason

Returns:

  • (String)


364
365
366
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 364

def external_destruction_failure_reason
  @external_destruction_failure_reason
end

#external_protection_level_optionsGoogle::Apis::KmsinventoryV1::GoogleCloudKmsV1ExternalProtectionLevelOptions

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels. Corresponds to the JSON property externalProtectionLevelOptions



371
372
373
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 371

def external_protection_level_options
  @external_protection_level_options
end

#generate_timeString

Output only. The time this CryptoKeyVersion's key material was generated. Corresponds to the JSON property generateTime

Returns:

  • (String)


376
377
378
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 376

def generate_time
  @generate_time
end

#generation_failure_reasonString

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED. Corresponds to the JSON property generationFailureReason

Returns:

  • (String)


382
383
384
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 382

def generation_failure_reason
  @generation_failure_reason
end

#import_failure_reasonString

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED. Corresponds to the JSON property importFailureReason

Returns:

  • (String)


388
389
390
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 388

def import_failure_reason
  @import_failure_reason
end

#import_jobString

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported. Corresponds to the JSON property importJob

Returns:

  • (String)


394
395
396
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 394

def import_job
  @import_job
end

#import_timeString

Output only. The time at which this CryptoKeyVersion's key material was most recently imported. Corresponds to the JSON property importTime

Returns:

  • (String)


400
401
402
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 400

def import_time
  @import_time
end

#nameString

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

Returns:

  • (String)


406
407
408
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 406

def name
  @name
end

#protection_levelString

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion. Corresponds to the JSON property protectionLevel

Returns:

  • (String)


412
413
414
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 412

def protection_level
  @protection_level
end

#reimport_eligibleBoolean Also known as: reimport_eligible?

Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest. crypto_key_version. Corresponds to the JSON property reimportEligible

Returns:

  • (Boolean)


419
420
421
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 419

def reimport_eligible
  @reimport_eligible
end

#stateString

The current state of the CryptoKeyVersion. Corresponds to the JSON property state

Returns:

  • (String)


425
426
427
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 425

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 432

def update!(**args)
  @algorithm = args[:algorithm] if args.key?(:algorithm)
  @attestation = args[:attestation] if args.key?(:attestation)
  @create_time = args[:create_time] if args.key?(:create_time)
  @destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time)
  @destroy_time = args[:destroy_time] if args.key?(:destroy_time)
  @external_destruction_failure_reason = args[:external_destruction_failure_reason] if args.key?(:external_destruction_failure_reason)
  @external_protection_level_options = args[:external_protection_level_options] if args.key?(:external_protection_level_options)
  @generate_time = args[:generate_time] if args.key?(:generate_time)
  @generation_failure_reason = args[:generation_failure_reason] if args.key?(:generation_failure_reason)
  @import_failure_reason = args[:import_failure_reason] if args.key?(:import_failure_reason)
  @import_job = args[:import_job] if args.key?(:import_job)
  @import_time = args[:import_time] if args.key?(:import_time)
  @name = args[:name] if args.key?(:name)
  @protection_level = args[:protection_level] if args.key?(:protection_level)
  @reimport_eligible = args[:reimport_eligible] if args.key?(:reimport_eligible)
  @state = args[:state] if args.key?(:state)
end