// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * GDC Virtual API Client for Deno * =============================== * * * * Docs: https://cloud.google.com/anthos/clusters/docs/on-prem/ * Source: https://googleapis.deno.dev/v1/gkeonprem:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class gkeonprem { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://gkeonprem.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a new bare metal admin cluster in a given project and location. * The API needs to be combined with creating a bootstrap cluster to work. * See: * https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/creating-clusters/create-admin-cluster-api#prepare_bootstrap_environment * * @param parent Required. The parent of the project and location where the cluster is created in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalAdminClustersCreate(parent: string, req: BareMetalAdminCluster, opts: ProjectsLocationsBareMetalAdminClustersCreateOptions = {}): Promise { req = serializeBareMetalAdminCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalAdminClusters`); if (opts.allowPreflightFailure !== undefined) { url.searchParams.append("allowPreflightFailure", String(opts.allowPreflightFailure)); } if (opts.bareMetalAdminClusterId !== undefined) { url.searchParams.append("bareMetalAdminClusterId", String(opts.bareMetalAdminClusterId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Enrolls an existing bare metal admin cluster to the Anthos On-Prem API * within a given project and location. Through enrollment, an existing admin * cluster will become Anthos On-Prem API managed. The corresponding GCP * resources will be created and all future modifications to the cluster will * be expected to be performed through the API. * * @param parent Required. The parent of the project and location where the cluster is enrolled in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalAdminClustersEnroll(parent: string, req: EnrollBareMetalAdminClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalAdminClusters:enroll`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single bare metal admin cluster. * * @param name Required. Name of the bare metal admin cluster to get. Format: "projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_admin_cluster}" */ async projectsLocationsBareMetalAdminClustersGet(name: string, opts: ProjectsLocationsBareMetalAdminClustersGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeBareMetalAdminCluster(data); } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalAdminClustersGetIamPolicy(resource: string, opts: ProjectsLocationsBareMetalAdminClustersGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists bare metal admin clusters in a given project and location. * * @param parent Required. The parent of the project and location where the clusters are listed in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalAdminClustersList(parent: string, opts: ProjectsLocationsBareMetalAdminClustersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalAdminClusters`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListBareMetalAdminClustersResponse(data); } /** * 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 projectsLocationsBareMetalAdminClustersOperationsGet(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 projectsLocationsBareMetalAdminClustersOperationsList(name: string, opts: ProjectsLocationsBareMetalAdminClustersOperationsListOptions = {}): 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Updates the parameters of a single bare metal admin cluster. * * @param name Immutable. The bare metal admin cluster resource name. */ async projectsLocationsBareMetalAdminClustersPatch(name: string, req: BareMetalAdminCluster, opts: ProjectsLocationsBareMetalAdminClustersPatchOptions = {}): Promise { req = serializeBareMetalAdminCluster(req); opts = serializeProjectsLocationsBareMetalAdminClustersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Queries the bare metal admin cluster version config. * * @param parent Required. The parent of the project and location to query for version config. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalAdminClustersQueryVersionConfig(parent: string, opts: ProjectsLocationsBareMetalAdminClustersQueryVersionConfigOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalAdminClusters:queryVersionConfig`); if (opts["upgradeConfig.clusterName"] !== undefined) { url.searchParams.append("upgradeConfig.clusterName", String(opts["upgradeConfig.clusterName"])); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as QueryBareMetalAdminVersionConfigResponse; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalAdminClustersSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalAdminClustersTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Unenrolls an existing bare metal admin cluster from the Anthos On-Prem API * within a given project and location. Unenrollment removes the Cloud * reference to the cluster without modifying the underlying OnPrem Resources. * Clusters will continue to run; however, they will no longer be accessible * through the Anthos On-Prem API or its clients. * * @param name Required. Name of the bare metal admin cluster to be unenrolled. Format: "projects/{project}/locations/{location}/bareMetalAdminClusters/{cluster}" */ async projectsLocationsBareMetalAdminClustersUnenroll(name: string, opts: ProjectsLocationsBareMetalAdminClustersUnenrollOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:unenroll`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.ignoreErrors !== undefined) { url.searchParams.append("ignoreErrors", String(opts.ignoreErrors)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Creates a new bare metal node pool in a given project, location and Bare * Metal cluster. * * @param parent Required. The parent resource where this node pool will be created. projects/{project}/locations/{location}/bareMetalClusters/{cluster} */ async projectsLocationsBareMetalClustersBareMetalNodePoolsCreate(parent: string, req: BareMetalNodePool, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalNodePools`); if (opts.bareMetalNodePoolId !== undefined) { url.searchParams.append("bareMetalNodePoolId", String(opts.bareMetalNodePoolId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single bare metal node pool. * * @param name Required. The name of the node pool to delete. Format: projects/{project}/locations/{location}/bareMetalClusters/{cluster}/bareMetalNodePools/{nodepool} */ async projectsLocationsBareMetalClustersBareMetalNodePoolsDelete(name: string, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.ignoreErrors !== undefined) { url.searchParams.append("ignoreErrors", String(opts.ignoreErrors)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Enrolls an existing bare metal node pool to the Anthos On-Prem API within * a given project and location. Through enrollment, an existing node pool * will become Anthos On-Prem API managed. The corresponding GCP resources * will be created. * * @param parent Required. The parent resource where this node pool will be created. projects/{project}/locations/{location}/bareMetalClusters/{cluster} */ async projectsLocationsBareMetalClustersBareMetalNodePoolsEnroll(parent: string, req: EnrollBareMetalNodePoolRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalNodePools:enroll`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single bare metal node pool. * * @param name Required. The name of the node pool to retrieve. projects/{project}/locations/{location}/bareMetalClusters/{cluster}/bareMetalNodePools/{nodepool} */ async projectsLocationsBareMetalClustersBareMetalNodePoolsGet(name: string, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as BareMetalNodePool; } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicy(resource: string, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists bare metal node pools in a given project, location and bare metal * cluster. * * @param parent Required. The parent, which owns this collection of node pools. Format: projects/{project}/locations/{location}/bareMetalClusters/{bareMetalCluster} */ async projectsLocationsBareMetalClustersBareMetalNodePoolsList(parent: string, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalNodePools`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBareMetalNodePoolsResponse; } /** * 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 projectsLocationsBareMetalClustersBareMetalNodePoolsOperationsGet(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 projectsLocationsBareMetalClustersBareMetalNodePoolsOperationsList(name: string, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListOptions = {}): 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Updates the parameters of a single bare metal node pool. * * @param name Immutable. The bare metal node pool resource name. */ async projectsLocationsBareMetalClustersBareMetalNodePoolsPatch(name: string, req: BareMetalNodePool, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions = {}): Promise { opts = serializeProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalClustersBareMetalNodePoolsSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalClustersBareMetalNodePoolsTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Unenrolls a bare metal node pool from Anthos On-Prem API. * * @param name Required. The name of the node pool to unenroll. Format: projects/{project}/locations/{location}/bareMetalClusters/{cluster}/bareMetalNodePools/{nodepool} */ async projectsLocationsBareMetalClustersBareMetalNodePoolsUnenroll(name: string, opts: ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:unenroll`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Creates a new bare metal cluster in a given project and location. * * @param parent Required. The parent of the project and location where the cluster is created in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalClustersCreate(parent: string, req: BareMetalCluster, opts: ProjectsLocationsBareMetalClustersCreateOptions = {}): Promise { req = serializeBareMetalCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalClusters`); if (opts.allowPreflightFailure !== undefined) { url.searchParams.append("allowPreflightFailure", String(opts.allowPreflightFailure)); } if (opts.bareMetalClusterId !== undefined) { url.searchParams.append("bareMetalClusterId", String(opts.bareMetalClusterId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single bare metal Cluster. * * @param name Required. Name of the bare metal user cluster to be deleted. Format: "projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_cluster}" */ async projectsLocationsBareMetalClustersDelete(name: string, opts: ProjectsLocationsBareMetalClustersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.ignoreErrors !== undefined) { url.searchParams.append("ignoreErrors", String(opts.ignoreErrors)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Enrolls an existing bare metal user cluster and its node pools to the * Anthos On-Prem API within a given project and location. Through enrollment, * an existing cluster will become Anthos On-Prem API managed. The * corresponding GCP resources will be created and all future modifications to * the cluster and/or its node pools will be expected to be performed through * the API. * * @param parent Required. The parent of the project and location where the cluster is enrolled in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalClustersEnroll(parent: string, req: EnrollBareMetalClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalClusters:enroll`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single bare metal Cluster. * * @param name Required. Name of the bare metal user cluster to get. Format: "projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_cluster}" */ async projectsLocationsBareMetalClustersGet(name: string, opts: ProjectsLocationsBareMetalClustersGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeBareMetalCluster(data); } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalClustersGetIamPolicy(resource: string, opts: ProjectsLocationsBareMetalClustersGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists bare metal clusters in a given project and location. * * @param parent Required. The parent of the project and location where the clusters are listed in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalClustersList(parent: string, opts: ProjectsLocationsBareMetalClustersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalClusters`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } 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.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListBareMetalClustersResponse(data); } /** * 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 projectsLocationsBareMetalClustersOperationsGet(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 projectsLocationsBareMetalClustersOperationsList(name: string, opts: ProjectsLocationsBareMetalClustersOperationsListOptions = {}): 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Updates the parameters of a single bare metal Cluster. * * @param name Immutable. The bare metal user cluster resource name. */ async projectsLocationsBareMetalClustersPatch(name: string, req: BareMetalCluster, opts: ProjectsLocationsBareMetalClustersPatchOptions = {}): Promise { req = serializeBareMetalCluster(req); opts = serializeProjectsLocationsBareMetalClustersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Queries the bare metal user cluster version config. * * @param parent Required. The parent of the project and location to query for version config. Format: "projects/{project}/locations/{location}" */ async projectsLocationsBareMetalClustersQueryVersionConfig(parent: string, opts: ProjectsLocationsBareMetalClustersQueryVersionConfigOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/bareMetalClusters:queryVersionConfig`); if (opts["createConfig.adminClusterMembership"] !== undefined) { url.searchParams.append("createConfig.adminClusterMembership", String(opts["createConfig.adminClusterMembership"])); } if (opts["createConfig.adminClusterName"] !== undefined) { url.searchParams.append("createConfig.adminClusterName", String(opts["createConfig.adminClusterName"])); } if (opts["upgradeConfig.clusterName"] !== undefined) { url.searchParams.append("upgradeConfig.clusterName", String(opts["upgradeConfig.clusterName"])); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as QueryBareMetalVersionConfigResponse; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalClustersSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsBareMetalClustersTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Unenrolls an existing bare metal user cluster and its node pools from the * Anthos On-Prem API within a given project and location. Unenrollment * removes the Cloud reference to the cluster without modifying the underlying * OnPrem Resources. Clusters and node pools will continue to run; however, * they will no longer be accessible through the Anthos On-Prem API or its * clients. * * @param name Required. Name of the bare metal user cluster to be unenrolled. Format: "projects/{project}/locations/{location}/bareMetalClusters/{cluster}" */ async projectsLocationsBareMetalClustersUnenroll(name: string, opts: ProjectsLocationsBareMetalClustersUnenrollOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:unenroll`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); 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. * * @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.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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Creates a new VMware admin cluster in a given project and location. The * API needs to be combined with creating a bootstrap cluster to work. * * @param parent Required. The parent of the project and location where the cluster is created in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareAdminClustersCreate(parent: string, req: VmwareAdminCluster, opts: ProjectsLocationsVmwareAdminClustersCreateOptions = {}): Promise { req = serializeVmwareAdminCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareAdminClusters`); if (opts.allowPreflightFailure !== undefined) { url.searchParams.append("allowPreflightFailure", String(opts.allowPreflightFailure)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } if (opts.vmwareAdminClusterId !== undefined) { url.searchParams.append("vmwareAdminClusterId", String(opts.vmwareAdminClusterId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Enrolls an existing VMware admin cluster to the Anthos On-Prem API within * a given project and location. Through enrollment, an existing admin cluster * will become Anthos On-Prem API managed. The corresponding GCP resources * will be created and all future modifications to the cluster will be * expected to be performed through the API. * * @param parent Required. The parent of the project and location where the cluster is enrolled in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareAdminClustersEnroll(parent: string, req: EnrollVmwareAdminClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareAdminClusters:enroll`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single VMware admin cluster. * * @param name Required. Name of the VMware admin cluster to be returned. Format: "projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_cluster}" */ async projectsLocationsVmwareAdminClustersGet(name: string, opts: ProjectsLocationsVmwareAdminClustersGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeVmwareAdminCluster(data); } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareAdminClustersGetIamPolicy(resource: string, opts: ProjectsLocationsVmwareAdminClustersGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists VMware admin clusters in a given project and location. * * @param parent Required. The parent of the project and location where the clusters are listed in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareAdminClustersList(parent: string, opts: ProjectsLocationsVmwareAdminClustersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareAdminClusters`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListVmwareAdminClustersResponse(data); } /** * 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 projectsLocationsVmwareAdminClustersOperationsGet(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 projectsLocationsVmwareAdminClustersOperationsList(name: string, opts: ProjectsLocationsVmwareAdminClustersOperationsListOptions = {}): 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Updates the parameters of a single VMware admin cluster. * * @param name Immutable. The VMware admin cluster resource name. */ async projectsLocationsVmwareAdminClustersPatch(name: string, req: VmwareAdminCluster, opts: ProjectsLocationsVmwareAdminClustersPatchOptions = {}): Promise { req = serializeVmwareAdminCluster(req); opts = serializeProjectsLocationsVmwareAdminClustersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareAdminClustersSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareAdminClustersTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Unenrolls an existing VMware admin cluster from the Anthos On-Prem API * within a given project and location. Unenrollment removes the Cloud * reference to the cluster without modifying the underlying OnPrem Resources. * Clusters will continue to run; however, they will no longer be accessible * through the Anthos On-Prem API or its clients. * * @param name Required. Name of the VMware admin cluster to be unenrolled. Format: "projects/{project}/locations/{location}/vmwareAdminClusters/{cluster}" */ async projectsLocationsVmwareAdminClustersUnenroll(name: string, opts: ProjectsLocationsVmwareAdminClustersUnenrollOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:unenroll`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Creates a new VMware user cluster in a given project and location. * * @param parent Required. The parent of the project and location where this cluster is created in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareClustersCreate(parent: string, req: VmwareCluster, opts: ProjectsLocationsVmwareClustersCreateOptions = {}): Promise { req = serializeVmwareCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareClusters`); if (opts.allowPreflightFailure !== undefined) { url.searchParams.append("allowPreflightFailure", String(opts.allowPreflightFailure)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } if (opts.vmwareClusterId !== undefined) { url.searchParams.append("vmwareClusterId", String(opts.vmwareClusterId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single VMware Cluster. * * @param name Required. Name of the VMware user cluster to be deleted. Format: "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}" */ async projectsLocationsVmwareClustersDelete(name: string, opts: ProjectsLocationsVmwareClustersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.ignoreErrors !== undefined) { url.searchParams.append("ignoreErrors", String(opts.ignoreErrors)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Enrolls an existing VMware user cluster and its node pools to the Anthos * On-Prem API within a given project and location. Through enrollment, an * existing cluster will become Anthos On-Prem API managed. The corresponding * GCP resources will be created and all future modifications to the cluster * and/or its node pools will be expected to be performed through the API. * * @param parent Required. The parent of the project and location where the cluster is Enrolled in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareClustersEnroll(parent: string, req: EnrollVmwareClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareClusters:enroll`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single VMware Cluster. * * @param name Required. Name of the VMware user cluster to be returned. Format: "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}" */ async projectsLocationsVmwareClustersGet(name: string, opts: ProjectsLocationsVmwareClustersGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeVmwareCluster(data); } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareClustersGetIamPolicy(resource: string, opts: ProjectsLocationsVmwareClustersGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists VMware Clusters in a given project and location. * * @param parent Required. The parent of the project and location where the clusters are listed in. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareClustersList(parent: string, opts: ProjectsLocationsVmwareClustersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareClusters`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } 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.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListVmwareClustersResponse(data); } /** * 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 projectsLocationsVmwareClustersOperationsGet(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 projectsLocationsVmwareClustersOperationsList(name: string, opts: ProjectsLocationsVmwareClustersOperationsListOptions = {}): 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Updates the parameters of a single VMware cluster. * * @param name Immutable. The VMware user cluster resource name. */ async projectsLocationsVmwareClustersPatch(name: string, req: VmwareCluster, opts: ProjectsLocationsVmwareClustersPatchOptions = {}): Promise { req = serializeVmwareCluster(req); opts = serializeProjectsLocationsVmwareClustersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Queries the VMware user cluster version config. * * @param parent Required. The parent of the project and location to query for version config. Format: "projects/{project}/locations/{location}" */ async projectsLocationsVmwareClustersQueryVersionConfig(parent: string, opts: ProjectsLocationsVmwareClustersQueryVersionConfigOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareClusters:queryVersionConfig`); if (opts["createConfig.adminClusterMembership"] !== undefined) { url.searchParams.append("createConfig.adminClusterMembership", String(opts["createConfig.adminClusterMembership"])); } if (opts["createConfig.adminClusterName"] !== undefined) { url.searchParams.append("createConfig.adminClusterName", String(opts["createConfig.adminClusterName"])); } if (opts["upgradeConfig.clusterName"] !== undefined) { url.searchParams.append("upgradeConfig.clusterName", String(opts["upgradeConfig.clusterName"])); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as QueryVmwareVersionConfigResponse; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareClustersSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareClustersTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Unenrolls an existing VMware user cluster and its node pools from the * Anthos On-Prem API within a given project and location. Unenrollment * removes the Cloud reference to the cluster without modifying the underlying * OnPrem Resources. Clusters and node pools will continue to run; however, * they will no longer be accessible through the Anthos On-Prem API or UI. * * @param name Required. Name of the VMware user cluster to be unenrolled. Format: "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}" */ async projectsLocationsVmwareClustersUnenroll(name: string, opts: ProjectsLocationsVmwareClustersUnenrollOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:unenroll`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Creates a new VMware node pool in a given project, location and VMWare * cluster. * * @param parent Required. The parent resource where this node pool will be created. projects/{project}/locations/{location}/vmwareClusters/{cluster} */ async projectsLocationsVmwareClustersVmwareNodePoolsCreate(parent: string, req: VmwareNodePool, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsCreateOptions = {}): Promise { req = serializeVmwareNodePool(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareNodePools`); if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } if (opts.vmwareNodePoolId !== undefined) { url.searchParams.append("vmwareNodePoolId", String(opts.vmwareNodePoolId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single VMware node pool. * * @param name Required. The name of the node pool to delete. Format: projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNodePools/{nodepool} */ async projectsLocationsVmwareClustersVmwareNodePoolsDelete(name: string, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.ignoreErrors !== undefined) { url.searchParams.append("ignoreErrors", String(opts.ignoreErrors)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Enrolls a VMware node pool to Anthos On-Prem API * * @param parent Required. The parent resource where the node pool is enrolled in. */ async projectsLocationsVmwareClustersVmwareNodePoolsEnroll(parent: string, req: EnrollVmwareNodePoolRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareNodePools:enroll`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets details of a single VMware node pool. * * @param name Required. The name of the node pool to retrieve. projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNodePools/{nodepool} */ async projectsLocationsVmwareClustersVmwareNodePoolsGet(name: string, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeVmwareNodePool(data); } /** * Gets the access control policy for a resource. Returns an empty policy if * the resource exists and does not have a policy set. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicy(resource: string, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:getIamPolicy`); if (opts["options.requestedPolicyVersion"] !== undefined) { url.searchParams.append("options.requestedPolicyVersion", String(opts["options.requestedPolicyVersion"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePolicy(data); } /** * Lists VMware node pools in a given project, location and VMWare cluster. * * @param parent Required. The parent, which owns this collection of node pools. Format: projects/{project}/locations/{location}/vmwareClusters/{vmwareCluster} */ async projectsLocationsVmwareClustersVmwareNodePoolsList(parent: string, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/vmwareNodePools`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListVmwareNodePoolsResponse(data); } /** * 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 projectsLocationsVmwareClustersVmwareNodePoolsOperationsGet(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 projectsLocationsVmwareClustersVmwareNodePoolsOperationsList(name: string, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListOptions = {}): 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Updates the parameters of a single VMware node pool. * * @param name Immutable. The resource name of this node pool. */ async projectsLocationsVmwareClustersVmwareNodePoolsPatch(name: string, req: VmwareNodePool, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions = {}): Promise { req = serializeVmwareNodePool(req); opts = serializeProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Sets the access control policy on the specified resource. Replaces any * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and * `PERMISSION_DENIED` errors. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareClustersVmwareNodePoolsSetIamPolicy(resource: string, req: SetIamPolicyRequest): Promise { req = serializeSetIamPolicyRequest(req); const url = new URL(`${this.#baseUrl}v1/${ resource }:setIamPolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePolicy(data); } /** * Returns permissions that a caller has on the specified resource. If the * resource does not exist, this will return an empty set of permissions, not * a `NOT_FOUND` error. Note: This operation is designed to be used for * building permission-aware UIs and command-line tools, not for authorization * checking. This operation may "fail open" without warning. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ async projectsLocationsVmwareClustersVmwareNodePoolsTestIamPermissions(resource: string, req: TestIamPermissionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ resource }:testIamPermissions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TestIamPermissionsResponse; } /** * Unenrolls a VMware node pool to Anthos On-Prem API * * @param name Required. The name of the node pool to unenroll. Format: projects/{project}/locations/{location}/vmwareClusters/{cluster}/vmwareNodePools/{nodepool} */ async projectsLocationsVmwareClustersVmwareNodePoolsUnenroll(name: string, opts: ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:unenroll`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } } /** * Authorization defines the On-Prem cluster authorization configuration to * bootstrap onto the admin cluster. */ export interface Authorization { /** * For VMware and bare metal user clusters, users will be granted the * cluster-admin role on the cluster, which provides full administrative * access to the cluster. For bare metal admin clusters, users will be granted * the cluster-view role, which limits users to read-only access. */ adminUsers?: ClusterUser[]; } /** * BareMetalAdminApiServerArgument represents an arg name->value pair. Only a * subset of customized flags are supported. Please refer to the API server * documentation below to know the exact format: * https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ */ export interface BareMetalAdminApiServerArgument { /** * Required. The argument name as it appears on the API Server command line * please make sure to remove the leading dashes. */ argument?: string; /** * Required. The value of the arg as it will be passed to the API Server * command line. */ value?: string; } /** * Resource that represents a bare metal admin cluster. */ export interface BareMetalAdminCluster { /** * Annotations on the bare metal admin cluster. This field has the same * restrictions as Kubernetes annotations. The total size of all keys and * values combined is limited to 256k. Key can have 2 segments: prefix * (optional) and name (required), separated by a slash (/). Prefix must be a * DNS subdomain. Name must be 63 characters or less, begin and end with * alphanumerics, with dashes (-), underscores (_), dots (.), and * alphanumerics between. */ annotations?: { [key: string]: string }; /** * The Anthos clusters on bare metal version for the bare metal admin * cluster. */ bareMetalVersion?: string; /** * Binary Authorization related configurations. */ binaryAuthorization?: BinaryAuthorization; /** * Cluster operations configuration. */ clusterOperations?: BareMetalAdminClusterOperationsConfig; /** * Control plane configuration. */ controlPlane?: BareMetalAdminControlPlaneConfig; /** * Output only. The time at which this bare metal admin cluster was created. */ readonly createTime?: Date; /** * Output only. The time at which this bare metal admin cluster was deleted. * If the resource is not deleted, this must be empty */ readonly deleteTime?: Date; /** * A human readable description of this bare metal admin cluster. */ description?: string; /** * Output only. The IP address name of bare metal admin cluster's API server. */ readonly endpoint?: string; /** * This checksum is computed by the server based on the value of other * fields, and may be sent on update and delete requests to ensure the client * has an up-to-date value before proceeding. Allows clients to perform * consistent read-modify-writes through optimistic concurrency control. */ etag?: string; /** * Output only. Fleet configuration for the cluster. */ readonly fleet?: Fleet; /** * Load balancer configuration. */ loadBalancer?: BareMetalAdminLoadBalancerConfig; /** * Output only. The object name of the bare metal cluster custom resource. * This field is used to support conflicting names when enrolling existing * clusters to the API. When used as a part of cluster enrollment, this field * will differ from the ID in the resource name. For new clusters, this field * will match the user provided cluster name and be visible in the last * component of the resource name. It is not modifiable. All users should use * this name to access their cluster using gkectl or kubectl and should expect * to see the local name when viewing admin cluster controller logs. */ readonly localName?: string; /** * Maintenance configuration. */ maintenanceConfig?: BareMetalAdminMaintenanceConfig; /** * Output only. MaintenanceStatus representing state of maintenance. */ readonly maintenanceStatus?: BareMetalAdminMaintenanceStatus; /** * Immutable. The bare metal admin cluster resource name. */ name?: string; /** * Network configuration. */ networkConfig?: BareMetalAdminNetworkConfig; /** * Node access related configurations. */ nodeAccessConfig?: BareMetalAdminNodeAccessConfig; /** * Workload node configuration. */ nodeConfig?: BareMetalAdminWorkloadNodeConfig; /** * OS environment related configurations. */ osEnvironmentConfig?: BareMetalAdminOsEnvironmentConfig; /** * Proxy configuration. */ proxy?: BareMetalAdminProxyConfig; /** * Output only. If set, there are currently changes in flight to the bare * metal Admin Cluster. */ readonly reconciling?: boolean; /** * Security related configuration. */ securityConfig?: BareMetalAdminSecurityConfig; /** * Output only. The current state of the bare metal admin cluster. */ readonly state?: | "STATE_UNSPECIFIED" | "PROVISIONING" | "RUNNING" | "RECONCILING" | "STOPPING" | "ERROR" | "DEGRADED"; /** * Output only. ResourceStatus representing detailed cluster status. */ readonly status?: ResourceStatus; /** * Storage configuration. */ storage?: BareMetalAdminStorageConfig; /** * Output only. The unique identifier of the bare metal admin cluster. */ readonly uid?: string; /** * Output only. The time at which this bare metal admin cluster was last * updated. */ readonly updateTime?: Date; /** * Output only. ValidationCheck representing the result of the preflight * check. */ readonly validationCheck?: ValidationCheck; } function serializeBareMetalAdminCluster(data: any): BareMetalAdminCluster { return { ...data, nodeConfig: data["nodeConfig"] !== undefined ? serializeBareMetalAdminWorkloadNodeConfig(data["nodeConfig"]) : undefined, }; } function deserializeBareMetalAdminCluster(data: any): BareMetalAdminCluster { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, nodeConfig: data["nodeConfig"] !== undefined ? deserializeBareMetalAdminWorkloadNodeConfig(data["nodeConfig"]) : undefined, status: data["status"] !== undefined ? deserializeResourceStatus(data["status"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * BareMetalAdminClusterOperationsConfig specifies the admin cluster's * observability infrastructure. */ export interface BareMetalAdminClusterOperationsConfig { /** * Whether collection of application logs/metrics should be enabled (in * addition to system logs/metrics). */ enableApplicationLogs?: boolean; } /** * BareMetalAdminControlPlaneConfig specifies the control plane configuration. */ export interface BareMetalAdminControlPlaneConfig { /** * Customizes the default API server args. Only a subset of customized flags * are supported. Please refer to the API server documentation below to know * the exact format: * https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ */ apiServerArgs?: BareMetalAdminApiServerArgument[]; /** * Required. Configures the node pool running the control plane. If specified * the corresponding NodePool will be created for the cluster's control plane. * The NodePool will have the same name and namespace as the cluster. */ controlPlaneNodePoolConfig?: BareMetalAdminControlPlaneNodePoolConfig; } /** * BareMetalAdminControlPlaneNodePoolConfig specifies the control plane node * pool configuration. We have a control plane specific node pool config so that * we can flexible about supporting control plane specific fields in the future. */ export interface BareMetalAdminControlPlaneNodePoolConfig { /** * Required. The generic configuration for a node pool running the control * plane. */ nodePoolConfig?: BareMetalNodePoolConfig; } /** * BareMetalAdminDrainedMachine represents the machines that are drained. */ export interface BareMetalAdminDrainedMachine { /** * Drained machine IP address. */ nodeIp?: string; } /** * BareMetalAdminDrainingMachine represents the machines that are currently * draining. */ export interface BareMetalAdminDrainingMachine { /** * Draining machine IP address. */ nodeIp?: string; /** * The count of pods yet to drain. */ podCount?: number; } /** * BareMetalAdminIslandModeCidrConfig specifies the cluster CIDR configuration * while running in island mode. */ export interface BareMetalAdminIslandModeCidrConfig { /** * Required. All pods in the cluster are assigned an RFC1918 IPv4 address * from these ranges. This field cannot be changed after creation. */ podAddressCidrBlocks?: string[]; /** * Required. All services in the cluster are assigned an RFC1918 IPv4 address * from these ranges. This field cannot be changed after creation. */ serviceAddressCidrBlocks?: string[]; } /** * BareMetalAdminLoadBalancerConfig specifies the load balancer configuration. */ export interface BareMetalAdminLoadBalancerConfig { /** * Manually configured load balancers. */ manualLbConfig?: BareMetalAdminManualLbConfig; /** * Configures the ports that the load balancer will listen on. */ portConfig?: BareMetalAdminPortConfig; /** * The VIPs used by the load balancer. */ vipConfig?: BareMetalAdminVipConfig; } /** * BareMetalAdminMachineDrainStatus represents the status of bare metal node * machines that are undergoing drain operations. */ export interface BareMetalAdminMachineDrainStatus { /** * The list of drained machines. */ drainedMachines?: BareMetalAdminDrainedMachine[]; /** * The list of draning machines. */ drainingMachines?: BareMetalAdminDrainingMachine[]; } /** * BareMetalAdminMaintenanceConfig specifies configurations to put bare metal * Admin cluster CRs nodes in and out of maintenance. */ export interface BareMetalAdminMaintenanceConfig { /** * Required. All IPv4 address from these ranges will be placed into * maintenance mode. Nodes in maintenance mode will be cordoned and drained. * When both of these are true, the "baremetal.cluster.gke.io/maintenance" * annotation will be set on the node resource. */ maintenanceAddressCidrBlocks?: string[]; } /** * BareMetalAdminMaintenanceStatus represents the maintenance status for bare * metal Admin cluster CR's nodes. */ export interface BareMetalAdminMaintenanceStatus { /** * Represents the status of draining and drained machine nodes. This is used * to show the progress of cluster upgrade. */ machineDrainStatus?: BareMetalAdminMachineDrainStatus; } /** * BareMetalAdminManualLbConfig represents configuration parameters for a * manual load balancer. */ export interface BareMetalAdminManualLbConfig { /** * Whether manual load balancing is enabled. */ enabled?: boolean; } /** * BareMetalAdminNetworkConfig specifies the cluster network configuration. */ export interface BareMetalAdminNetworkConfig { /** * Configuration for Island mode CIDR. */ islandModeCidr?: BareMetalAdminIslandModeCidrConfig; } /** * Specifies the node access related settings for the bare metal admin cluster. */ export interface BareMetalAdminNodeAccessConfig { /** * Required. LoginUser is the user name used to access node machines. It * defaults to "root" if not set. */ loginUser?: string; } /** * Specifies operating system operation settings for cluster provisioning. */ export interface BareMetalAdminOsEnvironmentConfig { /** * Whether the package repo should be added when initializing bare metal * machines. */ packageRepoExcluded?: boolean; } /** * BareMetalAdminPortConfig is the specification of load balancer ports. */ export interface BareMetalAdminPortConfig { /** * The port that control plane hosted load balancers will listen on. */ controlPlaneLoadBalancerPort?: number; } /** * BareMetalAdminProxyConfig specifies the cluster proxy configuration. */ export interface BareMetalAdminProxyConfig { /** * A list of IPs, hostnames, and domains that should skip the proxy. * Examples: ["127.0.0.1", "example.com", ".corp", "localhost"]. */ noProxy?: string[]; /** * Required. Specifies the address of your proxy server. Examples: * `http://domain` WARNING: Do not provide credentials in the format * `http://(username:password@)domain` these will be rejected by the server. */ uri?: string; } /** * Specifies the security related settings for the bare metal admin cluster. */ export interface BareMetalAdminSecurityConfig { /** * Configures user access to the admin cluster. */ authorization?: Authorization; } /** * BareMetalAdminStorageConfig specifies the cluster storage configuration. */ export interface BareMetalAdminStorageConfig { /** * Required. Specifies the config for local PersistentVolumes backed by * mounted node disks. These disks need to be formatted and mounted by the * user, which can be done before or after cluster creation. */ lvpNodeMountsConfig?: BareMetalLvpConfig; /** * Required. Specifies the config for local PersistentVolumes backed by * subdirectories in a shared filesystem. These subdirectores are * automatically created during cluster creation. */ lvpShareConfig?: BareMetalLvpShareConfig; } /** * BareMetalAdminVipConfig for bare metal load balancer configurations. */ export interface BareMetalAdminVipConfig { /** * The VIP which you previously set aside for the Kubernetes API of this bare * metal admin cluster. */ controlPlaneVip?: string; } /** * BareMetalAdminWorkloadNodeConfig specifies the workload node configurations. */ export interface BareMetalAdminWorkloadNodeConfig { /** * The maximum number of pods a node can run. The size of the CIDR range * assigned to the node will be derived from this parameter. By default 110 * Pods are created per Node. Upper bound is 250 for both HA and non-HA admin * cluster. Lower bound is 64 for non-HA admin cluster and 32 for HA admin * cluster. */ maxPodsPerNode?: bigint; } function serializeBareMetalAdminWorkloadNodeConfig(data: any): BareMetalAdminWorkloadNodeConfig { return { ...data, maxPodsPerNode: data["maxPodsPerNode"] !== undefined ? String(data["maxPodsPerNode"]) : undefined, }; } function deserializeBareMetalAdminWorkloadNodeConfig(data: any): BareMetalAdminWorkloadNodeConfig { return { ...data, maxPodsPerNode: data["maxPodsPerNode"] !== undefined ? BigInt(data["maxPodsPerNode"]) : undefined, }; } /** * Represents an arg name->value pair. Only a subset of customized flags are * supported. For the exact format, refer to the [API server * documentation](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/). */ export interface BareMetalApiServerArgument { /** * Required. The argument name as it appears on the API Server command line, * make sure to remove the leading dashes. */ argument?: string; /** * Required. The value of the arg as it will be passed to the API Server * command line. */ value?: string; } /** * BareMetalBgpLbConfig represents configuration parameters for a Border * Gateway Protocol (BGP) load balancer. */ export interface BareMetalBgpLbConfig { /** * Required. AddressPools is a list of non-overlapping IP pools used by load * balancer typed services. All addresses must be routable to load balancer * nodes. IngressVIP must be included in the pools. */ addressPools?: BareMetalLoadBalancerAddressPool[]; /** * Required. BGP autonomous system number (ASN) of the cluster. This field * can be updated after cluster creation. */ asn?: bigint; /** * Required. The list of BGP peers that the cluster will connect to. At least * one peer must be configured for each control plane node. Control plane * nodes will connect to these peers to advertise the control plane VIP. The * Services load balancer also uses these peers by default. This field can be * updated after cluster creation. */ bgpPeerConfigs?: BareMetalBgpPeerConfig[]; /** * Specifies the node pool running data plane load balancing. L2 connectivity * is required among nodes in this pool. If missing, the control plane node * pool is used for data plane load balancing. */ loadBalancerNodePoolConfig?: BareMetalLoadBalancerNodePoolConfig; } function serializeBareMetalBgpLbConfig(data: any): BareMetalBgpLbConfig { return { ...data, asn: data["asn"] !== undefined ? String(data["asn"]) : undefined, bgpPeerConfigs: data["bgpPeerConfigs"] !== undefined ? data["bgpPeerConfigs"].map((item: any) => (serializeBareMetalBgpPeerConfig(item))) : undefined, }; } function deserializeBareMetalBgpLbConfig(data: any): BareMetalBgpLbConfig { return { ...data, asn: data["asn"] !== undefined ? BigInt(data["asn"]) : undefined, bgpPeerConfigs: data["bgpPeerConfigs"] !== undefined ? data["bgpPeerConfigs"].map((item: any) => (deserializeBareMetalBgpPeerConfig(item))) : undefined, }; } /** * BareMetalBgpPeerConfig represents configuration parameters for a Border * Gateway Protocol (BGP) peer. */ export interface BareMetalBgpPeerConfig { /** * Required. BGP autonomous system number (ASN) for the network that contains * the external peer device. */ asn?: bigint; /** * The IP address of the control plane node that connects to the external * peer. If you don't specify any control plane nodes, all control plane nodes * can connect to the external peer. If you specify one or more IP addresses, * only the nodes specified participate in peering sessions. */ controlPlaneNodes?: string[]; /** * Required. The IP address of the external peer device. */ ipAddress?: string; } function serializeBareMetalBgpPeerConfig(data: any): BareMetalBgpPeerConfig { return { ...data, asn: data["asn"] !== undefined ? String(data["asn"]) : undefined, }; } function deserializeBareMetalBgpPeerConfig(data: any): BareMetalBgpPeerConfig { return { ...data, asn: data["asn"] !== undefined ? BigInt(data["asn"]) : undefined, }; } /** * Resource that represents a bare metal user cluster. */ export interface BareMetalCluster { /** * Required. The admin cluster this bare metal user cluster belongs to. This * is the full resource name of the admin cluster's fleet membership. */ adminClusterMembership?: string; /** * Output only. The resource name of the bare metal admin cluster managing * this user cluster. */ readonly adminClusterName?: string; /** * Annotations on the bare metal user cluster. This field has the same * restrictions as Kubernetes annotations. The total size of all keys and * values combined is limited to 256k. Key can have 2 segments: prefix * (optional) and name (required), separated by a slash (/). Prefix must be a * DNS subdomain. Name must be 63 characters or less, begin and end with * alphanumerics, with dashes (-), underscores (_), dots (.), and * alphanumerics between. */ annotations?: { [key: string]: string }; /** * Required. The Anthos clusters on bare metal version for your user cluster. */ bareMetalVersion?: string; /** * Binary Authorization related configurations. */ binaryAuthorization?: BinaryAuthorization; /** * Cluster operations configuration. */ clusterOperations?: BareMetalClusterOperationsConfig; /** * Required. Control plane configuration. */ controlPlane?: BareMetalControlPlaneConfig; /** * Output only. The time when the bare metal user cluster was created. */ readonly createTime?: Date; /** * Output only. The time when the bare metal user cluster was deleted. If the * resource is not deleted, this must be empty */ readonly deleteTime?: Date; /** * A human readable description of this bare metal user cluster. */ description?: string; /** * Output only. The IP address of the bare metal user cluster's API server. */ readonly endpoint?: string; /** * Output only. This checksum is computed by the server based on the value of * other fields, and may be sent on update and delete requests to ensure the * client has an up-to-date value before proceeding. Allows clients to perform * consistent read-modify-writes through optimistic concurrency control. */ readonly etag?: string; /** * Output only. Fleet configuration for the cluster. */ readonly fleet?: Fleet; /** * Required. Load balancer configuration. */ loadBalancer?: BareMetalLoadBalancerConfig; /** * Output only. The object name of the bare metal user cluster custom * resource on the associated admin cluster. This field is used to support * conflicting names when enrolling existing clusters to the API. When used as * a part of cluster enrollment, this field will differ from the name in the * resource name. For new clusters, this field will match the user provided * cluster name and be visible in the last component of the resource name. It * is not modifiable. When the local name and cluster name differ, the local * name is used in the admin cluster controller logs. You use the cluster name * when accessing the cluster using bmctl and kubectl. */ readonly localName?: string; /** * Maintenance configuration. */ maintenanceConfig?: BareMetalMaintenanceConfig; /** * Output only. Status of on-going maintenance tasks. */ readonly maintenanceStatus?: BareMetalMaintenanceStatus; /** * Immutable. The bare metal user cluster resource name. */ name?: string; /** * Required. Network configuration. */ networkConfig?: BareMetalNetworkConfig; /** * Node access related configurations. */ nodeAccessConfig?: BareMetalNodeAccessConfig; /** * Workload node configuration. */ nodeConfig?: BareMetalWorkloadNodeConfig; /** * OS environment related configurations. */ osEnvironmentConfig?: BareMetalOsEnvironmentConfig; /** * Proxy configuration. */ proxy?: BareMetalProxyConfig; /** * Output only. If set, there are currently changes in flight to the bare * metal user cluster. */ readonly reconciling?: boolean; /** * Security related setting configuration. */ securityConfig?: BareMetalSecurityConfig; /** * Output only. The current state of the bare metal user cluster. */ readonly state?: | "STATE_UNSPECIFIED" | "PROVISIONING" | "RUNNING" | "RECONCILING" | "STOPPING" | "ERROR" | "DEGRADED"; /** * Output only. Detailed cluster status. */ readonly status?: ResourceStatus; /** * Required. Storage configuration. */ storage?: BareMetalStorageConfig; /** * Output only. The unique identifier of the bare metal user cluster. */ readonly uid?: string; /** * Output only. The time when the bare metal user cluster was last updated. */ readonly updateTime?: Date; /** * The cluster upgrade policy. */ upgradePolicy?: BareMetalClusterUpgradePolicy; /** * Output only. The result of the preflight check. */ readonly validationCheck?: ValidationCheck; } function serializeBareMetalCluster(data: any): BareMetalCluster { return { ...data, loadBalancer: data["loadBalancer"] !== undefined ? serializeBareMetalLoadBalancerConfig(data["loadBalancer"]) : undefined, nodeConfig: data["nodeConfig"] !== undefined ? serializeBareMetalWorkloadNodeConfig(data["nodeConfig"]) : undefined, }; } function deserializeBareMetalCluster(data: any): BareMetalCluster { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, loadBalancer: data["loadBalancer"] !== undefined ? deserializeBareMetalLoadBalancerConfig(data["loadBalancer"]) : undefined, nodeConfig: data["nodeConfig"] !== undefined ? deserializeBareMetalWorkloadNodeConfig(data["nodeConfig"]) : undefined, status: data["status"] !== undefined ? deserializeResourceStatus(data["status"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Specifies the bare metal user cluster's observability infrastructure. */ export interface BareMetalClusterOperationsConfig { /** * Whether collection of application logs/metrics should be enabled (in * addition to system logs/metrics). */ enableApplicationLogs?: boolean; } /** * BareMetalClusterUpgradePolicy defines the cluster upgrade policy. */ export interface BareMetalClusterUpgradePolicy { /** * Output only. Pause is used to show the upgrade pause status. It's view * only for now. */ readonly pause?: boolean; /** * Specifies which upgrade policy to use. */ policy?: | "NODE_POOL_POLICY_UNSPECIFIED" | "SERIAL" | "CONCURRENT"; } /** * Specifies the control plane configuration. */ export interface BareMetalControlPlaneConfig { /** * Customizes the default API server args. Only a subset of customized flags * are supported. For the exact format, refer to the [API server * documentation](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/). */ apiServerArgs?: BareMetalApiServerArgument[]; /** * Required. Configures the node pool running the control plane. */ controlPlaneNodePoolConfig?: BareMetalControlPlaneNodePoolConfig; } /** * Specifies the control plane node pool configuration. */ export interface BareMetalControlPlaneNodePoolConfig { /** * Required. The generic configuration for a node pool running the control * plane. */ nodePoolConfig?: BareMetalNodePoolConfig; } /** * Represents a machine that is currently drained. */ export interface BareMetalDrainedMachine { /** * Drained machine IP address. */ nodeIp?: string; } /** * Represents a machine that is currently draining. */ export interface BareMetalDrainingMachine { /** * Draining machine IP address. */ nodeIp?: string; /** * The count of pods yet to drain. */ podCount?: number; } /** * Specifies the cluster CIDR configuration while running in island mode. */ export interface BareMetalIslandModeCidrConfig { /** * Required. All pods in the cluster are assigned an RFC1918 IPv4 address * from these ranges. This field cannot be changed after creation. */ podAddressCidrBlocks?: string[]; /** * Required. All services in the cluster are assigned an RFC1918 IPv4 address * from these ranges. This field is mutable after creation starting with * version 1.15. */ serviceAddressCidrBlocks?: string[]; } /** * KubeletConfig defines the modifiable kubelet configurations for bare metal * machines. Note: this list includes fields supported in GKE (see * https://cloud.google.com/kubernetes-engine/docs/how-to/node-system-config#kubelet-options). */ export interface BareMetalKubeletConfig { /** * The maximum size of bursty pulls, temporarily allows pulls to burst to * this number, while still not exceeding registry_pull_qps. The value must * not be a negative number. Updating this field may impact scalability by * changing the amount of traffic produced by image pulls. Defaults to 10. */ registryBurst?: number; /** * The limit of registry pulls per second. Setting this value to 0 means no * limit. Updating this field may impact scalability by changing the amount of * traffic produced by image pulls. Defaults to 5. */ registryPullQps?: number; /** * Prevents the Kubelet from pulling multiple images at a time. We recommend * *not* changing the default value on nodes that run docker daemon with * version < 1.9 or an Another Union File System (Aufs) storage backend. Issue * https://github.com/kubernetes/kubernetes/issues/10959 has more details. */ serializeImagePullsDisabled?: boolean; } /** * Represents an IP pool used by the load balancer. */ export interface BareMetalLoadBalancerAddressPool { /** * Required. The addresses that are part of this pool. Each address must be * either in the CIDR form (1.2.3.0/24) or range form (1.2.3.1-1.2.3.5). */ addresses?: string[]; /** * If true, avoid using IPs ending in .0 or .255. This avoids buggy consumer * devices mistakenly dropping IPv4 traffic for those special IP addresses. */ avoidBuggyIps?: boolean; /** * If true, prevent IP addresses from being automatically assigned. */ manualAssign?: boolean; /** * Required. The name of the address pool. */ pool?: string; } /** * Specifies the load balancer configuration. */ export interface BareMetalLoadBalancerConfig { /** * Configuration for BGP typed load balancers. When set * network_config.advanced_networking is automatically set to true. */ bgpLbConfig?: BareMetalBgpLbConfig; /** * Manually configured load balancers. */ manualLbConfig?: BareMetalManualLbConfig; /** * Configuration for MetalLB load balancers. */ metalLbConfig?: BareMetalMetalLbConfig; /** * Configures the ports that the load balancer will listen on. */ portConfig?: BareMetalPortConfig; /** * The VIPs used by the load balancer. */ vipConfig?: BareMetalVipConfig; } function serializeBareMetalLoadBalancerConfig(data: any): BareMetalLoadBalancerConfig { return { ...data, bgpLbConfig: data["bgpLbConfig"] !== undefined ? serializeBareMetalBgpLbConfig(data["bgpLbConfig"]) : undefined, }; } function deserializeBareMetalLoadBalancerConfig(data: any): BareMetalLoadBalancerConfig { return { ...data, bgpLbConfig: data["bgpLbConfig"] !== undefined ? deserializeBareMetalBgpLbConfig(data["bgpLbConfig"]) : undefined, }; } /** * Specifies the load balancer's node pool configuration. */ export interface BareMetalLoadBalancerNodePoolConfig { /** * The generic configuration for a node pool running a load balancer. */ nodePoolConfig?: BareMetalNodePoolConfig; } /** * Specifies the configs for local persistent volumes (PVs). */ export interface BareMetalLvpConfig { /** * Required. The host machine path. */ path?: string; /** * Required. The StorageClass name that PVs will be created with. */ storageClass?: string; } /** * Specifies the configs for local persistent volumes under a shared file * system. */ export interface BareMetalLvpShareConfig { /** * Required. Defines the machine path and storage class for the LVP Share. */ lvpConfig?: BareMetalLvpConfig; /** * The number of subdirectories to create under path. */ sharedPathPvCount?: number; } /** * Represents the status of node machines that are undergoing drain operations. */ export interface BareMetalMachineDrainStatus { /** * The list of drained machines. */ drainedMachines?: BareMetalDrainedMachine[]; /** * The list of draning machines. */ drainingMachines?: BareMetalDrainingMachine[]; } /** * Specifies configurations to put bare metal nodes in and out of maintenance. */ export interface BareMetalMaintenanceConfig { /** * Required. All IPv4 address from these ranges will be placed into * maintenance mode. Nodes in maintenance mode will be cordoned and drained. * When both of these are true, the "baremetal.cluster.gke.io/maintenance" * annotation will be set on the node resource. */ maintenanceAddressCidrBlocks?: string[]; } /** * Represents the maintenance status of the bare metal user cluster. */ export interface BareMetalMaintenanceStatus { /** * The maintenance status of node machines. */ machineDrainStatus?: BareMetalMachineDrainStatus; } /** * Represents configuration parameters for a manual load balancer. */ export interface BareMetalManualLbConfig { /** * Whether manual load balancing is enabled. */ enabled?: boolean; } /** * Represents configuration parameters for a MetalLB load balancer. */ export interface BareMetalMetalLbConfig { /** * Required. AddressPools is a list of non-overlapping IP pools used by load * balancer typed services. All addresses must be routable to load balancer * nodes. IngressVIP must be included in the pools. */ addressPools?: BareMetalLoadBalancerAddressPool[]; /** * Specifies the node pool running the load balancer. L2 connectivity is * required among nodes in this pool. If missing, the control plane node pool * is used as the load balancer pool. */ loadBalancerNodePoolConfig?: BareMetalLoadBalancerNodePoolConfig; } /** * Specifies the multiple networking interfaces cluster configuration. */ export interface BareMetalMultipleNetworkInterfacesConfig { /** * Whether to enable multiple network interfaces for your pods. When set * network_config.advanced_networking is automatically set to true. */ enabled?: boolean; } /** * Specifies the cluster network configuration. */ export interface BareMetalNetworkConfig { /** * Enables the use of advanced Anthos networking features, such as Bundled * Load Balancing with BGP or the egress NAT gateway. Setting configuration * for advanced networking features will automatically set this flag. */ advancedNetworking?: boolean; /** * Configuration for island mode CIDR. In an island-mode network, nodes have * unique IP addresses, but pods don't have unique addresses across clusters. * This doesn't cause problems because pods in one cluster never directly * communicate with pods in another cluster. Instead, there are gateways that * mediate between a pod in one cluster and a pod in another cluster. */ islandModeCidr?: BareMetalIslandModeCidrConfig; /** * Configuration for multiple network interfaces. */ multipleNetworkInterfacesConfig?: BareMetalMultipleNetworkInterfacesConfig; /** * Configuration for SR-IOV. */ srIovConfig?: BareMetalSrIovConfig; } /** * Specifies the node access related settings for the bare metal user cluster. */ export interface BareMetalNodeAccessConfig { /** * LoginUser is the user name used to access node machines. It defaults to * "root" if not set. */ loginUser?: string; } /** * BareMetalNodeConfig lists machine addresses to access Nodes. */ export interface BareMetalNodeConfig { /** * The labels assigned to this node. An object containing a list of key/value * pairs. The labels here, unioned with the labels set on * BareMetalNodePoolConfig are the set of labels that will be applied to the * node. If there are any conflicts, the BareMetalNodeConfig labels take * precedence. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. */ labels?: { [key: string]: string }; /** * The default IPv4 address for SSH access and Kubernetes node. Example: * 192.168.0.1 */ nodeIp?: string; } /** * Resource that represents a bare metal node pool. */ export interface BareMetalNodePool { /** * Annotations on the bare metal node pool. This field has the same * restrictions as Kubernetes annotations. The total size of all keys and * values combined is limited to 256k. Key can have 2 segments: prefix * (optional) and name (required), separated by a slash (/). Prefix must be a * DNS subdomain. Name must be 63 characters or less, begin and end with * alphanumerics, with dashes (-), underscores (_), dots (.), and * alphanumerics between. */ annotations?: { [key: string]: string }; /** * Output only. The time at which this bare metal node pool was created. */ readonly createTime?: Date; /** * Output only. The time at which this bare metal node pool was deleted. If * the resource is not deleted, this must be empty */ readonly deleteTime?: Date; /** * The display name for the bare metal node pool. */ displayName?: string; /** * This checksum is computed by the server based on the value of other * fields, and may be sent on update and delete requests to ensure the client * has an up-to-date value before proceeding. Allows clients to perform * consistent read-modify-writes through optimistic concurrency control. */ etag?: string; /** * Immutable. The bare metal node pool resource name. */ name?: string; /** * Required. Node pool configuration. */ nodePoolConfig?: BareMetalNodePoolConfig; /** * Output only. If set, there are currently changes in flight to the bare * metal node pool. */ readonly reconciling?: boolean; /** * Output only. The current state of the bare metal node pool. */ readonly state?: | "STATE_UNSPECIFIED" | "PROVISIONING" | "RUNNING" | "RECONCILING" | "STOPPING" | "ERROR" | "DEGRADED"; /** * Output only. ResourceStatus representing the detailed node pool status. */ readonly status?: ResourceStatus; /** * Output only. The unique identifier of the bare metal node pool. */ readonly uid?: string; /** * Output only. The time at which this bare metal node pool was last updated. */ readonly updateTime?: Date; /** * The worker node pool upgrade policy. */ upgradePolicy?: BareMetalNodePoolUpgradePolicy; } /** * BareMetalNodePoolConfig describes the configuration of all nodes within a * given bare metal node pool. */ export interface BareMetalNodePoolConfig { /** * The modifiable kubelet configurations for the bare metal machines. */ kubeletConfig?: BareMetalKubeletConfig; /** * The labels assigned to nodes of this node pool. An object containing a * list of key/value pairs. Example: { "name": "wrench", "mass": "1.3kg", * "count": "3" }. */ labels?: { [key: string]: string }; /** * Required. The list of machine addresses in the bare metal node pool. */ nodeConfigs?: BareMetalNodeConfig[]; /** * Specifies the nodes operating system (default: LINUX). */ operatingSystem?: | "OPERATING_SYSTEM_UNSPECIFIED" | "LINUX"; /** * The initial taints assigned to nodes of this node pool. */ taints?: NodeTaint[]; } /** * BareMetalNodePoolUpgradePolicy defines the node pool upgrade policy. */ export interface BareMetalNodePoolUpgradePolicy { /** * The parallel upgrade settings for worker node pools. */ parallelUpgradeConfig?: BareMetalParallelUpgradeConfig; } /** * Specifies operating system settings for cluster provisioning. */ export interface BareMetalOsEnvironmentConfig { /** * Whether the package repo should not be included when initializing bare * metal machines. */ packageRepoExcluded?: boolean; } /** * BareMetalParallelUpgradeConfig defines the parallel upgrade settings for * worker node pools. */ export interface BareMetalParallelUpgradeConfig { /** * The maximum number of nodes that can be upgraded at once. */ concurrentNodes?: number; /** * The minimum number of nodes that should be healthy and available during an * upgrade. If set to the default value of 0, it is possible that none of the * nodes will be available during an upgrade. */ minimumAvailableNodes?: number; } /** * Specifies load balancer ports for the bare metal user cluster. */ export interface BareMetalPortConfig { /** * The port that control plane hosted load balancers will listen on. */ controlPlaneLoadBalancerPort?: number; } /** * Specifies the cluster proxy configuration. */ export interface BareMetalProxyConfig { /** * A list of IPs, hostnames, and domains that should skip the proxy. * Examples: ["127.0.0.1", "example.com", ".corp", "localhost"]. */ noProxy?: string[]; /** * Required. Specifies the address of your proxy server. Examples: * `http://domain` Do not provide credentials in the format * `http://(username:password@)domain` these will be rejected by the server. */ uri?: string; } /** * Specifies the security related settings for the bare metal user cluster. */ export interface BareMetalSecurityConfig { /** * Configures user access to the user cluster. */ authorization?: Authorization; } /** * Specifies the SR-IOV networking operator config. */ export interface BareMetalSrIovConfig { /** * Whether to install the SR-IOV operator. */ enabled?: boolean; } /** * BareMetalStorageConfig specifies the cluster storage configuration. */ export interface BareMetalStorageConfig { /** * Required. Specifies the config for local PersistentVolumes backed by * mounted node disks. These disks need to be formatted and mounted by the * user, which can be done before or after cluster creation. */ lvpNodeMountsConfig?: BareMetalLvpConfig; /** * Required. Specifies the config for local PersistentVolumes backed by * subdirectories in a shared filesystem. These subdirectores are * automatically created during cluster creation. */ lvpShareConfig?: BareMetalLvpShareConfig; } /** * Contains information about a specific Anthos on bare metal version. */ export interface BareMetalVersionInfo { /** * The list of upgrade dependencies for this version. */ dependencies?: UpgradeDependency[]; /** * If set, the cluster dependencies (e.g. the admin cluster, other user * clusters managed by the same admin cluster, version skew policy, etc) must * be upgraded before this version can be installed or upgraded to. */ hasDependencies?: boolean; /** * Version number e.g. 1.13.1. */ version?: string; } /** * Specifies the VIP config for the bare metal load balancer. */ export interface BareMetalVipConfig { /** * The VIP which you previously set aside for the Kubernetes API of this bare * metal user cluster. */ controlPlaneVip?: string; /** * The VIP which you previously set aside for ingress traffic into this bare * metal user cluster. */ ingressVip?: string; } /** * Specifies the workload node configurations. */ export interface BareMetalWorkloadNodeConfig { /** * Specifies which container runtime will be used. */ containerRuntime?: | "CONTAINER_RUNTIME_UNSPECIFIED" | "CONTAINERD"; /** * The maximum number of pods a node can run. The size of the CIDR range * assigned to the node will be derived from this parameter. */ maxPodsPerNode?: bigint; } function serializeBareMetalWorkloadNodeConfig(data: any): BareMetalWorkloadNodeConfig { return { ...data, maxPodsPerNode: data["maxPodsPerNode"] !== undefined ? String(data["maxPodsPerNode"]) : undefined, }; } function deserializeBareMetalWorkloadNodeConfig(data: any): BareMetalWorkloadNodeConfig { return { ...data, maxPodsPerNode: data["maxPodsPerNode"] !== undefined ? BigInt(data["maxPodsPerNode"]) : undefined, }; } /** * Configuration for Binary Authorization. */ export interface BinaryAuthorization { /** * Mode of operation for binauthz policy evaluation. If unspecified, defaults * to DISABLED. */ evaluationMode?: | "EVALUATION_MODE_UNSPECIFIED" | "DISABLED" | "PROJECT_SINGLETON_POLICY_ENFORCE"; } /** * Associates `members`, or principals, with a `role`. */ export interface Binding { /** * The condition that is associated with this binding. If the condition * evaluates to `true`, then this binding applies to the current request. If * the condition evaluates to `false`, then this binding does not apply to the * current request. However, a different role binding might grant the same * role to one or more of the principals in this binding. To learn which * resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ condition?: Expr; /** * Specifies the principals requesting access for a Google Cloud resource. * `members` can have the following values: * `allUsers`: A special identifier * that represents anyone who is on the internet; with or without a Google * account. * `allAuthenticatedUsers`: A special identifier that represents * anyone who is authenticated with a Google account or a service account. * Does not include identities that come from external identity providers * (IdPs) through identity federation. * `user:{emailid}`: An email address * that represents a specific Google account. For example, `alice@example.com` * . * `serviceAccount:{emailid}`: An email address that represents a Google * service account. For example, `my-other-app@appspot.gserviceaccount.com`. * * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An * identifier for a [Kubernetes service * account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). * For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * * `group:{emailid}`: An email address that represents a Google group. For * example, `admins@example.com`. * `domain:{domain}`: The G Suite domain * (primary) that represents all the users of that domain. For example, * `google.com` or `example.com`. * * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: * A single identity in a workforce identity pool. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: * All workforce identities in a group. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: * All workforce identities with a specific attribute value. * * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: * All identities in a workforce identity pool. * * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: * A single identity in a workload identity pool. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: * A workload identity pool group. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: * All identities in a workload identity pool with a certain attribute. * * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: * All identities in a workload identity pool. * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique * identifier) representing a user that has been recently deleted. For * example, `alice@example.com?uid=123456789012345678901`. If the user is * recovered, this value reverts to `user:{emailid}` and the recovered user * retains the role in the binding. * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus * unique identifier) representing a service account that has been recently * deleted. For example, * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If * the service account is undeleted, this value reverts to * `serviceAccount:{emailid}` and the undeleted service account retains the * role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email * address (plus unique identifier) representing a Google group that has been * recently deleted. For example, * `admins@example.com?uid=123456789012345678901`. If the group is recovered, * this value reverts to `group:{emailid}` and the recovered group retains the * role in the binding. * * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: * Deleted single identity in a workforce identity pool. For example, * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. */ members?: string[]; /** * Role that is assigned to the list of `members`, or principals. For * example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview * of the IAM roles and permissions, see the [IAM * documentation](https://cloud.google.com/iam/docs/roles-overview). For a * list of the available pre-defined roles, see * [here](https://cloud.google.com/iam/docs/understanding-roles). */ role?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * ClusterUser configures user principals for an RBAC policy. */ export interface ClusterUser { /** * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. */ username?: 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 { } /** * Message for enrolling an existing bare metal admin cluster to the GKE * on-prem API. */ export interface EnrollBareMetalAdminClusterRequest { /** * User provided OnePlatform identifier that is used as part of the resource * name. This must be unique among all GKE on-prem clusters within a project * and location and will return a 409 if the cluster already exists. * (https://tools.ietf.org/html/rfc1123) format. */ bareMetalAdminClusterId?: string; /** * Required. This is the full resource name of this admin cluster's fleet * membership. */ membership?: string; } /** * Message for enrolling an existing bare metal cluster to the Anthos On-Prem * API. */ export interface EnrollBareMetalClusterRequest { /** * Required. The admin cluster this bare metal user cluster belongs to. This * is the full resource name of the admin cluster's fleet membership. In the * future, references to other resource types might be allowed if admin * clusters are modeled as their own resources. */ adminClusterMembership?: string; /** * User provided OnePlatform identifier that is used as part of the resource * name. This must be unique among all bare metal clusters within a project * and location and will return a 409 if the cluster already exists. * (https://tools.ietf.org/html/rfc1123) format. */ bareMetalClusterId?: string; /** * Optional. The object name of the bare metal cluster custom resource on the * associated admin cluster. This field is used to support conflicting * resource names when enrolling existing clusters to the API. When not * provided, this field will resolve to the bare_metal_cluster_id. Otherwise, * it must match the object name of the bare metal cluster custom resource. It * is not modifiable outside / beyond the enrollment operation. */ localName?: string; } /** * Message for enrolling an existing bare metal node pool to the GKE on-prem * API. */ export interface EnrollBareMetalNodePoolRequest { /** * User provided OnePlatform identifier that is used as part of the resource * name. (https://tools.ietf.org/html/rfc1123) format. */ bareMetalNodePoolId?: string; /** * If set, only validate the request, but do not actually enroll the node * pool. */ validateOnly?: boolean; } /** * Message for enrolling an existing VMware admin cluster to the GKE on-prem * API. */ export interface EnrollVmwareAdminClusterRequest { /** * Required. This is the full resource name of this admin cluster's fleet * membership. */ membership?: string; /** * User provided OnePlatform identifier that is used as part of the resource * name. This must be unique among all GKE on-prem clusters within a project * and location and will return a 409 if the cluster already exists. * (https://tools.ietf.org/html/rfc1123) format. */ vmwareAdminClusterId?: string; } /** * Message for enrolling an existing VMware cluster to the Anthos On-Prem API. */ export interface EnrollVmwareClusterRequest { /** * Required. The admin cluster this VMware user cluster belongs to. This is * the full resource name of the admin cluster's fleet membership. In the * future, references to other resource types might be allowed if admin * clusters are modeled as their own resources. */ adminClusterMembership?: string; /** * Optional. The object name of the VMware OnPremUserCluster custom resource * on the associated admin cluster. This field is used to support conflicting * resource names when enrolling existing clusters to the API. When not * provided, this field will resolve to the vmware_cluster_id. Otherwise, it * must match the object name of the VMware OnPremUserCluster custom resource. * It is not modifiable outside / beyond the enrollment operation. */ localName?: string; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; /** * User provided OnePlatform identifier that is used as part of the resource * name. This must be unique among all GKE on-prem clusters within a project * and location and will return a 409 if the cluster already exists. * (https://tools.ietf.org/html/rfc1123) format. */ vmwareClusterId?: string; } /** * Message for enrolling a VMware node pool. */ export interface EnrollVmwareNodePoolRequest { /** * The target node pool id to be enrolled. */ vmwareNodePoolId?: string; } /** * Represents a textual expression in the Common Expression Language (CEL) * syntax. CEL is a C-like expression language. The syntax and semantics of CEL * are documented at https://github.com/google/cel-spec. Example (Comparison): * title: "Summary size limit" description: "Determines if a summary is less * than 100 chars" expression: "document.summary.size() < 100" Example * (Equality): title: "Requestor is owner" description: "Determines if requestor * is the document owner" expression: "document.owner == * request.auth.claims.email" Example (Logic): title: "Public documents" * description: "Determine whether the document should be publicly visible" * expression: "document.type != 'private' && document.type != 'internal'" * Example (Data Manipulation): title: "Notification string" description: * "Create a notification string with a timestamp." expression: "'New message * received at ' + string(document.create_time)" The exact variables and * functions that may be referenced within an expression are determined by the * service that evaluates it. See the service documentation for additional * information. */ export interface Expr { /** * Optional. Description of the expression. This is a longer text which * describes the expression, e.g. when hovered over it in a UI. */ description?: string; /** * Textual representation of an expression in Common Expression Language * syntax. */ expression?: string; /** * Optional. String indicating the location of the expression for error * reporting, e.g. a file name and a position in the file. */ location?: string; /** * Optional. Title for the expression, i.e. a short string describing its * purpose. This can be used e.g. in UIs which allow to enter the expression. */ title?: string; } /** * Fleet related configuration. Fleets are a Google Cloud concept for logically * organizing clusters, letting you use and manage multi-cluster capabilities * and apply consistent policies across your systems. See [Anthos * Fleets](`https://cloud.google.com/anthos/multicluster-management/fleets`) for * more details on Anthos multi-cluster capabilities using Fleets. ## */ export interface Fleet { /** * Output only. The name of the managed fleet Membership resource associated * to this cluster. Membership names are formatted as * `projects//locations//memberships/`. */ readonly membership?: string; } /** * Response message for listing bare metal admin clusters. */ export interface ListBareMetalAdminClustersResponse { /** * The list of bare metal admin cluster. */ bareMetalAdminClusters?: BareMetalAdminCluster[]; /** * A token identifying a page of results the server should return. If the * token is not empty this means that more results are available and should be * retrieved by repeating the request with the provided page token. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListBareMetalAdminClustersResponse(data: any): ListBareMetalAdminClustersResponse { return { ...data, bareMetalAdminClusters: data["bareMetalAdminClusters"] !== undefined ? data["bareMetalAdminClusters"].map((item: any) => (serializeBareMetalAdminCluster(item))) : undefined, }; } function deserializeListBareMetalAdminClustersResponse(data: any): ListBareMetalAdminClustersResponse { return { ...data, bareMetalAdminClusters: data["bareMetalAdminClusters"] !== undefined ? data["bareMetalAdminClusters"].map((item: any) => (deserializeBareMetalAdminCluster(item))) : undefined, }; } /** * Response message for listing bare metal Clusters. */ export interface ListBareMetalClustersResponse { /** * The list of bare metal Clusters. */ bareMetalClusters?: BareMetalCluster[]; /** * A token identifying a page of results the server should return. If the * token is not empty this means that more results are available and should be * retrieved by repeating the request with the provided page token. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListBareMetalClustersResponse(data: any): ListBareMetalClustersResponse { return { ...data, bareMetalClusters: data["bareMetalClusters"] !== undefined ? data["bareMetalClusters"].map((item: any) => (serializeBareMetalCluster(item))) : undefined, }; } function deserializeListBareMetalClustersResponse(data: any): ListBareMetalClustersResponse { return { ...data, bareMetalClusters: data["bareMetalClusters"] !== undefined ? data["bareMetalClusters"].map((item: any) => (deserializeBareMetalCluster(item))) : undefined, }; } /** * Response message for listing bare metal node pools. */ export interface ListBareMetalNodePoolsResponse { /** * The node pools from the specified parent resource. */ bareMetalNodePools?: BareMetalNodePool[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * 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[]; } /** * Response message for listing VMware admin clusters. */ export interface ListVmwareAdminClustersResponse { /** * A token identifying a page of results the server should return. If the * token is not empty this means that more results are available and should be * retrieved by repeating the request with the provided page token. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; /** * The list of VMware admin cluster. */ vmwareAdminClusters?: VmwareAdminCluster[]; } function serializeListVmwareAdminClustersResponse(data: any): ListVmwareAdminClustersResponse { return { ...data, vmwareAdminClusters: data["vmwareAdminClusters"] !== undefined ? data["vmwareAdminClusters"].map((item: any) => (serializeVmwareAdminCluster(item))) : undefined, }; } function deserializeListVmwareAdminClustersResponse(data: any): ListVmwareAdminClustersResponse { return { ...data, vmwareAdminClusters: data["vmwareAdminClusters"] !== undefined ? data["vmwareAdminClusters"].map((item: any) => (deserializeVmwareAdminCluster(item))) : undefined, }; } /** * Response message for listing VMware Clusters. */ export interface ListVmwareClustersResponse { /** * A token identifying a page of results the server should return. If the * token is not empty this means that more results are available and should be * retrieved by repeating the request with the provided page token. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; /** * The list of VMware Cluster. */ vmwareClusters?: VmwareCluster[]; } function serializeListVmwareClustersResponse(data: any): ListVmwareClustersResponse { return { ...data, vmwareClusters: data["vmwareClusters"] !== undefined ? data["vmwareClusters"].map((item: any) => (serializeVmwareCluster(item))) : undefined, }; } function deserializeListVmwareClustersResponse(data: any): ListVmwareClustersResponse { return { ...data, vmwareClusters: data["vmwareClusters"] !== undefined ? data["vmwareClusters"].map((item: any) => (deserializeVmwareCluster(item))) : undefined, }; } /** * Response message for listing VMware node pools. */ export interface ListVmwareNodePoolsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; /** * The node pools from the specified parent resource. */ vmwareNodePools?: VmwareNodePool[]; } function serializeListVmwareNodePoolsResponse(data: any): ListVmwareNodePoolsResponse { return { ...data, vmwareNodePools: data["vmwareNodePools"] !== undefined ? data["vmwareNodePools"].map((item: any) => (serializeVmwareNodePool(item))) : undefined, }; } function deserializeListVmwareNodePoolsResponse(data: any): ListVmwareNodePoolsResponse { return { ...data, vmwareNodePools: data["vmwareNodePools"] !== undefined ? data["vmwareNodePools"].map((item: any) => (deserializeVmwareNodePool(item))) : undefined, }; } /** * 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; } /** * Progress metric is (string, int|float|string) pair. */ export interface Metric { /** * For metrics with floating point value. */ doubleValue?: number; /** * For metrics with integer value. */ intValue?: bigint; /** * Required. The metric name. */ metric?: | "METRIC_ID_UNSPECIFIED" | "NODES_TOTAL" | "NODES_DRAINING" | "NODES_UPGRADING" | "NODES_PENDING_UPGRADE" | "NODES_UPGRADED" | "NODES_FAILED" | "NODES_HEALTHY" | "NODES_RECONCILING" | "NODES_IN_MAINTENANCE" | "PREFLIGHTS_COMPLETED" | "PREFLIGHTS_RUNNING" | "PREFLIGHTS_FAILED" | "PREFLIGHTS_TOTAL"; /** * For metrics with custom values (ratios, visual progress, etc.). */ stringValue?: string; } function serializeMetric(data: any): Metric { return { ...data, intValue: data["intValue"] !== undefined ? String(data["intValue"]) : undefined, }; } function deserializeMetric(data: any): Metric { return { ...data, intValue: data["intValue"] !== undefined ? BigInt(data["intValue"]) : undefined, }; } /** * NodeTaint applied to every Kubernetes node in a node pool. Kubernetes taints * can be used together with tolerations to control how workloads are scheduled * to your nodes. Node taints are permanent. */ export interface NodeTaint { /** * The taint effect. */ effect?: | "EFFECT_UNSPECIFIED" | "NO_SCHEDULE" | "PREFER_NO_SCHEDULE" | "NO_EXECUTE"; /** * Key associated with the effect. */ key?: string; /** * Value associated with the effect. */ value?: 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. Denotes if the local managing cluster's control plane is * currently disconnected. This is expected to occur temporarily during * self-managed cluster upgrades. */ readonly controlPlaneDisconnected?: boolean; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Detailed progress information for the operation. */ readonly progress?: OperationProgress; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have successfully been cancelled have * [Operation.error] value with a [google.rpc.Status.code] of 1, corresponding * to `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Type of operation being executed. */ readonly type?: | "OPERATION_TYPE_UNSPECIFIED" | "CREATE" | "DELETE" | "UPDATE" | "UPGRADE" | "PLATFORM_UPGRADE"; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * Information about operation progress. */ export interface OperationProgress { /** * The stages of the operation. */ stages?: OperationStage[]; } function serializeOperationProgress(data: any): OperationProgress { return { ...data, stages: data["stages"] !== undefined ? data["stages"].map((item: any) => (serializeOperationStage(item))) : undefined, }; } function deserializeOperationProgress(data: any): OperationProgress { return { ...data, stages: data["stages"] !== undefined ? data["stages"].map((item: any) => (deserializeOperationStage(item))) : undefined, }; } /** * Information about a particular stage of an operation. */ export interface OperationStage { /** * Time the stage ended. */ endTime?: Date; /** * Progress metric bundle. */ metrics?: Metric[]; /** * The high-level stage of the operation. */ stage?: | "STAGE_UNSPECIFIED" | "PREFLIGHT_CHECK" | "CONFIGURE" | "DEPLOY" | "HEALTH_CHECK" | "UPDATE"; /** * Time the stage started. */ startTime?: Date; /** * Output only. State of the stage. */ readonly state?: | "STATE_UNSPECIFIED" | "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED"; } function serializeOperationStage(data: any): OperationStage { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, metrics: data["metrics"] !== undefined ? data["metrics"].map((item: any) => (serializeMetric(item))) : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeOperationStage(data: any): OperationStage { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, metrics: data["metrics"] !== undefined ? data["metrics"].map((item: any) => (deserializeMetric(item))) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * An Identity and Access Management (IAM) policy, which specifies access * controls for Google Cloud resources. A `Policy` is a collection of * `bindings`. A `binding` binds one or more `members`, or principals, to a * single `role`. Principals can be user accounts, service accounts, Google * groups, and domains (such as G Suite). A `role` is a named list of * permissions; each `role` can be an IAM predefined role or a user-created * custom role. For some types of Google Cloud resources, a `binding` can also * specify a `condition`, which is a logical expression that allows access to a * resource only if the expression evaluates to `true`. A condition can add * constraints based on attributes of the request, the resource, or both. To * learn which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). * **JSON example:** ``` { "bindings": [ { "role": * "roles/resourcemanager.organizationAdmin", "members": [ * "user:mike@example.com", "group:admins@example.com", "domain:google.com", * "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": * "roles/resourcemanager.organizationViewer", "members": [ * "user:eve@example.com" ], "condition": { "title": "expirable access", * "description": "Does not grant access after Sep 2020", "expression": * "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": * "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: * - user:mike@example.com - group:admins@example.com - domain:google.com - * serviceAccount:my-project-id@appspot.gserviceaccount.com role: * roles/resourcemanager.organizationAdmin - members: - user:eve@example.com * role: roles/resourcemanager.organizationViewer condition: title: expirable * access description: Does not grant access after Sep 2020 expression: * request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= * version: 3 ``` For a description of IAM and its features, see the [IAM * documentation](https://cloud.google.com/iam/docs/). */ export interface Policy { /** * Associates a list of `members`, or principals, with a `role`. Optionally, * may specify a `condition` that determines how and when the `bindings` are * applied. Each of the `bindings` must contain at least one principal. The * `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of * these principals can be Google groups. Each occurrence of a principal * counts towards these limits. For example, if the `bindings` grant 50 * different roles to `user:alice@example.com`, and not to any other * principal, then you can add another 1,450 principals to the `bindings` in * the `Policy`. */ bindings?: Binding[]; /** * `etag` is used for optimistic concurrency control as a way to help prevent * simultaneous updates of a policy from overwriting each other. It is * strongly suggested that systems make use of the `etag` in the * read-modify-write cycle to perform policy updates in order to avoid race * conditions: An `etag` is returned in the response to `getIamPolicy`, and * systems are expected to put that etag in the request to `setIamPolicy` to * ensure that their change will be applied to the same version of the policy. * **Important:** If you use IAM Conditions, you must include the `etag` field * whenever you call `setIamPolicy`. If you omit this field, then IAM allows * you to overwrite a version `3` policy with a version `1` policy, and all of * the conditions in the version `3` policy are lost. */ etag?: Uint8Array; /** * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. * Requests that specify an invalid value are rejected. Any operation that * affects conditional role bindings must specify version `3`. This * requirement applies to the following operations: * Getting a policy that * includes a conditional role binding * Adding a conditional role binding to * a policy * Changing a conditional role binding in a policy * Removing any * role binding, with or without a condition, from a policy that includes * conditions **Important:** If you use IAM Conditions, you must include the * `etag` field whenever you call `setIamPolicy`. If you omit this field, then * IAM allows you to overwrite a version `3` policy with a version `1` policy, * and all of the conditions in the version `3` policy are lost. If a policy * does not include any conditions, operations on that policy may specify any * valid version or leave the field unset. To learn which resources support * conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ version?: number; } function serializePolicy(data: any): Policy { return { ...data, etag: data["etag"] !== undefined ? encodeBase64(data["etag"]) : undefined, }; } function deserializePolicy(data: any): Policy { return { ...data, etag: data["etag"] !== undefined ? decodeBase64(data["etag"] as string) : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersCreate. */ export interface ProjectsLocationsBareMetalAdminClustersCreateOptions { /** * Optional. If set to true, CLM will force CCFE to persist the cluster * resource in RMS when the creation fails during standalone preflight checks. * In that case the subsequent create call will fail with "cluster already * exists" error and hence a update cluster is required to fix the cluster. */ allowPreflightFailure?: boolean; /** * Required. User provided identifier that is used as part of the resource * name; must conform to RFC-1034 and additionally restrict to lower-cased * letters. This comes out roughly to: /^a-z+[a-z0-9]$/ */ bareMetalAdminClusterId?: string; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersGetIamPolicy. */ export interface ProjectsLocationsBareMetalAdminClustersGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for gkeonprem#projectsLocationsBareMetalAdminClustersGet. */ export interface ProjectsLocationsBareMetalAdminClustersGetOptions { /** * Optional. If true, return BareMetal Admin Cluster including the one that * only exists in RMS. */ allowMissing?: boolean; /** * View for bare metal admin cluster. When `BASIC` is specified, only the * cluster resource name and membership are returned. The default/unset value * `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersList. */ export interface ProjectsLocationsBareMetalAdminClustersListOptions { /** * Optional. If true, return list of BareMetal Admin Clusters including the * ones that only exists in RMS. */ allowMissing?: boolean; /** * Requested page size. Server may return fewer items than requested. If * unspecified, at most 50 clusters will be returned. The maximum value is * 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; /** * View for bare metal admin clusters. When `BASIC` is specified, only the * admin cluster resource name and membership are returned. The default/unset * value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete admin cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersOperationsList. */ export interface ProjectsLocationsBareMetalAdminClustersOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersPatch. */ export interface ProjectsLocationsBareMetalAdminClustersPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the BareMetalAdminCluster resource by the update. The fields specified in * the update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all populated fields in the BareMetalAdminCluster message will be * updated. Empty fields will be ignored unless a field mask is used. */ updateMask?: string /* FieldMask */; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } function serializeProjectsLocationsBareMetalAdminClustersPatchOptions(data: any): ProjectsLocationsBareMetalAdminClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBareMetalAdminClustersPatchOptions(data: any): ProjectsLocationsBareMetalAdminClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersQueryVersionConfig. */ export interface ProjectsLocationsBareMetalAdminClustersQueryVersionConfigOptions { /** * The admin cluster resource name. This is the full resource name of the * admin cluster resource. Format: * "projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_admin_cluster}" */ ["upgradeConfig.clusterName"]?: string; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalAdminClustersUnenroll. */ export interface ProjectsLocationsBareMetalAdminClustersUnenrollOptions { /** * If set to true, and the bare metal admin cluster is not found, the request * will succeed but no action will be taken on the server and return a * completed LRO. */ allowMissing?: boolean; /** * The current etag of the bare metal admin cluster. If an etag is provided * and does not match the current etag of the cluster, deletion will be * blocked and an ABORTED error will be returned. */ etag?: string; /** * If set to true, the unenrollment of a bare metal admin cluster resource * will succeed even if errors occur during unenrollment. This parameter can * be used when you want to unenroll admin cluster resource and the on-prem * admin cluster is disconnected / unreachable. WARNING: Using this parameter * when your admin cluster still exists may result in a deleted GCP admin * cluster but existing resourcelink in on-prem admin cluster and membership. */ ignoreErrors?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsCreate. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsCreateOptions { /** * The ID to use for the node pool, which will become the final component of * the node pool's resource name. This value must be up to 63 characters, and * valid characters are /a-z-/. The value must not be permitted to be a UUID * (or UUID-like: anything matching * /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i). */ bareMetalNodePoolId?: string; /** * If set, only validate the request, but do not actually create the node * pool. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsDelete. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsDeleteOptions { /** * If set to true, and the bare metal node pool is not found, the request * will succeed but no action will be taken on the server and return a * completed LRO. */ allowMissing?: boolean; /** * The current etag of the BareMetalNodePool. If an etag is provided and does * not match the current etag of the node pool, deletion will be blocked and * an ABORTED error will be returned. */ etag?: string; /** * If set to true, the deletion of a bare metal node pool resource will * succeed even if errors occur during deletion. This parameter can be used * when you want to delete GCP's node pool resource and you've already deleted * the on-prem admin cluster that hosted your node pool. WARNING: Using this * parameter when your user cluster still exists may result in a deleted GCP * node pool but an existing on-prem node pool. */ ignoreErrors?: boolean; /** * If set, only validate the request, but do not actually delete the node * pool. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicy. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsGet. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsGetOptions { /** * View for bare metal node pool. When `BASIC` is specified, only the node * pool resource name is returned. The default/unset value * `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete node pool configuration details. */ view?: | "NODE_POOL_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsList. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsListOptions { /** * The maximum number of node pools to return. The service may return fewer * than this value. If unspecified, at most 50 node pools will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListBareMetalNodePools` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListBareMetalNodePools` must match the call that * provided the page token. */ pageToken?: string; /** * View for bare metal node pools. When `BASIC` is specified, only the node * pool resource name is returned. The default/unset value * `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete node pool configuration details. */ view?: | "NODE_POOL_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsOperationsList. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsPatch. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions { /** * If set to true, and the bare metal node pool is not found, the request * will create a new bare metal node pool with the provided configuration. The * user must have both create and update permission to call Update with * allow_missing set to true. */ allowMissing?: boolean; /** * Required. Field mask is used to specify the fields to be overwritten in * the BareMetalNodePool resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all populated fields in the BareMetalNodePool message will be * updated. Empty fields will be ignored unless a field mask is used. */ updateMask?: string /* FieldMask */; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } function serializeProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions(data: any): ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions(data: any): ProjectsLocationsBareMetalClustersBareMetalNodePoolsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersBareMetalNodePoolsUnenroll. */ export interface ProjectsLocationsBareMetalClustersBareMetalNodePoolsUnenrollOptions { /** * If set to true, and the bare metal node pool is not found, the request * will succeed but no action will be taken on the server and return a * completed LRO. */ allowMissing?: boolean; /** * The current etag of the bare metal node pool. If an etag is provided and * does not match the current etag of node pool, deletion will be blocked and * an ABORTED error will be returned. */ etag?: string; /** * If set, only validate the request, but do not actually unenroll the node * pool. */ validateOnly?: boolean; } /** * Additional options for gkeonprem#projectsLocationsBareMetalClustersCreate. */ export interface ProjectsLocationsBareMetalClustersCreateOptions { /** * Optional. If set to true, CLM will force CCFE to persist the cluster * resource in RMS when the creation fails during standalone preflight checks. * In that case the subsequent create call will fail with "cluster already * exists" error and hence a update cluster is required to fix the cluster. */ allowPreflightFailure?: boolean; /** * Required. User provided identifier that is used as part of the resource * name; must conform to RFC-1034 and additionally restrict to lower-cased * letters. This comes out roughly to: /^a-z+[a-z0-9]$/ */ bareMetalClusterId?: string; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for gkeonprem#projectsLocationsBareMetalClustersDelete. */ export interface ProjectsLocationsBareMetalClustersDeleteOptions { /** * If set to true, and the bare metal cluster is not found, the request will * succeed but no action will be taken on the server and return a completed * LRO. */ allowMissing?: boolean; /** * The current etag of the bare metal Cluster. If an etag is provided and * does not match the current etag of the cluster, deletion will be blocked * and an ABORTED error will be returned. */ etag?: string; /** * If set to true, any node pools from the cluster will also be deleted. */ force?: boolean; /** * If set to true, the deletion of a bare metal user cluster resource will * succeed even if errors occur during deletion. This parameter can be used * when you want to delete GCP's cluster resource and the on-prem admin * cluster that hosts your user cluster is disconnected / unreachable or * deleted. WARNING: Using this parameter when your user cluster still exists * may result in a deleted GCP user cluster but an existing on-prem user * cluster. */ ignoreErrors?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersGetIamPolicy. */ export interface ProjectsLocationsBareMetalClustersGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for gkeonprem#projectsLocationsBareMetalClustersGet. */ export interface ProjectsLocationsBareMetalClustersGetOptions { /** * Optional. If true, return BareMetal Cluster including the one that only * exists in RMS. */ allowMissing?: boolean; /** * View for bare metal user cluster. When `BASIC` is specified, only the * cluster resource name and admin cluster membership are returned. The * default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which * returns the complete cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for gkeonprem#projectsLocationsBareMetalClustersList. */ export interface ProjectsLocationsBareMetalClustersListOptions { /** * Optional. If true, return list of BareMetal Clusters including the ones * that only exists in RMS. */ allowMissing?: boolean; /** * A resource filtering expression following https://google.aip.dev/160. When * non-empty, only resource's whose attributes field matches the filter are * returned. */ filter?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, at most 50 clusters will be returned. The maximum value is * 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; /** * View for bare metal Clusters. When `BASIC` is specified, only the cluster * resource name and admin cluster membership are returned. The default/unset * value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersOperationsList. */ export interface ProjectsLocationsBareMetalClustersOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for gkeonprem#projectsLocationsBareMetalClustersPatch. */ export interface ProjectsLocationsBareMetalClustersPatchOptions { /** * If set to true, and the bare metal cluster is not found, the request will * create a new bare metal cluster with the provided configuration. The user * must have both create and update permission to call Update with * allow_missing set to true. */ allowMissing?: boolean; /** * Required. Field mask is used to specify the fields to be overwritten in * the BareMetalCluster resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all populated fields in the BareMetalCluster message will be * updated. Empty fields will be ignored unless a field mask is used. */ updateMask?: string /* FieldMask */; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } function serializeProjectsLocationsBareMetalClustersPatchOptions(data: any): ProjectsLocationsBareMetalClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBareMetalClustersPatchOptions(data: any): ProjectsLocationsBareMetalClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsBareMetalClustersQueryVersionConfig. */ export interface ProjectsLocationsBareMetalClustersQueryVersionConfigOptions { /** * The admin cluster membership. This is the full resource name of the admin * cluster's fleet membership. Format: * "projects/{project}/locations/{location}/memberships/{membership}" */ ["createConfig.adminClusterMembership"]?: string; /** * The admin cluster resource name. This is the full resource name of the * admin cluster resource. Format: * "projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_admin_cluster}" */ ["createConfig.adminClusterName"]?: string; /** * The user cluster resource name. This is the full resource name of the user * cluster resource. Format: * "projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_cluster}" */ ["upgradeConfig.clusterName"]?: string; } /** * Additional options for gkeonprem#projectsLocationsBareMetalClustersUnenroll. */ export interface ProjectsLocationsBareMetalClustersUnenrollOptions { /** * If set to true, and the bare metal cluster is not found, the request will * succeed but no action will be taken on the server and return a completed * LRO. */ allowMissing?: boolean; /** * The current etag of the bare metal Cluster. If an etag is provided and * does not match the current etag of the cluster, deletion will be blocked * and an ABORTED error will be returned. */ etag?: string; /** * This is required if the cluster has any associated node pools. When set, * any child node pools will also be unenrolled. */ force?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for gkeonprem#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * 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 gkeonprem#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for gkeonprem#projectsLocationsVmwareAdminClustersCreate. */ export interface ProjectsLocationsVmwareAdminClustersCreateOptions { /** * Optional. If set to true, CLM will force CCFE to persist the cluster * resource in RMS when the creation fails during standalone preflight checks. * In that case the subsequent create call will fail with "cluster already * exists" error and hence a update cluster is required to fix the cluster. */ allowPreflightFailure?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; /** * Required. User provided identifier that is used as part of the resource * name; must conform to RFC-1034 and additionally restrict to lower-cased * letters. This comes out roughly to: /^a-z+[a-z0-9]$/ */ vmwareAdminClusterId?: string; } /** * Additional options for * gkeonprem#projectsLocationsVmwareAdminClustersGetIamPolicy. */ export interface ProjectsLocationsVmwareAdminClustersGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for gkeonprem#projectsLocationsVmwareAdminClustersGet. */ export interface ProjectsLocationsVmwareAdminClustersGetOptions { /** * Optional. If true, return Vmware Admin Cluster including the one that only * exists in RMS. */ allowMissing?: boolean; /** * View for VMware admin cluster. When `BASIC` is specified, only the cluster * resource name and membership are returned. The default/unset value * `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for gkeonprem#projectsLocationsVmwareAdminClustersList. */ export interface ProjectsLocationsVmwareAdminClustersListOptions { /** * Optional. If true, return list of Vmware Admin Clusters including the ones * that only exists in RMS. */ allowMissing?: boolean; /** * Requested page size. Server may return fewer items than requested. If * unspecified, at most 50 clusters will be returned. The maximum value is * 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; /** * View for VMware admin clusters. When `BASIC` is specified, only the admin * cluster resource name and membership are returned. The default/unset value * `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete admin cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsVmwareAdminClustersOperationsList. */ export interface ProjectsLocationsVmwareAdminClustersOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for gkeonprem#projectsLocationsVmwareAdminClustersPatch. */ export interface ProjectsLocationsVmwareAdminClustersPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the VMwareAdminCluster resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all populated fields in the VmwareAdminCluster message will be * updated. Empty fields will be ignored unless a field mask is used. */ updateMask?: string /* FieldMask */; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } function serializeProjectsLocationsVmwareAdminClustersPatchOptions(data: any): ProjectsLocationsVmwareAdminClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVmwareAdminClustersPatchOptions(data: any): ProjectsLocationsVmwareAdminClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsVmwareAdminClustersUnenroll. */ export interface ProjectsLocationsVmwareAdminClustersUnenrollOptions { /** * If set to true, and the VMware admin cluster is not found, the request * will succeed but no action will be taken on the server and return a * completed LRO. */ allowMissing?: boolean; /** * The current etag of the VMware admin cluster. If an etag is provided and * does not match the current etag of the cluster, deletion will be blocked * and an ABORTED error will be returned. */ etag?: string; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for gkeonprem#projectsLocationsVmwareClustersCreate. */ export interface ProjectsLocationsVmwareClustersCreateOptions { /** * Optional. If set to true, CLM will force CCFE to persist the cluster * resource in RMS when the creation fails during standalone preflight checks. * In that case the subsequent create call will fail with "cluster already * exists" error and hence a update cluster is required to fix the cluster. */ allowPreflightFailure?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; /** * User provided identifier that is used as part of the resource name; This * value must be up to 40 characters and follow RFC-1123 * (https://tools.ietf.org/html/rfc1123) format. */ vmwareClusterId?: string; } /** * Additional options for gkeonprem#projectsLocationsVmwareClustersDelete. */ export interface ProjectsLocationsVmwareClustersDeleteOptions { /** * If set to true, and the VMware cluster is not found, the request will * succeed but no action will be taken on the server and return a completed * LRO. */ allowMissing?: boolean; /** * The current etag of the VMware cluster. If an etag is provided and does * not match the current etag of the cluster, deletion will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * If set to true, any node pools from the cluster will also be deleted. */ force?: boolean; /** * If set to true, the deletion of a VMware user cluster resource will * succeed even if errors occur during deletion. This parameter can be used * when you want to delete GCP's cluster resource and the on-prem admin * cluster that hosts your user cluster is disconnected / unreachable or * deleted. WARNING: Using this parameter when your user cluster still exists * may result in a deleted GCP user cluster but an existing on-prem user * cluster. */ ignoreErrors?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersGetIamPolicy. */ export interface ProjectsLocationsVmwareClustersGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for gkeonprem#projectsLocationsVmwareClustersGet. */ export interface ProjectsLocationsVmwareClustersGetOptions { /** * Optional. If true, return Vmware Cluster including the one that only * exists in RMS. */ allowMissing?: boolean; /** * View for VMware user cluster. When `BASIC` is specified, only the cluster * resource name and admin cluster membership are returned. The default/unset * value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for gkeonprem#projectsLocationsVmwareClustersList. */ export interface ProjectsLocationsVmwareClustersListOptions { /** * Optional. If true, return list of Vmware Clusters including the ones that * only exists in RMS. */ allowMissing?: boolean; /** * A resource filtering expression following https://google.aip.dev/160. When * non-empty, only resource's whose attributes field matches the filter are * returned. */ filter?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, at most 50 clusters will be returned. The maximum value is * 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; /** * View for VMware clusters. When `BASIC` is specified, only the cluster * resource name and admin cluster membership are returned. The default/unset * value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete cluster configuration details. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersOperationsList. */ export interface ProjectsLocationsVmwareClustersOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for gkeonprem#projectsLocationsVmwareClustersPatch. */ export interface ProjectsLocationsVmwareClustersPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the VMwareCluster resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all populated fields in the VmwareCluster message will be * updated. Empty fields will be ignored unless a field mask is used. */ updateMask?: string /* FieldMask */; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } function serializeProjectsLocationsVmwareClustersPatchOptions(data: any): ProjectsLocationsVmwareClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVmwareClustersPatchOptions(data: any): ProjectsLocationsVmwareClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersQueryVersionConfig. */ export interface ProjectsLocationsVmwareClustersQueryVersionConfigOptions { /** * The admin cluster membership. This is the full resource name of the admin * cluster's fleet membership. Format: * "projects/{project}/locations/{location}/memberships/{membership}" */ ["createConfig.adminClusterMembership"]?: string; /** * The admin cluster resource name. This is the full resource name of the * admin cluster resource. Format: * "projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_cluster}" */ ["createConfig.adminClusterName"]?: string; /** * The user cluster resource name. This is the full resource name of the user * cluster resource. Format: * "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}" */ ["upgradeConfig.clusterName"]?: string; } /** * Additional options for gkeonprem#projectsLocationsVmwareClustersUnenroll. */ export interface ProjectsLocationsVmwareClustersUnenrollOptions { /** * If set to true, and the VMware cluster is not found, the request will * succeed but no action will be taken on the server and return a completed * LRO. */ allowMissing?: boolean; /** * The current etag of the VMware Cluster. If an etag is provided and does * not match the current etag of the cluster, deletion will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * This is required if the cluster has any associated node pools. When set, * any child node pools will also be unenrolled. */ force?: boolean; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsCreate. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsCreateOptions { /** * If set, only validate the request, but do not actually create the node * pool. */ validateOnly?: boolean; /** * The ID to use for the node pool, which will become the final component of * the node pool's resource name. This value must be up to 40 characters and * follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value * must not be permitted to be a UUID (or UUID-like: anything matching * /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i). */ vmwareNodePoolId?: string; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsDelete. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsDeleteOptions { /** * If set to true, and the VMware node pool is not found, the request will * succeed but no action will be taken on the server and return a completed * LRO. */ allowMissing?: boolean; /** * The current etag of the VmwareNodePool. If an etag is provided and does * not match the current etag of the node pool, deletion will be blocked and * an ABORTED error will be returned. */ etag?: string; /** * If set to true, the deletion of a VMware node pool resource will succeed * even if errors occur during deletion. This parameter can be used when you * want to delete GCP's node pool resource and you've already deleted the * on-prem admin cluster that hosted your node pool. WARNING: Using this * parameter when your user cluster still exists may result in a deleted GCP * node pool but an existing on-prem node pool. */ ignoreErrors?: boolean; /** * If set, only validate the request, but do not actually delete the node * pool. */ validateOnly?: boolean; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicy. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsGetIamPolicyOptions { /** * Optional. The maximum policy version that will be used to format the * policy. Valid values are 0, 1, and 3. Requests specifying an invalid value * will be rejected. Requests for policies with any conditional role bindings * must specify version 3. Policies with no conditional role bindings may * specify any valid value or leave the field unset. The policy in the * response might use the policy version that you specified, or it might use a * lower policy version. For example, if you specify version 3, but the policy * has no conditional role bindings, the response uses version 1. To learn * which resources support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ ["options.requestedPolicyVersion"]?: number; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsGet. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsGetOptions { /** * View for VMware node pool. When `BASIC` is specified, only the node pool * resource name is returned. The default/unset value * `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete node pool configuration details. */ view?: | "NODE_POOL_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsList. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsListOptions { /** * The maximum number of node pools to return. The service may return fewer * than this value. If unspecified, at most 50 node pools will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListVmwareNodePools` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListVmwareNodePools` must match the call that provided the * page token. */ pageToken?: string; /** * View for VMware node pools. When `BASIC` is specified, only the node pool * resource name is returned. The default/unset value * `NODE_POOL_VIEW_UNSPECIFIED` is the same as `FULL', which returns the * complete node pool configuration details. */ view?: | "NODE_POOL_VIEW_UNSPECIFIED" | "BASIC" | "FULL"; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsOperationsList. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsPatch. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the VMwareNodePool resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all populated fields in the VMwareNodePool message will be * updated. Empty fields will be ignored unless a field mask is used. */ updateMask?: string /* FieldMask */; /** * Validate the request without actually doing any updates. */ validateOnly?: boolean; } function serializeProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions(data: any): ProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions(data: any): ProjectsLocationsVmwareClustersVmwareNodePoolsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * gkeonprem#projectsLocationsVmwareClustersVmwareNodePoolsUnenroll. */ export interface ProjectsLocationsVmwareClustersVmwareNodePoolsUnenrollOptions { /** * If set to true, and the VMware node pool is not found, the request will * succeed but no action will be taken on the server and return a completed * LRO. */ allowMissing?: boolean; /** * The current etag of the VMware node pool. If an etag is provided and does * not match the current etag of node pool, deletion will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * If set, only validate the request, but do not actually unenroll the node * pool. */ validateOnly?: boolean; } /** * Response message for querying bare metal admin cluster version config. */ export interface QueryBareMetalAdminVersionConfigResponse { /** * List of available versions to install or to upgrade to. */ versions?: BareMetalVersionInfo[]; } /** * Response message for querying bare metal admin cluster version config. */ export interface QueryBareMetalVersionConfigResponse { /** * List of available versions to install or to upgrade to. */ versions?: BareMetalVersionInfo[]; } /** * Response message for querying VMware user cluster version config. */ export interface QueryVmwareVersionConfigResponse { /** * List of available versions to install or to upgrade to. */ versions?: VmwareVersionInfo[]; } /** * ResourceCondition provides a standard mechanism for higher-level status * reporting from controller. */ export interface ResourceCondition { /** * Last time the condition transit from one status to another. */ lastTransitionTime?: Date; /** * Human-readable message indicating details about last transition. */ message?: string; /** * Machine-readable message indicating details about last transition. */ reason?: string; /** * state of the condition. */ state?: | "STATE_UNSPECIFIED" | "STATE_TRUE" | "STATE_FALSE" | "STATE_UNKNOWN"; /** * Type of the condition. (e.g., ClusterRunning, NodePoolRunning or * ServerSidePreflightReady) */ type?: string; } function serializeResourceCondition(data: any): ResourceCondition { return { ...data, lastTransitionTime: data["lastTransitionTime"] !== undefined ? data["lastTransitionTime"].toISOString() : undefined, }; } function deserializeResourceCondition(data: any): ResourceCondition { return { ...data, lastTransitionTime: data["lastTransitionTime"] !== undefined ? new Date(data["lastTransitionTime"]) : undefined, }; } /** * ResourceStatus describes why a cluster or node pool has a certain status. * (e.g., ERROR or DEGRADED). */ export interface ResourceStatus { /** * ResourceCondition provide a standard mechanism for higher-level status * reporting from controller. */ conditions?: ResourceCondition[]; /** * Human-friendly representation of the error message from controller. The * error message can be temporary as the controller controller creates a * cluster or node pool. If the error message persists for a longer period of * time, it can be used to surface error message to indicate real problems * requiring user intervention. */ errorMessage?: string; /** * Reflect current version of the resource. */ version?: string; /** * Shows the mapping of a given version to the number of machines under this * version. */ versions?: Versions; } function serializeResourceStatus(data: any): ResourceStatus { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (serializeResourceCondition(item))) : undefined, versions: data["versions"] !== undefined ? serializeVersions(data["versions"]) : undefined, }; } function deserializeResourceStatus(data: any): ResourceStatus { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (deserializeResourceCondition(item))) : undefined, versions: data["versions"] !== undefined ? deserializeVersions(data["versions"]) : undefined, }; } /** * Request message for `SetIamPolicy` method. */ export interface SetIamPolicyRequest { /** * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a valid policy * but certain Google Cloud services (such as Projects) might reject them. */ policy?: Policy; } function serializeSetIamPolicyRequest(data: any): SetIamPolicyRequest { return { ...data, policy: data["policy"] !== undefined ? serializePolicy(data["policy"]) : undefined, }; } function deserializeSetIamPolicyRequest(data: any): SetIamPolicyRequest { return { ...data, policy: data["policy"] !== undefined ? deserializePolicy(data["policy"]) : undefined, }; } /** * 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; } /** * Request message for `TestIamPermissions` method. */ export interface TestIamPermissionsRequest { /** * The set of permissions to check for the `resource`. Permissions with * wildcards (such as `*` or `storage.*`) are not allowed. For more * information see [IAM * Overview](https://cloud.google.com/iam/docs/overview#permissions). */ permissions?: string[]; } /** * Response message for `TestIamPermissions` method. */ export interface TestIamPermissionsResponse { /** * A subset of `TestPermissionsRequest.permissions` that the caller is * allowed. */ permissions?: string[]; } /** * UpgradeDependency represents a dependency when upgrading a resource. */ export interface UpgradeDependency { /** * Current version of the dependency e.g. 1.15.0. */ currentVersion?: string; /** * Membership names are formatted as `projects//locations//memberships/`. */ membership?: string; /** * Resource name of the dependency. */ resourceName?: string; /** * Target version of the dependency e.g. 1.16.1. This is the version the * dependency needs to be upgraded to before a resource can be upgraded. */ targetVersion?: string; } /** * ValidationCheck represents the result of preflight check. */ export interface ValidationCheck { /** * Options used for the validation check */ option?: | "OPTIONS_UNSPECIFIED" | "SKIP_VALIDATION_CHECK_BLOCKING" | "SKIP_VALIDATION_ALL"; /** * Output only. The scenario when the preflight checks were run. */ readonly scenario?: | "SCENARIO_UNSPECIFIED" | "CREATE" | "UPDATE"; /** * Output only. The detailed validation check status. */ readonly status?: ValidationCheckStatus; } /** * ValidationCheckResult defines the details about the validation check. */ export interface ValidationCheckResult { /** * The category of the validation. */ category?: string; /** * The description of the validation check. */ description?: string; /** * Detailed failure information, which might be unformatted. */ details?: string; /** * A human-readable message of the check failure. */ reason?: string; /** * The validation check state. */ state?: | "STATE_UNKNOWN" | "STATE_FAILURE" | "STATE_SKIPPED" | "STATE_FATAL" | "STATE_WARNING"; } /** * ValidationCheckStatus defines the detailed validation check status. */ export interface ValidationCheckStatus { /** * Individual checks which failed as part of the Preflight check execution. */ result?: ValidationCheckResult[]; } /** * Version describes the number of nodes at a given version under a resource. */ export interface Version { /** * Number of machines under the above version. */ count?: bigint; /** * Resource version. */ version?: string; } function serializeVersion(data: any): Version { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, }; } function deserializeVersion(data: any): Version { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, }; } /** * Versions describes the mapping of a given version to the number of machines * under this version. */ export interface Versions { /** * Shows the mapping of a given version to the number of machines under this * version. */ versions?: Version[]; } function serializeVersions(data: any): Versions { return { ...data, versions: data["versions"] !== undefined ? data["versions"].map((item: any) => (serializeVersion(item))) : undefined, }; } function deserializeVersions(data: any): Versions { return { ...data, versions: data["versions"] !== undefined ? data["versions"].map((item: any) => (deserializeVersion(item))) : undefined, }; } /** * Specifies anti affinity group config for the VMware user cluster. */ export interface VmwareAAGConfig { /** * Spread nodes across at least three physical hosts (requires at least three * hosts). Enabled by default. */ aagConfigDisabled?: boolean; } /** * Represents an IP pool used by the load balancer. */ export interface VmwareAddressPool { /** * Required. The addresses that are part of this pool. Each address must be * either in the CIDR form (1.2.3.0/24) or range form (1.2.3.1-1.2.3.5). */ addresses?: string[]; /** * If true, avoid using IPs ending in .0 or .255. This avoids buggy consumer * devices mistakenly dropping IPv4 traffic for those special IP addresses. */ avoidBuggyIps?: boolean; /** * If true, prevent IP addresses from being automatically assigned. */ manualAssign?: boolean; /** * Required. The name of the address pool. */ pool?: string; } /** * VmwareAdminAddonNodeConfig contains add-on node configurations for VMware * admin cluster. */ export interface VmwareAdminAddonNodeConfig { /** * VmwareAutoResizeConfig config specifies auto resize config. */ autoResizeConfig?: VmwareAutoResizeConfig; } /** * VmwareAdminAuthorizationConfig represents configuration for admin cluster * authorization. */ export interface VmwareAdminAuthorizationConfig { /** * For VMware admin clusters, users will be granted the cluster-viewer role * on the cluster. */ viewerUsers?: ClusterUser[]; } /** * Resource that represents a VMware admin cluster. */ export interface VmwareAdminCluster { /** * The VMware admin cluster addon node configuration. */ addonNode?: VmwareAdminAddonNodeConfig; /** * Annotations on the VMware admin cluster. This field has the same * restrictions as Kubernetes annotations. The total size of all keys and * values combined is limited to 256k. Key can have 2 segments: prefix * (optional) and name (required), separated by a slash (/). Prefix must be a * DNS subdomain. Name must be 63 characters or less, begin and end with * alphanumerics, with dashes (-), underscores (_), dots (.), and * alphanumerics between. */ annotations?: { [key: string]: string }; /** * The VMware admin cluster anti affinity group configuration. */ antiAffinityGroups?: VmwareAAGConfig; /** * The VMware admin cluster authorization configuration. */ authorization?: VmwareAdminAuthorizationConfig; /** * The VMware admin cluster auto repair configuration. */ autoRepairConfig?: VmwareAutoRepairConfig; /** * The bootstrap cluster this VMware admin cluster belongs to. */ bootstrapClusterMembership?: string; /** * The VMware admin cluster control plane node configuration. */ controlPlaneNode?: VmwareAdminControlPlaneNodeConfig; /** * Output only. The time at which VMware admin cluster was created. */ readonly createTime?: Date; /** * A human readable description of this VMware admin cluster. */ description?: string; /** * Output only. The DNS name of VMware admin cluster's API server. */ readonly endpoint?: string; /** * This checksum is computed by the server based on the value of other * fields, and may be sent on update and delete requests to ensure the client * has an up-to-date value before proceeding. Allows clients to perform * consistent read-modify-writes through optimistic concurrency control. */ etag?: string; /** * Output only. Fleet configuration for the cluster. */ readonly fleet?: Fleet; /** * The OS image type for the VMware admin cluster. */ imageType?: string; /** * The VMware admin cluster load balancer configuration. */ loadBalancer?: VmwareAdminLoadBalancerConfig; /** * Output only. The object name of the VMware OnPremAdminCluster custom * resource. This field is used to support conflicting names when enrolling * existing clusters to the API. When used as a part of cluster enrollment, * this field will differ from the ID in the resource name. For new clusters, * this field will match the user provided cluster name and be visible in the * last component of the resource name. It is not modifiable. All users should * use this name to access their cluster using gkectl or kubectl and should * expect to see the local name when viewing admin cluster controller logs. */ readonly localName?: string; /** * Immutable. The VMware admin cluster resource name. */ name?: string; /** * The VMware admin cluster network configuration. */ networkConfig?: VmwareAdminNetworkConfig; /** * The Anthos clusters on the VMware version for the admin cluster. */ onPremVersion?: string; /** * The VMware platform configuration. */ platformConfig?: VmwarePlatformConfig; /** * Output only. The VMware admin cluster prepared secrets configuration. It * should always be enabled by the Central API, instead of letting users set * it. */ readonly preparedSecrets?: VmwareAdminPreparedSecretsConfig; /** * Output only. If set, there are currently changes in flight to the VMware * admin cluster. */ readonly reconciling?: boolean; /** * Output only. The current state of VMware admin cluster. */ readonly state?: | "STATE_UNSPECIFIED" | "PROVISIONING" | "RUNNING" | "RECONCILING" | "STOPPING" | "ERROR" | "DEGRADED"; /** * Output only. ResourceStatus representing detailed cluster state. */ readonly status?: ResourceStatus; /** * Output only. The unique identifier of the VMware admin cluster. */ readonly uid?: string; /** * Output only. The time at which VMware admin cluster was last updated. */ readonly updateTime?: Date; /** * Output only. ValidationCheck represents the result of the preflight check * job. */ readonly validationCheck?: ValidationCheck; /** * The VMware admin cluster VCenter configuration. */ vcenter?: VmwareAdminVCenterConfig; } function serializeVmwareAdminCluster(data: any): VmwareAdminCluster { return { ...data, controlPlaneNode: data["controlPlaneNode"] !== undefined ? serializeVmwareAdminControlPlaneNodeConfig(data["controlPlaneNode"]) : undefined, }; } function deserializeVmwareAdminCluster(data: any): VmwareAdminCluster { return { ...data, controlPlaneNode: data["controlPlaneNode"] !== undefined ? deserializeVmwareAdminControlPlaneNodeConfig(data["controlPlaneNode"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, status: data["status"] !== undefined ? deserializeResourceStatus(data["status"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * VmwareAdminControlPlaneNodeConfig contains control plane node configuration * for VMware admin cluster. */ export interface VmwareAdminControlPlaneNodeConfig { /** * The number of vCPUs for the control-plane node of the admin cluster. */ cpus?: bigint; /** * The number of mebibytes of memory for the control-plane node of the admin * cluster. */ memory?: bigint; /** * The number of control plane nodes for this VMware admin cluster. (default: * 1 replica). */ replicas?: bigint; } function serializeVmwareAdminControlPlaneNodeConfig(data: any): VmwareAdminControlPlaneNodeConfig { return { ...data, cpus: data["cpus"] !== undefined ? String(data["cpus"]) : undefined, memory: data["memory"] !== undefined ? String(data["memory"]) : undefined, replicas: data["replicas"] !== undefined ? String(data["replicas"]) : undefined, }; } function deserializeVmwareAdminControlPlaneNodeConfig(data: any): VmwareAdminControlPlaneNodeConfig { return { ...data, cpus: data["cpus"] !== undefined ? BigInt(data["cpus"]) : undefined, memory: data["memory"] !== undefined ? BigInt(data["memory"]) : undefined, replicas: data["replicas"] !== undefined ? BigInt(data["replicas"]) : undefined, }; } /** * VmwareAdminF5BigIpConfig represents configuration parameters for an F5 * BIG-IP load balancer. */ export interface VmwareAdminF5BigIpConfig { /** * The load balancer's IP address. */ address?: string; /** * The preexisting partition to be used by the load balancer. This partition * is usually created for the admin cluster for example: * 'my-f5-admin-partition'. */ partition?: string; /** * The pool name. Only necessary, if using SNAT. */ snatPool?: string; } /** * Specifies HA admin control plane config. */ export interface VmwareAdminHAControlPlaneConfig { /** * Static IP addresses for the admin control plane nodes. */ controlPlaneIpBlock?: VmwareIpBlock; } /** * VmwareAdminLoadBalancerConfig contains load balancer configuration for * VMware admin cluster. */ export interface VmwareAdminLoadBalancerConfig { /** * Configuration for F5 Big IP typed load balancers. */ f5Config?: VmwareAdminF5BigIpConfig; /** * Manually configured load balancers. */ manualLbConfig?: VmwareAdminManualLbConfig; /** * MetalLB load balancers. */ metalLbConfig?: VmwareAdminMetalLbConfig; /** * Output only. Configuration for Seesaw typed load balancers. */ readonly seesawConfig?: VmwareAdminSeesawConfig; /** * The VIPs used by the load balancer. */ vipConfig?: VmwareAdminVipConfig; } export interface VmwareAdminManualLbConfig { /** * NodePort for add-ons server in the admin cluster. */ addonsNodePort?: number; /** * NodePort for control plane service. The Kubernetes API server in the admin * cluster is implemented as a Service of type NodePort (ex. 30968). */ controlPlaneNodePort?: number; /** * NodePort for ingress service's http. The ingress service in the admin * cluster is implemented as a Service of type NodePort (ex. 32527). */ ingressHttpNodePort?: number; /** * NodePort for ingress service's https. The ingress service in the admin * cluster is implemented as a Service of type NodePort (ex. 30139). */ ingressHttpsNodePort?: number; /** * NodePort for konnectivity server service running as a sidecar in each * kube-apiserver pod (ex. 30564). */ konnectivityServerNodePort?: number; } /** * VmwareAdminMetalLbConfig represents configuration parameters for a MetalLB * load balancer. For admin clusters, currently no configurations is needed. */ export interface VmwareAdminMetalLbConfig { /** * Whether MetalLB is enabled. */ enabled?: boolean; } /** * VmwareAdminNetworkConfig contains network configuration for VMware admin * cluster. */ export interface VmwareAdminNetworkConfig { /** * Configuration settings for a DHCP IP configuration. */ dhcpIpConfig?: VmwareDhcpIpConfig; /** * Configuration for HA admin cluster control plane. */ haControlPlaneConfig?: VmwareAdminHAControlPlaneConfig; /** * Represents common network settings irrespective of the host's IP address. */ hostConfig?: VmwareHostConfig; /** * Required. All pods in the cluster are assigned an RFC1918 IPv4 address * from these ranges. Only a single range is supported. This field cannot be * changed after creation. */ podAddressCidrBlocks?: string[]; /** * Required. All services in the cluster are assigned an RFC1918 IPv4 address * from these ranges. Only a single range is supported. This field cannot be * changed after creation. */ serviceAddressCidrBlocks?: string[]; /** * Configuration settings for a static IP configuration. */ staticIpConfig?: VmwareStaticIpConfig; /** * vcenter_network specifies vCenter network name. */ vcenterNetwork?: string; } /** * VmwareAdminPreparedSecretsConfig represents configuration for admin cluster * prepared secrets. */ export interface VmwareAdminPreparedSecretsConfig { /** * Whether prepared secrets is enabled. */ enabled?: boolean; } /** * VmwareSeesawConfig represents configuration parameters for an already * existing Seesaw load balancer. IMPORTANT: Please note that the Anthos On-Prem * API will not generate or update Seesaw configurations it can only bind a * pre-existing configuration to a new user cluster. IMPORTANT: When attempting * to create a user cluster with a pre-existing Seesaw load balancer you will * need to follow some preparation steps before calling the * 'CreateVmwareCluster' API method. First you will need to create the user * cluster's namespace via kubectl. The namespace will need to use the following * naming convention : -gke-onprem-mgmt or -gke-onprem-mgmt depending on whether * you used the 'VmwareCluster.local_name' to disambiguate collisions; for more * context see the documentation of 'VmwareCluster.local_name'. Once the * namespace is created you will need to create a secret resource via kubectl. * This secret will contain copies of your Seesaw credentials. The Secret must * be called 'user-cluster-creds' and contain Seesaw's SSH and Cert credentials. * The credentials must be keyed with the following names: * 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', 'seesaw-ssh-ca-key', * 'seesaw-ssh-ca-cert'. */ export interface VmwareAdminSeesawConfig { /** * Enable two load balancer VMs to achieve a highly-available Seesaw load * balancer. */ enableHa?: boolean; /** * In general the following format should be used for the Seesaw group name: * seesaw-for-[cluster_name]. */ group?: string; /** * The IP Blocks to be used by the Seesaw load balancer */ ipBlocks?: VmwareIpBlock[]; /** * MasterIP is the IP announced by the master of Seesaw group. */ masterIp?: string; /** * Name to be used by Stackdriver. */ stackdriverName?: string; /** * Names of the VMs created for this Seesaw group. */ vms?: string[]; } /** * VmwareAdminVCenterConfig contains VCenter configuration for VMware admin * cluster. */ export interface VmwareAdminVCenterConfig { /** * The vCenter IP address. */ address?: string; /** * Contains the vCenter CA certificate public key for SSL verification. */ caCertData?: string; /** * The name of the vCenter cluster for the admin cluster. */ cluster?: string; /** * The name of the vCenter datacenter for the admin cluster. */ datacenter?: string; /** * The name of the virtual machine disk (VMDK) for the admin cluster. */ dataDisk?: string; /** * The name of the vCenter datastore for the admin cluster. */ datastore?: string; /** * The name of the vCenter folder for the admin cluster. */ folder?: string; /** * The name of the vCenter resource pool for the admin cluster. */ resourcePool?: string; /** * The name of the vCenter storage policy for the user cluster. */ storagePolicyName?: string; } /** * VmwareAdminVipConfig for VMware load balancer configurations. */ export interface VmwareAdminVipConfig { /** * The VIP to configure the load balancer for add-ons. */ addonsVip?: string; /** * The VIP which you previously set aside for the Kubernetes API of the admin * cluster. */ controlPlaneVip?: string; } /** * Specifies config to enable/disable auto repair. The * cluster-health-controller is deployed only if Enabled is true. */ export interface VmwareAutoRepairConfig { /** * Whether auto repair is enabled. */ enabled?: boolean; } /** * Represents auto resizing configurations for the VMware user cluster. */ export interface VmwareAutoResizeConfig { /** * Whether to enable controle plane node auto resizing. */ enabled?: boolean; } /** * VmwareBundleConfig represents configuration for the bundle. */ export interface VmwareBundleConfig { /** * Output only. Resource status for the bundle. */ readonly status?: ResourceStatus; /** * The version of the bundle. */ version?: string; } /** * Resource that represents a VMware user cluster. ## */ export interface VmwareCluster { /** * Required. The admin cluster this VMware user cluster belongs to. This is * the full resource name of the admin cluster's fleet membership. In the * future, references to other resource types might be allowed if admin * clusters are modeled as their own resources. */ adminClusterMembership?: string; /** * Output only. The resource name of the VMware admin cluster hosting this * user cluster. */ readonly adminClusterName?: string; /** * Annotations on the VMware user cluster. This field has the same * restrictions as Kubernetes annotations. The total size of all keys and * values combined is limited to 256k. Key can have 2 segments: prefix * (optional) and name (required), separated by a slash (/). Prefix must be a * DNS subdomain. Name must be 63 characters or less, begin and end with * alphanumerics, with dashes (-), underscores (_), dots (.), and * alphanumerics between. */ annotations?: { [key: string]: string }; /** * AAGConfig specifies whether to spread VMware user cluster nodes across at * least three physical hosts in the datacenter. */ antiAffinityGroups?: VmwareAAGConfig; /** * RBAC policy that will be applied and managed by the Anthos On-Prem API. */ authorization?: Authorization; /** * Configuration for auto repairing. */ autoRepairConfig?: VmwareAutoRepairConfig; /** * Binary Authorization related configurations. */ binaryAuthorization?: BinaryAuthorization; /** * VMware user cluster control plane nodes must have either 1 or 3 replicas. */ controlPlaneNode?: VmwareControlPlaneNodeConfig; /** * Output only. The time at which VMware user cluster was created. */ readonly createTime?: Date; /** * VmwareDataplaneV2Config specifies configuration for Dataplane V2. */ dataplaneV2?: VmwareDataplaneV2Config; /** * Output only. The time at which VMware user cluster was deleted. */ readonly deleteTime?: Date; /** * A human readable description of this VMware user cluster. */ description?: string; /** * Disable bundled ingress. */ disableBundledIngress?: boolean; /** * Enable control plane V2. Default to false. */ enableControlPlaneV2?: boolean; /** * Output only. The DNS name of VMware user cluster's API server. */ readonly endpoint?: string; /** * This checksum is computed by the server based on the value of other * fields, and may be sent on update and delete requests to ensure the client * has an up-to-date value before proceeding. Allows clients to perform * consistent read-modify-writes through optimistic concurrency control. */ etag?: string; /** * Output only. Fleet configuration for the cluster. */ readonly fleet?: Fleet; /** * Load balancer configuration. */ loadBalancer?: VmwareLoadBalancerConfig; /** * Output only. The object name of the VMware OnPremUserCluster custom * resource on the associated admin cluster. This field is used to support * conflicting names when enrolling existing clusters to the API. When used as * a part of cluster enrollment, this field will differ from the ID in the * resource name. For new clusters, this field will match the user provided * cluster name and be visible in the last component of the resource name. It * is not modifiable. All users should use this name to access their cluster * using gkectl or kubectl and should expect to see the local name when * viewing admin cluster controller logs. */ readonly localName?: string; /** * Immutable. The VMware user cluster resource name. */ name?: string; /** * The VMware user cluster network configuration. */ networkConfig?: VmwareNetworkConfig; /** * Required. The Anthos clusters on the VMware version for your user cluster. */ onPremVersion?: string; /** * Output only. If set, there are currently changes in flight to the VMware * user cluster. */ readonly reconciling?: boolean; /** * Output only. The current state of VMware user cluster. */ readonly state?: | "STATE_UNSPECIFIED" | "PROVISIONING" | "RUNNING" | "RECONCILING" | "STOPPING" | "ERROR" | "DEGRADED"; /** * Output only. ResourceStatus representing detailed cluster state. */ readonly status?: ResourceStatus; /** * Storage configuration. */ storage?: VmwareStorageConfig; /** * Output only. The unique identifier of the VMware user cluster. */ readonly uid?: string; /** * Output only. The time at which VMware user cluster was last updated. */ readonly updateTime?: Date; /** * Specifies upgrade policy for the cluster. */ upgradePolicy?: VmwareClusterUpgradePolicy; /** * Output only. ValidationCheck represents the result of the preflight check * job. */ readonly validationCheck?: ValidationCheck; /** * VmwareVCenterConfig specifies vCenter config for the user cluster. If * unspecified, it is inherited from the admin cluster. */ vcenter?: VmwareVCenterConfig; /** * Enable VM tracking. */ vmTrackingEnabled?: boolean; } function serializeVmwareCluster(data: any): VmwareCluster { return { ...data, controlPlaneNode: data["controlPlaneNode"] !== undefined ? serializeVmwareControlPlaneNodeConfig(data["controlPlaneNode"]) : undefined, }; } function deserializeVmwareCluster(data: any): VmwareCluster { return { ...data, controlPlaneNode: data["controlPlaneNode"] !== undefined ? deserializeVmwareControlPlaneNodeConfig(data["controlPlaneNode"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, status: data["status"] !== undefined ? deserializeResourceStatus(data["status"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * VmwareClusterUpgradePolicy defines the cluster upgrade policy. */ export interface VmwareClusterUpgradePolicy { /** * Controls whether the upgrade applies to the control plane only. */ controlPlaneOnly?: boolean; } /** * Specifies control plane node config for the VMware user cluster. */ export interface VmwareControlPlaneNodeConfig { /** * AutoResizeConfig provides auto resizing configurations. */ autoResizeConfig?: VmwareAutoResizeConfig; /** * The number of CPUs for each admin cluster node that serve as control * planes for this VMware user cluster. (default: 4 CPUs) */ cpus?: bigint; /** * The megabytes of memory for each admin cluster node that serves as a * control plane for this VMware user cluster (default: 8192 MB memory). */ memory?: bigint; /** * The number of control plane nodes for this VMware user cluster. (default: * 1 replica). */ replicas?: bigint; /** * Vsphere-specific config. */ vsphereConfig?: VmwareControlPlaneVsphereConfig; } function serializeVmwareControlPlaneNodeConfig(data: any): VmwareControlPlaneNodeConfig { return { ...data, cpus: data["cpus"] !== undefined ? String(data["cpus"]) : undefined, memory: data["memory"] !== undefined ? String(data["memory"]) : undefined, replicas: data["replicas"] !== undefined ? String(data["replicas"]) : undefined, }; } function deserializeVmwareControlPlaneNodeConfig(data: any): VmwareControlPlaneNodeConfig { return { ...data, cpus: data["cpus"] !== undefined ? BigInt(data["cpus"]) : undefined, memory: data["memory"] !== undefined ? BigInt(data["memory"]) : undefined, replicas: data["replicas"] !== undefined ? BigInt(data["replicas"]) : undefined, }; } /** * Specifies control plane V2 config. */ export interface VmwareControlPlaneV2Config { /** * Static IP addresses for the control plane nodes. */ controlPlaneIpBlock?: VmwareIpBlock; } /** * Specifies control plane node config. */ export interface VmwareControlPlaneVsphereConfig { /** * The Vsphere datastore used by the control plane Node. */ datastore?: string; /** * The Vsphere storage policy used by the control plane Node. */ storagePolicyName?: string; } /** * Contains configurations for Dataplane V2, which is optimized dataplane for * Kubernetes networking. For more information, see: * https://cloud.google.com/kubernetes-engine/docs/concepts/dataplane-v2 */ export interface VmwareDataplaneV2Config { /** * Enable advanced networking which requires dataplane_v2_enabled to be set * true. */ advancedNetworking?: boolean; /** * Enables Dataplane V2. */ dataplaneV2Enabled?: boolean; /** * Configure ForwardMode for Dataplane v2. */ forwardMode?: string; /** * Enable Dataplane V2 for clusters with Windows nodes. */ windowsDataplaneV2Enabled?: boolean; } /** * Represents the network configuration required for the VMware user clusters * with DHCP IP configurations. */ export interface VmwareDhcpIpConfig { /** * enabled is a flag to mark if DHCP IP allocation is used for VMware user * clusters. */ enabled?: boolean; } /** * Represents configuration parameters for an F5 BIG-IP load balancer. */ export interface VmwareF5BigIpConfig { /** * The load balancer's IP address. */ address?: string; /** * The preexisting partition to be used by the load balancer. This partition * is usually created for the admin cluster for example: * 'my-f5-admin-partition'. */ partition?: string; /** * The pool name. Only necessary, if using SNAT. */ snatPool?: string; } /** * Represents the common parameters for all the hosts irrespective of their IP * address. */ export interface VmwareHostConfig { /** * DNS search domains. */ dnsSearchDomains?: string[]; /** * DNS servers. */ dnsServers?: string[]; /** * NTP servers. */ ntpServers?: string[]; } /** * Represents VMware user cluster node's network configuration. */ export interface VmwareHostIp { /** * Hostname of the machine. VM's name will be used if this field is empty. */ hostname?: string; /** * IP could be an IP address (like 1.2.3.4) or a CIDR (like 1.2.3.0/24). */ ip?: string; } /** * Represents a collection of IP addresses to assign to nodes. */ export interface VmwareIpBlock { /** * The network gateway used by the VMware user cluster. */ gateway?: string; /** * The node's network configurations used by the VMware user cluster. */ ips?: VmwareHostIp[]; /** * The netmask used by the VMware user cluster. */ netmask?: string; } /** * Specifies the locad balancer config for the VMware user cluster. */ export interface VmwareLoadBalancerConfig { /** * Configuration for F5 Big IP typed load balancers. */ f5Config?: VmwareF5BigIpConfig; /** * Manually configured load balancers. */ manualLbConfig?: VmwareManualLbConfig; /** * Configuration for MetalLB typed load balancers. */ metalLbConfig?: VmwareMetalLbConfig; /** * Output only. Configuration for Seesaw typed load balancers. */ readonly seesawConfig?: VmwareSeesawConfig; /** * The VIPs used by the load balancer. */ vipConfig?: VmwareVipConfig; } /** * Represents configuration parameters for an already existing manual load * balancer. Given the nature of manual load balancers it is expected that said * load balancer will be fully managed by users. IMPORTANT: Please note that the * Anthos On-Prem API will not generate or update ManualLB configurations it can * only bind a pre-existing configuration to a new VMware user cluster. */ export interface VmwareManualLbConfig { /** * NodePort for control plane service. The Kubernetes API server in the admin * cluster is implemented as a Service of type NodePort (ex. 30968). */ controlPlaneNodePort?: number; /** * NodePort for ingress service's http. The ingress service in the admin * cluster is implemented as a Service of type NodePort (ex. 32527). */ ingressHttpNodePort?: number; /** * NodePort for ingress service's https. The ingress service in the admin * cluster is implemented as a Service of type NodePort (ex. 30139). */ ingressHttpsNodePort?: number; /** * NodePort for konnectivity server service running as a sidecar in each * kube-apiserver pod (ex. 30564). */ konnectivityServerNodePort?: number; } /** * Represents configuration parameters for the MetalLB load balancer. */ export interface VmwareMetalLbConfig { /** * Required. AddressPools is a list of non-overlapping IP pools used by load * balancer typed services. All addresses must be routable to load balancer * nodes. IngressVIP must be included in the pools. */ addressPools?: VmwareAddressPool[]; } /** * Specifies network config for the VMware user cluster. */ export interface VmwareNetworkConfig { /** * Configuration for control plane V2 mode. */ controlPlaneV2Config?: VmwareControlPlaneV2Config; /** * Configuration settings for a DHCP IP configuration. */ dhcpIpConfig?: VmwareDhcpIpConfig; /** * Represents common network settings irrespective of the host's IP address. */ hostConfig?: VmwareHostConfig; /** * Required. All pods in the cluster are assigned an RFC1918 IPv4 address * from these ranges. Only a single range is supported. This field cannot be * changed after creation. */ podAddressCidrBlocks?: string[]; /** * Required. All services in the cluster are assigned an RFC1918 IPv4 address * from these ranges. Only a single range is supported. This field cannot be * changed after creation. */ serviceAddressCidrBlocks?: string[]; /** * Configuration settings for a static IP configuration. */ staticIpConfig?: VmwareStaticIpConfig; /** * vcenter_network specifies vCenter network name. Inherited from the admin * cluster. */ vcenterNetwork?: string; } /** * Parameters that describe the configuration of all nodes within a given node * pool. */ export interface VmwareNodeConfig { /** * VMware disk size to be used during creation. */ bootDiskSizeGb?: bigint; /** * The number of CPUs for each node in the node pool. */ cpus?: bigint; /** * Allow node pool traffic to be load balanced. Only works for clusters with * MetalLB load balancers. */ enableLoadBalancer?: boolean; /** * The OS image name in vCenter, only valid when using Windows. */ image?: string; /** * Required. The OS image to be used for each node in a node pool. Currently * `cos`, `cos_cgv2`, `ubuntu`, `ubuntu_cgv2`, `ubuntu_containerd` and * `windows` are supported. */ imageType?: string; /** * The map of Kubernetes labels (key/value pairs) to be applied to each node. * These will added in addition to any default label(s) that Kubernetes may * apply to the node. In case of conflict in label keys, the applied set may * differ depending on the Kubernetes version -- it's best to assume the * behavior is undefined and conflicts should be avoided. For more * information, including usage and the valid values, see: * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ */ labels?: { [key: string]: string }; /** * The megabytes of memory for each node in the node pool. */ memoryMb?: bigint; /** * The number of nodes in the node pool. */ replicas?: bigint; /** * The initial taints assigned to nodes of this node pool. */ taints?: NodeTaint[]; /** * Specifies the vSphere config for node pool. */ vsphereConfig?: VmwareVsphereConfig; } function serializeVmwareNodeConfig(data: any): VmwareNodeConfig { return { ...data, bootDiskSizeGb: data["bootDiskSizeGb"] !== undefined ? String(data["bootDiskSizeGb"]) : undefined, cpus: data["cpus"] !== undefined ? String(data["cpus"]) : undefined, memoryMb: data["memoryMb"] !== undefined ? String(data["memoryMb"]) : undefined, replicas: data["replicas"] !== undefined ? String(data["replicas"]) : undefined, }; } function deserializeVmwareNodeConfig(data: any): VmwareNodeConfig { return { ...data, bootDiskSizeGb: data["bootDiskSizeGb"] !== undefined ? BigInt(data["bootDiskSizeGb"]) : undefined, cpus: data["cpus"] !== undefined ? BigInt(data["cpus"]) : undefined, memoryMb: data["memoryMb"] !== undefined ? BigInt(data["memoryMb"]) : undefined, replicas: data["replicas"] !== undefined ? BigInt(data["replicas"]) : undefined, }; } /** * Resource VmwareNodePool represents a VMware node pool. ## */ export interface VmwareNodePool { /** * Annotations on the node pool. This field has the same restrictions as * Kubernetes annotations. The total size of all keys and values combined is * limited to 256k. Key can have 2 segments: prefix (optional) and name * (required), separated by a slash (/). Prefix must be a DNS subdomain. Name * must be 63 characters or less, begin and end with alphanumerics, with * dashes (-), underscores (_), dots (.), and alphanumerics between. */ annotations?: { [key: string]: string }; /** * Required. The node configuration of the node pool. */ config?: VmwareNodeConfig; /** * Output only. The time at which this node pool was created. */ readonly createTime?: Date; /** * Output only. The time at which this node pool was deleted. If the resource * is not deleted, this must be empty */ readonly deleteTime?: Date; /** * The display name for the node pool. */ displayName?: string; /** * This checksum is computed by the server based on the value of other * fields, and may be sent on update and delete requests to ensure the client * has an up-to-date value before proceeding. Allows clients to perform * consistent read-modify-writes through optimistic concurrency control. */ etag?: string; /** * Immutable. The resource name of this node pool. */ name?: string; /** * Node pool autoscaling config for the node pool. */ nodePoolAutoscaling?: VmwareNodePoolAutoscalingConfig; /** * Anthos version for the node pool. Defaults to the user cluster version. */ onPremVersion?: string; /** * Output only. If set, there are currently changes in flight to the node * pool. */ readonly reconciling?: boolean; /** * Output only. The current state of the node pool. */ readonly state?: | "STATE_UNSPECIFIED" | "PROVISIONING" | "RUNNING" | "RECONCILING" | "STOPPING" | "ERROR" | "DEGRADED"; /** * Output only. ResourceStatus representing the detailed VMware node pool * state. */ readonly status?: ResourceStatus; /** * Output only. The unique identifier of the node pool. */ readonly uid?: string; /** * Output only. The time at which this node pool was last updated. */ readonly updateTime?: Date; } function serializeVmwareNodePool(data: any): VmwareNodePool { return { ...data, config: data["config"] !== undefined ? serializeVmwareNodeConfig(data["config"]) : undefined, }; } function deserializeVmwareNodePool(data: any): VmwareNodePool { return { ...data, config: data["config"] !== undefined ? deserializeVmwareNodeConfig(data["config"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, status: data["status"] !== undefined ? deserializeResourceStatus(data["status"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * NodePoolAutoscaling config for the NodePool to allow for the kubernetes to * scale NodePool. */ export interface VmwareNodePoolAutoscalingConfig { /** * Maximum number of replicas in the NodePool. */ maxReplicas?: number; /** * Minimum number of replicas in the NodePool. */ minReplicas?: number; } /** * VmwarePlatformConfig represents configuration for the VMware platform. */ export interface VmwarePlatformConfig { /** * Output only. The list of bundles installed in the admin cluster. */ readonly bundles?: VmwareBundleConfig[]; /** * Output only. The platform version e.g. 1.13.2. */ readonly platformVersion?: string; /** * Input only. The required platform version e.g. 1.13.1. If the current * platform version is lower than the target version, the platform version * will be updated to the target version. If the target version is not * installed in the platform (bundle versions), download the target version * bundle. */ requiredPlatformVersion?: string; /** * Output only. Resource status for the platform. */ readonly status?: ResourceStatus; } /** * VmwareSeesawConfig represents configuration parameters for an already * existing Seesaw load balancer. IMPORTANT: Please note that the Anthos On-Prem * API will not generate or update Seesaw configurations it can only bind a * pre-existing configuration to a new user cluster. IMPORTANT: When attempting * to create a user cluster with a pre-existing Seesaw load balancer you will * need to follow some preparation steps before calling the * 'CreateVmwareCluster' API method. First you will need to create the user * cluster's namespace via kubectl. The namespace will need to use the following * naming convention : -gke-onprem-mgmt or -gke-onprem-mgmt depending on whether * you used the 'VmwareCluster.local_name' to disambiguate collisions; for more * context see the documentation of 'VmwareCluster.local_name'. Once the * namespace is created you will need to create a secret resource via kubectl. * This secret will contain copies of your Seesaw credentials. The Secret must * be called 'user-cluster-creds' and contain Seesaw's SSH and Cert credentials. * The credentials must be keyed with the following names: * 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', 'seesaw-ssh-ca-key', * 'seesaw-ssh-ca-cert'. */ export interface VmwareSeesawConfig { /** * Enable two load balancer VMs to achieve a highly-available Seesaw load * balancer. */ enableHa?: boolean; /** * Required. In general the following format should be used for the Seesaw * group name: seesaw-for-[cluster_name]. */ group?: string; /** * Required. The IP Blocks to be used by the Seesaw load balancer */ ipBlocks?: VmwareIpBlock[]; /** * Required. MasterIP is the IP announced by the master of Seesaw group. */ masterIp?: string; /** * Name to be used by Stackdriver. */ stackdriverName?: string; /** * Names of the VMs created for this Seesaw group. */ vms?: string[]; } /** * Represents the network configuration required for the VMware user clusters * with Static IP configurations. */ export interface VmwareStaticIpConfig { /** * Represents the configuration values for static IP allocation to nodes. */ ipBlocks?: VmwareIpBlock[]; } /** * Specifies vSphere CSI components deployment config in the VMware user * cluster. */ export interface VmwareStorageConfig { /** * Whether or not to deploy vSphere CSI components in the VMware user * cluster. Enabled by default. */ vsphereCsiDisabled?: boolean; } /** * Represents configuration for the VMware VCenter for the user cluster. */ export interface VmwareVCenterConfig { /** * Output only. The vCenter IP address. */ readonly address?: string; /** * Contains the vCenter CA certificate public key for SSL verification. */ caCertData?: string; /** * The name of the vCenter cluster for the user cluster. */ cluster?: string; /** * The name of the vCenter datacenter for the user cluster. */ datacenter?: string; /** * The name of the vCenter datastore for the user cluster. */ datastore?: string; /** * The name of the vCenter folder for the user cluster. */ folder?: string; /** * The name of the vCenter resource pool for the user cluster. */ resourcePool?: string; /** * The name of the vCenter storage policy for the user cluster. */ storagePolicyName?: string; } /** * Contains information about a specific Anthos on VMware version. */ export interface VmwareVersionInfo { /** * The list of upgrade dependencies for this version. */ dependencies?: UpgradeDependency[]; /** * If set, the cluster dependencies (e.g. the admin cluster, other user * clusters managed by the same admin cluster) must be upgraded before this * version can be installed or upgraded to. */ hasDependencies?: boolean; /** * If set, the version is installed in the admin cluster. Otherwise, the * version bundle must be downloaded and installed before a user cluster can * be created at or upgraded to this version. */ isInstalled?: boolean; /** * Version number e.g. 1.13.1-gke.1000. */ version?: string; } /** * Specifies the VIP config for the VMware user cluster load balancer. */ export interface VmwareVipConfig { /** * The VIP which you previously set aside for the Kubernetes API of this * cluster. */ controlPlaneVip?: string; /** * The VIP which you previously set aside for ingress traffic into this * cluster. */ ingressVip?: string; } /** * VmwareVsphereConfig represents configuration for the VMware VCenter for node * pool. */ export interface VmwareVsphereConfig { /** * The name of the vCenter datastore. Inherited from the user cluster. */ datastore?: string; /** * Vsphere host groups to apply to all VMs in the node pool */ hostGroups?: string[]; /** * Tags to apply to VMs. */ tags?: VmwareVsphereTag[]; } /** * VmwareVsphereTag describes a vSphere tag to be placed on VMs in the node * pool. For more information, see * https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenterhost.doc/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html */ export interface VmwareVsphereTag { /** * The Vsphere tag category. */ category?: string; /** * The Vsphere tag name. */ tag?: string; } function decodeBase64(b64: string): Uint8Array { const binString = atob(b64); const size = binString.length; const bytes = new Uint8Array(size); for (let i = 0; i < size; i++) { bytes[i] = binString.charCodeAt(i); } return bytes; } const base64abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]; /** * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation * @param data */ function encodeBase64(uint8: Uint8Array): string { let result = "", i; const l = uint8.length; for (i = 2; i < l; i += 3) { result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; result += base64abc[uint8[i] & 0x3f]; } if (i === l + 1) { // 1 octet yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[(uint8[i - 2] & 0x03) << 4]; result += "=="; } if (i === l) { // 2 octets yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[(uint8[i - 1] & 0x0f) << 2]; result += "="; } return result; }