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

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

    • Volume

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

    • name

      public String name()
      Get the name property: Volume name.
      Returns:
      the name value.
    • withName

      public Volume withName(String name)
      Set the name property: Volume name.
      Parameters:
      name - the name value to set.
      Returns:
      the Volume object itself.
    • storageType

      public StorageType storageType()
      Get the storageType property: Storage type for the volume. If not provided, use EmptyDir.
      Returns:
      the storageType value.
    • withStorageType

      public Volume withStorageType(StorageType storageType)
      Set the storageType property: Storage type for the volume. If not provided, use EmptyDir.
      Parameters:
      storageType - the storageType value to set.
      Returns:
      the Volume object itself.
    • storageName

      public String storageName()
      Get the storageName property: Name of storage resource. No need to provide for EmptyDir and Secret.
      Returns:
      the storageName value.
    • withStorageName

      public Volume withStorageName(String storageName)
      Set the storageName property: Name of storage resource. No need to provide for EmptyDir and Secret.
      Parameters:
      storageName - the storageName value to set.
      Returns:
      the Volume object itself.
    • secrets

      public List<SecretVolumeItem> secrets()
      Get the secrets property: List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
      Returns:
      the secrets value.
    • withSecrets

      public Volume withSecrets(List<SecretVolumeItem> secrets)
      Set the secrets property: List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
      Parameters:
      secrets - the secrets value to set.
      Returns:
      the Volume object itself.
    • mountOptions

      public String mountOptions()
      Get the mountOptions property: Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated string.
      Returns:
      the mountOptions value.
    • withMountOptions

      public Volume withMountOptions(String mountOptions)
      Set the mountOptions property: Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated string.
      Parameters:
      mountOptions - the mountOptions value to set.
      Returns:
      the Volume 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<Volume>
      Throws:
      IOException
    • fromJson

      public static Volume fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Volume from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Volume 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 Volume.