#[non_exhaustive]pub struct CryptoKeyVersion {Show 16 fields
pub name: String,
pub state: CryptoKeyVersionState,
pub protection_level: ProtectionLevel,
pub algorithm: CryptoKeyVersionAlgorithm,
pub attestation: Option<KeyOperationAttestation>,
pub create_time: Option<Timestamp>,
pub generate_time: Option<Timestamp>,
pub destroy_time: Option<Timestamp>,
pub destroy_event_time: Option<Timestamp>,
pub import_job: String,
pub import_time: Option<Timestamp>,
pub import_failure_reason: String,
pub generation_failure_reason: String,
pub external_destruction_failure_reason: String,
pub external_protection_level_options: Option<ExternalProtectionLevelOptions>,
pub reimport_eligible: bool,
/* private fields */
}Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. The resource name for this
CryptoKeyVersion in the format
projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.
state: CryptoKeyVersionStateThe current state of the CryptoKeyVersion.
protection_level: ProtectionLevelOutput only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
algorithm: CryptoKeyVersionAlgorithmOutput only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
attestation: Option<KeyOperationAttestation>Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
create_time: Option<Timestamp>Output only. The time at which this CryptoKeyVersion was created.
generate_time: Option<Timestamp>Output only. The time this CryptoKeyVersion’s key material was generated.
destroy_time: Option<Timestamp>Output only. The time this CryptoKeyVersion’s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
destroy_event_time: Option<Timestamp>Output only. The time this CryptoKeyVersion’s key material was destroyed. Only present if state is DESTROYED.
import_job: StringOutput only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
import_time: Option<Timestamp>Output only. The time at which this CryptoKeyVersion’s key material was most recently imported.
import_failure_reason: StringOutput only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
generation_failure_reason: StringOutput only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.
external_destruction_failure_reason: StringOutput only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.
external_protection_level_options: Option<ExternalProtectionLevelOptions>ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.
reimport_eligible: boolOutput only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Implementations§
Source§impl CryptoKeyVersion
impl CryptoKeyVersion
pub fn new() -> Self
Sourcepub fn set_state<T: Into<CryptoKeyVersionState>>(self, v: T) -> Self
pub fn set_state<T: Into<CryptoKeyVersionState>>(self, v: T) -> Self
Sets the value of state.
Sourcepub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
pub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
Sets the value of protection_level.
Sourcepub fn set_algorithm<T: Into<CryptoKeyVersionAlgorithm>>(self, v: T) -> Self
pub fn set_algorithm<T: Into<CryptoKeyVersionAlgorithm>>(self, v: T) -> Self
Sets the value of algorithm.
Sourcepub fn set_attestation<T>(self, v: T) -> Selfwhere
T: Into<KeyOperationAttestation>,
pub fn set_attestation<T>(self, v: T) -> Selfwhere
T: Into<KeyOperationAttestation>,
Sets the value of attestation.
Sourcepub fn set_or_clear_attestation<T>(self, v: Option<T>) -> Selfwhere
T: Into<KeyOperationAttestation>,
pub fn set_or_clear_attestation<T>(self, v: Option<T>) -> Selfwhere
T: Into<KeyOperationAttestation>,
Sets or clears the value of attestation.
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_generate_time<T>(self, v: T) -> Self
pub fn set_generate_time<T>(self, v: T) -> Self
Sets the value of generate_time.
Sourcepub fn set_or_clear_generate_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_generate_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of generate_time.
Sourcepub fn set_destroy_time<T>(self, v: T) -> Self
pub fn set_destroy_time<T>(self, v: T) -> Self
Sets the value of destroy_time.
Sourcepub fn set_or_clear_destroy_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_destroy_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of destroy_time.
Sourcepub fn set_destroy_event_time<T>(self, v: T) -> Self
pub fn set_destroy_event_time<T>(self, v: T) -> Self
Sets the value of destroy_event_time.
Sourcepub fn set_or_clear_destroy_event_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_destroy_event_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of destroy_event_time.
Sourcepub fn set_import_job<T: Into<String>>(self, v: T) -> Self
pub fn set_import_job<T: Into<String>>(self, v: T) -> Self
Sets the value of import_job.
Sourcepub fn set_import_time<T>(self, v: T) -> Self
pub fn set_import_time<T>(self, v: T) -> Self
Sets the value of import_time.
Sourcepub fn set_or_clear_import_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_import_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of import_time.
Sourcepub fn set_import_failure_reason<T: Into<String>>(self, v: T) -> Self
pub fn set_import_failure_reason<T: Into<String>>(self, v: T) -> Self
Sets the value of import_failure_reason.
Sourcepub fn set_generation_failure_reason<T: Into<String>>(self, v: T) -> Self
pub fn set_generation_failure_reason<T: Into<String>>(self, v: T) -> Self
Sets the value of generation_failure_reason.
Sourcepub fn set_external_destruction_failure_reason<T: Into<String>>(
self,
v: T,
) -> Self
pub fn set_external_destruction_failure_reason<T: Into<String>>( self, v: T, ) -> Self
Sets the value of external_destruction_failure_reason.
Sourcepub fn set_external_protection_level_options<T>(self, v: T) -> Selfwhere
T: Into<ExternalProtectionLevelOptions>,
pub fn set_external_protection_level_options<T>(self, v: T) -> Selfwhere
T: Into<ExternalProtectionLevelOptions>,
Sets the value of external_protection_level_options.
Sourcepub fn set_or_clear_external_protection_level_options<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<ExternalProtectionLevelOptions>,
pub fn set_or_clear_external_protection_level_options<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<ExternalProtectionLevelOptions>,
Sets or clears the value of external_protection_level_options.
Sourcepub fn set_reimport_eligible<T: Into<bool>>(self, v: T) -> Self
pub fn set_reimport_eligible<T: Into<bool>>(self, v: T) -> Self
Sets the value of reimport_eligible.
Trait Implementations§
Source§impl Clone for CryptoKeyVersion
impl Clone for CryptoKeyVersion
Source§fn clone(&self) -> CryptoKeyVersion
fn clone(&self) -> CryptoKeyVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more