public sealed class SecretEnvVar : IMessage<SecretEnvVar>, IEquatable<SecretEnvVar>, IDeepCloneable<SecretEnvVar>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Functions v1 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 (preferrably project number but can also be the project
ID) of the project that contains the secret. If not set, it will be
populated with the function's project assuming that the secret exists in
the same project as of 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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The latest version of the `SecretEnvVar` class in the Google Cloud Functions v1 API is 2.7.0, and previous versions are available for reference, ranging back to version 1.1.0."],["`SecretEnvVar` is a class that facilitates the configuration of secret environment variables, retrieving their values from Secret Manager and exposing them for the Cloud Functions v1 API."],["The `SecretEnvVar` class inherits from the base `object` class and implements multiple interfaces, including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`."],["Key properties of the `SecretEnvVar` class include `Key` (environment variable name), `ProjectId` (project identifier), `Secret` (secret name in Secret Manager), and `Version` (secret version)."],["The secret values referenced by the class `SecretEnvVar` will not update unless new instances of the function are started, and using a numerical version of the secret is recommended."]]],[]]