ResourceFile Class
- java.
lang. Object - com.
azure. resourcemanager. batch. models. ResourceFile
- com.
Implements
public final class ResourceFile
implements JsonSerializable<ResourceFile>
A single file or multiple files to be downloaded to a compute node.
Constructor Summary
| Constructor | Description |
|---|---|
| ResourceFile() |
Creates an instance of Resource |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
autoStorageContainerName()
Get the auto |
| String |
blobPrefix()
Get the blob |
| String |
fileMode()
Get the file |
| String |
filePath()
Get the file |
|
static
Resource |
fromJson(JsonReader jsonReader)
Reads an instance of Resource |
| String |
httpUrl()
Get the http |
|
Compute |
identityReference()
Get the identity |
| String |
storageContainerUrl()
Get the storage |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Resource |
withAutoStorageContainerName(String autoStorageContainerName)
Set the auto |
|
Resource |
withBlobPrefix(String blobPrefix)
Set the blob |
|
Resource |
withFileMode(String fileMode)
Set the file |
|
Resource |
withFilePath(String filePath)
Set the file |
|
Resource |
withHttpUrl(String httpUrl)
Set the http |
|
Resource |
withIdentityReference(ComputeNodeIdentityReference identityReference)
Set the identity |
|
Resource |
withStorageContainerUrl(String storageContainerUrl)
Set the storage |
Methods inherited from java.lang.Object
Constructor Details
ResourceFile
public ResourceFile()
Creates an instance of ResourceFile class.
Method Details
autoStorageContainerName
public String autoStorageContainerName()
Get the autoStorageContainerName property: The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.
Returns:
blobPrefix
public String blobPrefix()
Get the blobPrefix property: 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:
fileMode
public String fileMode()
Get the fileMode property: 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:
filePath
public String filePath()
Get the filePath property: 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:
fromJson
public static ResourceFile fromJson(JsonReader jsonReader)
Reads an instance of ResourceFile from the JsonReader.
Parameters:
Returns:
Throws:
httpUrl
public String httpUrl()
Get the httpUrl property: 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:
identityReference
public ComputeNodeIdentityReference identityReference()
Get the identityReference property: The reference to a user assigned identity associated with the Batch pool which a compute node will use.
Returns:
storageContainerUrl
public String storageContainerUrl()
Get the storageContainerUrl property: 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:
toJson
validate
public void validate()
Validates the instance.
withAutoStorageContainerName
public ResourceFile withAutoStorageContainerName(String autoStorageContainerName)
Set the autoStorageContainerName property: The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.
Parameters:
Returns:
withBlobPrefix
public ResourceFile withBlobPrefix(String blobPrefix)
Set the blobPrefix property: 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:
Returns:
withFileMode
public ResourceFile withFileMode(String fileMode)
Set the fileMode property: 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:
Returns:
withFilePath
public ResourceFile withFilePath(String filePath)
Set the filePath property: 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:
Returns:
withHttpUrl
public ResourceFile withHttpUrl(String httpUrl)
Set the httpUrl property: 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:
Returns:
withIdentityReference
public ResourceFile withIdentityReference(ComputeNodeIdentityReference identityReference)
Set the identityReference property: The reference to a user assigned identity associated with the Batch pool which a compute node will use.
Parameters:
Returns:
withStorageContainerUrl
public ResourceFile withStorageContainerUrl(String storageContainerUrl)
Set the storageContainerUrl property: 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:
Returns: