Skip to main content

nodes

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

Overview

Namenodes
TypeResource
Idazure.batch_dataplane.nodes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes. Required.
affinityIdstringAn identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. Required.
allocationTimestring (date-time)The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. Required.
endpointConfigurationobjectThe endpoint configuration for the Compute Node.
errorsarrayThe list of errors that are currently being encountered by the Compute Node.
ipAddressstringThe IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. Required.
ipv6AddressstringThe IPv6 address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. This property will not be present if the Pool is not configured for IPv6. Required.
isDedicatedbooleanWhether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node.
lastBootTimestring (date-time)The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable. Required.
nodeAgentInfoobjectInformation about the Compute Node agent version and the time the Compute Node upgraded to a new version.
recentTasksarrayA list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool.
runningTaskSlotsCountintegerThe total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.
runningTasksCountintegerThe total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.
schedulingStatestringWhether the Compute Node is available for Task scheduling. Known values are: "enabled" and "disabled". (enabled, disabled)
startTaskobjectThe Task specified to run on the Compute Node as it joins the Pool.
startTaskInfoobjectRuntime information about the execution of the StartTask on the Compute Node.
statestringThe current state of the Compute Node. Required. Known values are: "idle", "rebooting", "reimaging", "running", "unusable", "creating", "starting", "waitingforstarttask", "starttaskfailed", "unknown", "leavingpool", "offline", "preempted", "upgradingos", "deallocated", and "deallocating". (idle, rebooting, reimaging, running, unusable, creating, starting, waitingforstarttask, starttaskfailed, unknown, leavingpool, offline, preempted, upgradingos, deallocated, deallocating)
stateTransitionTimestring (date-time)The time at which the Compute Node entered its current state. Required.
totalTasksRunintegerThe total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. Required.
totalTasksSucceededintegerThe total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.
urlstringThe URL of the Compute Node. Required.
virtualMachineInfoobjectInfo about the current state of the virtual machine. Required.
vmSizestringThe size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes _). Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_nodeselectpool_id, node_id, endpointtimeOut, ocp-date, $selectGets information about the specified Compute Node. Gets information about the specified Compute Node.
list_nodesselectpool_id, endpointtimeOut, ocp-date, maxresults, $filter, $selectLists the Compute Nodes in the specified Pool. Lists the Compute Nodes in the specified Pool.

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: )
node_idstringThe ID of the Compute Node that you want to get information about. Required.
pool_idstringThe ID of the Pool from which you want to list Compute Nodes. 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-nodes-in-a-pool _. Default value is None.
$selectarrayAn OData $select clause. 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.
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

Gets information about the specified Compute Node. Gets information about the specified Compute Node.

SELECT
id,
affinityId,
allocationTime,
endpointConfiguration,
errors,
ipAddress,
ipv6Address,
isDedicated,
lastBootTime,
nodeAgentInfo,
recentTasks,
runningTaskSlotsCount,
runningTasksCount,
schedulingState,
startTask,
startTaskInfo,
state,
stateTransitionTime,
totalTasksRun,
totalTasksSucceeded,
url,
virtualMachineInfo,
vmSize
FROM azure.batch_dataplane.nodes
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 $select = '{{ $select }}'
;