ResourceFile Class

  • java.lang.Object
    • com.microsoft.azure.management.batch.ResourceFile

public class ResourceFile

A single file or multiple files to be downloaded to a compute node.

Constructor Summary

Constructor Description
ResourceFile()

Method Summary

Modifier and Type Method and Description
java.lang.String autoStorageContainerName()

Get the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

java.lang.String blobPrefix()

Get the property is valid only when autoStorageContainerName or storageContainerUrl is used.

java.lang.String fileMode()

Get this property applies only to files being downloaded to Linux compute nodes.

java.lang.String filePath()

Get if the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename.

java.lang.String httpUrl()

Get the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

ComputeNodeIdentityReference identityReference()

Get the identityReference value.

java.lang.String storageContainerUrl()

Get the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

ResourceFile withAutoStorageContainerName(String autoStorageContainerName)

Set the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

ResourceFile withBlobPrefix(String blobPrefix)

Set the property is valid only when autoStorageContainerName or storageContainerUrl is used.

ResourceFile withFileMode(String fileMode)

Set this property applies only to files being downloaded to Linux compute nodes.

ResourceFile withFilePath(String filePath)

Set if the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename.

ResourceFile withHttpUrl(String httpUrl)

Set the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

ResourceFile withIdentityReference(ComputeNodeIdentityReference identityReference)

Set the identityReference value.

ResourceFile withStorageContainerUrl(String storageContainerUrl)

Set the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ResourceFile

public ResourceFile()

Method Details

autoStorageContainerName

public String autoStorageContainerName()

Get the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

Returns:

the autoStorageContainerName value

blobPrefix

public String blobPrefix()

Get the property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.

Returns:

the blobPrefix value

fileMode

public String fileMode()

Get this property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.

Returns:

the fileMode value

filePath

public String filePath()

Get if the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task's working directory (for example by using '..').

Returns:

the filePath value

httpUrl

public String httpUrl()

Get the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access.

Returns:

the httpUrl value

identityReference

public ComputeNodeIdentityReference identityReference()

Get the identityReference value.

Returns:

the identityReference value

storageContainerUrl

public String storageContainerUrl()

Get the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access.

Returns:

the storageContainerUrl value

withAutoStorageContainerName

public ResourceFile withAutoStorageContainerName(String autoStorageContainerName)

Set the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

Parameters:

autoStorageContainerName - the autoStorageContainerName value to set

Returns:

the ResourceFile object itself.

withBlobPrefix

public ResourceFile withBlobPrefix(String blobPrefix)

Set the property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.

Parameters:

blobPrefix - the blobPrefix value to set

Returns:

the ResourceFile object itself.

withFileMode

public ResourceFile withFileMode(String fileMode)

Set this property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.

Parameters:

fileMode - the fileMode value to set

Returns:

the ResourceFile object itself.

withFilePath

public ResourceFile withFilePath(String filePath)

Set if the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task's working directory (for example by using '..').

Parameters:

filePath - the filePath value to set

Returns:

the ResourceFile object itself.

withHttpUrl

public ResourceFile withHttpUrl(String httpUrl)

Set the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access.

Parameters:

httpUrl - the httpUrl value to set

Returns:

the ResourceFile object itself.

withIdentityReference

public ResourceFile withIdentityReference(ComputeNodeIdentityReference identityReference)

Set the identityReference value.

Parameters:

identityReference - the identityReference value to set

Returns:

the ResourceFile object itself.

withStorageContainerUrl

public ResourceFile withStorageContainerUrl(String storageContainerUrl)

Set the autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access.

Parameters:

storageContainerUrl - the storageContainerUrl value to set

Returns:

the ResourceFile object itself.

Applies to