Skip to main content

nodes

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

Overview

Namenodes
TypeResource
Idgoogle.tpu.nodes

Fields

NameDatatypeDescription
idstringOutput only. The unique identifier for the TPU Node.
namestringOutput only. Immutable. The name of the TPU.
descriptionstringThe user-supplied description of the TPU. Maximum of 512 characters.
acceleratorConfigobjectA TPU accelerator configuration.
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.
createTimestringOutput only. The time when the node was created.
dataDisksarrayThe additional data disks for the Node.
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 related configurations.
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.
schedulingConfigobjectSets the scheduling options for this node.
serviceAccountobjectA service account.
shieldedInstanceConfigobjectA set of Shielded Instance options.
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.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, nodesId, projectsIdGets the details of a node.
listSELECTlocationsId, projectsIdLists nodes.
createINSERTlocationsId, projectsIdCreates a node.
deleteDELETElocationsId, nodesId, projectsIdDeletes a node.
patchUPDATElocationsId, nodesId, projectsIdUpdates the configurations of a node.
startEXEClocationsId, nodesId, projectsIdStarts a node.
stopEXEClocationsId, nodesId, projectsIdStops a node. This operation is only available with single TPU nodes.

SELECT examples

Lists nodes.

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

INSERT example

Use the following StackQL query and manifest file to create a new nodes resource.

/*+ create */
INSERT INTO google.tpu.nodes (
locationsId,
projectsId,
description,
acceleratorType,
runtimeVersion,
networkConfig,
cidrBlock,
serviceAccount,
schedulingConfig,
health,
labels,
metadata,
tags,
dataDisks,
shieldedInstanceConfig,
acceleratorConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ acceleratorType }}',
'{{ runtimeVersion }}',
'{{ networkConfig }}',
'{{ cidrBlock }}',
'{{ serviceAccount }}',
'{{ schedulingConfig }}',
'{{ health }}',
'{{ labels }}',
'{{ metadata }}',
'{{ tags }}',
'{{ dataDisks }}',
'{{ shieldedInstanceConfig }}',
'{{ acceleratorConfig }}'
;

UPDATE example

Updates a nodes resource.

/*+ update */
UPDATE google.tpu.nodes
SET
description = '{{ description }}',
acceleratorType = '{{ acceleratorType }}',
runtimeVersion = '{{ runtimeVersion }}',
networkConfig = '{{ networkConfig }}',
cidrBlock = '{{ cidrBlock }}',
serviceAccount = '{{ serviceAccount }}',
schedulingConfig = '{{ schedulingConfig }}',
health = '{{ health }}',
labels = '{{ labels }}',
metadata = '{{ metadata }}',
tags = '{{ tags }}',
dataDisks = '{{ dataDisks }}',
shieldedInstanceConfig = '{{ shieldedInstanceConfig }}',
acceleratorConfig = '{{ acceleratorConfig }}'
WHERE
locationsId = '{{ locationsId }}'
AND nodesId = '{{ nodesId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified nodes resource.

/*+ delete */
DELETE FROM google.tpu.nodes
WHERE locationsId = '{{ locationsId }}'
AND nodesId = '{{ nodesId }}'
AND projectsId = '{{ projectsId }}';