Class: Google::Apis::CloudkmsV1::CryptoKey
- Inherits:
-
Object
- Object
- Google::Apis::CloudkmsV1::CryptoKey
- 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 CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of one or more versions, which represent the actual key material used in cryptographic operations.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#name ⇒ String
Output only.
-
#next_rotation_time ⇒ String
At next_rotation_time, the Key Management Service will automatically: 1.
-
#primary ⇒ Google::Apis::CloudkmsV1::CryptoKeyVersion
A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.
-
#purpose ⇒ String
The immutable purpose of this CryptoKey.
-
#rotation_period ⇒ String
next_rotation_time will be advanced by this period when the service automatically rotates a key.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CryptoKey
constructor
A new instance of CryptoKey.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ CryptoKey
Returns a new instance of CryptoKey
287 288 289 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 287 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. The time at which this CryptoKey was created.
Corresponds to the JSON property createTime
263 264 265 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 263 def create_time @create_time end |
#name ⇒ String
Output only. The resource name for this CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*.
Corresponds to the JSON property name
285 286 287 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 285 def name @name end |
#next_rotation_time ⇒ String
At next_rotation_time, the Key Management Service will automatically:
- Create a new version of this CryptoKey.
- Mark the new version as primary.
Key rotations performed manually via
CreateCryptoKeyVersion and
UpdateCryptoKeyPrimaryVersion
do not affect next_rotation_time.
Corresponds to the JSON property
nextRotationTime
258 259 260 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 258 def next_rotation_time @next_rotation_time end |
#primary ⇒ Google::Apis::CloudkmsV1::CryptoKeyVersion
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.
Corresponds to the JSON property primary
279 280 281 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 279 def primary @primary end |
#purpose ⇒ String
The immutable purpose of this CryptoKey. Currently, the only acceptable
purpose is ENCRYPT_DECRYPT.
Corresponds to the JSON property purpose
247 248 249 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 247 def purpose @purpose end |
#rotation_period ⇒ String
next_rotation_time will be advanced by this period when the service
automatically rotates a key. Must be at least one day.
If rotation_period is set, next_rotation_time must also be set.
Corresponds to the JSON property rotationPeriod
270 271 272 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 270 def rotation_period @rotation_period end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
292 293 294 295 296 297 298 299 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 292 def update!(**args) @purpose = args[:purpose] if args.key?(:purpose) @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time) @create_time = args[:create_time] if args.key?(:create_time) @rotation_period = args[:rotation_period] if args.key?(:rotation_period) @primary = args[:primary] if args.key?(:primary) @name = args[:name] if args.key?(:name) end |