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.
-
#labels ⇒ Hash<String,String>
Labels with user-defined metadata.
-
#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.
-
#version_template ⇒ Google::Apis::CloudkmsV1::CryptoKeyVersionTemplate
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 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
342 343 344 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 342 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
279 280 281 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 279 def create_time @create_time end |
#labels ⇒ Hash<String,String>
Labels with user-defined metadata. For more information, see
Labeling Keys.
Corresponds to the JSON property labels
285 286 287 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 285 def labels @labels end |
#name ⇒ String
Output only. The resource name for this CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
Corresponds to the JSON property name
291 292 293 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 291 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.
Keys with purpose
ENCRYPT_DECRYPT support
automatic rotation. For other keys, this field must be omitted.
Corresponds to the JSON property
nextRotationTime
305 306 307 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 305 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.
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.
Corresponds to the JSON property primary
317 318 319 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 317 def primary @primary end |
#purpose ⇒ String
The immutable purpose of this CryptoKey.
Corresponds to the JSON property purpose
322 323 324 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 322 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.
Keys with purpose
ENCRYPT_DECRYPT support
automatic rotation. For other keys, this field must be omitted.
Corresponds to the JSON property rotationPeriod
332 333 334 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 332 def rotation_period @rotation_period end |
#version_template ⇒ Google::Apis::CloudkmsV1::CryptoKeyVersionTemplate
A CryptoKeyVersionTemplate specifies the properties to use when creating
a new CryptoKeyVersion, either manually with
CreateCryptoKeyVersion or
automatically as a result of auto-rotation.
Corresponds to the JSON property versionTemplate
340 341 342 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 340 def version_template @version_template end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
347 348 349 350 351 352 353 354 355 356 |
# File 'generated/google/apis/cloudkms_v1/classes.rb', line 347 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time) @primary = args[:primary] if args.key?(:primary) @purpose = args[:purpose] if args.key?(:purpose) @rotation_period = args[:rotation_period] if args.key?(:rotation_period) @version_template = args[:version_template] if args.key?(:version_template) end |