pub struct Key {
pub name: String,
pub purpose: i32,
pub state: i32,
pub primary_version: String,
pub versions: Vec<Version>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub purge_time: Option<Timestamp>,
pub tags: BTreeMap<String, String>,
pub platform_managed: bool,
}Expand description
A key: its versions’ material is kept by the platform and never leaves it.
Fields§
§name: StringThe key’s resource name.
purpose: i32What the key is for.
state: i32Whether the key can be used. A new key is key::State::Enabled; UpdateKey sets it
to key::State::Enabled or key::State::Disabled, and DeleteKey makes it key::State::Deleted.
primary_version: StringThe version new ciphertexts and signatures use.
versions: Vec<Version>Every version, oldest first. RotateKey adds one.
create_time: Option<Timestamp>When the key was created.
update_time: Option<Timestamp>When the key last changed.
purge_time: Option<Timestamp>When a deleted key’s material is destroyed, or was; unset unless the
key is key::State::Deleted.
Labels of your own, at most 50. The origin:name tag is the name the
console shows.
platform_managed: boolWhether the platform manages the key: it made the key in your project
for its own use of the project’s data, such as the key, tagged
origin:name=volumes, that protects your volumes’ data keys. You see it,
its grants and its audit log entries like any key of yours, but
UpdateKey, DeleteKey, UndeleteKey and RotateKey refuse it with
FORBIDDEN, whatever roles you hold.
Implementations§
Source§impl Key
impl Key
Sourcepub fn purpose(&self) -> Purpose
pub fn purpose(&self) -> Purpose
Returns the enum value of purpose, or the default if the field is set to an invalid enum value.
Sourcepub fn set_purpose(&mut self, value: Purpose)
pub fn set_purpose(&mut self, value: Purpose)
Sets purpose to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Key
impl<'de> Deserialize<'de> for Key
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for Key
impl Message for Key
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.