Package com.azure.compute.batch.models
Class ResourceFile
java.lang.Object
com.azure.compute.batch.models.ResourceFile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResourceFile>
public final class ResourceFile
extends Object
implements com.azure.json.JsonSerializable<ResourceFile>
A single file or multiple files to be downloaded to a Compute Node.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceFile
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ResourceFile from the JsonReader.Get the autoStorageContainerName property: The storage container name in the auto storage Account.Get the blobPrefix property: The blob prefix to use when downloading blobs from an Azure Storage container.Get the fileMode property: The file permission mode attribute in octal format.Get the filePath property: The location on the Compute Node to which to download the file(s), relative to the Task's working directory.Get the httpUrl property: The URL of the file to download.Get the identityReference property: The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl.Get the storageContainerUrl property: The URL of the blob container within Azure Blob Storage.setAutoStorageContainerName
(String autoStorageContainerName) Set the autoStorageContainerName property: The storage container name in the auto storage Account.setBlobPrefix
(String blobPrefix) Set the blobPrefix property: The blob prefix to use when downloading blobs from an Azure Storage container.setFileMode
(String fileMode) Set the fileMode property: The file permission mode attribute in octal format.setFilePath
(String filePath) Set the filePath property: The location on the Compute Node to which to download the file(s), relative to the Task's working directory.setHttpUrl
(String httpUrl) Set the httpUrl property: The URL of the file to download.setIdentityReference
(BatchNodeIdentityReference identityReference) Set the identityReference property: The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl.setStorageContainerUrl
(String storageContainerUrl) Set the storageContainerUrl property: The URL of the blob container within Azure Blob Storage.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
-
ResourceFile
public ResourceFile()Creates an instance of ResourceFile class.
-
-
Method Details
-
getAutoStorageContainerName
Get the autoStorageContainerName property: The storage container name in the auto storage Account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.- Returns:
- the autoStorageContainerName value.
-
setAutoStorageContainerName
Set the autoStorageContainerName property: The storage container name in the auto storage Account. 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.
-
getStorageContainerUrl
Get the storageContainerUrl property: The URL of the blob container within Azure Blob Storage. 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.
-
setStorageContainerUrl
Set the storageContainerUrl property: The URL of the blob container within Azure Blob Storage. 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.
-
getHttpUrl
Get the httpUrl property: The URL of the file to download. 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.
-
setHttpUrl
Set the httpUrl property: The URL of the file to download. 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.
-
getBlobPrefix
Get the blobPrefix property: The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. 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.
-
setBlobPrefix
Set the blobPrefix property: The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. 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.
-
getFilePath
Get the filePath property: The location on the Compute Node to which to download the file(s), relative to the Task's working directory. 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.
-
setFilePath
Set the filePath property: The location on the Compute Node to which to download the file(s), relative to the Task's working directory. 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.
-
getFileMode
Get the fileMode property: The file permission mode attribute in octal format. 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 Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file.- Returns:
- the fileMode value.
-
setFileMode
Set the fileMode property: The file permission mode attribute in octal format. 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 Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file.- Parameters:
fileMode
- the fileMode value to set.- Returns:
- the ResourceFile object itself.
-
getIdentityReference
Get the identityReference property: The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl.- Returns:
- the identityReference value.
-
setIdentityReference
Set the identityReference property: The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl.- Parameters:
identityReference
- the identityReference value to set.- Returns:
- the ResourceFile object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ResourceFile>
- Throws:
IOException
-
fromJson
Reads an instance of ResourceFile from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ResourceFile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the ResourceFile.
-