Class SecretVolume

  • All Implemented Interfaces:
    SecretVolumeOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class SecretVolume
    extends com.google.protobuf.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 file system read operation performs a
     lookup in Secret Manager to retrieve the secret value.
     
    Protobuf type google.cloud.functions.v1.SecretVolume
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SecretVolume.Builder
      Configuration for a secret volume.
      static class  SecretVolume.SecretVersion
      Configuration for a single version.
      static interface  SecretVolume.SecretVersionOrBuilder  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MOUNT_PATH_FIELD_NUMBER  
      static int PROJECT_ID_FIELD_NUMBER  
      static int SECRET_FIELD_NUMBER  
      static int VERSIONS_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessageV3

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getMountPath

        public String getMountPath()
         The path within the container to mount the secret volume. For example,
         setting the mount_path as `/etc/secrets` mounts the secret value files
         under the `/etc/secrets` directory. This directory is also 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;
        Specified by:
        getMountPath in interface SecretVolumeOrBuilder
        Returns:
        The mountPath.
      • getMountPathBytes

        public com.google.protobuf.ByteString getMountPathBytes()
         The path within the container to mount the secret volume. For example,
         setting the mount_path as `/etc/secrets` mounts the secret value files
         under the `/etc/secrets` directory. This directory is also 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;
        Specified by:
        getMountPathBytes in interface SecretVolumeOrBuilder
        Returns:
        The bytes for mountPath.
      • 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 is
         populated with the function's project, assuming that the secret exists in
         the same project as the function.
         
        string project_id = 2;
        Specified by:
        getProjectId in interface SecretVolumeOrBuilder
        Returns:
        The projectId.
      • getProjectIdBytes

        public com.google.protobuf.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 is
         populated with the function's project, assuming that the secret exists in
         the same project as the function.
         
        string project_id = 2;
        Specified by:
        getProjectIdBytes in interface SecretVolumeOrBuilder
        Returns:
        The bytes for projectId.
      • getSecret

        public String getSecret()
         Name of the secret in Secret Manager (not the full resource name).
         
        string secret = 3;
        Specified by:
        getSecret in interface SecretVolumeOrBuilder
        Returns:
        The secret.
      • getSecretBytes

        public com.google.protobuf.ByteString getSecretBytes()
         Name of the secret in Secret Manager (not the full resource name).
         
        string secret = 3;
        Specified by:
        getSecretBytes in interface SecretVolumeOrBuilder
        Returns:
        The bytes for secret.
      • getVersionsList

        public List<SecretVolume.SecretVersion> getVersionsList()
         List of secret versions to mount for this secret. If empty, the `latest`
         version of the secret is made available in a file named after the
         secret under the mount point.
         
        repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;
        Specified by:
        getVersionsList in interface SecretVolumeOrBuilder
      • getVersionsOrBuilderList

        public List<? extends SecretVolume.SecretVersionOrBuilder> getVersionsOrBuilderList()
         List of secret versions to mount for this secret. If empty, the `latest`
         version of the secret is made available in a file named after the
         secret under the mount point.
         
        repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;
        Specified by:
        getVersionsOrBuilderList in interface SecretVolumeOrBuilder
      • getVersionsCount

        public int getVersionsCount()
         List of secret versions to mount for this secret. If empty, the `latest`
         version of the secret is made available in a file named after the
         secret under the mount point.
         
        repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;
        Specified by:
        getVersionsCount in interface SecretVolumeOrBuilder
      • getVersions

        public SecretVolume.SecretVersion getVersions​(int index)
         List of secret versions to mount for this secret. If empty, the `latest`
         version of the secret is made available in a file named after the
         secret under the mount point.
         
        repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;
        Specified by:
        getVersions in interface SecretVolumeOrBuilder
      • getVersionsOrBuilder

        public SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder​(int index)
         List of secret versions to mount for this secret. If empty, the `latest`
         version of the secret is made available in a file named after the
         secret under the mount point.
         
        repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4;
        Specified by:
        getVersionsOrBuilder in interface SecretVolumeOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static SecretVolume parseFrom​(ByteBuffer data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SecretVolume parseFrom​(ByteBuffer data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SecretVolume parseFrom​(com.google.protobuf.ByteString data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SecretVolume parseFrom​(com.google.protobuf.ByteString data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SecretVolume parseFrom​(byte[] data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SecretVolume parseFrom​(byte[] data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SecretVolume parseFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Throws:
        IOException
      • newBuilderForType

        public SecretVolume.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public SecretVolume.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected SecretVolume.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static SecretVolume getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<SecretVolume> parser()
      • getParserForType

        public com.google.protobuf.Parser<SecretVolume> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public SecretVolume getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder