Skip to main content

node_templates

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

Overview

Namenode_templates
TypeResource
Idgoogle.compute.node_templates

Fields

NameDatatypeDescription
idstring[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringThe name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
acceleratorsarray
cpuOvercommitTypestringCPU overcommit.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
disksarray
kindstring[Output Only] The type of the resource. Always compute#nodeTemplate for node templates.
nodeAffinityLabelsobjectLabels to use for node affinity, which will be used in instance scheduling.
nodeTypestringThe node type to use for nodes group that are created from this template.
nodeTypeFlexibilityobject
regionstring[Output Only] The name of the region where the node template resides, such as us-central1.
selfLinkstring[Output Only] Server-defined URL for the resource.
serverBindingobject
statusstring[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.
statusMessagestring[Output Only] An optional, human-readable explanation of the status.

Methods

NameAccessible byRequired ParamsDescription
aggregated_listSELECTprojectRetrieves an aggregated list of node templates. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
getSELECTnodeTemplate, project, regionReturns the specified node template.
listSELECTproject, regionRetrieves a list of node templates available to the specified project.
insertINSERTproject, regionCreates a NodeTemplate resource in the specified project using the data included in the request.
deleteDELETEnodeTemplate, project, regionDeletes the specified NodeTemplate resource.

SELECT examples

Retrieves an aggregated list of node templates. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

SELECT
id,
name,
description,
accelerators,
cpuOvercommitType,
creationTimestamp,
disks,
kind,
nodeAffinityLabels,
nodeType,
nodeTypeFlexibility,
region,
selfLink,
serverBinding,
status,
statusMessage
FROM google.compute.node_templates
WHERE project = '{{ project }}';

INSERT example

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

/*+ create */
INSERT INTO google.compute.node_templates (
project,
region,
name,
description,
nodeType,
nodeAffinityLabels,
status,
statusMessage,
region,
nodeTypeFlexibility,
serverBinding,
disks,
accelerators,
cpuOvercommitType
)
SELECT
'{{ project }}',
'{{ region }}',
'{{ name }}',
'{{ description }}',
'{{ nodeType }}',
'{{ nodeAffinityLabels }}',
'{{ status }}',
'{{ statusMessage }}',
'{{ region }}',
'{{ nodeTypeFlexibility }}',
'{{ serverBinding }}',
'{{ disks }}',
'{{ accelerators }}',
'{{ cpuOvercommitType }}'
;

DELETE example

Deletes the specified node_templates resource.

/*+ delete */
DELETE FROM google.compute.node_templates
WHERE nodeTemplate = '{{ nodeTemplate }}'
AND project = '{{ project }}'
AND region = '{{ region }}';