Skip to main content

node_files

Creates, updates, deletes, gets or lists a node_files resource.

Overview

Namenode_files
TypeResource
Idazure.batch_dataplane.node_files

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe file path.
contentLengthintegerThe length of the file. Required.
contentTypestringThe content type of the file.
creationTimestring (date-time)The file creation time. The creation time is not returned for files on Linux Compute Nodes.
fileModestringThe file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes.
isDirectorybooleanWhether the object represents a directory.
lastModifiedstring (date-time)The time at which the file was last modified. Required.
urlstringThe URL of the file.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_node_filesselectpool_id, node_id, endpointtimeOut, ocp-date, maxresults, $filter, recursiveLists all of the files in Task directories on the specified Compute Node. Lists all of the files in Task directories on the specified Compute Node.
delete_node_filedeletepool_id, node_id, file_path, endpointtimeOut, ocp-date, recursiveDeletes the specified file from the Compute Node. Deletes the specified file from the Compute Node.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
file_pathstringThe path to the file or directory. Required.
node_idstringThe ID of the Compute Node. Required.
pool_idstringThe ID of the Pool that contains the Compute Node. Required.
$filterstringAn OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files _. Default value is None.
maxresultsintegerThe maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None.
ocp-datestringThe time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
recursivebooleanWhether to delete children of a directory. If the filePath parameter represents a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail. Default value is None.
timeOutintegerThe maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None.

SELECT examples

Lists all of the files in Task directories on the specified Compute Node. Lists all of the files in Task directories on the specified Compute Node.

SELECT
name,
contentLength,
contentType,
creationTime,
fileMode,
isDirectory,
lastModified,
url
FROM azure.batch_dataplane.node_files
WHERE pool_id = '{{ pool_id }}' -- required
AND node_id = '{{ node_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND maxresults = '{{ maxresults }}'
AND $filter = '{{ $filter }}'
AND recursive = '{{ recursive }}'
;

DELETE examples

Deletes the specified file from the Compute Node. Deletes the specified file from the Compute Node.

DELETE FROM azure.batch_dataplane.node_files
WHERE pool_id = '{{ pool_id }}' --required
AND node_id = '{{ node_id }}' --required
AND file_path = '{{ file_path }}' --required
AND endpoint = '{{ endpoint }}' --required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND recursive = '{{ recursive }}'
;