Struct gapi_grpc::google::cloud::kms::v1::CryptoKey[][src]

pub struct CryptoKey {
    pub name: String,
    pub primary: Option<CryptoKeyVersion>,
    pub purpose: i32,
    pub create_time: Option<Timestamp>,
    pub next_rotation_time: Option<Timestamp>,
    pub version_template: Option<CryptoKeyVersionTemplate>,
    pub labels: HashMap<String, String>,
    pub rotation_schedule: Option<RotationSchedule>,
}

A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that can be used for cryptographic operations.

A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual key material used in cryptographic operations.

Fields

name: String

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

primary: Option<CryptoKeyVersion>

Output only. A copy of the “primary” [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].

The [CryptoKey][google.cloud.kms.v1.CryptoKey]’s primary version can be updated via [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].

Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] may have a primary. For other keys, this field will be omitted.

purpose: i32

Immutable. The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].

create_time: Option<Timestamp>

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

next_rotation_time: Option<Timestamp>

At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], the Key Management Service will automatically:

  1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
  2. Mark the new version as primary.

Key rotations performed manually via [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] and [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] do not affect [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].

Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] support automatic rotation. For other keys, this field must be omitted.

version_template: Option<CryptoKeyVersionTemplate>

A template describing settings for new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances created by either [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or auto-rotation are controlled by this template.

labels: HashMap<String, String>

Labels with user-defined metadata. For more information, see Labeling Keys.

rotation_schedule: Option<RotationSchedule>

Controls the rate of automatic rotation.

Implementations

impl CryptoKey[src]

pub fn purpose(&self) -> CryptoKeyPurpose[src]

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

pub fn set_purpose(&mut self, value: CryptoKeyPurpose)[src]

Sets purpose to the provided enum value.

Trait Implementations

impl Clone for CryptoKey[src]

impl Debug for CryptoKey[src]

impl Default for CryptoKey[src]

impl Message for CryptoKey[src]

impl PartialEq<CryptoKey> for CryptoKey[src]

impl StructuralPartialEq for CryptoKey[src]

Auto Trait Implementations

impl RefUnwindSafe for CryptoKey

impl Send for CryptoKey

impl Sync for CryptoKey

impl Unpin for CryptoKey

impl UnwindSafe for CryptoKey

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> 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>, 
[src]

impl<T> WithSubscriber for T[src]