Share via


BatchTaskContainerSettings Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchTaskContainerSettings

Implements

public final class BatchTaskContainerSettings
implements JsonSerializable<BatchTaskContainerSettings>

The container settings for a Task.

Constructor Summary

Constructor Description
BatchTaskContainerSettings(String imageName)

Creates an instance of BatchTaskContainerSettings class.

Method Summary

Modifier and Type Method and Description
static BatchTaskContainerSettings fromJson(JsonReader jsonReader)

Reads an instance of BatchTaskContainerSettings from the JsonReader.

List<ContainerHostBatchBindMountEntry> getContainerHostBatchBindMounts()

Get the containerHostBatchBindMounts property: The paths you want to mounted to container task.

String getContainerRunOptions()

Get the containerRunOptions property: Additional options to the container create command.

String getImageName()

Get the imageName property: The Image to use to create the container in which the Task will run.

ContainerRegistryReference getRegistry()

Get the registry property: The private registry which contains the container Image.

ContainerWorkingDirectory getWorkingDirectory()

Get the workingDirectory property: The location of the container Task working directory.

BatchTaskContainerSettings setContainerHostBatchBindMounts(List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts)

Set the containerHostBatchBindMounts property: The paths you want to mounted to container task.

BatchTaskContainerSettings setContainerRunOptions(String containerRunOptions)

Set the containerRunOptions property: Additional options to the container create command.

BatchTaskContainerSettings setRegistry(ContainerRegistryReference registry)

Set the registry property: The private registry which contains the container Image.

BatchTaskContainerSettings setWorkingDirectory(ContainerWorkingDirectory workingDirectory)

Set the workingDirectory property: The location of the container Task working directory.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchTaskContainerSettings

public BatchTaskContainerSettings(String imageName)

Creates an instance of BatchTaskContainerSettings class.

Parameters:

imageName - the imageName value to set.

Method Details

fromJson

public static BatchTaskContainerSettings fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

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.

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.

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.

getWorkingDirectory

public ContainerWorkingDirectory getWorkingDirectory()

Get the workingDirectory property: The location of the container Task working directory. The default is 'taskWorkingDirectory'.

Returns:

the workingDirectory 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.

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.

setRegistry

public BatchTaskContainerSettings setRegistry(ContainerRegistryReference registry)

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.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to