class Google::Apis::CloudkmsV1::CryptoKeyVersion

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.

Attributes

algorithm[RW]

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports. Corresponds to the JSON property `algorithm` @return [String]

attestation[RW]

Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (cloud.google.com/kms/docs/ attest-key). Corresponds to the JSON property `attestation` @return [Google::Apis::CloudkmsV1::KeyOperationAttestation]

create_time[RW]

Output only. The time at which this CryptoKeyVersion was created. Corresponds to the JSON property `createTime` @return [String]

destroy_event_time[RW]

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

destroy_time[RW]

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` @return [String]

external_protection_level_options[RW]

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. Corresponds to the JSON property `externalProtectionLevelOptions` @return [Google::Apis::CloudkmsV1::ExternalProtectionLevelOptions]

generate_time[RW]

Output only. The time this CryptoKeyVersion's key material was generated. Corresponds to the JSON property `generateTime` @return [String]

import_failure_reason[RW]

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED. Corresponds to the JSON property `importFailureReason` @return [String]

import_job[RW]

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` @return [String]

import_time[RW]

Output only. The time at which this CryptoKeyVersion's key material was most recently imported. Corresponds to the JSON property `importTime` @return [String]

name[RW]

Output only. The resource name for this CryptoKeyVersion in the format ` projects//locations//keyRings//cryptoKeys//cryptoKeyVersions/*`. Corresponds to the JSON property `name` @return [String]

protection_level[RW]

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion. Corresponds to the JSON property `protectionLevel` @return [String]

reimport_eligible[RW]

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` @return [Boolean]

reimport_eligible?[RW]

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` @return [Boolean]

state[RW]

The current state of the CryptoKeyVersion. Corresponds to the JSON property `state` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/cloudkms_v1/classes.rb, line 578
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/cloudkms_v1/classes.rb, line 583
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_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)
  @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