clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | google.hypercomputecluster.clusters |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Relative resource name of the cluster, in the format projects/{project}/locations/{location}/clusters/{cluster}. |
computeResources | object | Optional. Compute resources available to the cluster. Keys specify the ID of the compute resource by which it can be referenced elsewhere, and must conform to RFC-1034 (lower-case, alphanumeric, and at most 63 characters). |
createTime | string (google-datetime) | Output only. Time that the cluster was originally created. |
description | string | Optional. A description for your cluster. You can use up to 2,048 characters. |
labels | object | Optional. Labels applied to the cluster. Labels can be used to organize clusters and to filter them in queries. |
networkResources | object | Optional. Network resources available to the cluster. Must contain exactly one value. Keys specify the ID of the network resource by which it can be referenced elsewhere, and must conform to RFC-1034 (lower-case, alphanumeric, and at most 63 characters). |
orchestrator | object | Optional. Orchestrator that is responsible for scheduling and running jobs on the cluster. (id: Orchestrator) |
reconciling | boolean | Output only. Indicates whether changes to the cluster are currently in flight. If this is true, then the current state might not match the cluster's intended state. |
storageResources | object | Optional. Storage resources available to the cluster. Keys specify the ID of the storage resource by which it can be referenced elsewhere, and must conform to RFC-1034 (lower-case, alphanumeric, and at most 63 characters). |
updateTime | string (google-datetime) | Output only. Time that the cluster was most recently updated. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, clustersId | Gets details of a single Cluster. | |
list | select | projectsId, locationsId | filter, pageSize, orderBy, pageToken | Lists Clusters in a given project and location. |
create | insert | projectsId, locationsId | requestId, clusterId | Creates a new Cluster in a given project and location. |
patch | update | projectsId, locationsId, clustersId | updateMask, requestId | Updates the parameters of a single Cluster. |
delete | delete | projectsId, locationsId, clustersId | requestId | Deletes a single Cluster. |
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 | |
locationsId | string | |
projectsId | string | |
clusterId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single Cluster.
SELECT
name,
computeResources,
createTime,
description,
labels,
networkResources,
orchestrator,
reconciling,
storageResources,
updateTime
FROM google.hypercomputecluster.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
;
Lists Clusters in a given project and location.
SELECT
*
FROM google.hypercomputecluster.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new Cluster in a given project and location.
INSERT INTO google.hypercomputecluster.clusters (
data__computeResources,
data__orchestrator,
data__description,
data__storageResources,
data__networkResources,
data__name,
data__labels,
projectsId,
locationsId,
requestId,
clusterId
)
SELECT
'{{ computeResources }}',
'{{ orchestrator }}',
'{{ description }}',
'{{ storageResources }}',
'{{ networkResources }}',
'{{ name }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ clusterId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the clusters resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the clusters resource.
- name: computeResources
value: "{{ computeResources }}"
description: |
Optional. Compute resources available to the cluster. Keys specify the ID of the compute resource by which it can be referenced elsewhere, and must conform to [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, alphanumeric, and at most 63 characters).
- name: orchestrator
description: |
Optional. Orchestrator that is responsible for scheduling and running jobs on the cluster.
value:
slurm:
epilogBashScripts:
- "{{ epilogBashScripts }}"
nodeSets:
- id: "{{ id }}"
computeInstance:
labels: "{{ labels }}"
startupScript: "{{ startupScript }}"
bootDisk:
sizeGb: "{{ sizeGb }}"
type: "{{ type }}"
storageConfigs: "{{ storageConfigs }}"
computeId: "{{ computeId }}"
staticNodeCount: "{{ staticNodeCount }}"
maxDynamicNodeCount: "{{ maxDynamicNodeCount }}"
partitions:
- id: "{{ id }}"
nodeSetIds: "{{ nodeSetIds }}"
defaultPartition: "{{ defaultPartition }}"
prologBashScripts:
- "{{ prologBashScripts }}"
loginNodes:
enablePublicIps: {{ enablePublicIps }}
zone: "{{ zone }}"
startupScript: "{{ startupScript }}"
bootDisk:
sizeGb: "{{ sizeGb }}"
type: "{{ type }}"
count: "{{ count }}"
machineType: "{{ machineType }}"
labels: "{{ labels }}"
instances:
- instance: "{{ instance }}"
enableOsLogin: {{ enableOsLogin }}
storageConfigs:
- id: "{{ id }}"
localMount: "{{ localMount }}"
- name: description
value: "{{ description }}"
description: |
Optional. A description for your cluster. You can use up to 2,048 characters.
- name: storageResources
value: "{{ storageResources }}"
description: |
Optional. Storage resources available to the cluster. Keys specify the ID of the storage resource by which it can be referenced elsewhere, and must conform to [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, alphanumeric, and at most 63 characters).
- name: networkResources
value: "{{ networkResources }}"
description: |
Optional. Network resources available to the cluster. Must contain exactly one value. Keys specify the ID of the network resource by which it can be referenced elsewhere, and must conform to [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, alphanumeric, and at most 63 characters).
- name: name
value: "{{ name }}"
description: |
Identifier. [Relative resource name](https://google.aip.dev/122) of the cluster, in the format `projects/{project}/locations/{location}/clusters/{cluster}`.
- name: labels
value: "{{ labels }}"
description: |
Optional. [Labels](https://cloud.google.com/compute/docs/labeling-resources) applied to the cluster. Labels can be used to organize clusters and to filter them in queries.
- name: requestId
value: "{{ requestId }}"
- name: clusterId
value: "{{ clusterId }}"
UPDATE examples
- patch
Updates the parameters of a single Cluster.
UPDATE google.hypercomputecluster.clusters
SET
data__computeResources = '{{ computeResources }}',
data__orchestrator = '{{ orchestrator }}',
data__description = '{{ description }}',
data__storageResources = '{{ storageResources }}',
data__networkResources = '{{ networkResources }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single Cluster.
DELETE FROM google.hypercomputecluster.clusters
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND requestId = '{{ requestId }}'
;