node_templates
Creates, updates, deletes, gets or lists a node_templates
resource.
Overview
Name | node_templates |
Type | Resource |
Id | google.compute.node_templates |
Fields
Name | Datatype | Description |
---|---|---|
id | string | [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | The 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. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
accelerators | array | |
cpuOvercommitType | string | CPU overcommit. |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
disks | array | |
kind | string | [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. |
nodeAffinityLabels | object | Labels to use for node affinity, which will be used in instance scheduling. |
nodeType | string | The node type to use for nodes group that are created from this template. |
nodeTypeFlexibility | object | |
region | string | [Output Only] The name of the region where the node template resides, such as us-central1. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
serverBinding | object | |
status | string | [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. |
statusMessage | string | [Output Only] An optional, human-readable explanation of the status. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
aggregated_list | SELECT | project | Retrieves an aggregated list of node templates. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true . |
get | SELECT | nodeTemplate, project, region | Returns the specified node template. |
list | SELECT | project, region | Retrieves a list of node templates available to the specified project. |
insert | INSERT | project, region | Creates a NodeTemplate resource in the specified project using the data included in the request. |
delete | DELETE | nodeTemplate, project, region | Deletes 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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: kind
value: string
- name: id
value: string
- name: creationTimestamp
value: string
- name: name
value: string
- name: description
value: string
- name: nodeType
value: string
- name: nodeAffinityLabels
value: object
- name: status
value: string
- name: statusMessage
value: string
- name: region
value: string
- name: selfLink
value: string
- name: nodeTypeFlexibility
value:
- name: cpus
value: string
- name: memory
value: string
- name: localSsd
value: string
- name: serverBinding
value:
- name: type
value: string
- name: disks
value:
- - name: diskType
value: string
- name: diskSizeGb
value: integer
- name: diskCount
value: integer
- name: accelerators
value:
- - name: acceleratorType
value: string
- name: acceleratorCount
value: integer
- name: cpuOvercommitType
value: string
DELETE
example
Deletes the specified node_templates
resource.
/*+ delete */
DELETE FROM google.compute.node_templates
WHERE nodeTemplate = '{{ nodeTemplate }}'
AND project = '{{ project }}'
AND region = '{{ region }}';