#[non_exhaustive]pub struct SecretEnvVar {
pub key: String,
pub project_id: String,
pub secret: String,
pub version: String,
/* private fields */
}
Expand description
Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.
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.key: String
Name of the environment variable.
project_id: String
Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.
secret: String
Name of the secret in secret manager (not the full resource name).
version: String
Version of the secret (version number or the string ‘latest’). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.
Implementations§
Source§impl SecretEnvVar
impl SecretEnvVar
pub fn new() -> Self
Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
Sets the value of project_id.
Sourcepub fn set_secret<T: Into<String>>(self, v: T) -> Self
pub fn set_secret<T: Into<String>>(self, v: T) -> Self
Sets the value of secret.
Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sets the value of version.
Trait Implementations§
Source§impl Clone for SecretEnvVar
impl Clone for SecretEnvVar
Source§fn clone(&self) -> SecretEnvVar
fn clone(&self) -> SecretEnvVar
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more