[][src]Struct gcp_client::google::cloud::kms::v1::CryptoKeyVersion

pub struct CryptoKeyVersion {
    pub name: String,
    pub state: i32,
    pub protection_level: i32,
    pub algorithm: i32,
    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 external_protection_level_options: Option<ExternalProtectionLevelOptions>,
}

A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an individual cryptographic key, and the associated key material.

An [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] version can be used for cryptographic operations.

For security reasons, the raw cryptographic key material represented by a [CryptoKeyVersion][google.cloud.kms.v1.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

name: String

Output only. The resource name for this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

state: i32

The current state of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

protection_level: i32

Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] describing how crypto operations are performed with this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

algorithm: i32

Output only. The [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] that this [CryptoKeyVersion][google.cloud.kms.v1.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][google.cloud.kms.v1.CryptoKeyVersion.protection_level] [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].

create_time: Option<Timestamp>

Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.

generate_time: Option<Timestamp>

Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was generated.

destroy_time: Option<Timestamp>

Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is scheduled for destruction. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].

destroy_event_time: Option<Timestamp>

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].

import_job: String

Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] used to import this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if the underlying key material was imported.

import_time: Option<Timestamp>

Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was imported.

import_failure_reason: String

Output only. The root cause of an import failure. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].

external_protection_level_options: Option<ExternalProtectionLevelOptions>

ExternalProtectionLevelOptions stores a group of additional fields for configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that are specific to the [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level.

Implementations

impl CryptoKeyVersion[src]

pub fn state(&self) -> CryptoKeyVersionState[src]

Returns the enum value of state, or the default if the field is set to an invalid enum value.

pub fn set_state(&mut self, value: CryptoKeyVersionState)[src]

Sets state to the provided enum value.

pub fn protection_level(&self) -> ProtectionLevel[src]

Returns the enum value of protection_level, or the default if the field is set to an invalid enum value.

pub fn set_protection_level(&mut self, value: ProtectionLevel)[src]

Sets protection_level to the provided enum value.

pub fn algorithm(&self) -> CryptoKeyVersionAlgorithm[src]

Returns the enum value of algorithm, or the default if the field is set to an invalid enum value.

pub fn set_algorithm(&mut self, value: CryptoKeyVersionAlgorithm)[src]

Sets algorithm to the provided enum value.

Trait Implementations

impl Clone for CryptoKeyVersion[src]

impl Debug for CryptoKeyVersion[src]

impl Default for CryptoKeyVersion[src]

impl Message for CryptoKeyVersion[src]

impl PartialEq<CryptoKeyVersion> for CryptoKeyVersion[src]

impl StructuralPartialEq for CryptoKeyVersion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]