Package com.azure.compute.batch.models
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 Summary
ConstructorsConstructorDescriptionBatchTaskContainerSettings
(String imageName) Creates an instance of BatchTaskContainerSettings class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchTaskContainerSettings
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchTaskContainerSettings from the JsonReader.Get the containerHostBatchBindMounts property: The paths you want to mounted to container task.Get the containerRunOptions property: Additional options to the container create command.Get the imageName property: The Image to use to create the container in which the Task will run.Get the registry property: The private registry which contains the container Image.Get the workingDirectory property: The location of the container Task working directory.setContainerHostBatchBindMounts
(List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts) Set the containerHostBatchBindMounts property: The paths you want to mounted to container task.setContainerRunOptions
(String containerRunOptions) Set the containerRunOptions property: Additional options to the container create command.setRegistry
(ContainerRegistryReference registry) Set the registry property: The private registry which contains the container Image.setWorkingDirectory
(ContainerWorkingDirectory workingDirectory) Set the workingDirectory property: The location of the container Task working directory.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) 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
-
BatchTaskContainerSettings
Creates an instance of BatchTaskContainerSettings class.- Parameters:
imageName
- the imageName value to set.
-
-
Method Details
-
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
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
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
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
Get the workingDirectory property: The location of the container Task working directory. The default is 'taskWorkingDirectory'.- Returns:
- the workingDirectory value.
-
setWorkingDirectory
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
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
- Specified by:
toJson
in interfacecom.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.
-