#[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 region-snapshots 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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CustomerEncryptionKey
impl Debug for CustomerEncryptionKey
Source§impl Default for CustomerEncryptionKey
impl Default for CustomerEncryptionKey
Source§fn default() -> CustomerEncryptionKey
fn default() -> CustomerEncryptionKey
Source§impl Message for CustomerEncryptionKey
impl Message for CustomerEncryptionKey
Source§impl PartialEq for CustomerEncryptionKey
impl PartialEq for CustomerEncryptionKey
impl StructuralPartialEq for CustomerEncryptionKey
Auto Trait Implementations§
impl Freeze for CustomerEncryptionKey
impl RefUnwindSafe for CustomerEncryptionKey
impl Send for CustomerEncryptionKey
impl Sync for CustomerEncryptionKey
impl Unpin for CustomerEncryptionKey
impl UnsafeUnpin for CustomerEncryptionKey
impl UnwindSafe for CustomerEncryptionKey
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