Share via


TaskContainerSettings Class

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

Implements

public final class TaskContainerSettings
implements JsonSerializable<TaskContainerSettings>

The container settings for a task.

Constructor Summary

Constructor Description
TaskContainerSettings()

Creates an instance of TaskContainerSettings class.

Method Summary

Modifier and Type Method and Description
List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts()

Get the containerHostBatchBindMounts property: 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).

String containerRunOptions()

Get the containerRunOptions property: These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.

static TaskContainerSettings fromJson(JsonReader jsonReader)

Reads an instance of TaskContainerSettings from the JsonReader.

String imageName()

Get the imageName property: This is the full image reference, as would be specified to "docker pull".

ContainerRegistry registry()

Get the registry property: This setting can be omitted if was already provided at pool creation.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

TaskContainerSettings withContainerHostBatchBindMounts(List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts)

Set the containerHostBatchBindMounts property: 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).

TaskContainerSettings withContainerRunOptions(String containerRunOptions)

Set the containerRunOptions property: These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.

TaskContainerSettings withImageName(String imageName)

Set the imageName property: This is the full image reference, as would be specified to "docker pull".

TaskContainerSettings withRegistry(ContainerRegistry registry)

Set the registry property: This setting can be omitted if was already provided at pool creation.

TaskContainerSettings withWorkingDirectory(ContainerWorkingDirectory workingDirectory)

Set the workingDirectory property: A flag to indicate where the container task working directory is.

ContainerWorkingDirectory workingDirectory()

Get the workingDirectory property: A flag to indicate where the container task working directory is.

Methods inherited from java.lang.Object

Constructor Details

TaskContainerSettings

public TaskContainerSettings()

Creates an instance of TaskContainerSettings class.

Method Details

containerHostBatchBindMounts

public List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts()

Get the containerHostBatchBindMounts property: 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.

containerRunOptions

public String containerRunOptions()

Get the containerRunOptions property: 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.

fromJson

public static TaskContainerSettings fromJson(JsonReader jsonReader)

Reads an instance of TaskContainerSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TaskContainerSettings 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.

imageName

public String imageName()

Get the imageName property: 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.

registry

public ContainerRegistry registry()

Get the registry property: This setting can be omitted if was already provided at pool creation.

Returns:

the registry value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withContainerHostBatchBindMounts

public TaskContainerSettings withContainerHostBatchBindMounts(List<ContainerHostBatchBindMountEntry> containerHostBatchBindMounts)

Set the containerHostBatchBindMounts property: 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 TaskContainerSettings object itself.

withContainerRunOptions

public TaskContainerSettings withContainerRunOptions(String containerRunOptions)

Set the containerRunOptions property: 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.

withImageName

public TaskContainerSettings withImageName(String imageName)

Set the imageName property: 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.

withRegistry

public TaskContainerSettings withRegistry(ContainerRegistry registry)

Set the registry property: This setting can be omitted if was already provided at pool creation.

Parameters:

registry - the registry value to set.

Returns:

the TaskContainerSettings object itself.

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.

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.

Applies to