#[non_exhaustive]pub struct CustomerEncryptionKey {
pub kms_key_name: Option<String>,
pub kms_key_service_account: Option<String>,
pub raw_key: Option<String>,
pub rsa_encrypted_key: Option<String>,
pub sha256: Option<String>,
/* private fields */
}disks or image-family-views or images or instance-templates or instances or machine-images or region-disks or region-instance-templates or region-instances or snapshots only.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.kms_key_name: Option<String>The name of the encryption key that is stored in Google Cloud KMS. For example:
“kmsKeyName”: “projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key
The fully-qualifed key name may be returned for resource GET requests. For example:
“kmsKeyName”: “projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1
kms_key_service_account: Option<String>The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example:
“kmsKeyServiceAccount”: “name@project_id.iam.gserviceaccount.com/
raw_key: Option<String>Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or thersaEncryptedKey. For example:
“rawKey”: “SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=”
rsa_encrypted_key: Option<String>Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or thersaEncryptedKey. For example:
“rsaEncryptedKey”: “ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==”
The key must meet the following requirements before you can provide it to Compute Engine:
- The key is wrapped using a RSA public key certificate provided by Google.
- After being wrapped, the key must be encoded in RFC 4648 base64 encoding.
Gets the RSA public key certificate provided by Google at:
https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
sha256: Option<String>[Output only] TheRFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Implementations§
Source§impl CustomerEncryptionKey
impl CustomerEncryptionKey
pub fn new() -> Self
Sourcepub fn set_kms_key_name<T>(self, v: T) -> Self
pub fn set_kms_key_name<T>(self, v: T) -> Self
Sets the value of kms_key_name.
§Example
let x = CustomerEncryptionKey::new().set_kms_key_name("example");Sourcepub fn set_or_clear_kms_key_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kms_key_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of kms_key_name.
§Example
let x = CustomerEncryptionKey::new().set_or_clear_kms_key_name(Some("example"));
let x = CustomerEncryptionKey::new().set_or_clear_kms_key_name(None::<String>);Sourcepub fn set_kms_key_service_account<T>(self, v: T) -> Self
pub fn set_kms_key_service_account<T>(self, v: T) -> Self
Sets the value of kms_key_service_account.
§Example
let x = CustomerEncryptionKey::new().set_kms_key_service_account("example");Sourcepub fn set_or_clear_kms_key_service_account<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kms_key_service_account<T>(self, v: Option<T>) -> Self
Sets or clears the value of kms_key_service_account.
§Example
let x = CustomerEncryptionKey::new().set_or_clear_kms_key_service_account(Some("example"));
let x = CustomerEncryptionKey::new().set_or_clear_kms_key_service_account(None::<String>);Sourcepub fn set_raw_key<T>(self, v: T) -> Self
pub fn set_raw_key<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_raw_key<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_raw_key<T>(self, v: Option<T>) -> Self
Sourcepub fn set_rsa_encrypted_key<T>(self, v: T) -> Self
pub fn set_rsa_encrypted_key<T>(self, v: T) -> Self
Sets the value of rsa_encrypted_key.
§Example
let x = CustomerEncryptionKey::new().set_rsa_encrypted_key("example");Sourcepub fn set_or_clear_rsa_encrypted_key<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rsa_encrypted_key<T>(self, v: Option<T>) -> Self
Sets or clears the value of rsa_encrypted_key.
§Example
let x = CustomerEncryptionKey::new().set_or_clear_rsa_encrypted_key(Some("example"));
let x = CustomerEncryptionKey::new().set_or_clear_rsa_encrypted_key(None::<String>);Sourcepub fn set_sha256<T>(self, v: T) -> Self
pub fn set_sha256<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for CustomerEncryptionKey
impl Clone for CustomerEncryptionKey
Source§fn clone(&self) -> CustomerEncryptionKey
fn clone(&self) -> CustomerEncryptionKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more