Class v1.ClusterManagerClient (5.8.0)

Google Kubernetes Engine Cluster Manager v1 v1

Package

@google-cloud/container

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of ClusterManagerClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new ClusterManagerClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

clusterManagerStub

clusterManagerStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

cancelOperation(request, options)

cancelOperation(request?: protos.google.container.v1.ICancelOperationRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.container.v1.ICancelOperationRequest | undefined,
        {} | undefined
    ]>;

Cancels the specified operation.

Parameters
NameDescription
request ICancelOperationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, operation id) of the operation to cancel.
   *  Specified in the format `projects/* /locations/* /operations/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callCancelOperation() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.cancelOperation(request);
    console.log(response);
  }

  callCancelOperation();

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.container.v1.ICancelOperationRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICancelOperationRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelOperation(request, callback)

cancelOperation(request: protos.google.container.v1.ICancelOperationRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICancelOperationRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkAutopilotCompatibility(request, options)

checkAutopilotCompatibility(request?: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.ICheckAutopilotCompatibilityResponse,
        (protos.google.container.v1.ICheckAutopilotCompatibilityRequest | undefined),
        {} | undefined
    ]>;

Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.

Parameters
NameDescription
request ICheckAutopilotCompatibilityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.ICheckAutopilotCompatibilityResponse, (protos.google.container.v1.ICheckAutopilotCompatibilityRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing CheckAutopilotCompatibilityResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster) of the cluster to retrieve.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callCheckAutopilotCompatibility() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.checkAutopilotCompatibility(request);
    console.log(response);
  }

  callCheckAutopilotCompatibility();

checkAutopilotCompatibility(request, options, callback)

checkAutopilotCompatibility(request: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, options: CallOptions, callback: Callback<protos.google.container.v1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICheckAutopilotCompatibilityRequest
options CallOptions
callback Callback<protos.google.container.v1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkAutopilotCompatibility(request, callback)

checkAutopilotCompatibility(request: protos.google.container.v1.ICheckAutopilotCompatibilityRequest, callback: Callback<protos.google.container.v1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICheckAutopilotCompatibilityRequest
callback Callback<protos.google.container.v1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

completeIPRotation(request, options)

completeIPRotation(request?: protos.google.container.v1.ICompleteIPRotationRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ICompleteIPRotationRequest | undefined,
        {} | undefined
    ]>;

Completes master IP rotation.

Parameters
NameDescription
request ICompleteIPRotationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster name) of the cluster to complete IP
   *  rotation. Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callCompleteIPRotation() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.completeIPRotation(request);
    console.log(response);
  }

  callCompleteIPRotation();

completeIPRotation(request, options, callback)

completeIPRotation(request: protos.google.container.v1.ICompleteIPRotationRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICompleteIPRotationRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

completeIPRotation(request, callback)

completeIPRotation(request: protos.google.container.v1.ICompleteIPRotationRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICompleteIPRotationRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

completeNodePoolUpgrade(request, options)

completeNodePoolUpgrade(request?: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.container.v1.ICompleteNodePoolUpgradeRequest | undefined,
        {} | undefined
    ]>;

CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.

Parameters
NameDescription
request ICompleteNodePoolUpgradeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster, node pool id) of the node pool to
   *  complete upgrade.
   *  Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callCompleteNodePoolUpgrade() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.completeNodePoolUpgrade(request);
    console.log(response);
  }

  callCompleteNodePoolUpgrade();

completeNodePoolUpgrade(request, options, callback)

completeNodePoolUpgrade(request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICompleteNodePoolUpgradeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

completeNodePoolUpgrade(request, callback)

completeNodePoolUpgrade(request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICompleteNodePoolUpgradeRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCluster(request, options)

createCluster(request?: protos.google.container.v1.ICreateClusterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ICreateClusterRequest | undefined,
        {} | undefined
    ]>;

Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.

By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).

One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.

Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.

Parameters
NameDescription
request ICreateClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A cluster
   *  resource (https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
   */
  // const cluster = {}
  /**
   *  The parent (project and location) where the cluster will be created.
   *  Specified in the format `projects/* /locations/*`.
   */
  // const parent = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callCreateCluster() {
    // Construct request
    const request = {
      cluster,
    };

    // Run request
    const response = await containerClient.createCluster(request);
    console.log(response);
  }

  callCreateCluster();

createCluster(request, options, callback)

