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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time at which this CryptoKey was created.
#destroy_scheduled_duration
def destroy_scheduled_duration() -> ::Google::Protobuf::Duration
- (::Google::Protobuf::Duration) — 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.
#destroy_scheduled_duration=
def destroy_scheduled_duration=(value) -> ::Google::Protobuf::Duration
- value (::Google::Protobuf::Duration) — 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.
- (::Google::Protobuf::Duration) — 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.
#import_only
def import_only() -> ::Boolean
- (::Boolean) — Immutable. Whether this key may contain imported versions only.
#import_only=
def import_only=(value) -> ::Boolean
- value (::Boolean) — Immutable. Whether this key may contain imported versions only.
- (::Boolean) — Immutable. Whether this key may contain imported versions only.
#labels
def labels() -> ::Google::Protobuf::Map{::String => ::String}
- (::Google::Protobuf::Map{::String => ::String}) — Labels with user-defined metadata. For more information, see Labeling Keys.
#labels=
def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}
- value (::Google::Protobuf::Map{::String => ::String}) — Labels with user-defined metadata. For more information, see Labeling Keys.
- (::Google::Protobuf::Map{::String => ::String}) — Labels with user-defined metadata. For more information, see Labeling Keys.
#name
def name() -> ::String
-
(::String) — Output only. The resource name for this CryptoKey in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*
.
#next_rotation_time
def next_rotation_time() -> ::Google::Protobuf::Timestamp
-
(::Google::Protobuf::Timestamp) — 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.
#next_rotation_time=
def next_rotation_time=(value) -> ::Google::Protobuf::Timestamp
-
value (::Google::Protobuf::Timestamp) — 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.
-
(::Google::Protobuf::Timestamp) — 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.
#primary
def primary() -> ::Google::Cloud::Kms::V1::CryptoKeyVersion
-
(::Google::Cloud::Kms::V1::CryptoKeyVersion) — Output only. A copy of the "primary" CryptoKeyVersion that will be used
by Encrypt when this CryptoKey is given
in EncryptRequest.name.
The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion.
Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.
#purpose
def purpose() -> ::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose
- (::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose) — Immutable. The immutable purpose of this CryptoKey.
#purpose=
def purpose=(value) -> ::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose
- value (::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose) — Immutable. The immutable purpose of this CryptoKey.
- (::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose) — Immutable. The immutable purpose of this CryptoKey.
#rotation_period
def rotation_period() -> ::Google::Protobuf::Duration
-
(::Google::Protobuf::Duration) — 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.
#rotation_period=
def rotation_period=(value) -> ::Google::Protobuf::Duration
-
value (::Google::Protobuf::Duration) — 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.
-
(::Google::Protobuf::Duration) — 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.
#version_template
def version_template() -> ::Google::Cloud::Kms::V1::CryptoKeyVersionTemplate
- (::Google::Cloud::Kms::V1::CryptoKeyVersionTemplate) — A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
#version_template=
def version_template=(value) -> ::Google::Cloud::Kms::V1::CryptoKeyVersionTemplate
- value (::Google::Cloud::Kms::V1::CryptoKeyVersionTemplate) — A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.
- (::Google::Cloud::Kms::V1::CryptoKeyVersionTemplate) — A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.