Class v1beta1.ClusterManagerClient (5.6.0)

Google Kubernetes Engine Cluster Manager v1beta1 v1beta1

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

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

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.

warn

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

Methods

cancelOperation(request, options)

cancelOperation(request?: protos.google.container.v1beta1.ICancelOperationRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.container.v1beta1.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.v1beta1.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').v1beta1;

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

  async function callCancelOperation() {
    // Construct request
    const request = {
      projectId,
      zone,
      operationId,
    };

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

  callCancelOperation();

cancelOperation(request, options, callback)

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

cancelOperation(request, callback)

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

checkAutopilotCompatibility(request, options)

checkAutopilotCompatibility(request?: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse,
        (protos.google.container.v1beta1.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.v1beta1.ICheckAutopilotCompatibilityResponse, (protos.google.container.v1beta1.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').v1beta1;

  // 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.v1beta1.ICheckAutopilotCompatibilityRequest, options: CallOptions, callback: Callback<protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICheckAutopilotCompatibilityRequest
options CallOptions
callback Callback<protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkAutopilotCompatibility(request, callback)

checkAutopilotCompatibility(request: protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest, callback: Callback<protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1beta1.ICheckAutopilotCompatibilityRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICheckAutopilotCompatibilityRequest
callback Callback<protos.google.container.v1beta1.ICheckAutopilotCompatibilityResponse, protos.google.container.v1beta1.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.v1beta1.ICompleteIPRotationRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callCompleteIPRotation();

completeIPRotation(request, options, callback)

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

completeIPRotation(request, callback)

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

completeNodePoolUpgrade(request, options)

completeNodePoolUpgrade(request?: protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.container.v1beta1.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.v1beta1.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').v1beta1;

  // 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.v1beta1.ICompleteNodePoolUpgradeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICompleteNodePoolUpgradeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.container.v1beta1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

completeNodePoolUpgrade(request, callback)

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

createCluster(request, options)

createCluster(request?: protos.google.container.v1beta1.ICreateClusterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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/v1beta1/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').v1beta1;

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

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

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

  callCreateCluster();

createCluster(request, options, callback)

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

createCluster(request, callback)

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

createNodePool(request, options)

createNodePool(request?: protos.google.container.v1beta1.ICreateNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callCreateNodePool();

createNodePool(request, options, callback)

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

createNodePool(request, callback)

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

deleteCluster(request, options)

deleteCluster(request?: protos.google.container.v1beta1.IDeleteClusterRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callDeleteCluster();

deleteCluster(request, options, callback)

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

deleteCluster(request, callback)

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

deleteNodePool(request, options)

deleteNodePool(request?: protos.google.container.v1beta1.IDeleteNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callDeleteNodePool();

deleteNodePool(request, options, callback)

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

deleteNodePool(request, callback)

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

getCluster(request, options)

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

Gets the details for 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.v1beta1.ICluster, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callGetCluster();

getCluster(request, options, callback)

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

getCluster(request, callback)

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

getJSONWebKeys(request, options)

getJSONWebKeys(request?: protos.google.container.v1beta1.IGetJSONWebKeysRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IGetJSONWebKeysResponse,
        protos.google.container.v1beta1.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.v1beta1.IGetJSONWebKeysResponse, protos.google.container.v1beta1.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').v1beta1;

  // 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.v1beta1.IGetJSONWebKeysRequest, options: CallOptions, callback: Callback<protos.google.container.v1beta1.IGetJSONWebKeysResponse, protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJSONWebKeysRequest
options CallOptions
callback Callback<protos.google.container.v1beta1.IGetJSONWebKeysResponse, protos.google.container.v1beta1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJSONWebKeys(request, callback)

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

getNodePool(request, options)

getNodePool(request?: protos.google.container.v1beta1.IGetNodePoolRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.INodePool,
        protos.google.container.v1beta1.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.v1beta1.INodePool, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callGetNodePool();

getNodePool(request, options, callback)

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

getNodePool(request, callback)

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

getOperation(request, options)

getOperation(request?: protos.google.container.v1beta1.IGetOperationRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

  async function callGetOperation() {
    // Construct request
    const request = {
      projectId,
      zone,
      operationId,
    };

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

  callGetOperation();

getOperation(request, options, callback)

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

getOperation(request, callback)

getOperation(request: protos.google.container.v1beta1.IGetOperationRequest, callback: Callback<protos.google.container.v1beta1.IOperation, protos.google.container.v1beta1.IGetOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetOperationRequest
callback Callback<protos.google.container.v1beta1.IOperation, protos.google.container.v1beta1.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.v1beta1.IGetServerConfigRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IServerConfig,
        protos.google.container.v1beta1.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.v1beta1.IServerConfig, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callGetServerConfig();

getServerConfig(request, options, callback)

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

getServerConfig(request, callback)

getServerConfig(request: protos.google.container.v1beta1.IGetServerConfigRequest, callback: Callback<protos.google.container.v1beta1.IServerConfig, protos.google.container.v1beta1.IGetServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetServerConfigRequest
callback Callback<protos.google.container.v1beta1.IServerConfig, protos.google.container.v1beta1.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.v1beta1.IListClustersRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IListClustersResponse,
        protos.google.container.v1beta1.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.v1beta1.IListClustersResponse, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callListClusters();

listClusters(request, options, callback)

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

listClusters(request, callback)

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

listLocations(request, options)

listLocations(request?: protos.google.container.v1beta1.IListLocationsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IListLocationsResponse,
        protos.google.container.v1beta1.IListLocationsRequest | undefined,
        {} | undefined
    ]>;

Fetches locations that offer Google Kubernetes Engine.

Parameters
NameDescription
request IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.container.v1beta1.IListLocationsResponse, protos.google.container.v1beta1.IListLocationsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ListLocationsResponse. 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. Contains the name of the resource requested.
   *  Specified in the format `projects/*`.
   */
  // const parent = 'abc123'

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

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

  async function callListLocations() {
    // Construct request
    const request = {
      parent,
    };

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

  callListLocations();

listLocations(request, options, callback)

listLocations(request: protos.google.container.v1beta1.IListLocationsRequest, options: CallOptions, callback: Callback<protos.google.container.v1beta1.IListLocationsResponse, protos.google.container.v1beta1.IListLocationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListLocationsRequest
options CallOptions
callback Callback<protos.google.container.v1beta1.IListLocationsResponse, protos.google.container.v1beta1.IListLocationsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listLocations(request, callback)

listLocations(request: protos.google.container.v1beta1.IListLocationsRequest, callback: Callback<protos.google.container.v1beta1.IListLocationsResponse, protos.google.container.v1beta1.IListLocationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IListLocationsRequest
callback Callback<protos.google.container.v1beta1.IListLocationsResponse, protos.google.container.v1beta1.IListLocationsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listNodePools(request, options)

listNodePools(request?: protos.google.container.v1beta1.IListNodePoolsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IListNodePoolsResponse,
        protos.google.container.v1beta1.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.v1beta1.IListNodePoolsResponse, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callListNodePools();

listNodePools(request, options, callback)

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

listNodePools(request, callback)

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

listOperations(request, options)

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

Lists all operations in a project in the specified 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.v1beta1.IListOperationsResponse, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callListOperations();

listOperations(request, options, callback)

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

listOperations(request, callback)

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

listUsableSubnetworks(request, options)

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

Lists subnetworks that can be used 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.v1beta1.IUsableSubnetwork[], protos.google.container.v1beta1.IListUsableSubnetworksRequest | null, protos.google.container.v1beta1.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.v1beta1.IListUsableSubnetworksRequest, options: CallOptions, callback: PaginationCallback<protos.google.container.v1beta1.IListUsableSubnetworksRequest, protos.google.container.v1beta1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1beta1.IUsableSubnetwork>): void;
Parameters
NameDescription
request IListUsableSubnetworksRequest
options CallOptions
callback PaginationCallback<protos.google.container.v1beta1.IListUsableSubnetworksRequest, protos.google.container.v1beta1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1beta1.IUsableSubnetwork>
Returns
TypeDescription
void

listUsableSubnetworks(request, callback)

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

listUsableSubnetworksAsync(request, options)

listUsableSubnetworksAsync(request?: protos.google.container.v1beta1.IListUsableSubnetworksRequest, options?: CallOptions): AsyncIterable<protos.google.container.v1beta1.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.v1beta1.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.
   */
  /**
   *  Required. 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').v1beta1;

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

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

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

  callListUsableSubnetworks();

listUsableSubnetworksStream(request, options)

listUsableSubnetworksStream(request?: protos.google.container.v1beta1.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.v1beta1.IRollbackNodePoolUpgradeRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        (protos.google.container.v1beta1.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.v1beta1.IOperation, (protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callRollbackNodePoolUpgrade();

rollbackNodePoolUpgrade(request, options, callback)

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

rollbackNodePoolUpgrade(request, callback)

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

setAddonsConfig(request, options)

setAddonsConfig(request?: protos.google.container.v1beta1.ISetAddonsConfigRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callSetAddonsConfig();

setAddonsConfig(request, options, callback)

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

setAddonsConfig(request, callback)

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

setLabels(request, options)

setLabels(request?: protos.google.container.v1beta1.ISetLabelsRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callSetLabels();

setLabels(request, options, callback)

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

setLabels(request, callback)

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

setLegacyAbac(request, options)

setLegacyAbac(request?: protos.google.container.v1beta1.ISetLegacyAbacRequest, options?: CallOptions): Promise<[
        protos.google.container.v1beta1.IOperation,
        protos.google.container.v1beta1.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.v1beta1.IOperation, protos.google.container.v1beta1.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').v1beta1;

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

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

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

  callSetLegacyAbac();

setLegacyAbac(request, options, callback)

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

setLegacyAbac(request, callback)

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