#[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
pub fn new() -> Self
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");