Class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion

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

Overview

A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. It can be used for cryptographic operations either directly, or via its parent CryptoKey, in which case the server will choose the appropriate version for the operation.

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



390
391
392
# File 'generated/google/apis/cloudkms_v1beta1/classes.rb', line 390

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

Instance Attribute Details

#create_timeString

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

Returns:

  • (String)


370
371
372
# File 'generated/google/apis/cloudkms_v1beta1/classes.rb', line 370

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)


388
389
390
# File 'generated/google/apis/cloudkms_v1beta1/classes.rb', line 388

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)


365
366
367
# File 'generated/google/apis/cloudkms_v1beta1/classes.rb', line 365

def destroy_time
  @destroy_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)


381
382
383
# File 'generated/google/apis/cloudkms_v1beta1/classes.rb', line 381

def name
  @name
end

#stateString

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

Returns:

  • (String)


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

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



395
396
397
398
399
400
401
# File 'generated/google/apis/cloudkms_v1beta1/classes.rb', line 395

def update!(**args)
  @destroy_time = args[:destroy_time] if args.key?(:destroy_time)
  @create_time = args[:create_time] if args.key?(:create_time)
  @state = args[:state] if args.key?(:state)
  @name = args[:name] if args.key?(:name)
  @destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time)
end