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
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.
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.
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.
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.
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.
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.
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"]],[["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-08-07 UTC."],[],[],null,["# Interface SecretVolumeOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.functions.v2.SecretVolumeOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.functions.v2.SecretVolumeOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.functions.v2.SecretVolumeOrBuilder) \n\n public interface SecretVolumeOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getMountPath()\n\n public abstract String getMountPath()\n\nThe path within the container to mount the secret volume. For example,\nsetting the mount_path as `/etc/secrets` would mount the secret value files\nunder the `/etc/secrets` directory. This directory will also be completely\nshadowed and unavailable to mount any other secrets.\nRecommended mount path: /etc/secrets\n\n`string mount_path = 1;`\n\n### getMountPathBytes()\n\n public abstract ByteString getMountPathBytes()\n\nThe path within the container to mount the secret volume. For example,\nsetting the mount_path as `/etc/secrets` would mount the secret value files\nunder the `/etc/secrets` directory. This directory will also be completely\nshadowed and unavailable to mount any other secrets.\nRecommended mount path: /etc/secrets\n\n`string mount_path = 1;`\n\n### getProjectId()\n\n public abstract String getProjectId()\n\nProject identifier (preferably project number but can also be the project\nID) of the project that contains the secret. If not set, it is\nassumed that the secret is in the same project as the function.\n\n`string project_id = 2;`\n\n### getProjectIdBytes()\n\n public abstract ByteString getProjectIdBytes()\n\nProject identifier (preferably project number but can also be the project\nID) of the project that contains the secret. If not set, it is\nassumed that the secret is in the same project as the function.\n\n`string project_id = 2;`\n\n### getSecret()\n\n public abstract String getSecret()\n\nName of the secret in secret manager (not the full resource name).\n\n`string secret = 3;`\n\n### getSecretBytes()\n\n public abstract ByteString getSecretBytes()\n\nName of the secret in secret manager (not the full resource name).\n\n`string secret = 3;`\n\n### getVersions(int index)\n\n public abstract SecretVolume.SecretVersion getVersions(int index)\n\nList of secret versions to mount for this secret. If empty, the `latest`\nversion of the secret will be made available in a file named after the\nsecret under the mount point.\n\n`repeated .google.events.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;\n`\n\n### getVersionsCount()\n\n public abstract int getVersionsCount()\n\nList of secret versions to mount for this secret. If empty, the `latest`\nversion of the secret will be made available in a file named after the\nsecret under the mount point.\n\n`repeated .google.events.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;\n`\n\n### getVersionsList()\n\n public abstract List\u003cSecretVolume.SecretVersion\u003e getVersionsList()\n\nList of secret versions to mount for this secret. If empty, the `latest`\nversion of the secret will be made available in a file named after the\nsecret under the mount point.\n\n`repeated .google.events.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;\n`\n\n### getVersionsOrBuilder(int index)\n\n public abstract SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder(int index)\n\nList of secret versions to mount for this secret. If empty, the `latest`\nversion of the secret will be made available in a file named after the\nsecret under the mount point.\n\n`repeated .google.events.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;\n`\n\n### getVersionsOrBuilderList()\n\n public abstract List\u003c? extends SecretVolume.SecretVersionOrBuilder\u003e getVersionsOrBuilderList()\n\nList of secret versions to mount for this secret. If empty, the `latest`\nversion of the secret will be made available in a file named after the\nsecret under the mount point.\n\n`repeated .google.events.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;\n`"]]