Class: Google::Apis::KmsinventoryV1::GoogleCloudKmsV1CryptoKey
- Inherits:
-
Object
- Object
- Google::Apis::KmsinventoryV1::GoogleCloudKmsV1CryptoKey
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/kmsinventory_v1/classes.rb,
lib/google/apis/kmsinventory_v1/representations.rb,
lib/google/apis/kmsinventory_v1/representations.rb
Overview
A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#crypto_key_backend ⇒ String
Immutable.
-
#destroy_scheduled_duration ⇒ String
Immutable.
-
#import_only ⇒ Boolean
(also: #import_only?)
Immutable.
-
#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::KmsinventoryV1::GoogleCloudKmsV1CryptoKeyVersion
A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.
-
#purpose ⇒ String
Immutable.
-
#rotation_period ⇒ String
next_rotation_time will be advanced by this period when the service automatically rotates a key.
-
#version_template ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsV1CryptoKeyVersionTemplate
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) ⇒ GoogleCloudKmsV1CryptoKey
constructor
A new instance of GoogleCloudKmsV1CryptoKey.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudKmsV1CryptoKey
Returns a new instance of GoogleCloudKmsV1CryptoKey.
302 303 304 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 302 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
224 225 226 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 224 def create_time @create_time end |
#crypto_key_backend ⇒ String
Immutable. The resource name of the backend environment where the key material
for all CryptoKeyVersions associated with this CryptoKey reside and where all
related cryptographic operations are performed. Only applicable if
CryptoKeyVersions have a ProtectionLevel of EXTERNAL_VPC, with the resource
name in the format projects/*/locations/*/ekmConnections/*. Note, this list
is non-exhaustive and may apply to additional ProtectionLevels in the future.
Corresponds to the JSON property cryptoKeyBackend
234 235 236 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 234 def crypto_key_backend @crypto_key_backend end |
#destroy_scheduled_duration ⇒ String
Immutable. The period of time that versions of this key spend in the
DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at
creation time, the default duration is 24 hours.
Corresponds to the JSON property destroyScheduledDuration
241 242 243 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 241 def destroy_scheduled_duration @destroy_scheduled_duration end |
#import_only ⇒ Boolean Also known as: import_only?
Immutable. Whether this key may contain imported versions only.
Corresponds to the JSON property importOnly
246 247 248 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 246 def import_only @import_only end |
#labels ⇒ Hash<String,String>
Labels with user-defined metadata. For more information, see Labeling Keys.
Corresponds to the JSON property labels
253 254 255 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 253 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
259 260 261 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 259 def name @name end |
#next_rotation_time ⇒ String
At next_rotation_time, the Key Management Service will automatically: 1.
Create a new version of this CryptoKey. 2. 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
269 270 271 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 269 def next_rotation_time @next_rotation_time end |
#primary ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsV1CryptoKeyVersion
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
279 280 281 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 279 def primary @primary end |
#purpose ⇒ String
Immutable. The immutable purpose of this CryptoKey.
Corresponds to the JSON property purpose
284 285 286 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 284 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 24 hours and at most 876,000
hours. 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
293 294 295 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 293 def rotation_period @rotation_period end |
#version_template ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsV1CryptoKeyVersionTemplate
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
300 301 302 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 300 def version_template @version_template end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/google/apis/kmsinventory_v1/classes.rb', line 307 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @crypto_key_backend = args[:crypto_key_backend] if args.key?(:crypto_key_backend) @destroy_scheduled_duration = args[:destroy_scheduled_duration] if args.key?(:destroy_scheduled_duration) @import_only = args[:import_only] if args.key?(:import_only) @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 |