node_groups
Creates, updates, deletes, gets or lists a node_groups resource.
Overview
| Name | node_groups |
| Type | Resource |
| Id | google.dataproc.node_groups |
Fields
The following fields are returned by SELECT queries:
- projects_regions_clusters_node_groups_get
| Name | Datatype | Description |
|---|---|---|
name | string | The Node group resource name (https://aip.dev/122). |
labels | object | Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labels. |
nodeGroupConfig | object | Optional. The node group instance group configuration. (id: InstanceGroupConfig) |
roles | array | Required. Node group roles. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_regions_clusters_node_groups_get | select | projectsId, regionsId, clustersId, nodeGroupsId | Gets the resource representation for a node group in a cluster. | |
projects_regions_clusters_node_groups_create | insert | projectsId, regionsId, clustersId | requestId, nodeGroupId, parentOperationId | Creates a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). |
projects_regions_clusters_node_groups_resize | exec | projectsId, regionsId, clustersId, nodeGroupsId | Resizes a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). | |
projects_regions_clusters_node_groups_repair | exec | projectsId, regionsId, clustersId, nodeGroupsId | Repair nodes in a node group. |
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.
| Name | Datatype | Description |
|---|---|---|
clustersId | string | |
nodeGroupsId | string | |
projectsId | string | |
regionsId | string | |
nodeGroupId | string | |
parentOperationId | string | |
requestId | string |
SELECT examples
- projects_regions_clusters_node_groups_get
Gets the resource representation for a node group in a cluster.
SELECT
name,
labels,
nodeGroupConfig,
roles
FROM google.dataproc.node_groups
WHERE projectsId = '{{ projectsId }}' -- required
AND regionsId = '{{ regionsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND nodeGroupsId = '{{ nodeGroupsId }}' -- required
;
INSERT examples
- projects_regions_clusters_node_groups_create
- Manifest
Creates a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
INSERT INTO google.dataproc.node_groups (
data__nodeGroupConfig,
data__labels,
data__roles,
data__name,
projectsId,
regionsId,
clustersId,
requestId,
nodeGroupId,
parentOperationId
)
SELECT
'{{ nodeGroupConfig }}',
'{{ labels }}',
'{{ roles }}',
'{{ name }}',
'{{ projectsId }}',
'{{ regionsId }}',
'{{ clustersId }}',
'{{ requestId }}',
'{{ nodeGroupId }}',
'{{ parentOperationId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: node_groups
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the node_groups resource.
- name: regionsId
value: "{{ regionsId }}"
description: Required parameter for the node_groups resource.
- name: clustersId
value: "{{ clustersId }}"
description: Required parameter for the node_groups resource.
- name: nodeGroupConfig
description: |
Optional. The node group instance group configuration.
value:
numInstances: {{ numInstances }}
minCpuPlatform: "{{ minCpuPlatform }}"
instanceNames:
- "{{ instanceNames }}"
diskConfig:
numLocalSsds: {{ numLocalSsds }}
bootDiskProvisionedIops: "{{ bootDiskProvisionedIops }}"
bootDiskType: "{{ bootDiskType }}"
bootDiskProvisionedThroughput: "{{ bootDiskProvisionedThroughput }}"
bootDiskSizeGb: {{ bootDiskSizeGb }}
localSsdInterface: "{{ localSsdInterface }}"
attachedDiskConfigs:
- provisionedIops: "{{ provisionedIops }}"
diskType: "{{ diskType }}"
diskSizeGb: {{ diskSizeGb }}
provisionedThroughput: "{{ provisionedThroughput }}"
managedGroupConfig:
instanceGroupManagerUri: "{{ instanceGroupManagerUri }}"
instanceTemplateName: "{{ instanceTemplateName }}"
instanceGroupManagerName: "{{ instanceGroupManagerName }}"
instanceReferences:
- publicKey: "{{ publicKey }}"
instanceName: "{{ instanceName }}"
instanceId: "{{ instanceId }}"
publicEciesKey: "{{ publicEciesKey }}"
imageUri: "{{ imageUri }}"
preemptibility: "{{ preemptibility }}"
isPreemptible: {{ isPreemptible }}
startupConfig:
requiredRegistrationFraction: {{ requiredRegistrationFraction }}
machineTypeUri: "{{ machineTypeUri }}"
minNumInstances: {{ minNumInstances }}
accelerators:
- acceleratorTypeUri: "{{ acceleratorTypeUri }}"
acceleratorCount: {{ acceleratorCount }}
instanceFlexibilityPolicy:
provisioningModelMix:
standardCapacityBase: {{ standardCapacityBase }}
standardCapacityPercentAboveBase: {{ standardCapacityPercentAboveBase }}
instanceMachineTypes: "{{ instanceMachineTypes }}"
instanceSelectionList:
- diskConfig:
numLocalSsds: {{ numLocalSsds }}
bootDiskProvisionedIops: "{{ bootDiskProvisionedIops }}"
bootDiskType: "{{ bootDiskType }}"
bootDiskProvisionedThroughput: "{{ bootDiskProvisionedThroughput }}"
bootDiskSizeGb: {{ bootDiskSizeGb }}
localSsdInterface: "{{ localSsdInterface }}"
attachedDiskConfigs:
- provisionedIops: "{{ provisionedIops }}"
diskType: "{{ diskType }}"
diskSizeGb: {{ diskSizeGb }}
provisionedThroughput: "{{ provisionedThroughput }}"
machineTypes: "{{ machineTypes }}"
rank: {{ rank }}
instanceSelectionResults:
- machineType: "{{ machineType }}"
vmCount: {{ vmCount }}
- name: labels
value: "{{ labels }}"
description: |
Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labels.
- name: roles
value:
- "{{ roles }}"
description: |
Required. Node group roles.
- name: name
value: "{{ name }}"
description: |
The Node group resource name (https://aip.dev/122).
- name: requestId
value: "{{ requestId }}"
- name: nodeGroupId
value: "{{ nodeGroupId }}"
- name: parentOperationId
value: "{{ parentOperationId }}"
Lifecycle Methods
- projects_regions_clusters_node_groups_resize
- projects_regions_clusters_node_groups_repair
Resizes a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
EXEC google.dataproc.node_groups.projects_regions_clusters_node_groups_resize
@projectsId='{{ projectsId }}' --required,
@regionsId='{{ regionsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodeGroupsId='{{ nodeGroupsId }}' --required
@@json=
'{
"size": {{ size }},
"requestId": "{{ requestId }}",
"gracefulDecommissionTimeout": "{{ gracefulDecommissionTimeout }}",
"parentOperationId": "{{ parentOperationId }}"
}'
;
Repair nodes in a node group.
EXEC google.dataproc.node_groups.projects_regions_clusters_node_groups_repair
@projectsId='{{ projectsId }}' --required,
@regionsId='{{ regionsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodeGroupsId='{{ nodeGroupsId }}' --required
@@json=
'{
"repairAction": "{{ repairAction }}",
"requestId": "{{ requestId }}",
"instanceNames": "{{ instanceNames }}"
}'
;