node_groups
Creates, updates, deletes, gets or lists a node_groups
resource.
Overview
Name | node_groups |
Type | Resource |
Id | google.compute.node_groups |
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. |
autoscalingPolicy | object | |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
fingerprint | string | |
kind | string | [Output Only] The type of the resource. Always compute#nodeGroup for node group. |
locationHint | string | An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate. |
maintenanceInterval | string | Specifies the frequency of planned maintenance events. The accepted values are: AS_NEEDED and RECURRENT . |
maintenancePolicy | string | Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies. |
maintenanceWindow | object | Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window. |
nodeTemplate | string | URL of the node template to create the node group from. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
shareSettings | object | The share setting for reservations and sole tenancy node groups. |
size | integer | [Output Only] The total number of nodes in the node group. |
status | string | |
zone | string | [Output Only] The name of the zone where the node group resides, such as us-central1-a. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
aggregated_list | SELECT | project | Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true . |
get | SELECT | nodeGroup, project, zone | Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead. |
list | SELECT | project, zone | Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. |
insert | INSERT | initialNodeCount, project, zone | Creates a NodeGroup resource in the specified project using the data included in the request. |
delete | DELETE | nodeGroup, project, zone | Deletes the specified NodeGroup resource. |
patch | UPDATE | nodeGroup, project, zone | Updates the specified node group. |
perform_maintenance | EXEC | nodeGroup, project, zone | Perform maintenance on a subset of nodes in the node group. |
set_node_template | EXEC | nodeGroup, project, zone | Updates the node template of the node group. |
simulate_maintenance_event | EXEC | nodeGroup, project, zone | Simulates maintenance event on specified nodes from the node group. |
SELECT
examples
Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
SELECT
id,
name,
description,
autoscalingPolicy,
creationTimestamp,
fingerprint,
kind,
locationHint,
maintenanceInterval,
maintenancePolicy,
maintenanceWindow,
nodeTemplate,
selfLink,
shareSettings,
size,
status,
zone
FROM google.compute.node_groups
WHERE project = '{{ project }}';
INSERT
example
Use the following StackQL query and manifest file to create a new node_groups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.compute.node_groups (
initialNodeCount,
project,
zone,
name,
description,
nodeTemplate,
zone,
status,
size,
autoscalingPolicy,
maintenancePolicy,
locationHint,
fingerprint,
maintenanceWindow,
shareSettings,
maintenanceInterval
)
SELECT
'{{ initialNodeCount }}',
'{{ project }}',
'{{ zone }}',
'{{ name }}',
'{{ description }}',
'{{ nodeTemplate }}',
'{{ zone }}',
'{{ status }}',
'{{ size }}',
'{{ autoscalingPolicy }}',
'{{ maintenancePolicy }}',
'{{ locationHint }}',
'{{ fingerprint }}',
'{{ maintenanceWindow }}',
'{{ shareSettings }}',
'{{ maintenanceInterval }}'
;
- 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: nodeTemplate
value: string
- name: zone
value: string
- name: selfLink
value: string
- name: status
value: string
- name: size
value: integer
- name: autoscalingPolicy
value:
- name: mode
value: string
- name: minNodes
value: integer
- name: maxNodes
value: integer
- name: maintenancePolicy
value: string
- name: locationHint
value: string
- name: fingerprint
value: string
- name: maintenanceWindow
value:
- name: startTime
value: string
- name: maintenanceDuration
value:
- name: seconds
value: string
- name: nanos
value: integer
- name: shareSettings
value:
- name: shareType
value: string
- name: projectMap
value: object
- name: maintenanceInterval
value: string
UPDATE
example
Updates a node_groups
resource.
/*+ update */
UPDATE google.compute.node_groups
SET
name = '{{ name }}',
description = '{{ description }}',
nodeTemplate = '{{ nodeTemplate }}',
zone = '{{ zone }}',
status = '{{ status }}',
size = '{{ size }}',
autoscalingPolicy = '{{ autoscalingPolicy }}',
maintenancePolicy = '{{ maintenancePolicy }}',
locationHint = '{{ locationHint }}',
fingerprint = '{{ fingerprint }}',
maintenanceWindow = '{{ maintenanceWindow }}',
shareSettings = '{{ shareSettings }}',
maintenanceInterval = '{{ maintenanceInterval }}'
WHERE
nodeGroup = '{{ nodeGroup }}'
AND project = '{{ project }}'
AND zone = '{{ zone }}';
DELETE
example
Deletes the specified node_groups
resource.
/*+ delete */
DELETE FROM google.compute.node_groups
WHERE nodeGroup = '{{ nodeGroup }}'
AND project = '{{ project }}'
AND zone = '{{ zone }}';