Class: Google::Apis::CloudkmsV1::CryptoKeyVersionTemplate

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudkms_v1/classes.rb,
lib/google/apis/cloudkms_v1/representations.rb,
lib/google/apis/cloudkms_v1/representations.rb

Overview

A CryptoKeyVersionTemplate specifies the properties to use when creating a new CryptoKeyVersion, either manually with CreateCryptoKeyVersion or automatically as a result of auto-rotation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CryptoKeyVersionTemplate

Returns a new instance of CryptoKeyVersionTemplate.



834
835
836
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 834

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

Instance Attribute Details

#algorithmString

Required. Algorithm to use when creating a CryptoKeyVersion based on this template. For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT. Corresponds to the JSON property algorithm

Returns:

  • (String)


826
827
828
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 826

def algorithm
  @algorithm
end

#protection_levelString

ProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE. Corresponds to the JSON property protectionLevel

Returns:

  • (String)


832
833
834
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 832

def protection_level
  @protection_level
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



839
840
841
842
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 839

def update!(**args)
  @algorithm = args[:algorithm] if args.key?(:algorithm)
  @protection_level = args[:protection_level] if args.key?(:protection_level)
end