public sealed class SecretVolume : IMessage<SecretVolume>, IEquatable<SecretVolume>, IDeepCloneable<SecretVolume>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Functions v2beta API class SecretVolume.
Configuration for a secret volume. It has the information necessary to fetch
the secret value from secret manager and make it available as files mounted
at the requested paths within the application container.
The path within the container to mount the secret volume. For example,
setting the mount_path as /etc/secrets would mount the secret value files
under the /etc/secrets directory. This directory will also be completely
shadowed and unavailable to mount any other secrets.
Recommended mount path: /etc/secrets
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.
public RepeatedField<SecretVolume.Types.SecretVersion> Versions { get; }
List of secret versions to mount for this secret. If empty, the latest
version of the secret will be made available in a file named after the
secret under the mount point.
[[["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."],[[["\u003cp\u003e\u003ccode\u003eSecretVolume\u003c/code\u003e is a class within the Cloud Functions v2beta API, used to configure how secret values are fetched from Secret Manager and made available as mounted files within an application container.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows users to specify the \u003ccode\u003eMountPath\u003c/code\u003e, which is the directory within the container where the secret files will be mounted and made available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eProjectId\u003c/code\u003e property lets you specify the project that contains the secret, and if it is not set, the function's project is assumed.\u003c/p\u003e\n"],["\u003cp\u003eYou can define which versions of the secret should be mounted using the \u003ccode\u003eVersions\u003c/code\u003e property, or if left empty the latest secret version will be used.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSecretVolume\u003c/code\u003e implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing capabilities for message handling, equality checks, deep cloning, and buffer operations.\u003c/p\u003e\n"]]],[],null,[]]