Class SecretVolume (2.41.0)

public final class SecretVolume extends GeneratedMessageV3 implements SecretVolumeOrBuilder

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. Secret value is not a part of the configuration. Every filesystem read operation performs a lookup in secret manager to retrieve the secret value.

Protobuf type google.cloud.functions.v1.SecretVolume

Static Fields

MOUNT_PATH_FIELD_NUMBER

public static final int MOUNT_PATH_FIELD_NUMBER
Field Value
TypeDescription
int

PROJECT_ID_FIELD_NUMBER

public static final int PROJECT_ID_FIELD_NUMBER
Field Value
TypeDescription
int

SECRET_FIELD_NUMBER

public static final int SECRET_FIELD_NUMBER
Field Value
TypeDescription
int

VERSIONS_FIELD_NUMBER

public static final int VERSIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SecretVolume getDefaultInstance()
Returns
TypeDescription
SecretVolume

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SecretVolume.Builder newBuilder()
Returns
TypeDescription
SecretVolume.Builder

newBuilder(SecretVolume prototype)

public static SecretVolume.Builder newBuilder(SecretVolume prototype)
Parameter
NameDescription
prototypeSecretVolume
Returns
TypeDescription
SecretVolume.Builder

parseDelimitedFrom(InputStream input)

public static SecretVolume parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SecretVolume parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SecretVolume parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SecretVolume parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SecretVolume parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SecretVolume parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SecretVolume parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SecretVolume parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SecretVolume parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SecretVolume parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SecretVolume parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SecretVolume parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SecretVolume
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SecretVolume> parser()
Returns
TypeDescription
Parser<SecretVolume>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public SecretVolume getDefaultInstanceForType()
Returns
TypeDescription
SecretVolume

getMountPath()

public String getMountPath()

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 paths: /etc/secrets Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log

string mount_path = 1;

Returns
TypeDescription
String

The mountPath.

getMountPathBytes()

public ByteString getMountPathBytes()

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 paths: /etc/secrets Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log

string mount_path = 1;

Returns
TypeDescription
ByteString

The bytes for mountPath.

getParserForType()

public Parser<SecretVolume> getParserForType()
Returns
TypeDescription
Parser<SecretVolume>
Overrides

getProjectId()

public String getProjectId()

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.

string project_id = 2;

Returns
TypeDescription
String

The projectId.

getProjectIdBytes()

public ByteString getProjectIdBytes()

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.

string project_id = 2;

Returns
TypeDescription
ByteString

The bytes for projectId.

getSecret()

public String getSecret()

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Returns
TypeDescription
String

The secret.

getSecretBytes()

public ByteString getSecretBytes()

Name of the secret in secret manager (not the full resource name).

string secret = 3;

Returns
TypeDescription
ByteString

The bytes for secret.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getVersions(int index)

public SecretVolume.SecretVersion getVersions(int index)

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.

repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.SecretVersion

getVersionsCount()

public int getVersionsCount()

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.

repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
int

getVersionsList()

public List<SecretVolume.SecretVersion> getVersionsList()

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.

repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
List<SecretVersion>

getVersionsOrBuilder(int index)

public SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder(int index)

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.

repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.SecretVersionOrBuilder

getVersionsOrBuilderList()

public List<? extends SecretVolume.SecretVersionOrBuilder> getVersionsOrBuilderList()

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.

repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;

Returns
TypeDescription
List<? extends com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder>

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SecretVolume.Builder newBuilderForType()
Returns
TypeDescription
SecretVolume.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SecretVolume.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SecretVolume.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SecretVolume.Builder toBuilder()
Returns
TypeDescription
SecretVolume.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException