Class: Google::Apis::CloudkmsV1::CryptoKeyVersion

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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CryptoKeyVersion

Returns a new instance of CryptoKeyVersion



446
447
448
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 446

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)


375
376
377
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 375

def algorithm
  @algorithm
end

#attestationGoogle::Apis::CloudkmsV1::KeyOperationAttestation

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



382
383
384
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 382

def attestation
  @attestation
end

#create_timeString

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

Returns:

  • (String)


387
388
389
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 387

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)


394
395
396
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 394

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)


401
402
403
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 401

def destroy_time
  @destroy_time
end

#generate_timeString

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

Returns:

  • (String)


407
408
409
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 407

def generate_time
  @generate_time
end

#import_failure_reasonString

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

Returns:

  • (String)


414
415
416
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 414

def import_failure_reason
  @import_failure_reason
end

#import_jobString

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

Returns:

  • (String)


421
422
423
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 421

def import_job
  @import_job
end

#import_timeString

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

Returns:

  • (String)


427
428
429
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 427

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)


433
434
435
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 433

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)


439
440
441
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 439

def protection_level
  @protection_level
end

#stateString

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

Returns:

  • (String)


444
445
446
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 444

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



451
452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 451

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)
  @generate_time = args[:generate_time] if args.key?(:generate_time)
  @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)
  @state = args[:state] if args.key?(:state)
end