ClusterManagerClient

ClusterManagerClient

Google Kubernetes Engine Cluster Manager v1

Constructor

new ClusterManagerClient(optionsopt, fallback)

Construct an instance of ClusterManagerClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

client configuration override. TODO(@alexander-fenster): link to gax documentation.

fallback boolean

Use HTTP fallback mode. In fallback mode, a special browser-compatible transport implementation is used instead of gRPC transport. In browser context (if the window object is defined) the fallback mode is enabled automatically; set options.fallback to false if you need to override this behavior.

Members

apiEndpoint

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

port

The port for this API service.

scopes

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

servicePath

The DNS address for this API service.

Methods

cancelOperation(request, optionsopt) → {Promise}

Cancels the specified operation.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the operation resides. This field has been deprecated and replaced by the name field.

operationId string

Deprecated. The server-assigned name of the operation. This field has been deprecated and replaced by the name field.

name string

The name (project, location, operation id) of the operation to cancel. Specified in the format projects/* /locations/* /operations/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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
const [response] = await client.cancelOperation(request);

close() → {Promise}

Terminate the gRPC channel and close the client.

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

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

completeIPRotation(request, optionsopt) → {Promise}

Completes master IP rotation.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster id) of the cluster to complete IP rotation. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.completeIPRotation(request);

createCluster(request, optionsopt) → {Promise}

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.

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.

cluster google.container.v1.Cluster

Required. A cluster resource

parent string

The parent (project and location) where the cluster will be created. Specified in the format projects/* /locations/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.createCluster(request);

createNodePool(request, optionsopt) → {Promise}

Creates a node pool for a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.

nodePool google.container.v1.NodePool

Required. The node pool to create.

parent string

The parent (project, location, cluster id) where the node pool will be created. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.createNodePool(request);

deleteCluster(request, optionsopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster) of the cluster to delete. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteCluster(request);

deleteNodePool(request, optionsopt) → {Promise}

Deletes a node pool from a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteNodePool(request);

getCluster(request, optionsopt) → {Promise}

Gets the details of a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster) of the cluster to retrieve. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Cluster. Please see the documentation for more details and examples.
Example
const [response] = await client.getCluster(request);

getNodePool(request, optionsopt) → {Promise}

Retrieves the requested node pool.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing NodePool. Please see the documentation for more details and examples.
Example
const [response] = await client.getNodePool(request);

getOperation(request, optionsopt) → {Promise}

Gets the specified operation.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

operationId string

Deprecated. The server-assigned name of the operation. This field has been deprecated and replaced by the name field.

name string

The name (project, location, operation id) of the operation to get. Specified in the format projects/* /locations/* /operations/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.getOperation(request);

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

getServerConfig(request, optionsopt) → {Promise}

Returns configuration info about the Google Kubernetes Engine service.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone to return operations for. This field has been deprecated and replaced by the name field.

name string

The name (project and location) of the server config to get, specified in the format projects/* /locations/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing ServerConfig. Please see the documentation for more details and examples.
Example
const [response] = await client.getServerConfig(request);

initialize() → {Promise}

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:
Type Description
Promise

A promise that resolves to an authenticated service stub.

listClusters(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field.

parent string

The parent (project and location) where the clusters will be listed. Specified in the format projects/* /locations/*. Location "-" matches all zones and all regions.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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
const [response] = await client.listClusters(request);

listNodePools(request, optionsopt) → {Promise}

Lists the node pools for a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.

parent string

The parent (project, location, cluster id) where the node pools will be listed. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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
const [response] = await client.listNodePools(request);

listOperations(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

zone string

Deprecated. The name of the Google Compute Engine zone to return operations for, or - for all zones. This field has been deprecated and replaced by the parent field.

parent string

The parent (project and location) where the operations will be listed. Specified in the format projects/* /locations/*. Location "-" matches all zones and all regions.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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
const [response] = await client.listOperations(request);

listUsableSubnetworks(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent project where subnetworks are usable. Specified in the format projects/*.

filter string

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.

pageSize number

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)

pageToken string

Specifies a page token to use. Set this to the nextPageToken returned by previous list requests to get the next page of results.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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.

listUsableSubnetworksAsync(request, optionsopt) → {Object}

Equivalent to listUsableSubnetworks, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent project where subnetworks are usable. Specified in the format projects/*.

filter string

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.

pageSize number

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)

pageToken string

Specifies a page token to use. Set this to the nextPageToken returned by previous list requests to get the next page of results.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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
const iterable = client.listUsableSubnetworksAsync(request);
for await (const response of iterable) {
  // process response
}

listUsableSubnetworksStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

The parent project where subnetworks are usable. Specified in the format projects/*.

filter string

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.

pageSize number

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)

pageToken string

Specifies a page token to use. Set this to the nextPageToken returned by previous list requests to get the next page of results.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.rollbackNodePoolUpgrade(request);

setAddonsConfig(request, optionsopt) → {Promise}

Sets the addons for a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

addonsConfig google.container.v1.AddonsConfig

Required. The desired configurations for the various addons available to run in the cluster.

name string

The name (project, location, cluster) of the cluster to set addons. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setAddonsConfig(request);

setLabels(request, optionsopt) → {Promise}

Sets labels on a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

resourceLabels Array.<number>

Required. The labels to set for that cluster.

labelFingerprint string

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.

name string

The name (project, location, cluster id) of the cluster to set labels. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setLabels(request);

setLegacyAbac(request, optionsopt) → {Promise}

Enables or disables the ABAC authorization mechanism on a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

enabled boolean

Required. Whether ABAC authorization will be enabled in the cluster.

name string

The name (project, location, cluster id) of the cluster to set legacy abac. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setLegacyAbac(request);

setLocations(request, optionsopt) → {Promise}

Sets the locations for a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

locations Array.<string>

Required. The desired list of Google Compute Engine zones 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.

name string

The name (project, location, cluster) of the cluster to set locations. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setLocations(request);

setLoggingService(request, optionsopt) → {Promise}

Sets the logging service for a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

loggingService string

Required. The logging service the cluster should use to write metrics. Currently available options:

  • "logging.googleapis.com" - the Google Cloud Logging service
  • "none" - no metrics will be exported from the cluster
name string

The name (project, location, cluster) of the cluster to set logging. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setLoggingService(request);

setMaintenancePolicy(request, optionsopt) → {Promise}

Sets the maintenance policy for a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Required. The Google Developers Console project ID or project number.

zone string

Required. The name of the Google Compute Engine zone in which the cluster resides.

clusterId string

Required. The name of the cluster to update.

maintenancePolicy google.container.v1.MaintenancePolicy

Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.

name string

The name (project, location, cluster id) of the cluster to set maintenance policy. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setMaintenancePolicy(request);

setMasterAuth(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

action google.container.v1.SetMasterAuthRequest.Action

Required. The exact form of action to be taken on the master auth.

update google.container.v1.MasterAuth

Required. A description of the update.

name string

The name (project, location, cluster) of the cluster to set auth. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setMasterAuth(request);

setMonitoringService(request, optionsopt) → {Promise}

Sets the monitoring service for a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

monitoringService string

Required. The monitoring service the cluster should use to write metrics. Currently available options:

  • "monitoring.googleapis.com/kubernetes" - the Google Cloud Monitoring service with Kubernetes-native resource model
  • "monitoring.googleapis.com" - the Google Cloud Monitoring service
  • "none" - no metrics will be exported from the cluster
name string

The name (project, location, cluster) of the cluster to set monitoring. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setMonitoringService(request);

setNetworkPolicy(request, optionsopt) → {Promise}

Enables or disables Network Policy for a cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

networkPolicy google.container.v1.NetworkPolicy

Required. Configuration options for the NetworkPolicy feature.

name string

The name (project, location, cluster id) of the cluster to set networking policy. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setNetworkPolicy(request);

setNodePoolAutoscaling(request, optionsopt) → {Promise}

Sets the autoscaling settings for the specified node pool.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.

autoscaling google.container.v1.NodePoolAutoscaling

Required. Autoscaling configuration for the node pool.

name string

The name (project, location, cluster, node pool) of the node pool to set autoscaler settings. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setNodePoolAutoscaling(request);

setNodePoolManagement(request, optionsopt) → {Promise}

Sets the NodeManagement options for a node pool.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.

management google.container.v1.NodeManagement

Required. NodeManagement configuration for the node pool.

name string

The name (project, location, cluster, node pool id) of the node pool to set management properties. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setNodePoolManagement(request);

setNodePoolSize(request, optionsopt) → {Promise}

Sets the size for a specific node pool.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.

nodeCount number

Required. The desired node count for the pool.

name string

The name (project, location, cluster, node pool id) of the node pool to set size. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.setNodePoolSize(request);

startIPRotation(request, optionsopt) → {Promise}

Starts master IP rotation.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

name string

The name (project, location, cluster id) of the cluster to start IP rotation. Specified in the format projects/* /locations/* /clusters/*.

rotateCredentials boolean

Whether to rotate credentials during IP rotation.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.startIPRotation(request);

updateCluster(request, optionsopt) → {Promise}

Updates the settings of a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

update google.container.v1.ClusterUpdate

Required. A description of the update.

name string

The name (project, location, cluster) of the cluster to update. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.updateCluster(request);

updateMaster(request, optionsopt) → {Promise}

Updates the master for a specific cluster.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

masterVersion string

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
name string

The name (project, location, cluster) of the cluster to update. Specified in the format projects/* /locations/* /clusters/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.updateMaster(request);

updateNodePool(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
projectId string

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

zone string

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

clusterId string

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

nodePoolId string

Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.

nodeVersion string

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
imageType string

Required. The desired image type for the node pool.

name string

The name (project, location, cluster, node pool) of the node pool to update. Specified in the format projects/* /locations/* /clusters/* /nodePools/*.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Operation. Please see the documentation for more details and examples.
Example
const [response] = await client.updateNodePool(request);