public sealed class SecretVolume : IMessage<SecretVolume>, IEquatable<SecretVolume>, IDeepCloneable<SecretVolume>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Functions v2 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\u003eThis document provides reference information for the \u003ccode\u003eSecretVolume\u003c/code\u003e class within the Google Cloud Functions v2 API, detailing its purpose in managing secret volumes.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSecretVolume\u003c/code\u003e is designed to fetch secret values from Secret Manager and mount them as files within an application container, utilizing specified paths.\u003c/p\u003e\n"],["\u003cp\u003eThe class supports configuration options like \u003ccode\u003eMountPath\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, \u003ccode\u003eSecret\u003c/code\u003e, and \u003ccode\u003eVersions\u003c/code\u003e to control how secrets are accessed and mounted.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSecretVolume\u003c/code\u003e implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and the newest version is 1.7.0 with the current version of the document being 1.4.0.\u003c/p\u003e\n"],["\u003cp\u003eThe SecretVolume class has several inherited members, but \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e and \u003ccode\u003eToString\u003c/code\u003e are the only ones listed in the document.\u003c/p\u003e\n"]]],[],null,[]]