public sealed class SecretEnvVar : IMessage<SecretEnvVar>, IEquatable<SecretEnvVar>, IDeepCloneable<SecretEnvVar>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Functions v2 API class SecretEnvVar.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The `SecretEnvVar` class in the Cloud Functions v2 API is used to configure secret environment variables, allowing you to fetch secret values from Secret Manager and expose them."],["This class implements multiple interfaces including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, providing functionalities such as deep cloning and message handling."],["You can find the reference documentation for versions ranging from 1.0.0 to 1.7.0 of the `SecretEnvVar` class, with 1.7.0 being the most recent."],["The `SecretEnvVar` class has properties for `Key`, `ProjectId`, `Secret`, and `Version`, allowing for precise specification of the environment variable's name, the project it belongs to, the name of the secret, and the version of the secret being used."],["The `SecretEnvVar` class can be instantiated using two constructors: a default constructor `SecretEnvVar()` and an overload `SecretEnvVar(SecretEnvVar other)` which allows for the initialization of a copy of an existing `SecretEnvVar`."]]],[]]