Skip to main content

nodes

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

Overview

Namenodes
TypeResource
Idgoogle.tpu.nodes

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (int64)Output only. The unique identifier for the TPU Node.
namestringOutput only. Immutable. The name of the TPU.
acceleratorConfigobjectThe AccleratorConfig for the TPU Node. (id: AcceleratorConfig)
acceleratorTypestringOptional. The type of hardware accelerators associated with this node.
apiVersionstringOutput only. The API version that created this Node.
cidrBlockstringThe CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
createTimestring (google-datetime)Output only. The time when the node was created.
dataDisksarrayThe additional data disks for the Node.
descriptionstringThe user-supplied description of the TPU. Maximum of 512 characters.
healthstringThe health status of the TPU node.
healthDescriptionstringOutput only. If this field is populated, it contains a description of why the TPU Node is unhealthy.
labelsobjectResource labels to represent user-provided metadata.
metadataobjectCustom metadata to apply to the TPU Node. Can set startup-script and shutdown-script
multisliceNodebooleanOutput only. Whether the Node belongs to a Multislice group.
networkConfigobjectNetwork configurations for the TPU node. network_config and network_configs are mutually exclusive, you can only specify one of them. If both are specified, an error will be returned. (id: NetworkConfig)
networkConfigsarrayOptional. Repeated network configurations for the TPU node. This field is used to specify multiple networks configs for the TPU node. network_config and network_configs are mutually exclusive, you can only specify one of them. If both are specified, an error will be returned.
networkEndpointsarrayOutput only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.
queuedResourcestringOutput only. The qualified name of the QueuedResource that requested this Node.
runtimeVersionstringRequired. The runtime version running in the Node.
schedulingConfigobjectThe scheduling options for this node. (id: SchedulingConfig)
serviceAccountobjectThe Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used. (id: ServiceAccount)
shieldedInstanceConfigobjectShielded Instance options. (id: ShieldedInstanceConfig)
statestringOutput only. The current state for the TPU Node.
symptomsarrayOutput only. The Symptoms that have occurred to the TPU Node.
tagsarrayTags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.
upcomingMaintenanceobjectOutput only. Upcoming maintenance on this TPU node. (id: UpcomingMaintenance)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, nodesIdGets the details of a node.
listselectprojectsId, locationsIdpageSize, pageTokenLists nodes.
createinsertprojectsId, locationsIdnodeIdCreates a node.
patchupdateprojectsId, locationsId, nodesIdupdateMaskUpdates the configurations of a node.
deletedeleteprojectsId, locationsId, nodesIdDeletes a node.
stopexecprojectsId, locationsId, nodesIdStops a node. This operation is only available with single TPU nodes.
startexecprojectsId, locationsId, nodesIdStarts a 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
locationsIdstring
nodesIdstring
projectsIdstring
nodeIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the details of a node.

SELECT
id,
name,
acceleratorConfig,
acceleratorType,
apiVersion,
cidrBlock,
createTime,
dataDisks,
description,
health,
healthDescription,
labels,
metadata,
multisliceNode,
networkConfig,
networkConfigs,
networkEndpoints,
queuedResource,
runtimeVersion,
schedulingConfig,
serviceAccount,
shieldedInstanceConfig,
state,
symptoms,
tags,
upcomingMaintenance
FROM google.tpu.nodes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND nodesId = '{{ nodesId }}' -- required;

INSERT examples

Creates a node.

INSERT INTO google.tpu.nodes (
data__description,
data__acceleratorType,
data__runtimeVersion,
data__networkConfig,
data__networkConfigs,
data__cidrBlock,
data__serviceAccount,
data__schedulingConfig,
data__health,
data__labels,
data__metadata,
data__tags,
data__dataDisks,
data__shieldedInstanceConfig,
data__acceleratorConfig,
projectsId,
locationsId,
nodeId
)
SELECT
'{{ description }}',
'{{ acceleratorType }}',
'{{ runtimeVersion }}',
'{{ networkConfig }}',
'{{ networkConfigs }}',
'{{ cidrBlock }}',
'{{ serviceAccount }}',
'{{ schedulingConfig }}',
'{{ health }}',
'{{ labels }}',
'{{ metadata }}',
'{{ tags }}',
'{{ dataDisks }}',
'{{ shieldedInstanceConfig }}',
'{{ acceleratorConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ nodeId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the configurations of a node.

UPDATE google.tpu.nodes
SET
data__description = '{{ description }}',
data__acceleratorType = '{{ acceleratorType }}',
data__runtimeVersion = '{{ runtimeVersion }}',
data__networkConfig = '{{ networkConfig }}',
data__networkConfigs = '{{ networkConfigs }}',
data__cidrBlock = '{{ cidrBlock }}',
data__serviceAccount = '{{ serviceAccount }}',
data__schedulingConfig = '{{ schedulingConfig }}',
data__health = '{{ health }}',
data__labels = '{{ labels }}',
data__metadata = '{{ metadata }}',
data__tags = '{{ tags }}',
data__dataDisks = '{{ dataDisks }}',
data__shieldedInstanceConfig = '{{ shieldedInstanceConfig }}',
data__acceleratorConfig = '{{ acceleratorConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND nodesId = '{{ nodesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a node.

DELETE FROM google.tpu.nodes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND nodesId = '{{ nodesId }}' --required;

Lifecycle Methods

Stops a node. This operation is only available with single TPU nodes.

EXEC google.tpu.nodes.stop 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@nodesId='{{ nodesId }}' --required;