node_files
Creates, updates, deletes, gets or lists a node_files resource.
Overview
| Name | node_files |
| Type | Resource |
| Id | azure.batch_dataplane.node_files |
Fields
The following fields are returned by SELECT queries:
- list_node_files
| Name | Datatype | Description |
|---|---|---|
name | string | The file path. |
contentLength | integer | The length of the file. Required. |
contentType | string | The content type of the file. |
creationTime | string (date-time) | The file creation time. The creation time is not returned for files on Linux Compute Nodes. |
fileMode | string | The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. |
isDirectory | boolean | Whether the object represents a directory. |
lastModified | string (date-time) | The time at which the file was last modified. Required. |
url | string | The URL of the file. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_node_files | select | pool_id, node_id, endpoint | timeOut, ocp-date, maxresults, $filter, recursive | 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. |
delete_node_file | delete | pool_id, node_id, file_path, endpoint | timeOut, ocp-date, recursive | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
file_path | string | The path to the file or directory. Required. |
node_id | string | The ID of the Compute Node. Required. |
pool_id | string | The ID of the Pool that contains the Compute Node. Required. |
$filter | string | An 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. |
maxresults | integer | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. |
ocp-date | string | The 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. |
recursive | boolean | Whether 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. |
timeOut | integer | The 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
- list_node_files
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
- delete_node_file
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 }}'
;