createCluster(request: protos.google.container.v1.ICreateClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateClusterRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCluster(request, callback)

createCluster(request: protos.google.container.v1.ICreateClusterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateClusterRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createNodePool(request, options)

createNodePool(request?: protos.google.container.v1.ICreateNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ICreateNodePoolRequest | undefined,
        {} | undefined
    ]>;

Creates a node pool for a cluster.

Parameters
NameDescription
request ICreateNodePoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The node pool to create.
   */
  // const nodePool = {}
  /**
   *  The parent (project, location, cluster name) where the node pool will be
   *  created. Specified in the format
   *  `projects/* /locations/* /clusters/*`.
   */
  // const parent = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callCreateNodePool() {
    // Construct request
    const request = {
      nodePool,
    };

    // Run request
    const response = await containerClient.createNodePool(request);
    console.log(response);
  }

  callCreateNodePool();

createNodePool(request, options, callback)

createNodePool(request: protos.google.container.v1.ICreateNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateNodePoolRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createNodePool(request, callback)

createNodePool(request: protos.google.container.v1.ICreateNodePoolRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateNodePoolRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCluster(request, options)

deleteCluster(request?: protos.google.container.v1.IDeleteClusterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IDeleteClusterRequest | undefined,
        {} | undefined
    ]>;

Deletes the cluster, including the Kubernetes endpoint and all worker nodes.

Firewalls and routes that were configured during cluster creation are also deleted.

Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.

Parameters
NameDescription
request IDeleteClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster) of the cluster to delete.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callDeleteCluster() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.deleteCluster(request);
    console.log(response);
  }

  callDeleteCluster();

deleteCluster(request, options, callback)

deleteCluster(request: protos.google.container.v1.IDeleteClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteClusterRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCluster(request, callback)

deleteCluster(request: protos.google.container.v1.IDeleteClusterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteClusterRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteNodePool(request, options)

deleteNodePool(request?: protos.google.container.v1.IDeleteNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IDeleteNodePoolRequest | undefined,
        {} | undefined
    ]>;

Deletes a node pool from a cluster.

Parameters
NameDescription
request IDeleteNodePoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster, node pool id) of the node pool to
   *  delete. Specified in the format
   *  `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callDeleteNodePool() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.deleteNodePool(request);
    console.log(response);
  }

  callDeleteNodePool();

deleteNodePool(request, options, callback)

deleteNodePool(request: protos.google.container.v1.IDeleteNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteNodePoolRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteNodePool(request, callback)

deleteNodePool(request: protos.google.container.v1.IDeleteNodePoolRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteNodePoolRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCluster(request, options)

getCluster(request?: protos.google.container.v1.IGetClusterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.ICluster,
        protos.google.container.v1.IGetClusterRequest | undefined,
        {} | undefined
    ]>;

Gets the details of a specific cluster.

Parameters
NameDescription
request IGetClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster) of the cluster to retrieve.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callGetCluster() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.getCluster(request);
    console.log(response);
  }

  callGetCluster();

getCluster(request, options, callback)

getCluster(request: protos.google.container.v1.IGetClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetClusterRequest
options CallOptions
callback Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCluster(request, callback)

getCluster(request: protos.google.container.v1.IGetClusterRequest, callback: Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetClusterRequest
callback Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJSONWebKeys(request, options)

getJSONWebKeys(request?: protos.google.container.v1.IGetJSONWebKeysRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IGetJSONWebKeysResponse,
        protos.google.container.v1.IGetJSONWebKeysRequest | undefined,
        {} | undefined
    ]>;

Gets the public component of the cluster signing keys in JSON Web Key format.

Parameters
NameDescription
request IGetJSONWebKeysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing GetJSONWebKeysResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The cluster (project, location, cluster name) to get keys for. Specified in
   *  the format `projects/* /locations/* /clusters/*`.
   */
  // const parent = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callGetJSONWebKeys() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.getJSONWebKeys(request);
    console.log(response);
  }

  callGetJSONWebKeys();

getJSONWebKeys(request, options, callback)

getJSONWebKeys(request: protos.google.container.v1.IGetJSONWebKeysRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJSONWebKeysRequest
options CallOptions
callback Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJSONWebKeys(request, callback)

getJSONWebKeys(request: protos.google.container.v1.IGetJSONWebKeysRequest, callback: Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJSONWebKeysRequest
callback Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getNodePool(request, options)

getNodePool(request?: protos.google.container.v1.IGetNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.INodePool,
        protos.google.container.v1.IGetNodePoolRequest | undefined,
        {} | undefined
    ]>;

Retrieves the requested node pool.

Parameters
NameDescription
request IGetNodePoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster, node pool id) of the node pool to
   *  get. Specified in the format
   *  `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callGetNodePool() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.getNodePool(request);
    console.log(response);
  }

  callGetNodePool();

getNodePool(request, options, callback)

getNodePool(request: protos.google.container.v1.IGetNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetNodePoolRequest
options CallOptions
callback Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getNodePool(request, callback)

getNodePool(request: protos.google.container.v1.IGetNodePoolRequest, callback: Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetNodePoolRequest
callback Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options)

getOperation(request?: protos.google.container.v1.IGetOperationRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IGetOperationRequest | undefined,
        {} | undefined
    ]>;

Gets the specified operation.

Parameters
NameDescription
request IGetOperationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, operation id) of the operation to get.
   *  Specified in the format `projects/* /locations/* /operations/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callGetOperation() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.getOperation(request);
    console.log(response);
  }

  callGetOperation();

getOperation(request, options, callback)

getOperation(request: protos.google.container.v1.IGetOperationRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetOperationRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, callback)

getOperation(request: protos.google.container.v1.IGetOperationRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetOperationRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getServerConfig(request, options)

getServerConfig(request?: protos.google.container.v1.IGetServerConfigRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IServerConfig,
        protos.google.container.v1.IGetServerConfigRequest | undefined,
        {} | undefined
    ]>;

Returns configuration info about the Google Kubernetes Engine service.

Parameters
NameDescription
request IGetServerConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project and location) of the server config to get,
   *  specified in the format `projects/* /locations/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callGetServerConfig() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.getServerConfig(request);
    console.log(response);
  }

  callGetServerConfig();

getServerConfig(request, options, callback)

getServerConfig(request: protos.google.container.v1.IGetServerConfigRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetServerConfigRequest
options CallOptions
callback Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServerConfig(request, callback)

getServerConfig(request: protos.google.container.v1.IGetServerConfigRequest, callback: Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetServerConfigRequest
callback Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listClusters(request, options)

listClusters(request?: protos.google.container.v1.IListClustersRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IListClustersResponse,
        protos.google.container.v1.IListClustersRequest | undefined,
        {} | undefined
    ]>;

Lists all clusters owned by a project in either the specified zone or all zones.

Parameters
NameDescription
request IListClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ListClustersResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent (project and location) where the clusters will be listed.
   *  Specified in the format `projects/* /locations/*`.
   *  Location "-" matches all zones and all regions.
   */
  // const parent = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callListClusters() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.listClusters(request);
    console.log(response);
  }

  callListClusters();

listClusters(request, options, callback)

listClusters(request: protos.google.container.v1.IListClustersRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListClustersRequest
options CallOptions
callback Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listClusters(request, callback)

listClusters(request: protos.google.container.v1.IListClustersRequest, callback: Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListClustersRequest
callback Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listNodePools(request, options)

listNodePools(request?: protos.google.container.v1.IListNodePoolsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IListNodePoolsResponse,
        protos.google.container.v1.IListNodePoolsRequest | undefined,
        {} | undefined
    ]>;

Lists the node pools for a cluster.

Parameters
NameDescription
request IListNodePoolsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ListNodePoolsResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent (project, location, cluster name) where the node pools will be
   *  listed. Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const parent = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callListNodePools() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.listNodePools(request);
    console.log(response);
  }

  callListNodePools();

listNodePools(request, options, callback)

listNodePools(request: protos.google.container.v1.IListNodePoolsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListNodePoolsRequest
options CallOptions
callback Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listNodePools(request, callback)

listNodePools(request: protos.google.container.v1.IListNodePoolsRequest, callback: Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListNodePoolsRequest
callback Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listOperations(request, options)

listOperations(request?: protos.google.container.v1.IListOperationsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IListOperationsResponse,
        protos.google.container.v1.IListOperationsRequest | undefined,
        {} | undefined
    ]>;

Lists all operations in a project in a specific zone or all zones.

Parameters
NameDescription
request IListOperationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ListOperationsResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent (project and location) where the operations will be listed.
   *  Specified in the format `projects/* /locations/*`.
   *  Location "-" matches all zones and all regions.
   */
  // const parent = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callListOperations() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.listOperations(request);
    console.log(response);
  }

  callListOperations();

listOperations(request, options, callback)

listOperations(request: protos.google.container.v1.IListOperationsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListOperationsRequest
options CallOptions
callback Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listOperations(request, callback)

listOperations(request: protos.google.container.v1.IListOperationsRequest, callback: Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListOperationsRequest
callback Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listUsableSubnetworks(request, options)

listUsableSubnetworks(request?: protos.google.container.v1.IListUsableSubnetworksRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IUsableSubnetwork[],
        protos.google.container.v1.IListUsableSubnetworksRequest | null,
        protos.google.container.v1.IListUsableSubnetworksResponse
    ]>;

Lists subnetworks that are usable for creating clusters in a project.

Parameters
NameDescription
request IListUsableSubnetworksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IUsableSubnetwork[], protos.google.container.v1.IListUsableSubnetworksRequest | null, protos.google.container.v1.IListUsableSubnetworksResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of UsableSubnetwork. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listUsableSubnetworksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listUsableSubnetworks(request, options, callback)

listUsableSubnetworks(request: protos.google.container.v1.IListUsableSubnetworksRequest, options: CallOptions, callback: PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>): void;
Parameters
NameDescription
request IListUsableSubnetworksRequest
options CallOptions
callback PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>
Returns
TypeDescription
void

listUsableSubnetworks(request, callback)

listUsableSubnetworks(request: protos.google.container.v1.IListUsableSubnetworksRequest, callback: PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>): void;
Parameters
NameDescription
request IListUsableSubnetworksRequest
callback PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>
Returns
TypeDescription
void

listUsableSubnetworksAsync(request, options)

listUsableSubnetworksAsync(request?: protos.google.container.v1.IListUsableSubnetworksRequest, options?: CallOptions): AsyncIterable<protos.google.container.v1.IUsableSubnetwork>;

Equivalent to listUsableSubnetworks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListUsableSubnetworksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.container.v1.IUsableSubnetwork>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing UsableSubnetwork. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The parent project where subnetworks are usable.
   *  Specified in the format `projects/*`.
   */
  // const parent = 'abc123'
  /**
   *  Filtering currently only supports equality on the networkProjectId and must
   *  be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
   *  is the project which owns the listed subnetworks. This defaults to the
   *  parent project ID.
   */
  // const filter = 'abc123'
  /**
   *  The max number of results per page that should be returned. If the number
   *  of available results is larger than `page_size`, a `next_page_token` is
   *  returned which can be used to get the next page of results in subsequent
   *  requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
   */
  // const pageSize = 1234
  /**
   *  Specifies a page token to use. Set this to the nextPageToken returned by
   *  previous list requests to get the next page of results.
   */
  // const pageToken = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callListUsableSubnetworks() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = containerClient.listUsableSubnetworksAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListUsableSubnetworks();

listUsableSubnetworksStream(request, options)

listUsableSubnetworksStream(request?: protos.google.container.v1.IListUsableSubnetworksRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListUsableSubnetworksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing UsableSubnetwork on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listUsableSubnetworksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

rollbackNodePoolUpgrade(request, options)

rollbackNodePoolUpgrade(request?: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IRollbackNodePoolUpgradeRequest | undefined,
        {} | undefined
    ]>;

Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.

Parameters
NameDescription
request IRollbackNodePoolUpgradeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster, node pool id) of the node poll to
   *  rollback upgrade.
   *  Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'
  /**
   *  Option for rollback to ignore the PodDisruptionBudget.
   *  Default value is false.
   */
  // const respectPdb = true

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callRollbackNodePoolUpgrade() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.rollbackNodePoolUpgrade(request);
    console.log(response);
  }

  callRollbackNodePoolUpgrade();

rollbackNodePoolUpgrade(request, options, callback)

rollbackNodePoolUpgrade(request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRollbackNodePoolUpgradeRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

rollbackNodePoolUpgrade(request, callback)

rollbackNodePoolUpgrade(request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRollbackNodePoolUpgradeRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setAddonsConfig(request, options)

setAddonsConfig(request?: protos.google.container.v1.ISetAddonsConfigRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetAddonsConfigRequest | undefined,
        {} | undefined
    ]>;

Sets the addons for a specific cluster.

Parameters
NameDescription
request ISetAddonsConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The desired configurations for the various addons available to
   *  run in the cluster.
   */
  // const addonsConfig = {}
  /**
   *  The name (project, location, cluster) of the cluster to set addons.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetAddonsConfig() {
    // Construct request
    const request = {
      addonsConfig,
    };

    // Run request
    const response = await containerClient.setAddonsConfig(request);
    console.log(response);
  }

  callSetAddonsConfig();

setAddonsConfig(request, options, callback)

setAddonsConfig(request: protos.google.container.v1.ISetAddonsConfigRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetAddonsConfigRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setAddonsConfig(request, callback)

setAddonsConfig(request: protos.google.container.v1.ISetAddonsConfigRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetAddonsConfigRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLabels(request, options)

setLabels(request?: protos.google.container.v1.ISetLabelsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetLabelsRequest | undefined,
        {} | undefined
    ]>;

Sets labels on a cluster.

Parameters
NameDescription
request ISetLabelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The labels to set for that cluster.
   */
  // const resourceLabels = [1,2,3,4]
  /**
   *  Required. The fingerprint of the previous set of labels for this resource,
   *  used to detect conflicts. The fingerprint is initially generated by
   *  Kubernetes Engine and changes after every request to modify or update
   *  labels. You must always provide an up-to-date fingerprint hash when
   *  updating or changing labels. Make a `get()` request to the
   *  resource to get the latest fingerprint.
   */
  // const labelFingerprint = 'abc123'
  /**
   *  The name (project, location, cluster name) of the cluster to set labels.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetLabels() {
    // Construct request
    const request = {
      resourceLabels,
      labelFingerprint,
    };

    // Run request
    const response = await containerClient.setLabels(request);
    console.log(response);
  }

  callSetLabels();

setLabels(request, options, callback)

setLabels(request: protos.google.container.v1.ISetLabelsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLabelsRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLabels(request, callback)

setLabels(request: protos.google.container.v1.ISetLabelsRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLabelsRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLegacyAbac(request, options)

setLegacyAbac(request?: protos.google.container.v1.ISetLegacyAbacRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetLegacyAbacRequest | undefined,
        {} | undefined
    ]>;

Enables or disables the ABAC authorization mechanism on a cluster.

Parameters
NameDescription
request ISetLegacyAbacRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Whether ABAC authorization will be enabled in the cluster.
   */
  // const enabled = true
  /**
   *  The name (project, location, cluster name) of the cluster to set legacy
   *  abac. Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetLegacyAbac() {
    // Construct request
    const request = {
      enabled,
    };

    // Run request
    const response = await containerClient.setLegacyAbac(request);
    console.log(response);
  }

  callSetLegacyAbac();

setLegacyAbac(request, options, callback)

setLegacyAbac(request: protos.google.container.v1.ISetLegacyAbacRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLegacyAbacRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLegacyAbac(request, callback)

setLegacyAbac(request: protos.google.container.v1.ISetLegacyAbacRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLegacyAbacRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLocations(request, options)

setLocations(request?: protos.google.container.v1.ISetLocationsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetLocationsRequest | undefined,
        {} | undefined
    ]>;

Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.

Parameters
NameDescription
request ISetLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The desired list of Google Compute Engine
   *  zones (https://cloud.google.com/compute/docs/zones#available) in which the
   *  cluster's nodes should be located. Changing the locations a cluster is in
   *  will result in nodes being either created or removed from the cluster,
   *  depending on whether locations are being added or removed.
   *  This list must always include the cluster's primary zone.
   */
  // const locations = ['abc','def']
  /**
   *  The name (project, location, cluster) of the cluster to set locations.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetLocations() {
    // Construct request
    const request = {
      locations,
    };

    // Run request
    const response = await containerClient.setLocations(request);
    console.log(response);
  }

  callSetLocations();

setLocations(request, options, callback)

setLocations(request: protos.google.container.v1.ISetLocationsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLocationsRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLocations(request, callback)

setLocations(request: protos.google.container.v1.ISetLocationsRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLocationsRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLoggingService(request, options)

setLoggingService(request?: protos.google.container.v1.ISetLoggingServiceRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetLoggingServiceRequest | undefined,
        {} | undefined
    ]>;

Sets the logging service for a specific cluster.

Parameters
NameDescription
request ISetLoggingServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The logging service the cluster should use to write logs.
   *  Currently available options:
   *  * `logging.googleapis.com/kubernetes` - The Cloud Logging
   *  service with a Kubernetes-native resource model
   *  * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
   *    available as of GKE 1.15).
   *  * `none` - no logs will be exported from the cluster.
   *  If left as an empty string,`logging.googleapis.com/kubernetes` will be
   *  used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
   */
  // const loggingService = 'abc123'
  /**
   *  The name (project, location, cluster) of the cluster to set logging.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetLoggingService() {
    // Construct request
    const request = {
      loggingService,
    };

    // Run request
    const response = await containerClient.setLoggingService(request);
    console.log(response);
  }

  callSetLoggingService();

setLoggingService(request, options, callback)

setLoggingService(request: protos.google.container.v1.ISetLoggingServiceRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLoggingServiceRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setLoggingService(request, callback)

setLoggingService(request: protos.google.container.v1.ISetLoggingServiceRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetLoggingServiceRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setMaintenancePolicy(request, options)

setMaintenancePolicy(request?: protos.google.container.v1.ISetMaintenancePolicyRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetMaintenancePolicyRequest | undefined,
        {} | undefined
    ]>;

Sets the maintenance policy for a cluster.

Parameters
NameDescription
request ISetMaintenancePolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The Google Developers Console project ID or project
   *  number (https://cloud.google.com/resource-manager/docs/creating-managing-projects).
   */
  // const projectId = 'abc123'
  /**
   *  Required. The name of the Google Compute Engine
   *  zone (https://cloud.google.com/compute/docs/zones#available) in which the
   *  cluster resides.
   */
  // const zone = 'abc123'
  /**
   *  Required. The name of the cluster to update.
   */
  // const clusterId = 'abc123'
  /**
   *  Required. The maintenance policy to be set for the cluster. An empty field
   *  clears the existing maintenance policy.
   */
  // const maintenancePolicy = {}
  /**
   *  The name (project, location, cluster name) of the cluster to set
   *  maintenance policy.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetMaintenancePolicy() {
    // Construct request
    const request = {
      projectId,
      zone,
      clusterId,
      maintenancePolicy,
    };

    // Run request
    const response = await containerClient.setMaintenancePolicy(request);
    console.log(response);
  }

  callSetMaintenancePolicy();

setMaintenancePolicy(request, options, callback)

setMaintenancePolicy(request: protos.google.container.v1.ISetMaintenancePolicyRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetMaintenancePolicyRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setMaintenancePolicy(request, callback)

setMaintenancePolicy(request: protos.google.container.v1.ISetMaintenancePolicyRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetMaintenancePolicyRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setMasterAuth(request, options)

setMasterAuth(request?: protos.google.container.v1.ISetMasterAuthRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetMasterAuthRequest | undefined,
        {} | undefined
    ]>;

Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.

Parameters
NameDescription
request ISetMasterAuthRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The exact form of action to be taken on the master auth.
   */
  // const action = {}
  /**
   *  Required. A description of the update.
   */
  // const update = {}
  /**
   *  The name (project, location, cluster) of the cluster to set auth.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetMasterAuth() {
    // Construct request
    const request = {
      action,
      update,
    };

    // Run request
    const response = await containerClient.setMasterAuth(request);
    console.log(response);
  }

  callSetMasterAuth();

setMasterAuth(request, options, callback)

setMasterAuth(request: protos.google.container.v1.ISetMasterAuthRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetMasterAuthRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setMasterAuth(request, callback)

setMasterAuth(request: protos.google.container.v1.ISetMasterAuthRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetMasterAuthRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setMonitoringService(request, options)

setMonitoringService(request?: protos.google.container.v1.ISetMonitoringServiceRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetMonitoringServiceRequest | undefined,
        {} | undefined
    ]>;

Sets the monitoring service for a specific cluster.

Parameters
NameDescription
request ISetMonitoringServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The monitoring service the cluster should use to write metrics.
   *  Currently available options:
   *  * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
   *  service with a Kubernetes-native resource model
   *  * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
   *    longer available as of GKE 1.15).
   *  * `none` - No metrics will be exported from the cluster.
   *  If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
   *  used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
   */
  // const monitoringService = 'abc123'
  /**
   *  The name (project, location, cluster) of the cluster to set monitoring.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetMonitoringService() {
    // Construct request
    const request = {
      monitoringService,
    };

    // Run request
    const response = await containerClient.setMonitoringService(request);
    console.log(response);
  }

  callSetMonitoringService();

setMonitoringService(request, options, callback)

setMonitoringService(request: protos.google.container.v1.ISetMonitoringServiceRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetMonitoringServiceRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setMonitoringService(request, callback)

setMonitoringService(request: protos.google.container.v1.ISetMonitoringServiceRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetMonitoringServiceRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNetworkPolicy(request, options)

setNetworkPolicy(request?: protos.google.container.v1.ISetNetworkPolicyRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetNetworkPolicyRequest | undefined,
        {} | undefined
    ]>;

Enables or disables Network Policy for a cluster.

Parameters
NameDescription
request ISetNetworkPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Configuration options for the NetworkPolicy feature.
   */
  // const networkPolicy = {}
  /**
   *  The name (project, location, cluster name) of the cluster to set networking
   *  policy. Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetNetworkPolicy() {
    // Construct request
    const request = {
      networkPolicy,
    };

    // Run request
    const response = await containerClient.setNetworkPolicy(request);
    console.log(response);
  }

  callSetNetworkPolicy();

setNetworkPolicy(request, options, callback)

setNetworkPolicy(request: protos.google.container.v1.ISetNetworkPolicyRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNetworkPolicyRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNetworkPolicy(request, callback)

setNetworkPolicy(request: protos.google.container.v1.ISetNetworkPolicyRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNetworkPolicyRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNodePoolAutoscaling(request, options)

setNodePoolAutoscaling(request?: protos.google.container.v1.ISetNodePoolAutoscalingRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetNodePoolAutoscalingRequest | undefined,
        {} | undefined
    ]>;

Sets the autoscaling settings for the specified node pool.

Parameters
NameDescription
request ISetNodePoolAutoscalingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Autoscaling configuration for the node pool.
   */
  // const autoscaling = {}
  /**
   *  The name (project, location, cluster, node pool) of the node pool to set
   *  autoscaler settings. Specified in the format
   *  `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetNodePoolAutoscaling() {
    // Construct request
    const request = {
      autoscaling,
    };

    // Run request
    const response = await containerClient.setNodePoolAutoscaling(request);
    console.log(response);
  }

  callSetNodePoolAutoscaling();

setNodePoolAutoscaling(request, options, callback)

setNodePoolAutoscaling(request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNodePoolAutoscalingRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNodePoolAutoscaling(request, callback)

setNodePoolAutoscaling(request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNodePoolAutoscalingRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNodePoolManagement(request, options)

setNodePoolManagement(request?: protos.google.container.v1.ISetNodePoolManagementRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetNodePoolManagementRequest | undefined,
        {} | undefined
    ]>;

Sets the NodeManagement options for a node pool.

Parameters
NameDescription
request ISetNodePoolManagementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. NodeManagement configuration for the node pool.
   */
  // const management = {}
  /**
   *  The name (project, location, cluster, node pool id) of the node pool to set
   *  management properties. Specified in the format
   *  `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetNodePoolManagement() {
    // Construct request
    const request = {
      management,
    };

    // Run request
    const response = await containerClient.setNodePoolManagement(request);
    console.log(response);
  }

  callSetNodePoolManagement();

setNodePoolManagement(request, options, callback)

setNodePoolManagement(request: protos.google.container.v1.ISetNodePoolManagementRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNodePoolManagementRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNodePoolManagement(request, callback)

setNodePoolManagement(request: protos.google.container.v1.ISetNodePoolManagementRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNodePoolManagementRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNodePoolSize(request, options)

setNodePoolSize(request?: protos.google.container.v1.ISetNodePoolSizeRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.ISetNodePoolSizeRequest | undefined,
        {} | undefined
    ]>;

Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying .

Parameters
NameDescription
request ISetNodePoolSizeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The desired node count for the pool.
   */
  // const nodeCount = 1234
  /**
   *  The name (project, location, cluster, node pool id) of the node pool to set
   *  size.
   *  Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callSetNodePoolSize() {
    // Construct request
    const request = {
      nodeCount,
    };

    // Run request
    const response = await containerClient.setNodePoolSize(request);
    console.log(response);
  }

  callSetNodePoolSize();

setNodePoolSize(request, options, callback)

setNodePoolSize(request: protos.google.container.v1.ISetNodePoolSizeRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNodePoolSizeRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setNodePoolSize(request, callback)

setNodePoolSize(request: protos.google.container.v1.ISetNodePoolSizeRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISetNodePoolSizeRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startIPRotation(request, options)

startIPRotation(request?: protos.google.container.v1.IStartIPRotationRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IStartIPRotationRequest | undefined,
        {} | undefined
    ]>;

Starts master IP rotation.

Parameters
NameDescription
request IStartIPRotationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name (project, location, cluster name) of the cluster to start IP
   *  rotation. Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'
  /**
   *  Whether to rotate credentials during IP rotation.
   */
  // const rotateCredentials = true

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callStartIPRotation() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await containerClient.startIPRotation(request);
    console.log(response);
  }

  callStartIPRotation();

startIPRotation(request, options, callback)

startIPRotation(request: protos.google.container.v1.IStartIPRotationRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IStartIPRotationRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startIPRotation(request, callback)

startIPRotation(request: protos.google.container.v1.IStartIPRotationRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IStartIPRotationRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCluster(request, options)

updateCluster(request?: protos.google.container.v1.IUpdateClusterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IUpdateClusterRequest | undefined,
        {} | undefined
    ]>;

Updates the settings of a specific cluster.

Parameters
NameDescription
request IUpdateClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A description of the update.
   */
  // const update = {}
  /**
   *  The name (project, location, cluster) of the cluster to update.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callUpdateCluster() {
    // Construct request
    const request = {
      update,
    };

    // Run request
    const response = await containerClient.updateCluster(request);
    console.log(response);
  }

  callUpdateCluster();

updateCluster(request, options, callback)

updateCluster(request: protos.google.container.v1.IUpdateClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateClusterRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCluster(request, callback)

updateCluster(request: protos.google.container.v1.IUpdateClusterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateClusterRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMaster(request, options)

updateMaster(request?: protos.google.container.v1.IUpdateMasterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IUpdateMasterRequest | undefined,
        {} | undefined
    ]>;

Updates the master for a specific cluster.

Parameters
NameDescription
request IUpdateMasterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The Kubernetes version to change the master to.
   *  Users may specify either explicit versions offered by Kubernetes Engine or
   *  version aliases, which have the following behavior:
   *  - "latest": picks the highest valid Kubernetes version
   *  - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
   *  - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
   *  - "1.X.Y-gke.N": picks an explicit Kubernetes version
   *  - "-": picks the default Kubernetes version
   */
  // const masterVersion = 'abc123'
  /**
   *  The name (project, location, cluster) of the cluster to update.
   *  Specified in the format `projects/* /locations/* /clusters/*`.
   */
  // const name = 'abc123'

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callUpdateMaster() {
    // Construct request
    const request = {
      masterVersion,
    };

    // Run request
    const response = await containerClient.updateMaster(request);
    console.log(response);
  }

  callUpdateMaster();

updateMaster(request, options, callback)

updateMaster(request: protos.google.container.v1.IUpdateMasterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateMasterRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMaster(request, callback)

updateMaster(request: protos.google.container.v1.IUpdateMasterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateMasterRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateNodePool(request, options)

updateNodePool(request?: protos.google.container.v1.IUpdateNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1.IOperation,
        protos.google.container.v1.IUpdateNodePoolRequest | undefined,
        {} | undefined
    ]>;

Updates the version and/or image type for the specified node pool.

Parameters
NameDescription
request IUpdateNodePoolRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The Kubernetes version to change the nodes to (typically an
   *  upgrade).
   *  Users may specify either explicit versions offered by Kubernetes Engine or
   *  version aliases, which have the following behavior:
   *  - "latest": picks the highest valid Kubernetes version
   *  - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
   *  - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
   *  - "1.X.Y-gke.N": picks an explicit Kubernetes version
   *  - "-": picks the Kubernetes master version
   */
  // const nodeVersion = 'abc123'
  /**
   *  Required. The desired image type for the node pool. Please see
   *  https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for
   *  available image types.
   */
  // const imageType = 'abc123'
  /**
   *  The name (project, location, cluster, node pool) of the node pool to
   *  update. Specified in the format
   *  `projects/* /locations/* /clusters/* /nodePools/*`.
   */
  // const name = 'abc123'
  /**
   *  The desired list of Google Compute Engine
   *  zones (https://cloud.google.com/compute/docs/zones#available) in which the
   *  node pool's nodes should be located. Changing the locations for a node pool
   *  will result in nodes being either created or removed from the node pool,
   *  depending on whether locations are being added or removed.
   */
  // const locations = ['abc','def']
  /**
   *  The desired workload metadata config for the node pool.
   */
  // const workloadMetadataConfig = {}
  /**
   *  Upgrade settings control disruption and speed of the upgrade.
   */
  // const upgradeSettings = {}
  /**
   *  The desired network tags to be applied to all nodes in the node pool.
   *  If this field is not present, the tags will not be changed. Otherwise,
   *  the existing network tags will be *replaced* with the provided tags.
   */
  // const tags = {}
  /**
   *  The desired node taints to be applied to all nodes in the node pool.
   *  If this field is not present, the taints will not be changed. Otherwise,
   *  the existing node taints will be *replaced* with the provided taints.
   */
  // const taints = {}
  /**
   *  The desired node labels to be applied to all nodes in the node pool.
   *  If this field is not present, the labels will not be changed. Otherwise,
   *  the existing node labels will be *replaced* with the provided labels.
   */
  // const labels = {}
  /**
   *  Parameters that can be configured on Linux nodes.
   */
  // const linuxNodeConfig = {}
  /**
   *  Node kubelet configs.
   */
  // const kubeletConfig = {}
  /**
   *  Node network config.
   */
  // const nodeNetworkConfig = {}
  /**
   *  GCFS config.
   */
  // const gcfsConfig = {}
  /**
   *  Confidential nodes config.
   *  All the nodes in the node pool will be Confidential VM once enabled.
   */
  // const confidentialNodes = {}
  /**
   *  Enable or disable gvnic on the node pool.
   */
  // const gvnic = {}
  /**
   *  The current etag of the node pool.
   *  If an etag is provided and does not match the current etag of the node
   *  pool, update will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'
  /**
   *  Enable or disable NCCL fast socket for the node pool.
   */
  // const fastSocket = {}
  /**
   *  Logging configuration.
   */
  // const loggingConfig = {}
  /**
   *  The resource labels for the node pool to use to annotate any related
   *  Google Compute Engine resources.
   */
  // const resourceLabels = {}
  /**
   *  Parameters that can be configured on Windows nodes.
   */
  // const windowsNodeConfig = {}
  /**
   *  Optional. The desired Google Compute Engine machine
   *  type (https://cloud.google.com/compute/docs/machine-types) for nodes in the
   *  node pool. Initiates an upgrade operation that migrates the nodes in the
   *  node pool to the specified machine type.
   */
  // const machineType = 'abc123'
  /**
   *  Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or
   *  'pd-balanced') for nodes in the node pool.
   *  Initiates an upgrade operation that migrates the nodes in the
   *  node pool to the specified disk type.
   */
  // const diskType = 'abc123'
  /**
   *  Optional. The desired disk size for nodes in the node pool specified in GB.
   *  The smallest allowed disk size is 10GB.
   *  Initiates an upgrade operation that migrates the nodes in the
   *  node pool to the specified disk size.
   */
  // const diskSizeGb = 1234
  /**
   *  Desired resource manager tag keys and values to be attached to the nodes
   *  for managing Compute Engine firewalls using Network Firewall Policies.
   *  Existing tags will be replaced with new values.
   */
  // const resourceManagerTags = {}
  /**
   *  Specifies the configuration of queued provisioning.
   */
  // const queuedProvisioning = {}

  // Imports the Container library
  const {ClusterManagerClient} = require('@google-cloud/container').v1;

  // Instantiates a client
  const containerClient = new ClusterManagerClient();

  async function callUpdateNodePool() {
    // Construct request
    const request = {
      nodeVersion,
      imageType,
    };

    // Run request
    const response = await containerClient.updateNodePool(request);
    console.log(response);
  }

  callUpdateNodePool();

updateNodePool(request, options, callback)

updateNodePool(request: protos.google.container.v1.IUpdateNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateNodePoolRequest
options CallOptions
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateNodePool(request, callback)

updateNodePool(request: protos.google.container.v1.IUpdateNodePoolRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateNodePoolRequest
callback Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void