Class BatchTaskContainerSettings

java.lang.Object
com.azure.compute.batch.models.BatchTaskContainerSettings
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchTaskContainerSettings>

public final class BatchTaskContainerSettings extends Object implements com.azure.json.JsonSerializable<BatchTaskContainerSettings>
The container settings for a Task.
  • Constructor Details

    • BatchTaskContainerSettings

      public BatchTaskContainerSettings(String imageName)
      Creates an instance of BatchTaskContainerSettings class.
      Parameters:
      imageName - the imageName value to set.
  • Method Details

    • getContainerRunOptions

      public String getContainerRunOptions()
      Get the containerRunOptions property: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
      Returns:
      the containerRunOptions value.
    • setContainerRunOptions

      public BatchTaskContainerSettings setContainerRunOptions(String containerRunOptions)
      Set the containerRunOptions property: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
      Parameters:
      containerRunOptions - the containerRunOptions value to set.
      Returns:
      the BatchTaskContainerSettings object itself.
    • getImageName

      public String getImageName()
      Get the imageName property: The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default.
      Returns:
      the imageName value.
    • getRegistry

      public ContainerRegistryReference getRegistry()
      Get the registry property: The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation.
      Returns:
      the registry value.
    • setRegistry

      Set the registry property: The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation.
      Parameters:
      registry - the registry value to set.
      Returns:
      the BatchTaskContainerSettings object itself.
    • getWorkingDirectory

      public ContainerWorkingDirectory getWorkingDirectory()
      Get the workingDirectory property: The location of the container Task working directory. The default is 'taskWorkingDirectory'.
      Returns:
      the workingDirectory value.
    • setWorkingDirectory

      public BatchTaskContainerSettings setWorkingDirectory(ContainerWorkingDirectory workingDirectory)
      Set the workingDirectory property: The location of the container Task working directory. The default is 'taskWorkingDirectory'.
      Parameters:
      workingDirectory - the workingDirectory value to set.
      Returns:
      the BatchTaskContainerSettings object itself.
    • getContainerHostBatchBindMounts

      public List<ContainerHostBatchBindMountEntry> getContainerHostBatchBindMounts()
      Get the containerHostBatchBindMounts property: The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty.
      Returns:
      the containerHostBatchBindMounts value.
    • setContainerHostBatchBindMounts

      public BatchTaskContainerSettings setContainerHostBatchBindMounts(List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts)
      Set the containerHostBatchBindMounts property: The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty.
      Parameters:
      containerHostBatchBindMounts - the containerHostBatchBindMounts value to set.
      Returns:
      the BatchTaskContainerSettings object itself.
    • toJson

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

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