#[non_exhaustive]pub struct KmsConfig {
pub name: String,
pub crypto_key_name: String,
pub state: State,
pub state_details: String,
pub create_time: Option<Timestamp>,
pub description: String,
pub labels: HashMap<String, String>,
pub instructions: String,
pub service_account: String,
/* private fields */
}Expand description
KmsConfig is the customer-managed encryption key(CMEK) configuration.
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: StringIdentifier. Name of the KmsConfig.
Format: projects/{project}/locations/{location}/kmsConfigs/{kms_config}
crypto_key_name: StringRequired. Customer-managed crypto key resource full name. Format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
state: StateOutput only. State of the KmsConfig.
state_details: StringOutput only. State details of the KmsConfig.
create_time: Option<Timestamp>Output only. Create time of the KmsConfig.
description: StringDescription of the KmsConfig.
labels: HashMap<String, String>Labels as key value pairs
instructions: StringOutput only. Instructions to provide the access to the customer provided encryption key.
service_account: StringOutput only. The Service account which will have access to the customer provided encryption key.
Implementations§
Source§impl KmsConfig
impl KmsConfig
Sourcepub fn set_crypto_key_name<T: Into<String>>(self, v: T) -> Self
pub fn set_crypto_key_name<T: Into<String>>(self, v: T) -> Self
Sets the value of crypto_key_name.
§Example
let x = KmsConfig::new().set_crypto_key_name("example");Sourcepub fn set_state_details<T: Into<String>>(self, v: T) -> Self
pub fn set_state_details<T: Into<String>>(self, v: T) -> Self
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.
§Example
use wkt::Timestamp;
let x = KmsConfig::new().set_create_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = KmsConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = KmsConfig::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_instructions<T: Into<String>>(self, v: T) -> Self
pub fn set_instructions<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = KmsConfig::new().set_service_account("example");Trait Implementations§
impl StructuralPartialEq for KmsConfig
Auto Trait Implementations§
impl Freeze for KmsConfig
impl RefUnwindSafe for KmsConfig
impl Send for KmsConfig
impl Sync for KmsConfig
impl Unpin for KmsConfig
impl UnsafeUnpin for KmsConfig
impl UnwindSafe for KmsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request