Google Kubernetes Engine Cluster Manager v1 v1
Package
@google-cloud/container
Constructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of ClusterManagerClient.
Parameters
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.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: 'rest'}, gax); ```
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
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.v1.ICancelOperationRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.container.v1.ICancelOperationRequest | undefined,
{} | undefined
]>;
Cancels the specified operation.
Parameters
Name | Description |
request |
protos.google.container.v1.ICancelOperationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.container.v1.ICancelOperationRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, operation id) of the operation to cancel.
* Specified in the format `projects/* /locations/* /operations/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callCancelOperation() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.cancelOperation(request);
console.log(response);
}
callCancelOperation();
cancelOperation(request, options, callback)
cancelOperation(request: protos.google.container.v1.ICancelOperationRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICancelOperationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>
|
Returns
cancelOperation(request, callback)
cancelOperation(request: protos.google.container.v1.ICancelOperationRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICancelOperationRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICancelOperationRequest | null | undefined, {} | null | undefined>
|
Returns
close()
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<void> | {Promise} A promise that resolves when the client is closed.
|
completeIPRotation(request, options)
completeIPRotation(request?: protos.google.container.v1.ICompleteIPRotationRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ICompleteIPRotationRequest | undefined,
{} | undefined
]>;
Completes master IP rotation.
Parameters
Name | Description |
request |
protos.google.container.v1.ICompleteIPRotationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ICompleteIPRotationRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster name) of the cluster to complete IP
* rotation. Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callCompleteIPRotation() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.completeIPRotation(request);
console.log(response);
}
callCompleteIPRotation();
completeIPRotation(request, options, callback)
completeIPRotation(request: protos.google.container.v1.ICompleteIPRotationRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICompleteIPRotationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>
|
Returns
completeIPRotation(request, callback)
completeIPRotation(request: protos.google.container.v1.ICompleteIPRotationRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICompleteIPRotationRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICompleteIPRotationRequest | null | undefined, {} | null | undefined>
|
Returns
completeNodePoolUpgrade(request, options)
completeNodePoolUpgrade(request?: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.container.v1.ICompleteNodePoolUpgradeRequest | undefined,
{} | undefined
]>;
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
Parameters
Name | Description |
request |
protos.google.container.v1.ICompleteNodePoolUpgradeRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.container.v1.ICompleteNodePoolUpgradeRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster, node pool id) of the node pool to
* complete upgrade.
* Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callCompleteNodePoolUpgrade() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.completeNodePoolUpgrade(request);
console.log(response);
}
callCompleteNodePoolUpgrade();
completeNodePoolUpgrade(request, options, callback)
completeNodePoolUpgrade(request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICompleteNodePoolUpgradeRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
|
Returns
completeNodePoolUpgrade(request, callback)
completeNodePoolUpgrade(request: protos.google.container.v1.ICompleteNodePoolUpgradeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICompleteNodePoolUpgradeRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.container.v1.ICompleteNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
|
Returns
createCluster(request, options)
createCluster(request?: protos.google.container.v1.ICreateClusterRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ICreateClusterRequest | undefined,
{} | undefined
]>;
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances.
By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
Parameters
Name | Description |
request |
protos.google.container.v1.ICreateClusterRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ICreateClusterRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A cluster
* resource (https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)
*/
// const cluster = {}
/**
* The parent (project and location) where the cluster will be created.
* Specified in the format `projects/* /locations/*`.
*/
// const parent = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callCreateCluster() {
// Construct request
const request = {
cluster,
};
// Run request
const response = await containerClient.createCluster(request);
console.log(response);
}
callCreateCluster();
createCluster(request, options, callback)
createCluster(request: protos.google.container.v1.ICreateClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICreateClusterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>
|
Returns
createCluster(request, callback)
createCluster(request: protos.google.container.v1.ICreateClusterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICreateClusterRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateClusterRequest | null | undefined, {} | null | undefined>
|
Returns
createNodePool(request, options)
createNodePool(request?: protos.google.container.v1.ICreateNodePoolRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ICreateNodePoolRequest | undefined,
{} | undefined
]>;
Creates a node pool for a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ICreateNodePoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ICreateNodePoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The node pool to create.
*/
// const nodePool = {}
/**
* The parent (project, location, cluster name) where the node pool will be
* created. Specified in the format
* `projects/* /locations/* /clusters/*`.
*/
// const parent = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callCreateNodePool() {
// Construct request
const request = {
nodePool,
};
// Run request
const response = await containerClient.createNodePool(request);
console.log(response);
}
callCreateNodePool();
createNodePool(request, options, callback)
createNodePool(request: protos.google.container.v1.ICreateNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICreateNodePoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
createNodePool(request, callback)
createNodePool(request: protos.google.container.v1.ICreateNodePoolRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ICreateNodePoolRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ICreateNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
deleteCluster(request, options)
deleteCluster(request?: protos.google.container.v1.IDeleteClusterRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IDeleteClusterRequest | undefined,
{} | undefined
]>;
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
Parameters
Name | Description |
request |
protos.google.container.v1.IDeleteClusterRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IDeleteClusterRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster) of the cluster to delete.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callDeleteCluster() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.deleteCluster(request);
console.log(response);
}
callDeleteCluster();
deleteCluster(request, options, callback)
deleteCluster(request: protos.google.container.v1.IDeleteClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IDeleteClusterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>
|
Returns
deleteCluster(request, callback)
deleteCluster(request: protos.google.container.v1.IDeleteClusterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IDeleteClusterRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteClusterRequest | null | undefined, {} | null | undefined>
|
Returns
deleteNodePool(request, options)
deleteNodePool(request?: protos.google.container.v1.IDeleteNodePoolRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IDeleteNodePoolRequest | undefined,
{} | undefined
]>;
Deletes a node pool from a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.IDeleteNodePoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IDeleteNodePoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster, node pool id) of the node pool to
* delete. Specified in the format
* `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callDeleteNodePool() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.deleteNodePool(request);
console.log(response);
}
callDeleteNodePool();
deleteNodePool(request, options, callback)
deleteNodePool(request: protos.google.container.v1.IDeleteNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IDeleteNodePoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
deleteNodePool(request, callback)
deleteNodePool(request: protos.google.container.v1.IDeleteNodePoolRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IDeleteNodePoolRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IDeleteNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
getCluster(request, options)
getCluster(request?: protos.google.container.v1.IGetClusterRequest, options?: CallOptions): Promise<[
protos.google.container.v1.ICluster,
protos.google.container.v1.IGetClusterRequest | undefined,
{} | undefined
]>;
Gets the details of a specific cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.IGetClusterRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.ICluster,
protos.google.container.v1.IGetClusterRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Cluster]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster) of the cluster to retrieve.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callGetCluster() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.getCluster(request);
console.log(response);
}
callGetCluster();
getCluster(request, options, callback)
getCluster(request: protos.google.container.v1.IGetClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetClusterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
|
Returns
getCluster(request, callback)
getCluster(request: protos.google.container.v1.IGetClusterRequest, callback: Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetClusterRequest
|
callback |
Callback<protos.google.container.v1.ICluster, protos.google.container.v1.IGetClusterRequest | null | undefined, {} | null | undefined>
|
Returns
getJSONWebKeys(request, options)
getJSONWebKeys(request?: protos.google.container.v1.IGetJSONWebKeysRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IGetJSONWebKeysResponse,
protos.google.container.v1.IGetJSONWebKeysRequest | undefined,
{} | undefined
]>;
Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.
Parameters
Name | Description |
request |
protos.google.container.v1.IGetJSONWebKeysRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IGetJSONWebKeysResponse,
protos.google.container.v1.IGetJSONWebKeysRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [GetJSONWebKeysResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The cluster (project, location, cluster name) to get keys for. Specified in
* the format `projects/* /locations/* /clusters/*`.
*/
// const parent = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callGetJSONWebKeys() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.getJSONWebKeys(request);
console.log(response);
}
callGetJSONWebKeys();
getJSONWebKeys(request, options, callback)
getJSONWebKeys(request: protos.google.container.v1.IGetJSONWebKeysRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetJSONWebKeysRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>
|
Returns
getJSONWebKeys(request, callback)
getJSONWebKeys(request: protos.google.container.v1.IGetJSONWebKeysRequest, callback: Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetJSONWebKeysRequest
|
callback |
Callback<protos.google.container.v1.IGetJSONWebKeysResponse, protos.google.container.v1.IGetJSONWebKeysRequest | null | undefined, {} | null | undefined>
|
Returns
getNodePool(request, options)
getNodePool(request?: protos.google.container.v1.IGetNodePoolRequest, options?: CallOptions): Promise<[
protos.google.container.v1.INodePool,
protos.google.container.v1.IGetNodePoolRequest | undefined,
{} | undefined
]>;
Retrieves the requested node pool.
Parameters
Name | Description |
request |
protos.google.container.v1.IGetNodePoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.INodePool,
protos.google.container.v1.IGetNodePoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [NodePool]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster, node pool id) of the node pool to
* get. Specified in the format
* `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callGetNodePool() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.getNodePool(request);
console.log(response);
}
callGetNodePool();
getNodePool(request, options, callback)
getNodePool(request: protos.google.container.v1.IGetNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetNodePoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
getNodePool(request, callback)
getNodePool(request: protos.google.container.v1.IGetNodePoolRequest, callback: Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetNodePoolRequest
|
callback |
Callback<protos.google.container.v1.INodePool, protos.google.container.v1.IGetNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
getOperation(request, options)
getOperation(request?: protos.google.container.v1.IGetOperationRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IGetOperationRequest | undefined,
{} | undefined
]>;
Gets the specified operation.
Parameters
Name | Description |
request |
protos.google.container.v1.IGetOperationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IGetOperationRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, operation id) of the operation to get.
* Specified in the format `projects/* /locations/* /operations/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callGetOperation() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.getOperation(request);
console.log(response);
}
callGetOperation();
getOperation(request, options, callback)
getOperation(request: protos.google.container.v1.IGetOperationRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetOperationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>
|
Returns
getOperation(request, callback)
getOperation(request: protos.google.container.v1.IGetOperationRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetOperationRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IGetOperationRequest | null | undefined, {} | null | undefined>
|
Returns
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
getServerConfig(request, options)
getServerConfig(request?: protos.google.container.v1.IGetServerConfigRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IServerConfig,
protos.google.container.v1.IGetServerConfigRequest | undefined,
{} | undefined
]>;
Returns configuration info about the Google Kubernetes Engine service.
Parameters
Name | Description |
request |
protos.google.container.v1.IGetServerConfigRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IServerConfig,
protos.google.container.v1.IGetServerConfigRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [ServerConfig]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project and location) of the server config to get,
* specified in the format `projects/* /locations/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callGetServerConfig() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.getServerConfig(request);
console.log(response);
}
callGetServerConfig();
getServerConfig(request, options, callback)
getServerConfig(request: protos.google.container.v1.IGetServerConfigRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetServerConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>
|
Returns
getServerConfig(request, callback)
getServerConfig(request: protos.google.container.v1.IGetServerConfigRequest, callback: Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IGetServerConfigRequest
|
callback |
Callback<protos.google.container.v1.IServerConfig, protos.google.container.v1.IGetServerConfigRequest | null | undefined, {} | null | undefined>
|
Returns
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
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub.
|
listClusters(request, options)
listClusters(request?: protos.google.container.v1.IListClustersRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IListClustersResponse,
protos.google.container.v1.IListClustersRequest | undefined,
{} | undefined
]>;
Lists all clusters owned by a project in either the specified zone or all zones.
Parameters
Name | Description |
request |
protos.google.container.v1.IListClustersRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IListClustersResponse,
protos.google.container.v1.IListClustersRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [ListClustersResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The parent (project and location) where the clusters will be listed.
* Specified in the format `projects/* /locations/*`.
* Location "-" matches all zones and all regions.
*/
// const parent = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callListClusters() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.listClusters(request);
console.log(response);
}
callListClusters();
listClusters(request, options, callback)
listClusters(request: protos.google.container.v1.IListClustersRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListClustersRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>
|
Returns
listClusters(request, callback)
listClusters(request: protos.google.container.v1.IListClustersRequest, callback: Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListClustersRequest
|
callback |
Callback<protos.google.container.v1.IListClustersResponse, protos.google.container.v1.IListClustersRequest | null | undefined, {} | null | undefined>
|
Returns
listNodePools(request, options)
listNodePools(request?: protos.google.container.v1.IListNodePoolsRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IListNodePoolsResponse,
protos.google.container.v1.IListNodePoolsRequest | undefined,
{} | undefined
]>;
Lists the node pools for a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.IListNodePoolsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IListNodePoolsResponse,
protos.google.container.v1.IListNodePoolsRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [ListNodePoolsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The parent (project, location, cluster name) where the node pools will be
* listed. Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const parent = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callListNodePools() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.listNodePools(request);
console.log(response);
}
callListNodePools();
listNodePools(request, options, callback)
listNodePools(request: protos.google.container.v1.IListNodePoolsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListNodePoolsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>
|
Returns
listNodePools(request, callback)
listNodePools(request: protos.google.container.v1.IListNodePoolsRequest, callback: Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListNodePoolsRequest
|
callback |
Callback<protos.google.container.v1.IListNodePoolsResponse, protos.google.container.v1.IListNodePoolsRequest | null | undefined, {} | null | undefined>
|
Returns
listOperations(request, options)
listOperations(request?: protos.google.container.v1.IListOperationsRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IListOperationsResponse,
protos.google.container.v1.IListOperationsRequest | undefined,
{} | undefined
]>;
Lists all operations in a project in a specific zone or all zones.
Parameters
Name | Description |
request |
protos.google.container.v1.IListOperationsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IListOperationsResponse,
protos.google.container.v1.IListOperationsRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [ListOperationsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The parent (project and location) where the operations will be listed.
* Specified in the format `projects/* /locations/*`.
* Location "-" matches all zones and all regions.
*/
// const parent = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callListOperations() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.listOperations(request);
console.log(response);
}
callListOperations();
listOperations(request, options, callback)
listOperations(request: protos.google.container.v1.IListOperationsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListOperationsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>
|
Returns
listOperations(request, callback)
listOperations(request: protos.google.container.v1.IListOperationsRequest, callback: Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListOperationsRequest
|
callback |
Callback<protos.google.container.v1.IListOperationsResponse, protos.google.container.v1.IListOperationsRequest | null | undefined, {} | null | undefined>
|
Returns
listUsableSubnetworks(request, options)
listUsableSubnetworks(request?: protos.google.container.v1.IListUsableSubnetworksRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IUsableSubnetwork[],
protos.google.container.v1.IListUsableSubnetworksRequest | null,
protos.google.container.v1.IListUsableSubnetworksResponse
]>;
Lists subnetworks that are usable for creating clusters in a project.
Parameters
Name | Description |
request |
protos.google.container.v1.IListUsableSubnetworksRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IUsableSubnetwork[],
protos.google.container.v1.IListUsableSubnetworksRequest | null,
protos.google.container.v1.IListUsableSubnetworksResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [UsableSubnetwork]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listUsableSubnetworksAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listUsableSubnetworks(request, options, callback)
listUsableSubnetworks(request: protos.google.container.v1.IListUsableSubnetworksRequest, options: CallOptions, callback: PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListUsableSubnetworksRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>
|
Returns
listUsableSubnetworks(request, callback)
listUsableSubnetworks(request: protos.google.container.v1.IListUsableSubnetworksRequest, callback: PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IListUsableSubnetworksRequest
|
callback |
PaginationCallback<protos.google.container.v1.IListUsableSubnetworksRequest, protos.google.container.v1.IListUsableSubnetworksResponse | null | undefined, protos.google.container.v1.IUsableSubnetwork>
|
Returns
listUsableSubnetworksAsync(request, options)
listUsableSubnetworksAsync(request?: protos.google.container.v1.IListUsableSubnetworksRequest, options?: CallOptions): AsyncIterable<protos.google.container.v1.IUsableSubnetwork>;
Equivalent to listUsableSubnetworks
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.container.v1.IListUsableSubnetworksRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.container.v1.IUsableSubnetwork> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The parent project where subnetworks are usable.
* Specified in the format `projects/*`.
*/
// const parent = 'abc123'
/**
* Filtering currently only supports equality on the networkProjectId and must
* be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId`
* is the project which owns the listed subnetworks. This defaults to the
* parent project ID.
*/
// const filter = 'abc123'
/**
* The max number of results per page that should be returned. If the number
* of available results is larger than `page_size`, a `next_page_token` is
* returned which can be used to get the next page of results in subsequent
* requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
*/
// const pageSize = 1234
/**
* Specifies a page token to use. Set this to the nextPageToken returned by
* previous list requests to get the next page of results.
*/
// const pageToken = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callListUsableSubnetworks() {
// Construct request
const request = {
};
// Run request
const iterable = await containerClient.listUsableSubnetworksAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListUsableSubnetworks();
listUsableSubnetworksStream(request, options)
listUsableSubnetworksStream(request?: protos.google.container.v1.IListUsableSubnetworksRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.container.v1.IListUsableSubnetworksRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
rollbackNodePoolUpgrade(request, options)
rollbackNodePoolUpgrade(request?: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IRollbackNodePoolUpgradeRequest | undefined,
{} | undefined
]>;
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
Parameters
Name | Description |
request |
protos.google.container.v1.IRollbackNodePoolUpgradeRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IRollbackNodePoolUpgradeRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster, node pool id) of the node poll to
* rollback upgrade.
* Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
/**
* Option for rollback to ignore the PodDisruptionBudget.
* Default value is false.
*/
// const respectPdb = true
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callRollbackNodePoolUpgrade() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.rollbackNodePoolUpgrade(request);
console.log(response);
}
callRollbackNodePoolUpgrade();
rollbackNodePoolUpgrade(request, options, callback)
rollbackNodePoolUpgrade(request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IRollbackNodePoolUpgradeRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
|
Returns
rollbackNodePoolUpgrade(request, callback)
rollbackNodePoolUpgrade(request: protos.google.container.v1.IRollbackNodePoolUpgradeRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IRollbackNodePoolUpgradeRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IRollbackNodePoolUpgradeRequest | null | undefined, {} | null | undefined>
|
Returns
setAddonsConfig(request, options)
setAddonsConfig(request?: protos.google.container.v1.ISetAddonsConfigRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetAddonsConfigRequest | undefined,
{} | undefined
]>;
Sets the addons for a specific cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetAddonsConfigRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetAddonsConfigRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The desired configurations for the various addons available to run in the
* cluster.
*/
// const addonsConfig = {}
/**
* The name (project, location, cluster) of the cluster to set addons.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetAddonsConfig() {
// Construct request
const request = {
addonsConfig,
};
// Run request
const response = await containerClient.setAddonsConfig(request);
console.log(response);
}
callSetAddonsConfig();
setAddonsConfig(request, options, callback)
setAddonsConfig(request: protos.google.container.v1.ISetAddonsConfigRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetAddonsConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>
|
Returns
setAddonsConfig(request, callback)
setAddonsConfig(request: protos.google.container.v1.ISetAddonsConfigRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetAddonsConfigRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetAddonsConfigRequest | null | undefined, {} | null | undefined>
|
Returns
setLabels(request, options)
setLabels(request?: protos.google.container.v1.ISetLabelsRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLabelsRequest | undefined,
{} | undefined
]>;
Sets labels on a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLabelsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLabelsRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 = 1234
/**
* Required. The fingerprint of the previous set of labels for this resource,
* used to detect conflicts. The fingerprint is initially generated by
* Kubernetes Engine and changes after every request to modify or update
* labels. You must always provide an up-to-date fingerprint hash when
* updating or changing labels. Make a `get()` request to the
* resource to get the latest fingerprint.
*/
// const labelFingerprint = 'abc123'
/**
* The name (project, location, cluster name) of the cluster to set labels.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetLabels() {
// Construct request
const request = {
resourceLabels,
labelFingerprint,
};
// Run request
const response = await containerClient.setLabels(request);
console.log(response);
}
callSetLabels();
setLabels(request, options, callback)
setLabels(request: protos.google.container.v1.ISetLabelsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLabelsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>
|
Returns
setLabels(request, callback)
setLabels(request: protos.google.container.v1.ISetLabelsRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLabelsRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLabelsRequest | null | undefined, {} | null | undefined>
|
Returns
setLegacyAbac(request, options)
setLegacyAbac(request?: protos.google.container.v1.ISetLegacyAbacRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLegacyAbacRequest | undefined,
{} | undefined
]>;
Enables or disables the ABAC authorization mechanism on a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLegacyAbacRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLegacyAbacRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Whether ABAC authorization will be enabled in the cluster.
*/
// const enabled = true
/**
* The name (project, location, cluster name) of the cluster to set legacy
* abac. Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetLegacyAbac() {
// Construct request
const request = {
enabled,
};
// Run request
const response = await containerClient.setLegacyAbac(request);
console.log(response);
}
callSetLegacyAbac();
setLegacyAbac(request, options, callback)
setLegacyAbac(request: protos.google.container.v1.ISetLegacyAbacRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLegacyAbacRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>
|
Returns
setLegacyAbac(request, callback)
setLegacyAbac(request: protos.google.container.v1.ISetLegacyAbacRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLegacyAbacRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLegacyAbacRequest | null | undefined, {} | null | undefined>
|
Returns
setLocations(request, options)
setLocations(request?: protos.google.container.v1.ISetLocationsRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLocationsRequest | undefined,
{} | undefined
]>;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLocationsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLocationsRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The desired list of Google Compute Engine
* zones (https://cloud.google.com/compute/docs/zones#available) in which the
* cluster's nodes should be located. Changing the locations a cluster is in
* will result in nodes being either created or removed from the cluster,
* depending on whether locations are being added or removed.
* This list must always include the cluster's primary zone.
*/
// const locations = 'abc123'
/**
* The name (project, location, cluster) of the cluster to set locations.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetLocations() {
// Construct request
const request = {
locations,
};
// Run request
const response = await containerClient.setLocations(request);
console.log(response);
}
callSetLocations();
setLocations(request, options, callback)
setLocations(request: protos.google.container.v1.ISetLocationsRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLocationsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>
|
Returns
setLocations(request, callback)
setLocations(request: protos.google.container.v1.ISetLocationsRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLocationsRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLocationsRequest | null | undefined, {} | null | undefined>
|
Returns
setLoggingService(request, options)
setLoggingService(request?: protos.google.container.v1.ISetLoggingServiceRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLoggingServiceRequest | undefined,
{} | undefined
]>;
Sets the logging service for a specific cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLoggingServiceRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetLoggingServiceRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The logging service the cluster should use to write logs.
* Currently available options:
* * `logging.googleapis.com/kubernetes` - The Cloud Logging
* service with a Kubernetes-native resource model
* * `logging.googleapis.com` - The legacy Cloud Logging service (no longer
* available as of GKE 1.15).
* * `none` - no logs will be exported from the cluster.
* If left as an empty string,`logging.googleapis.com/kubernetes` will be
* used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.
*/
// const loggingService = 'abc123'
/**
* The name (project, location, cluster) of the cluster to set logging.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetLoggingService() {
// Construct request
const request = {
loggingService,
};
// Run request
const response = await containerClient.setLoggingService(request);
console.log(response);
}
callSetLoggingService();
setLoggingService(request, options, callback)
setLoggingService(request: protos.google.container.v1.ISetLoggingServiceRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLoggingServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>
|
Returns
setLoggingService(request, callback)
setLoggingService(request: protos.google.container.v1.ISetLoggingServiceRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetLoggingServiceRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetLoggingServiceRequest | null | undefined, {} | null | undefined>
|
Returns
setMaintenancePolicy(request, options)
setMaintenancePolicy(request?: protos.google.container.v1.ISetMaintenancePolicyRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetMaintenancePolicyRequest | undefined,
{} | undefined
]>;
Sets the maintenance policy for a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMaintenancePolicyRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetMaintenancePolicyRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Google Developers Console project ID or project
* number (https://cloud.google.com/resource-manager/docs/creating-managing-projects).
*/
// const projectId = 'abc123'
/**
* Required. The name of the Google Compute Engine
* zone (https://cloud.google.com/compute/docs/zones#available) in which the
* cluster resides.
*/
// const zone = 'abc123'
/**
* Required. The name of the cluster to update.
*/
// const clusterId = 'abc123'
/**
* Required. The maintenance policy to be set for the cluster. An empty field
* clears the existing maintenance policy.
*/
// const maintenancePolicy = {}
/**
* The name (project, location, cluster name) of the cluster to set
* maintenance policy.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetMaintenancePolicy() {
// Construct request
const request = {
projectId,
zone,
clusterId,
maintenancePolicy,
};
// Run request
const response = await containerClient.setMaintenancePolicy(request);
console.log(response);
}
callSetMaintenancePolicy();
setMaintenancePolicy(request, options, callback)
setMaintenancePolicy(request: protos.google.container.v1.ISetMaintenancePolicyRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMaintenancePolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>
|
Returns
setMaintenancePolicy(request, callback)
setMaintenancePolicy(request: protos.google.container.v1.ISetMaintenancePolicyRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMaintenancePolicyRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMaintenancePolicyRequest | null | undefined, {} | null | undefined>
|
Returns
setMasterAuth(request, options)
setMasterAuth(request?: protos.google.container.v1.ISetMasterAuthRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetMasterAuthRequest | undefined,
{} | undefined
]>;
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMasterAuthRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetMasterAuthRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The exact form of action to be taken on the master auth.
*/
// const action = {}
/**
* Required. A description of the update.
*/
// const update = {}
/**
* The name (project, location, cluster) of the cluster to set auth.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetMasterAuth() {
// Construct request
const request = {
action,
update,
};
// Run request
const response = await containerClient.setMasterAuth(request);
console.log(response);
}
callSetMasterAuth();
setMasterAuth(request, options, callback)
setMasterAuth(request: protos.google.container.v1.ISetMasterAuthRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMasterAuthRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>
|
Returns
setMasterAuth(request, callback)
setMasterAuth(request: protos.google.container.v1.ISetMasterAuthRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMasterAuthRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMasterAuthRequest | null | undefined, {} | null | undefined>
|
Returns
setMonitoringService(request, options)
setMonitoringService(request?: protos.google.container.v1.ISetMonitoringServiceRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetMonitoringServiceRequest | undefined,
{} | undefined
]>;
Sets the monitoring service for a specific cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMonitoringServiceRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetMonitoringServiceRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The monitoring service the cluster should use to write metrics.
* Currently available options:
* * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring
* service with a Kubernetes-native resource model
* * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no
* longer available as of GKE 1.15).
* * `none` - No metrics will be exported from the cluster.
* If left as an empty string,`monitoring.googleapis.com/kubernetes` will be
* used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.
*/
// const monitoringService = 'abc123'
/**
* The name (project, location, cluster) of the cluster to set monitoring.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetMonitoringService() {
// Construct request
const request = {
monitoringService,
};
// Run request
const response = await containerClient.setMonitoringService(request);
console.log(response);
}
callSetMonitoringService();
setMonitoringService(request, options, callback)
setMonitoringService(request: protos.google.container.v1.ISetMonitoringServiceRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMonitoringServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>
|
Returns
setMonitoringService(request, callback)
setMonitoringService(request: protos.google.container.v1.ISetMonitoringServiceRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetMonitoringServiceRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetMonitoringServiceRequest | null | undefined, {} | null | undefined>
|
Returns
setNetworkPolicy(request, options)
setNetworkPolicy(request?: protos.google.container.v1.ISetNetworkPolicyRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNetworkPolicyRequest | undefined,
{} | undefined
]>;
Enables or disables Network Policy for a cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNetworkPolicyRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNetworkPolicyRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Configuration options for the NetworkPolicy feature.
*/
// const networkPolicy = {}
/**
* The name (project, location, cluster name) of the cluster to set networking
* policy. Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetNetworkPolicy() {
// Construct request
const request = {
networkPolicy,
};
// Run request
const response = await containerClient.setNetworkPolicy(request);
console.log(response);
}
callSetNetworkPolicy();
setNetworkPolicy(request, options, callback)
setNetworkPolicy(request: protos.google.container.v1.ISetNetworkPolicyRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNetworkPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>
|
Returns
setNetworkPolicy(request, callback)
setNetworkPolicy(request: protos.google.container.v1.ISetNetworkPolicyRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNetworkPolicyRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNetworkPolicyRequest | null | undefined, {} | null | undefined>
|
Returns
setNodePoolAutoscaling(request, options)
setNodePoolAutoscaling(request?: protos.google.container.v1.ISetNodePoolAutoscalingRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNodePoolAutoscalingRequest | undefined,
{} | undefined
]>;
Sets the autoscaling settings for the specified node pool.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolAutoscalingRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNodePoolAutoscalingRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Autoscaling configuration for the node pool.
*/
// const autoscaling = {}
/**
* The name (project, location, cluster, node pool) of the node pool to set
* autoscaler settings. Specified in the format
* `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetNodePoolAutoscaling() {
// Construct request
const request = {
autoscaling,
};
// Run request
const response = await containerClient.setNodePoolAutoscaling(request);
console.log(response);
}
callSetNodePoolAutoscaling();
setNodePoolAutoscaling(request, options, callback)
setNodePoolAutoscaling(request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolAutoscalingRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>
|
Returns
setNodePoolAutoscaling(request, callback)
setNodePoolAutoscaling(request: protos.google.container.v1.ISetNodePoolAutoscalingRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolAutoscalingRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolAutoscalingRequest | null | undefined, {} | null | undefined>
|
Returns
setNodePoolManagement(request, options)
setNodePoolManagement(request?: protos.google.container.v1.ISetNodePoolManagementRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNodePoolManagementRequest | undefined,
{} | undefined
]>;
Sets the NodeManagement options for a node pool.
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolManagementRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNodePoolManagementRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. NodeManagement configuration for the node pool.
*/
// const management = {}
/**
* The name (project, location, cluster, node pool id) of the node pool to set
* management properties. Specified in the format
* `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetNodePoolManagement() {
// Construct request
const request = {
management,
};
// Run request
const response = await containerClient.setNodePoolManagement(request);
console.log(response);
}
callSetNodePoolManagement();
setNodePoolManagement(request, options, callback)
setNodePoolManagement(request: protos.google.container.v1.ISetNodePoolManagementRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolManagementRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>
|
Returns
setNodePoolManagement(request, callback)
setNodePoolManagement(request: protos.google.container.v1.ISetNodePoolManagementRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolManagementRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolManagementRequest | null | undefined, {} | null | undefined>
|
Returns
setNodePoolSize(request, options)
setNodePoolSize(request?: protos.google.container.v1.ISetNodePoolSizeRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNodePoolSizeRequest | undefined,
{} | undefined
]>;
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying .
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolSizeRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.ISetNodePoolSizeRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The desired node count for the pool.
*/
// const nodeCount = 1234
/**
* The name (project, location, cluster, node pool id) of the node pool to set
* size.
* Specified in the format `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callSetNodePoolSize() {
// Construct request
const request = {
nodeCount,
};
// Run request
const response = await containerClient.setNodePoolSize(request);
console.log(response);
}
callSetNodePoolSize();
setNodePoolSize(request, options, callback)
setNodePoolSize(request: protos.google.container.v1.ISetNodePoolSizeRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolSizeRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>
|
Returns
setNodePoolSize(request, callback)
setNodePoolSize(request: protos.google.container.v1.ISetNodePoolSizeRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.ISetNodePoolSizeRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.ISetNodePoolSizeRequest | null | undefined, {} | null | undefined>
|
Returns
startIPRotation(request, options)
startIPRotation(request?: protos.google.container.v1.IStartIPRotationRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IStartIPRotationRequest | undefined,
{} | undefined
]>;
Starts master IP rotation.
Parameters
Name | Description |
request |
protos.google.container.v1.IStartIPRotationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IStartIPRotationRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name (project, location, cluster name) of the cluster to start IP
* rotation. Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
/**
* Whether to rotate credentials during IP rotation.
*/
// const rotateCredentials = true
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callStartIPRotation() {
// Construct request
const request = {
};
// Run request
const response = await containerClient.startIPRotation(request);
console.log(response);
}
callStartIPRotation();
startIPRotation(request, options, callback)
startIPRotation(request: protos.google.container.v1.IStartIPRotationRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IStartIPRotationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>
|
Returns
startIPRotation(request, callback)
startIPRotation(request: protos.google.container.v1.IStartIPRotationRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IStartIPRotationRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IStartIPRotationRequest | null | undefined, {} | null | undefined>
|
Returns
updateCluster(request, options)
updateCluster(request?: protos.google.container.v1.IUpdateClusterRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IUpdateClusterRequest | undefined,
{} | undefined
]>;
Updates the settings of a specific cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateClusterRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IUpdateClusterRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A description of the update.
*/
// const update = {}
/**
* The name (project, location, cluster) of the cluster to update.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callUpdateCluster() {
// Construct request
const request = {
update,
};
// Run request
const response = await containerClient.updateCluster(request);
console.log(response);
}
callUpdateCluster();
updateCluster(request, options, callback)
updateCluster(request: protos.google.container.v1.IUpdateClusterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateClusterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>
|
Returns
updateCluster(request, callback)
updateCluster(request: protos.google.container.v1.IUpdateClusterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateClusterRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateClusterRequest | null | undefined, {} | null | undefined>
|
Returns
updateMaster(request, options)
updateMaster(request?: protos.google.container.v1.IUpdateMasterRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IUpdateMasterRequest | undefined,
{} | undefined
]>;
Updates the master for a specific cluster.
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateMasterRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IUpdateMasterRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Kubernetes version to change the master to.
* Users may specify either explicit versions offered by Kubernetes Engine or
* version aliases, which have the following behavior:
* - "latest": picks the highest valid Kubernetes version
* - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
* - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
* - "1.X.Y-gke.N": picks an explicit Kubernetes version
* - "-": picks the default Kubernetes version
*/
// const masterVersion = 'abc123'
/**
* The name (project, location, cluster) of the cluster to update.
* Specified in the format `projects/* /locations/* /clusters/*`.
*/
// const name = 'abc123'
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callUpdateMaster() {
// Construct request
const request = {
masterVersion,
};
// Run request
const response = await containerClient.updateMaster(request);
console.log(response);
}
callUpdateMaster();
updateMaster(request, options, callback)
updateMaster(request: protos.google.container.v1.IUpdateMasterRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateMasterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>
|
Returns
updateMaster(request, callback)
updateMaster(request: protos.google.container.v1.IUpdateMasterRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateMasterRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateMasterRequest | null | undefined, {} | null | undefined>
|
Returns
updateNodePool(request, options)
updateNodePool(request?: protos.google.container.v1.IUpdateNodePoolRequest, options?: CallOptions): Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IUpdateNodePoolRequest | undefined,
{} | undefined
]>;
Updates the version and/or image type for the specified node pool.
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateNodePoolRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.container.v1.IOperation,
protos.google.container.v1.IUpdateNodePoolRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Operation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Kubernetes version to change the nodes to (typically an
* upgrade).
* Users may specify either explicit versions offered by Kubernetes Engine or
* version aliases, which have the following behavior:
* - "latest": picks the highest valid Kubernetes version
* - "1.X": picks the highest valid patch+gke.N patch in the 1.X version
* - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version
* - "1.X.Y-gke.N": picks an explicit Kubernetes version
* - "-": picks the Kubernetes master version
*/
// const nodeVersion = 'abc123'
/**
* Required. The desired image type for the node pool.
*/
// const imageType = 'abc123'
/**
* The name (project, location, cluster, node pool) of the node pool to
* update. Specified in the format
* `projects/* /locations/* /clusters/* /nodePools/*`.
*/
// const name = 'abc123'
/**
* The desired list of Google Compute Engine
* zones (https://cloud.google.com/compute/docs/zones#available) in which the
* node pool's nodes should be located. Changing the locations for a node pool
* will result in nodes being either created or removed from the node pool,
* depending on whether locations are being added or removed.
*/
// const locations = 'abc123'
/**
* The desired workload metadata config for the node pool.
*/
// const workloadMetadataConfig = {}
/**
* Upgrade settings control disruption and speed of the upgrade.
*/
// const upgradeSettings = {}
/**
* The desired network tags to be applied to all nodes in the node pool.
* If this field is not present, the tags will not be changed. Otherwise,
* the existing network tags will be *replaced* with the provided tags.
*/
// const tags = {}
/**
* The desired node taints to be applied to all nodes in the node pool.
* If this field is not present, the taints will not be changed. Otherwise,
* the existing node taints will be *replaced* with the provided taints.
*/
// const taints = {}
/**
* The desired node labels to be applied to all nodes in the node pool.
* If this field is not present, the labels will not be changed. Otherwise,
* the existing node labels will be *replaced* with the provided labels.
*/
// const labels = {}
/**
* Parameters that can be configured on Linux nodes.
*/
// const linuxNodeConfig = {}
/**
* Node kubelet configs.
*/
// const kubeletConfig = {}
/**
* Node network config.
*/
// const nodeNetworkConfig = {}
/**
* GCFS config.
*/
// const gcfsConfig = {}
/**
* Confidential nodes config.
* All the nodes in the node pool will be Confidential VM once enabled.
*/
// const confidentialNodes = {}
/**
* Enable or disable gvnic on the node pool.
*/
// const gvnic = {}
/**
* Logging configuration.
*/
// const loggingConfig = {}
/**
* The resource labels for the node pool to use to annotate any related
* Google Compute Engine resources.
*/
// const resourceLabels = {}
// Imports the Container library
const {ClusterManagerClient} = require('@google-cloud/container').v1;
// Instantiates a client
const containerClient = new ClusterManagerClient();
async function callUpdateNodePool() {
// Construct request
const request = {
nodeVersion,
imageType,
};
// Run request
const response = await containerClient.updateNodePool(request);
console.log(response);
}
callUpdateNodePool();
updateNodePool(request, options, callback)
updateNodePool(request: protos.google.container.v1.IUpdateNodePoolRequest, options: CallOptions, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateNodePoolRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns
updateNodePool(request, callback)
updateNodePool(request: protos.google.container.v1.IUpdateNodePoolRequest, callback: Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.container.v1.IUpdateNodePoolRequest
|
callback |
Callback<protos.google.container.v1.IOperation, protos.google.container.v1.IUpdateNodePoolRequest | null | undefined, {} | null | undefined>
|
Returns