java.lang.Object
com.azure.resourcemanager.appcontainers.models.VolumeMount
All Implemented Interfaces:
com.azure.json.JsonSerializable<VolumeMount>

public final class VolumeMount extends Object implements com.azure.json.JsonSerializable<VolumeMount>
Volume mount for the Container App.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of VolumeMount class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of VolumeMount from the JsonReader.
    Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'.
    Get the subPath property: Path within the volume from which the container's volume should be mounted.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Get the volumeName property: This must match the Name of a Volume.
    withMountPath(String mountPath)
    Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'.
    Set the subPath property: Path within the volume from which the container's volume should be mounted.
    withVolumeName(String volumeName)
    Set the volumeName property: This must match the Name of a Volume.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • VolumeMount

      public VolumeMount()
      Creates an instance of VolumeMount class.
  • Method Details

    • volumeName

      public String volumeName()
      Get the volumeName property: This must match the Name of a Volume.
      Returns:
      the volumeName value.
    • withVolumeName

      public VolumeMount withVolumeName(String volumeName)
      Set the volumeName property: This must match the Name of a Volume.
      Parameters:
      volumeName - the volumeName value to set.
      Returns:
      the VolumeMount object itself.
    • mountPath

      public String mountPath()
      Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'.
      Returns:
      the mountPath value.
    • withMountPath

      public VolumeMount withMountPath(String mountPath)
      Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'.
      Parameters:
      mountPath - the mountPath value to set.
      Returns:
      the VolumeMount object itself.
    • subPath

      public String subPath()
      Get the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
      Returns:
      the subPath value.
    • withSubPath

      public VolumeMount withSubPath(String subPath)
      Set the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
      Parameters:
      subPath - the subPath value to set.
      Returns:
      the VolumeMount object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<VolumeMount>
      Throws:
      IOException
    • fromJson

      public static VolumeMount fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VolumeMount from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VolumeMount if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the VolumeMount.