Class TaskContainerSettings

java.lang.Object
com.azure.resourcemanager.batch.models.TaskContainerSettings

public final class TaskContainerSettings extends Object
The container settings for a task.
  • Constructor Details

    • TaskContainerSettings

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

    • containerRunOptions

      public String containerRunOptions()
      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.
    • withContainerRunOptions

      public TaskContainerSettings withContainerRunOptions(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 TaskContainerSettings object itself.
    • imageName

      public String imageName()
      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.
    • withImageName

      public TaskContainerSettings withImageName(String imageName)
      Set 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.

      Parameters:
      imageName - the imageName value to set.
      Returns:
      the TaskContainerSettings object itself.
    • registry

      public ContainerRegistry registry()
      Get the registry property: A private container registry.

      This setting can be omitted if was already provided at pool creation.

      Returns:
      the registry value.
    • withRegistry

      public TaskContainerSettings withRegistry(ContainerRegistry registry)
      Set the registry property: A private container registry.

      This setting can be omitted if was already provided at pool creation.

      Parameters:
      registry - the registry value to set.
      Returns:
      the TaskContainerSettings object itself.
    • workingDirectory

      public ContainerWorkingDirectory workingDirectory()
      Get the workingDirectory property: A flag to indicate where the container task working directory is. The default is 'taskWorkingDirectory'.
      Returns:
      the workingDirectory value.
    • withWorkingDirectory

      public TaskContainerSettings withWorkingDirectory(ContainerWorkingDirectory workingDirectory)
      Set the workingDirectory property: A flag to indicate where the container task working directory is. The default is 'taskWorkingDirectory'.
      Parameters:
      workingDirectory - the workingDirectory value to set.
      Returns:
      the TaskContainerSettings object itself.
    • validate

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