// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Cluster Director API Client for Deno * ==================================== * * The Cluster Director API allows you to deploy, manage, and monitor clusters that run AI, ML, or HPC workloads. * * Docs: https://docs.cloud.google.com/cluster-director/docs * Source: https://googleapis.deno.dev/v1/hypercomputecluster:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * The Cluster Director API allows you to deploy, manage, and monitor clusters * that run AI, ML, or HPC workloads. */ export class hypercomputeCluster { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://hypercomputecluster.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a new Cluster in a given project and location. * * @param parent Required. Parent location in which the cluster should be created, in the format `projects/{project}/locations/{location}`. */ async projectsLocationsClustersCreate(parent: string, req: Cluster, opts: ProjectsLocationsClustersCreateOptions = {}): Promise { req = serializeCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/clusters`); if (opts.clusterId !== undefined) { url.searchParams.append("clusterId", String(opts.clusterId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Cluster. * * @param name Required. Name of the cluster to delete, in the format `projects/{project}/locations/{location}/clusters/{cluster}`. */ async projectsLocationsClustersDelete(name: string, opts: ProjectsLocationsClustersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Cluster. * * @param name Required. Name of the cluster to retrieve, in the format `projects/{project}/locations/{location}/clusters/{cluster}`. */ async projectsLocationsClustersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeCluster(data); } /** * Lists Clusters in a given project and location. * * @param parent Required. Parent location of the clusters to list, in the format `projects/{project}/locations/{location}`. */ async projectsLocationsClustersList(parent: string, opts: ProjectsLocationsClustersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/clusters`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListClustersResponse(data); } /** * Updates the parameters of a single Cluster. * * @param name Identifier. [Relative resource name](https://google.aip.dev/122) of the cluster, in the format `projects/{project}/locations/{location}/clusters/{cluster}`. */ async projectsLocationsClustersPatch(name: string, req: Cluster, opts: ProjectsLocationsClustersPatchOptions = {}): Promise { req = serializeCluster(req); opts = serializeProjectsLocationsClustersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Location; } /** * Lists information about the supported locations for this service. This * method can be called in two ways: * **List all public locations:** Use the * path `GET /v1/locations`. * **List project-visible locations:** Use the * path `GET /v1/projects/{project_id}/locations`. This may include public * locations as well as private or other locations specifically visible to the * project. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/locations`); if (opts.extraLocationTypes !== undefined) { url.searchParams.append("extraLocationTypes", String(opts.extraLocationTypes)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListLocationsResponse; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } } /** * A [Persistent disk](https://cloud.google.com/compute/docs/disks) used as the * boot disk for a Compute Engine VM instance. */ export interface BootDisk { /** * Required. Immutable. Size of the disk in gigabytes. Must be at least 10GB. */ sizeGb?: bigint; /** * Required. Immutable. [Persistent disk * type](https://cloud.google.com/compute/docs/disks#disk-types), in the * format `projects/{project}/zones/{zone}/diskTypes/{disk_type}`. */ type?: string; } function serializeBootDisk(data: any): BootDisk { return { ...data, sizeGb: data["sizeGb"] !== undefined ? String(data["sizeGb"]) : undefined, }; } function deserializeBootDisk(data: any): BootDisk { return { ...data, sizeGb: data["sizeGb"] !== undefined ? BigInt(data["sizeGb"]) : undefined, }; } /** * A reference to a [Google Cloud Storage](https://cloud.google.com/storage) * bucket. */ export interface BucketReference { /** * Output only. Name of the bucket. */ readonly bucket?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * When set in OperationStep, indicates that cluster health check should be * performed. */ export interface CheckClusterHealth { } /** * A collection of virtual machines and connected resources forming a * high-performance computing cluster capable of running large-scale, tightly * coupled workloads. A cluster combines a set a compute resources that perform * computations, storage resources that contain inputs and store outputs, an * orchestrator that is responsible for assigning jobs to compute resources, and * network resources that connect everything together. */ export interface Cluster { /** * 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). */ computeResources?: { [key: string]: ComputeResource }; /** * Output only. Time that the cluster was originally created. */ readonly createTime?: Date; /** * Optional. User-provided description of the cluster. */ description?: string; /** * 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. */ labels?: { [key: string]: string }; /** * Identifier. [Relative resource name](https://google.aip.dev/122) of the * cluster, in the format * `projects/{project}/locations/{location}/clusters/{cluster}`. */ name?: string; /** * Optional. Network resources available to the cluster. Must contain at most * 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). */ networkResources?: { [key: string]: NetworkResource }; /** * Optional. Orchestrator that is responsible for scheduling and running jobs * on the cluster. */ orchestrator?: Orchestrator; /** * 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. */ readonly reconciling?: boolean; /** * 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). */ storageResources?: { [key: string]: StorageResource }; /** * Output only. Time that the cluster was most recently updated. */ readonly updateTime?: Date; } function serializeCluster(data: any): Cluster { return { ...data, computeResources: data["computeResources"] !== undefined ? Object.fromEntries(Object.entries(data["computeResources"]).map(([k, v]: [string, any]) => ([k, serializeComputeResource(v)]))) : undefined, orchestrator: data["orchestrator"] !== undefined ? serializeOrchestrator(data["orchestrator"]) : undefined, storageResources: data["storageResources"] !== undefined ? Object.fromEntries(Object.entries(data["storageResources"]).map(([k, v]: [string, any]) => ([k, serializeStorageResource(v)]))) : undefined, }; } function deserializeCluster(data: any): Cluster { return { ...data, computeResources: data["computeResources"] !== undefined ? Object.fromEntries(Object.entries(data["computeResources"]).map(([k, v]: [string, any]) => ([k, deserializeComputeResource(v)]))) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, orchestrator: data["orchestrator"] !== undefined ? deserializeOrchestrator(data["orchestrator"]) : undefined, storageResources: data["storageResources"] !== undefined ? Object.fromEntries(Object.entries(data["storageResources"]).map(([k, v]: [string, any]) => ([k, deserializeStorageResource(v)]))) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Details about a Compute Engine * [instance](https://cloud.google.com/compute/docs/instances). */ export interface ComputeInstance { /** * Output only. Name of the VM instance, in the format * `projects/{project}/zones/{zone}/instances/{instance}`. */ readonly instance?: string; } /** * When set in a SlurmNodeSet, indicates that the nodeset should be backed by * Compute Engine VM instances. */ export interface ComputeInstanceSlurmNodeSet { /** * Optional. Boot disk for the compute instance */ bootDisk?: BootDisk; /** * Optional. * [Labels](https://cloud.google.com/compute/docs/labeling-resources) that * should be applied to each VM instance in the nodeset. */ labels?: { [key: string]: string }; /** * Optional. [Startup * script](https://cloud.google.com/compute/docs/instances/startup-scripts/linux) * to be run on each VM instance in the nodeset. Max 256KB. */ startupScript?: string; } function serializeComputeInstanceSlurmNodeSet(data: any): ComputeInstanceSlurmNodeSet { return { ...data, bootDisk: data["bootDisk"] !== undefined ? serializeBootDisk(data["bootDisk"]) : undefined, }; } function deserializeComputeInstanceSlurmNodeSet(data: any): ComputeInstanceSlurmNodeSet { return { ...data, bootDisk: data["bootDisk"] !== undefined ? deserializeBootDisk(data["bootDisk"]) : undefined, }; } /** * A resource defining how virtual machines and accelerators should be * provisioned for the cluster. */ export interface ComputeResource { /** * Required. Immutable. Configuration for this compute resource, which * describes how it should be created at runtime. */ config?: ComputeResourceConfig; } function serializeComputeResource(data: any): ComputeResource { return { ...data, config: data["config"] !== undefined ? serializeComputeResourceConfig(data["config"]) : undefined, }; } function deserializeComputeResource(data: any): ComputeResource { return { ...data, config: data["config"] !== undefined ? deserializeComputeResourceConfig(data["config"]) : undefined, }; } /** * Describes how a compute resource should be created at runtime. */ export interface ComputeResourceConfig { /** * Optional. Immutable. If set, indicates that this resource should use * flex-start VMs. */ newFlexStartInstances?: NewFlexStartInstancesConfig; /** * Optional. Immutable. If set, indicates that this resource should use * on-demand VMs. */ newOnDemandInstances?: NewOnDemandInstancesConfig; /** * Optional. Immutable. If set, indicates that this resource should use * reserved VMs. */ newReservedInstances?: NewReservedInstancesConfig; /** * Optional. Immutable. If set, indicates that this resource should use spot * VMs. */ newSpotInstances?: NewSpotInstancesConfig; } function serializeComputeResourceConfig(data: any): ComputeResourceConfig { return { ...data, newFlexStartInstances: data["newFlexStartInstances"] !== undefined ? serializeNewFlexStartInstancesConfig(data["newFlexStartInstances"]) : undefined, }; } function deserializeComputeResourceConfig(data: any): ComputeResourceConfig { return { ...data, newFlexStartInstances: data["newFlexStartInstances"] !== undefined ? deserializeNewFlexStartInstancesConfig(data["newFlexStartInstances"]) : undefined, }; } /** * When set in OperationStep, indicates that a new filestore instance should be * created. */ export interface CreateFilestoreInstance { /** * Output only. Name of the Filestore instance, in the format * `projects/{project}/locations/{location}/instances/{instance}` */ readonly filestore?: string; } /** * When set in OperationStep, indicates that a login node should be created. */ export interface CreateLoginNode { } /** * When set in OperationStep, indicates that a new lustre instance should be * created. */ export interface CreateLustreInstance { /** * Output only. Name of the Managed Lustre instance, in the format * `projects/{project}/locations/{location}/instances/{instance}` */ readonly lustre?: string; } /** * When set in OperationStep, indicates that a new network should be created. */ export interface CreateNetwork { /** * Output only. Name of the network to create, in the format * `projects/{project}/global/networks/{network}`. */ readonly network?: string; } /** * When set in OperationStep, indicates that a nodeset should be created. */ export interface CreateNodeset { /** * Output only. Name of the nodeset to create */ readonly nodesets?: string[]; } /** * When set in OperationStep, indicates that an orchestrator should be created. */ export interface CreateOrchestrator { } /** * When set in OperationStep, indicates that a partition should be created. */ export interface CreatePartition { /** * Output only. Name of the partition to create */ readonly partitions?: string[]; } /** * When set in OperationStep, indicates that a new private service access * should be created. */ export interface CreatePrivateServiceAccess { } /** * When set in OperationStep, indicates that a new storage bucket should be * created. */ export interface CreateStorageBucket { /** * Output only. Name of the bucket. */ readonly bucket?: string; } /** * When set in OperationStep, indicates that a Filestore instance should be * deleted. */ export interface DeleteFilestoreInstance { /** * Output only. Name of the Filestore instance, in the format * `projects/{project}/locations/{location}/instances/{instance}` */ readonly filestore?: string; } /** * When set in OperationStep, indicates that a login node should be deleted. */ export interface DeleteLoginNode { } /** * When set in OperationStep, indicates that a Lustre instance should be * deleted. */ export interface DeleteLustreInstance { /** * Output only. Name of the Managed Lustre instance, in the format * `projects/{project}/locations/{location}/instances/{instance}` */ readonly lustre?: string; } /** * When set in OperationStep, indicates network deletion step with the resource * name. */ export interface DeleteNetwork { /** * Output only. Name of the network to delete, in the format * `projects/{project}/global/networks/{network}`. */ readonly network?: string; } /** * When set in OperationStep, indicates that a nodeset should be deleted. */ export interface DeleteNodeset { /** * Output only. Name of the nodeset to delete */ readonly nodesets?: string[]; } /** * When set in OperationStep, indicates that an orchestrator should be deleted. */ export interface DeleteOrchestrator { } /** * When set in OperationStep, indicates that a partition should be deleted. */ export interface DeletePartition { /** * Output only. Name of the partition to delete */ readonly partitions?: string[]; } /** * When set in OperationStep, indicates private service access deletion step. */ export interface DeletePrivateServiceAccess { } /** * When set in OperationStep, indicates that Cloud Storage bucket should be * deleted. */ export interface DeleteStorageBucket { /** * Output only. Name of the bucket. */ readonly bucket?: string; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * When set in a StorageResourceConfig, indicates that an existing [Google * Cloud Storage](https://cloud.google.com/storage) bucket should be imported. */ export interface ExistingBucketConfig { /** * Required. Immutable. Name of the Cloud Storage bucket to import. */ bucket?: string; } /** * When set in a StorageResourceConfig, indicates that an existing * [Filestore](https://cloud.google.com/filestore) instance should be imported. */ export interface ExistingFilestoreConfig { /** * Required. Immutable. Name of the Filestore instance to import, in the * format `projects/{project}/locations/{location}/instances/{instance}` */ filestore?: string; } /** * When set in a StorageResourceConfig, indicates that an existing [Managed * Lustre](https://cloud.google.com/products/managed-lustre) instance should be * imported. */ export interface ExistingLustreConfig { /** * Required. Immutable. Name of the Managed Lustre instance to import, in the * format `projects/{project}/locations/{location}/instances/{instance}` */ lustre?: string; } /** * When set in a NetworkResourceConfig, indicates that an existing network * should be imported. */ export interface ExistingNetworkConfig { /** * Required. Immutable. Name of the network to import, in the format * `projects/{project}/global/networks/{network}`. */ network?: string; /** * Required. Immutable. Particular subnetwork to use, in the format * `projects/{project}/regions/{region}/subnetworks/{subnetwork}`. */ subnetwork?: string; } /** * Message describing filestore configuration */ export interface FileShareConfig { /** * Required. Size of the filestore in GB. Must be between 1024 and 102400, * and must meet scalability requirements described at * https://cloud.google.com/filestore/docs/service-tiers. */ capacityGb?: bigint; /** * Required. Filestore share location */ fileShare?: string; } function serializeFileShareConfig(data: any): FileShareConfig { return { ...data, capacityGb: data["capacityGb"] !== undefined ? String(data["capacityGb"]) : undefined, }; } function deserializeFileShareConfig(data: any): FileShareConfig { return { ...data, capacityGb: data["capacityGb"] !== undefined ? BigInt(data["capacityGb"]) : undefined, }; } /** * A reference to a [Filestore](https://cloud.google.com/filestore) instance. */ export interface FilestoreReference { /** * Output only. Name of the Filestore instance, in the format * `projects/{project}/locations/{location}/instances/{instance}` */ readonly filestore?: string; } /** * Message describing Google Cloud Storage autoclass configuration */ export interface GcsAutoclassConfig { /** * Required. Enables Auto-class feature. */ enabled?: boolean; /** * Optional. Terminal storage class of the autoclass bucket */ terminalStorageClass?: | "TERMINAL_STORAGE_CLASS_UNSPECIFIED"; } /** * Message describing Google Cloud Storage hierarchical namespace configuration */ export interface GcsHierarchicalNamespaceConfig { /** * Required. Enables hierarchical namespace setup for the bucket. */ enabled?: boolean; } /** * Response message for ListClusters. */ export interface ListClustersResponse { /** * Clusters in the specified location. */ clusters?: Cluster[]; /** * A token that can be sent as `page_token` to retrieve the next page. If * this field is absent, there are no subsequent pages. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListClustersResponse(data: any): ListClustersResponse { return { ...data, clusters: data["clusters"] !== undefined ? data["clusters"].map((item: any) => (serializeCluster(item))) : undefined, }; } function deserializeListClustersResponse(data: any): ListClustersResponse { return { ...data, clusters: data["clusters"] !== undefined ? data["clusters"].map((item: any) => (deserializeCluster(item))) : undefined, }; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Location[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; /** * Unordered list. Unreachable resources. Populated when the request sets * `ListOperationsRequest.return_partial_success` and reads across * collections. For example, when attempting to list all resources across all * supported locations. */ unreachable?: string[]; } /** * A resource that represents a Google Cloud location. */ export interface Location { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * A reference to a [Managed * Lustre](https://cloud.google.com/products/managed-lustre) instance. */ export interface LustreReference { /** * Output only. Name of the Managed Lustre instance, in the format * `projects/{project}/locations/{location}/instances/{instance}` */ readonly lustre?: string; } /** * A reference to a [VPC network](https://cloud.google.com/vpc/docs/vpc) in * Google Compute Engine. */ export interface NetworkReference { /** * Output only. Name of the network, in the format * `projects/{project}/global/networks/{network}`. */ readonly network?: string; /** * Output only. Name of the particular subnetwork being used by the cluster, * in the format * `projects/{project}/regions/{region}/subnetworks/{subnetwork}`. */ readonly subnetwork?: string; } /** * A resource representing a network that connects the various components of a * cluster together. */ export interface NetworkResource { /** * Immutable. Configuration for this network resource, which describes how it * should be created or imported. This field only controls how the network * resource is initially created or imported. Subsequent changes to the * network resource should be made via the resource's API and will not be * reflected in the configuration. */ config?: NetworkResourceConfig; /** * Reference to a network in Google Compute Engine. */ network?: NetworkReference; } /** * Describes how a network resource should be initialized. Each network * resource can either be imported from an existing Google Cloud resource or * initialized when the cluster is created. */ export interface NetworkResourceConfig { /** * Optional. Immutable. If set, indicates that an existing network should be * imported. */ existingNetwork?: ExistingNetworkConfig; /** * Optional. Immutable. If set, indicates that a new network should be * created. */ newNetwork?: NewNetworkConfig; } /** * When set in a StorageResourceConfig, indicates that a new [Google Cloud * Storage](https://cloud.google.com/storage) bucket should be created. */ export interface NewBucketConfig { /** * Optional. Immutable. If set, indicates that the bucket should use * [Autoclass](https://cloud.google.com/storage/docs/autoclass). */ autoclass?: GcsAutoclassConfig; /** * Required. Immutable. Name of the Cloud Storage bucket to create. */ bucket?: string; /** * Optional. Immutable. If set, indicates that the bucket should use * [hierarchical * namespaces](https://cloud.google.com/storage/docs/hns-overview). */ hierarchicalNamespace?: GcsHierarchicalNamespaceConfig; /** * Optional. Immutable. If set, uses the provided storage class as the * bucket's default storage class. */ storageClass?: | "STORAGE_CLASS_UNSPECIFIED" | "STANDARD" | "NEARLINE" | "COLDLINE" | "ARCHIVE"; } /** * When set in a StorageResourceConfig, indicates that a new * [Filestore](https://cloud.google.com/filestore) instance should be created. */ export interface NewFilestoreConfig { /** * Optional. Immutable. Description of the instance. Maximum of 2048 * characters. */ description?: string; /** * Required. Immutable. File system shares on the instance. Exactly one file * share must be specified. */ fileShares?: FileShareConfig[]; /** * Required. Immutable. Name of the Filestore instance to create, in the * format `projects/{project}/locations/{location}/instances/{instance}` */ filestore?: string; /** * Optional. Immutable. Access protocol to use for all file shares in the * instance. Defaults to NFS V3 if not set. */ protocol?: | "PROTOCOL_UNSPECIFIED" | "NFSV3" | "NFSV41"; /** * Required. Immutable. Service tier to use for the instance. */ tier?: | "TIER_UNSPECIFIED" | "ZONAL" | "REGIONAL"; } function serializeNewFilestoreConfig(data: any): NewFilestoreConfig { return { ...data, fileShares: data["fileShares"] !== undefined ? data["fileShares"].map((item: any) => (serializeFileShareConfig(item))) : undefined, }; } function deserializeNewFilestoreConfig(data: any): NewFilestoreConfig { return { ...data, fileShares: data["fileShares"] !== undefined ? data["fileShares"].map((item: any) => (deserializeFileShareConfig(item))) : undefined, }; } /** * When set in a ComputeResourceConfig, indicates that VM instances should be * created using [Flex * Start](https://cloud.google.com/compute/docs/instances/provisioning-models). */ export interface NewFlexStartInstancesConfig { /** * Required. Immutable. Name of the Compute Engine [machine * type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g. * `n2-standard-2`. */ machineType?: string; /** * Required. Immutable. Specifies the time limit for created instances. * Instances will be terminated at the end of this duration. */ maxDuration?: number /* Duration */; /** * Required. Immutable. Name of the zone in which VM instances should run, * e.g., `us-central1-a`. Must be in the same region as the cluster, and must * match the zone of any other resources specified in the cluster. */ zone?: string; } function serializeNewFlexStartInstancesConfig(data: any): NewFlexStartInstancesConfig { return { ...data, maxDuration: data["maxDuration"] !== undefined ? data["maxDuration"] : undefined, }; } function deserializeNewFlexStartInstancesConfig(data: any): NewFlexStartInstancesConfig { return { ...data, maxDuration: data["maxDuration"] !== undefined ? data["maxDuration"] : undefined, }; } /** * When set in a StorageResourceConfig, indicates that a new [Managed * Lustre](https://cloud.google.com/products/managed-lustre) instance should be * created. */ export interface NewLustreConfig { /** * Required. Immutable. Storage capacity of the instance in gibibytes (GiB). * Allowed values are between 18000 and 7632000. */ capacityGb?: bigint; /** * Optional. Immutable. Description of the Managed Lustre instance. Maximum * of 2048 characters. */ description?: string; /** * Required. Immutable. Filesystem name for this instance. This name is used * by client-side tools, including when mounting the instance. Must be 8 * characters or less and can only contain letters and numbers. */ filesystem?: string; /** * Required. Immutable. Name of the Managed Lustre instance to create, in the * format `projects/{project}/locations/{location}/instances/{instance}` */ lustre?: string; } function serializeNewLustreConfig(data: any): NewLustreConfig { return { ...data, capacityGb: data["capacityGb"] !== undefined ? String(data["capacityGb"]) : undefined, }; } function deserializeNewLustreConfig(data: any): NewLustreConfig { return { ...data, capacityGb: data["capacityGb"] !== undefined ? BigInt(data["capacityGb"]) : undefined, }; } /** * When set in a NetworkResourceConfig, indicates that a new network should be * created. */ export interface NewNetworkConfig { /** * Optional. Immutable. Description of the network. Maximum of 2048 * characters. */ description?: string; /** * Required. Immutable. Name of the network to create, in the format * `projects/{project}/global/networks/{network}`. */ network?: string; } /** * When set in a ComputeResourceConfig, indicates that on-demand (i.e., using * the standard provisioning model) VM instances should be created. */ export interface NewOnDemandInstancesConfig { /** * Required. Immutable. Name of the Compute Engine [machine * type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g. * `n2-standard-2`. */ machineType?: string; /** * Required. Immutable. Name of the zone in which VM instances should run, * e.g., `us-central1-a`. Must be in the same region as the cluster, and must * match the zone of any other resources specified in the cluster. */ zone?: string; } /** * When set in a ComputeResourceConfig, indicates that VM instances should be * created from a * [reservation](https://cloud.google.com/compute/docs/instances/reservations-overview). */ export interface NewReservedInstancesConfig { /** * Optional. Immutable. Name of the reservation from which VM instances * should be created, in the format * `projects/{project}/zones/{zone}/reservations/{reservation}`. */ reservation?: string; } /** * When set in a ComputeResourceConfig, indicates that [spot * VM](https://cloud.google.com/compute/docs/instances/spot) instances should be * created. */ export interface NewSpotInstancesConfig { /** * Required. Immutable. Name of the Compute Engine [machine * type](https://cloud.google.com/compute/docs/machine-resource) to use, e.g. * `n2-standard-2`. */ machineType?: string; /** * Optional. Termination action for the instance. If not specified, Compute * Engine sets the termination action to DELETE. */ terminationAction?: | "TERMINATION_ACTION_UNSPECIFIED" | "STOP" | "DELETE"; /** * Required. Immutable. Name of the zone in which VM instances should run, * e.g., `us-central1-a`. Must be in the same region as the cluster, and must * match the zone of any other resources specified in the cluster. */ zone?: string; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Progress of the operation. */ readonly progress?: OperationProgress; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been cancelled successfully have * google.longrunning.Operation.error value with a google.rpc.Status.code of * `1`, corresponding to `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * Message describing the progress of a cluster mutation long-running * operation. */ export interface OperationProgress { /** * Output only. Steps and status of the operation. */ readonly steps?: OperationStep[]; } /** * Message describing the status of a single step in a cluster mutation * long-running operation. */ export interface OperationStep { /** * Output only. If set, indicates that cluster health check is part of the * operation. */ readonly checkClusterHealth?: CheckClusterHealth; /** * Output only. If set, indicates that new Filestore instance creation is * part of the operation. */ readonly createFilestoreInstance?: CreateFilestoreInstance; /** * Output only. If set, indicates that new login node creation is part of the * operation. */ readonly createLoginNode?: CreateLoginNode; /** * Output only. If set, indicates that new Lustre instance creation is part * of the operation. */ readonly createLustreInstance?: CreateLustreInstance; /** * Output only. If set, indicates that new network creation is part of the * operation. */ readonly createNetwork?: CreateNetwork; /** * Output only. If set, indicates that new nodeset creation is part of the * operation. */ readonly createNodeset?: CreateNodeset; /** * Output only. If set, indicates that orchestrator creation is part of the * operation. */ readonly createOrchestrator?: CreateOrchestrator; /** * Output only. If set, indicates that new partition creation is part of the * operation. */ readonly createPartition?: CreatePartition; /** * Output only. If set, indicates that new private service access creation is * part of the operation. */ readonly createPrivateServiceAccess?: CreatePrivateServiceAccess; /** * Output only. If set, indicates that new Cloud Storage bucket creation is * part of the operation. */ readonly createStorageBucket?: CreateStorageBucket; /** * Output only. If set, indicates that Filestore instance deletion is part of * the operation. */ readonly deleteFilestoreInstance?: DeleteFilestoreInstance; /** * Output only. If set, indicates that login node deletion is part of the * operation. */ readonly deleteLoginNode?: DeleteLoginNode; /** * Output only. If set, indicates that Lustre instance deletion is part of * the operation. */ readonly deleteLustreInstance?: DeleteLustreInstance; /** * Output only. If set, indicates that network deletion is part of the * operation. */ readonly deleteNetwork?: DeleteNetwork; /** * Output only. If set, indicates that nodeset deletion is part of the * operation. */ readonly deleteNodeset?: DeleteNodeset; /** * Output only. If set, indicates that orchestrator deletion is part of the * operation. */ readonly deleteOrchestrator?: DeleteOrchestrator; /** * Output only. If set, indicates that partition deletion is part of the * operation. */ readonly deletePartition?: DeletePartition; /** * Output only. If set, indicates that private service access deletion is * part of the operation. */ readonly deletePrivateServiceAccess?: DeletePrivateServiceAccess; /** * Output only. If set, indicates that Cloud Storage bucket deletion is part * of the operation. */ readonly deleteStorageBucket?: DeleteStorageBucket; /** * Output only. State of the operation step. */ readonly state?: | "STATE_UNSPECIFIED" | "WAITING" | "IN_PROGRESS" | "DONE"; /** * Output only. If set, indicates that login node update is part of the * operation. */ readonly updateLoginNode?: UpdateLoginNode; /** * Output only. If set, indicates that nodeset update is part of the * operation. */ readonly updateNodeset?: UpdateNodeset; /** * Output only. If set, indicates that an orchestrator update is part of the * operation. */ readonly updateOrchestrator?: UpdateOrchestrator; /** * Output only. If set, indicates that partition update is part of the * operation. */ readonly updatePartition?: UpdatePartition; } /** * The component responsible for scheduling and running workloads on the * cluster as well as providing the user interface for interacting with the * cluster at runtime. */ export interface Orchestrator { /** * Optional. If set, indicates that the cluster should use Slurm as the * orchestrator. */ slurm?: SlurmOrchestrator; } function serializeOrchestrator(data: any): Orchestrator { return { ...data, slurm: data["slurm"] !== undefined ? serializeSlurmOrchestrator(data["slurm"]) : undefined, }; } function deserializeOrchestrator(data: any): Orchestrator { return { ...data, slurm: data["slurm"] !== undefined ? deserializeSlurmOrchestrator(data["slurm"]) : undefined, }; } /** * Additional options for hypercomputeCluster#projectsLocationsClustersCreate. */ export interface ProjectsLocationsClustersCreateOptions { /** * Required. ID of the cluster to create. Must conform to * [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, * alphanumeric, and at most 63 characters). */ clusterId?: string; /** * Optional. A unique identifier for this request. A random UUID is * recommended. This request is idempotent if and only if `request_id` is * provided. */ requestId?: string; } /** * Additional options for hypercomputeCluster#projectsLocationsClustersDelete. */ export interface ProjectsLocationsClustersDeleteOptions { /** * Optional. A unique identifier for this request. A random UUID is * recommended. This request is idempotent if and only if `request_id` is * provided. */ requestId?: string; } /** * Additional options for hypercomputeCluster#projectsLocationsClustersList. */ export interface ProjectsLocationsClustersListOptions { /** * Optional. [Filter](https://google.aip.dev/160) to apply to the returned * results. */ filter?: string; /** * Optional. How to order the resulting clusters. Must be one of the * following strings: * `name` * `name desc` * `create_time` * `create_time * desc` If not specified, clusters will be returned in an arbitrary order. */ orderBy?: string; /** * Optional. Maximum number of clusters to return. The service may return * fewer than this value. */ pageSize?: number; /** * Optional. A page token received from a previous `ListClusters` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListClusters` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for hypercomputeCluster#projectsLocationsClustersPatch. */ export interface ProjectsLocationsClustersPatchOptions { /** * Optional. A unique identifier for this request. A random UUID is * recommended. This request is idempotent if and only if `request_id` is * provided. */ requestId?: string; /** * Optional. Mask specifying which fields in the cluster to update. All paths * must be specified explicitly - wildcards are not supported. At least one * path must be provided. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsClustersPatchOptions(data: any): ProjectsLocationsClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsClustersPatchOptions(data: any): ProjectsLocationsClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for hypercomputeCluster#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * Optional. Do not use this field. It is unsupported and is ignored unless * explicitly documented otherwise. This is primarily for internal usage. */ extraLocationTypes?: string; /** * A filter to narrow down results to a preferred subset. The filtering * language accepts strings like `"displayName=tokyo"`, and is documented in * more detail in [AIP-160](https://google.aip.dev/160). */ filter?: string; /** * The maximum number of results to return. If not set, the service selects a * default. */ pageSize?: number; /** * A page token received from the `next_page_token` field in the response. * Send that page token to receive the subsequent page. */ pageToken?: string; } /** * Additional options for hypercomputeCluster#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * ListOperationsResponse.unreachable field. This can only be `true` when * reading across collections. For example, when `parent` is set to * `"projects/example/locations/-"`. This field is not supported by default * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Configuration for Slurm [login * nodes](https://slurm.schedmd.com/quickstart_admin.html#login) in the cluster. * Login nodes are Compute Engine VM instances that allow users to access the * cluster over SSH. */ export interface SlurmLoginNodes { /** * Optional. Boot disk for the login node. */ bootDisk?: BootDisk; /** * Required. Number of login node instances to create. */ count?: bigint; /** * Optional. Whether [OS * Login](https://cloud.google.com/compute/docs/oslogin) should be enabled on * login node instances. */ enableOsLogin?: boolean; /** * Optional. Whether login node instances should be assigned [external IP * addresses](https://cloud.google.com/compute/docs/ip-addresses#externaladdresses). */ enablePublicIps?: boolean; /** * Output only. Information about the login node instances that were created * in Compute Engine. */ readonly instances?: ComputeInstance[]; /** * Optional. * [Labels](https://cloud.google.com/compute/docs/labeling-resources) that * should be applied to each login node instance. */ labels?: { [key: string]: string }; /** * Required. Name of the Compute Engine [machine * type](https://cloud.google.com/compute/docs/machine-resource) to use for * login nodes, e.g. `n2-standard-2`. */ machineType?: string; /** * Optional. [Startup * script](https://cloud.google.com/compute/docs/instances/startup-scripts/linux) * to be run on each login node instance. Max 256KB. The script must complete * within the system-defined default timeout of 5 minutes. For tasks that * require more time, consider running them in the background using methods * such as `&` or `nohup`. */ startupScript?: string; /** * Optional. How storage resources should be mounted on each login node. */ storageConfigs?: StorageConfig[]; /** * Required. Name of the zone in which login nodes should run, e.g., * `us-central1-a`. Must be in the same region as the cluster, and must match * the zone of any other resources specified in the cluster. */ zone?: string; } function serializeSlurmLoginNodes(data: any): SlurmLoginNodes { return { ...data, bootDisk: data["bootDisk"] !== undefined ? serializeBootDisk(data["bootDisk"]) : undefined, count: data["count"] !== undefined ? String(data["count"]) : undefined, }; } function deserializeSlurmLoginNodes(data: any): SlurmLoginNodes { return { ...data, bootDisk: data["bootDisk"] !== undefined ? deserializeBootDisk(data["bootDisk"]) : undefined, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, }; } /** * Configuration for Slurm nodesets in the cluster. Nodesets are groups of * compute nodes used by Slurm that are responsible for running workloads * submitted to the cluster. */ export interface SlurmNodeSet { /** * Optional. ID of the compute resource on which this nodeset will run. Must * match a key in the cluster's compute_resources. */ computeId?: string; /** * Optional. If set, indicates that the nodeset should be backed by Compute * Engine instances. */ computeInstance?: ComputeInstanceSlurmNodeSet; /** * Required. Identifier for the nodeset, which allows it to be referenced by * partitions. Must conform to * [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, * alphanumeric, and at most 63 characters). */ id?: string; /** * Optional. Controls how many additional nodes a cluster can bring online to * handle workloads. Set this value to enable dynamic node creation and limit * the number of additional nodes the cluster can bring online. Leave empty if * you do not want the cluster to create nodes dynamically, and instead rely * only on static nodes. */ maxDynamicNodeCount?: bigint; /** * Optional. Number of nodes to be statically created for this nodeset. The * cluster will attempt to ensure that at least this many nodes exist at all * times. */ staticNodeCount?: bigint; /** * Optional. How storage resources should be mounted on each compute node. */ storageConfigs?: StorageConfig[]; } function serializeSlurmNodeSet(data: any): SlurmNodeSet { return { ...data, computeInstance: data["computeInstance"] !== undefined ? serializeComputeInstanceSlurmNodeSet(data["computeInstance"]) : undefined, maxDynamicNodeCount: data["maxDynamicNodeCount"] !== undefined ? String(data["maxDynamicNodeCount"]) : undefined, staticNodeCount: data["staticNodeCount"] !== undefined ? String(data["staticNodeCount"]) : undefined, }; } function deserializeSlurmNodeSet(data: any): SlurmNodeSet { return { ...data, computeInstance: data["computeInstance"] !== undefined ? deserializeComputeInstanceSlurmNodeSet(data["computeInstance"]) : undefined, maxDynamicNodeCount: data["maxDynamicNodeCount"] !== undefined ? BigInt(data["maxDynamicNodeCount"]) : undefined, staticNodeCount: data["staticNodeCount"] !== undefined ? BigInt(data["staticNodeCount"]) : undefined, }; } /** * When set in Orchestrator, indicates that the cluster should use * [Slurm](https://slurm.schedmd.com/) as the orchestrator. */ export interface SlurmOrchestrator { /** * Optional. Default partition to use for submitted jobs that do not * explicitly specify a partition. Required if and only if there is more than * one partition, in which case it must match the id of one of the partitions. */ defaultPartition?: string; /** * Optional. Slurm [epilog * scripts](https://slurm.schedmd.com/prolog_epilog.html), which will be * executed by compute nodes whenever a node finishes running a job. Values * must not be empty. */ epilogBashScripts?: string[]; /** * Required. Configuration for login nodes, which allow users to access the * cluster over SSH. */ loginNodes?: SlurmLoginNodes; /** * Optional. Compute resource configuration for the Slurm nodesets in your * cluster. If not specified, the cluster won't create any nodes. */ nodeSets?: SlurmNodeSet[]; /** * Optional. Configuration for the Slurm partitions in your cluster. Each * partition can contain one or more nodesets, and you can submit separate * jobs on each partition. If you don't specify at least one partition in your * cluster, you can't submit jobs to the cluster. */ partitions?: SlurmPartition[]; /** * Optional. Slurm [prolog * scripts](https://slurm.schedmd.com/prolog_epilog.html), which will be * executed by compute nodes before a node begins running a new job. Values * must not be empty. */ prologBashScripts?: string[]; } function serializeSlurmOrchestrator(data: any): SlurmOrchestrator { return { ...data, loginNodes: data["loginNodes"] !== undefined ? serializeSlurmLoginNodes(data["loginNodes"]) : undefined, nodeSets: data["nodeSets"] !== undefined ? data["nodeSets"].map((item: any) => (serializeSlurmNodeSet(item))) : undefined, }; } function deserializeSlurmOrchestrator(data: any): SlurmOrchestrator { return { ...data, loginNodes: data["loginNodes"] !== undefined ? deserializeSlurmLoginNodes(data["loginNodes"]) : undefined, nodeSets: data["nodeSets"] !== undefined ? data["nodeSets"].map((item: any) => (deserializeSlurmNodeSet(item))) : undefined, }; } /** * Configuration for Slurm partitions in the cluster. Partitions are groups of * nodesets, and are how clients specify where their workloads should be run. */ export interface SlurmPartition { /** * Required. ID of the partition, which is how users will identify it. Must * conform to [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) * (lower-case, alphanumeric, and at most 63 characters). */ id?: string; /** * Required. IDs of the nodesets that make up this partition. Values must * match SlurmNodeSet.id. */ nodeSetIds?: string[]; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * Description of how a storage resource should be mounted on a VM instance. */ export interface StorageConfig { /** * Required. ID of the storage resource to mount, which must match a key in * the cluster's storage_resources. */ id?: string; /** * Required. A directory inside the VM instance's file system where the * storage resource should be mounted (e.g., `/mnt/share`). */ localMount?: string; } /** * A resource representing a form of persistent storage that is accessible to * compute resources in the cluster. */ export interface StorageResource { /** * Reference to a Google Cloud Storage bucket. Populated if and only if the * storage resource was configured to use Google Cloud Storage. */ bucket?: BucketReference; /** * Required. Immutable. Configuration for this storage resource, which * describes how it should be created or imported. This field only controls * how the storage resource is initially created or imported. Subsequent * changes to the storage resource should be made via the resource's API and * will not be reflected in the configuration. */ config?: StorageResourceConfig; /** * Reference to a Filestore instance. Populated if and only if the storage * resource was configured to use Filestore. */ filestore?: FilestoreReference; /** * Reference to a Managed Lustre instance. Populated if and only if the * storage resource was configured to use Managed Lustre. */ lustre?: LustreReference; } function serializeStorageResource(data: any): StorageResource { return { ...data, config: data["config"] !== undefined ? serializeStorageResourceConfig(data["config"]) : undefined, }; } function deserializeStorageResource(data: any): StorageResource { return { ...data, config: data["config"] !== undefined ? deserializeStorageResourceConfig(data["config"]) : undefined, }; } /** * Describes how a storage resource should be initialized. Each storage * resource can either be imported from an existing Google Cloud resource or * initialized when the cluster is created. */ export interface StorageResourceConfig { /** * Optional. Immutable. If set, indicates that an existing Cloud Storage * bucket should be imported. */ existingBucket?: ExistingBucketConfig; /** * Optional. Immutable. If set, indicates that an existing Filestore instance * should be imported. */ existingFilestore?: ExistingFilestoreConfig; /** * Optional. Immutable. If set, indicates that an existing Managed Lustre * instance should be imported. */ existingLustre?: ExistingLustreConfig; /** * Optional. Immutable. If set, indicates that a new Cloud Storage bucket * should be created. */ newBucket?: NewBucketConfig; /** * Optional. Immutable. If set, indicates that a new Filestore instance * should be created. */ newFilestore?: NewFilestoreConfig; /** * Optional. Immutable. If set, indicates that a new Managed Lustre instance * should be created. */ newLustre?: NewLustreConfig; } function serializeStorageResourceConfig(data: any): StorageResourceConfig { return { ...data, newFilestore: data["newFilestore"] !== undefined ? serializeNewFilestoreConfig(data["newFilestore"]) : undefined, newLustre: data["newLustre"] !== undefined ? serializeNewLustreConfig(data["newLustre"]) : undefined, }; } function deserializeStorageResourceConfig(data: any): StorageResourceConfig { return { ...data, newFilestore: data["newFilestore"] !== undefined ? deserializeNewFilestoreConfig(data["newFilestore"]) : undefined, newLustre: data["newLustre"] !== undefined ? deserializeNewLustreConfig(data["newLustre"]) : undefined, }; } /** * When set in OperationStep, indicates that a login node should be updated. */ export interface UpdateLoginNode { } /** * When set in OperationStep, indicates that a nodeset should be updated. */ export interface UpdateNodeset { /** * Output only. Name of the nodeset to update */ readonly nodesets?: string[]; } /** * When set in OperationStep, indicates that an orchestrator should be updated. */ export interface UpdateOrchestrator { } /** * When set in OperationStep, indicates that a partition should be updated. */ export interface UpdatePartition { /** * Output only. Name of the partition to update */ readonly partitions?: string[]; }