@google-cloud/notebooks
Version:
Notebooks client for Node.js
727 lines • 62.7 kB
TypeScript
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, IamClient, IamProtos, LocationsClient, LocationProtos } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* API v2 service for Workbench Notebooks Instances.
* @class
* @memberof v2
*/
export declare class NotebookServiceClient {
private _terminated;
private _opts;
private _providedCustomServicePath;
private _gaxModule;
private _gaxGrpc;
private _protos;
private _defaults;
private _universeDomain;
private _servicePath;
private _log;
auth: gax.GoogleAuth;
descriptors: Descriptors;
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {
[name: string]: Function;
};
iamClient: IamClient;
locationsClient: LocationsClient;
pathTemplates: {
[name: string]: gax.PathTemplate;
};
operationsClient: gax.OperationsClient;
notebookServiceStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of NotebookServiceClient.
*
* @param {object} [options] - The configuration object.
* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:
* @param {object} [options.credentials] - Credentials object.
* @param {string} [options.credentials.client_email]
* @param {string} [options.credentials.private_key]
* @param {string} [options.email] - Account email address. Required when
* using a .pem or .p12 keyFilename.
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
* .p12 key downloaded from the Google Developers Console. If you provide
* a path to a JSON file, the projectId option below is not necessary.
* NOTE: .pem and .p12 require you to specify options.email as well.
* @param {number} [options.port] - The port on which to connect to
* the remote host.
* @param {string} [options.projectId] - The project ID from the Google
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
* the environment variable GCLOUD_PROJECT for your project ID. If your
* app is running in an environment which supports
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.
* @param {string} [options.apiEndpoint] - The domain name of the
* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: 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 NotebookServiceClient({fallback: true}, gax);
* ```
*/
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
/**
* 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 {Promise} A promise that resolves to an authenticated service stub.
*/
initialize(): Promise<{
[name: string]: Function;
}>;
/**
* The DNS address for this API service.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath(): string;
/**
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint(): string;
/**
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get apiEndpoint(): string;
get universeDomain(): string;
/**
* The port for this API service.
* @returns {number} The default port for this service.
*/
static get port(): number;
/**
* The scopes needed to make gRPC calls for every method defined
* in this service.
* @returns {string[]} List of default scopes.
*/
static get scopes(): string[];
getProjectId(): Promise<string>;
getProjectId(callback: Callback<string, undefined, undefined>): void;
/**
* Gets details of a single Instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.notebooks.v2.Instance|Instance}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.get_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_GetInstance_async
*/
getInstance(request?: protos.google.cloud.notebooks.v2.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.notebooks.v2.IInstance,
protos.google.cloud.notebooks.v2.IGetInstanceRequest | undefined,
{} | undefined
]>;
getInstance(request: protos.google.cloud.notebooks.v2.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
getInstance(request: protos.google.cloud.notebooks.v2.IGetInstanceRequest, callback: Callback<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
/**
* Checks whether a notebook instance is upgradable.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.notebookInstance
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse|CheckInstanceUpgradabilityResponse}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.check_instance_upgradability.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_CheckInstanceUpgradability_async
*/
checkInstanceUpgradability(request?: protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityRequest, options?: CallOptions): Promise<[
protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityResponse,
protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityRequest | undefined,
{} | undefined
]>;
checkInstanceUpgradability(request: protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityRequest, options: CallOptions, callback: Callback<protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityResponse, protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityRequest | null | undefined, {} | null | undefined>): void;
checkInstanceUpgradability(request: protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityRequest, callback: Callback<protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityResponse, protos.google.cloud.notebooks.v2.ICheckInstanceUpgradabilityRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a new Instance in a given project and location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format:
* `parent=projects/{project_id}/locations/{location}`
* @param {string} request.instanceId
* Required. User-defined unique ID of this instance.
* @param {google.cloud.notebooks.v2.Instance} request.instance
* Required. The instance to be created.
* @param {string} [request.requestId]
* Optional. Idempotent request UUID.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.create_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_CreateInstance_async
*/
createInstance(request?: protos.google.cloud.notebooks.v2.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createInstance(request: protos.google.cloud.notebooks.v2.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createInstance(request: protos.google.cloud.notebooks.v2.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.create_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_CreateInstance_async
*/
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* UpdateInstance updates an Instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.cloud.notebooks.v2.Instance} request.instance
* Required. A representation of an instance.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. Mask used to update an instance
* @param {string} [request.requestId]
* Optional. Idempotent request UUID.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.update_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_UpdateInstance_async
*/
updateInstance(request?: protos.google.cloud.notebooks.v2.IUpdateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
updateInstance(request: protos.google.cloud.notebooks.v2.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
updateInstance(request: protos.google.cloud.notebooks.v2.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `updateInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.update_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_UpdateInstance_async
*/
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Deletes a single Instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {string} [request.requestId]
* Optional. Idempotent request UUID.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.delete_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_DeleteInstance_async
*/
deleteInstance(request?: protos.google.cloud.notebooks.v2.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
deleteInstance(request: protos.google.cloud.notebooks.v2.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
deleteInstance(request: protos.google.cloud.notebooks.v2.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `deleteInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.delete_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_DeleteInstance_async
*/
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Starts a notebook instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.start_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_StartInstance_async
*/
startInstance(request?: protos.google.cloud.notebooks.v2.IStartInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
startInstance(request: protos.google.cloud.notebooks.v2.IStartInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
startInstance(request: protos.google.cloud.notebooks.v2.IStartInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `startInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.start_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_StartInstance_async
*/
checkStartInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Stops a notebook instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.stop_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_StopInstance_async
*/
stopInstance(request?: protos.google.cloud.notebooks.v2.IStopInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
stopInstance(request: protos.google.cloud.notebooks.v2.IStopInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
stopInstance(request: protos.google.cloud.notebooks.v2.IStopInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `stopInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.stop_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_StopInstance_async
*/
checkStopInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Resets a notebook instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.reset_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_ResetInstance_async
*/
resetInstance(request?: protos.google.cloud.notebooks.v2.IResetInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
resetInstance(request: protos.google.cloud.notebooks.v2.IResetInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
resetInstance(request: protos.google.cloud.notebooks.v2.IResetInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `resetInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.reset_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_ResetInstance_async
*/
checkResetInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Upgrades a notebook instance to the latest version.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.upgrade_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_UpgradeInstance_async
*/
upgradeInstance(request?: protos.google.cloud.notebooks.v2.IUpgradeInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
upgradeInstance(request: protos.google.cloud.notebooks.v2.IUpgradeInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
upgradeInstance(request: protos.google.cloud.notebooks.v2.IUpgradeInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `upgradeInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.upgrade_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_UpgradeInstance_async
*/
checkUpgradeInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Rollbacks a notebook instance to the previous version.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {string} request.targetSnapshot
* Required. The snapshot for rollback.
* Example: "projects/test-project/global/snapshots/krwlzipynril".
* @param {string} request.revisionId
* Required. Output only. Revision Id
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.rollback_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_RollbackInstance_async
*/
rollbackInstance(request?: protos.google.cloud.notebooks.v2.IRollbackInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
rollbackInstance(request: protos.google.cloud.notebooks.v2.IRollbackInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
rollbackInstance(request: protos.google.cloud.notebooks.v2.IRollbackInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `rollbackInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.rollback_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_RollbackInstance_async
*/
checkRollbackInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format:
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
* @param {google.cloud.notebooks.v2.DiagnosticConfig} request.diagnosticConfig
* Required. Defines flags that are used to run the diagnostic tool
* @param {number} [request.timeoutMinutes]
* Optional. Maxmium amount of time in minutes before the operation times out.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.diagnose_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_DiagnoseInstance_async
*/
diagnoseInstance(request?: protos.google.cloud.notebooks.v2.IDiagnoseInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
diagnoseInstance(request: protos.google.cloud.notebooks.v2.IDiagnoseInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
diagnoseInstance(request: protos.google.cloud.notebooks.v2.IDiagnoseInstanceRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v2.IInstance, protos.google.cloud.notebooks.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `diagnoseInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.diagnose_instance.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_DiagnoseInstance_async
*/
checkDiagnoseInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v2.Instance, protos.google.cloud.notebooks.v2.OperationMetadata>>;
/**
* Lists instances in a given project and location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format:
* `parent=projects/{project_id}/locations/{location}`
* @param {number} [request.pageSize]
* Optional. Maximum return size of the list call.
* @param {string} [request.pageToken]
* Optional. A previous returned page token that can be used to continue
* listing from the last result.
* @param {string} [request.orderBy]
* Optional. Sort results. Supported values are "name", "name desc" or ""
* (unsorted).
* @param {string} [request.filter]
* Optional. List filter.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.cloud.notebooks.v2.Instance|Instance}.
* 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 `listInstancesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listInstances(request?: protos.google.cloud.notebooks.v2.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.notebooks.v2.IInstance[],
protos.google.cloud.notebooks.v2.IListInstancesRequest | null,
protos.google.cloud.notebooks.v2.IListInstancesResponse
]>;
listInstances(request: protos.google.cloud.notebooks.v2.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.notebooks.v2.IListInstancesRequest, protos.google.cloud.notebooks.v2.IListInstancesResponse | null | undefined, protos.google.cloud.notebooks.v2.IInstance>): void;
listInstances(request: protos.google.cloud.notebooks.v2.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.notebooks.v2.IListInstancesRequest, protos.google.cloud.notebooks.v2.IListInstancesResponse | null | undefined, protos.google.cloud.notebooks.v2.IInstance>): void;
/**
* Equivalent to `listInstances`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format:
* `parent=projects/{project_id}/locations/{location}`
* @param {number} [request.pageSize]
* Optional. Maximum return size of the list call.
* @param {string} [request.pageToken]
* Optional. A previous returned page token that can be used to continue
* listing from the last result.
* @param {string} [request.orderBy]
* Optional. Sort results. Supported values are "name", "name desc" or ""
* (unsorted).
* @param {string} [request.filter]
* Optional. List filter.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.cloud.notebooks.v2.Instance|Instance} 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 `listInstancesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listInstancesStream(request?: protos.google.cloud.notebooks.v2.IListInstancesRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listInstances`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format:
* `parent=projects/{project_id}/locations/{location}`
* @param {number} [request.pageSize]
* Optional. Maximum return size of the list call.
* @param {string} [request.pageToken]
* Optional. A previous returned page token that can be used to continue
* listing from the last result.
* @param {string} [request.orderBy]
* Optional. Sort results. Supported values are "name", "name desc" or ""
* (unsorted).
* @param {string} [request.filter]
* Optional. List filter.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.cloud.notebooks.v2.Instance|Instance}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/notebook_service.list_instances.js</caption>
* region_tag:notebooks_v2_generated_NotebookService_ListInstances_async
*/
listInstancesAsync(request?: protos.google.cloud.notebooks.v2.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.notebooks.v2.IInstance>;
/**
* Gets the access control policy for a resource. Returns an empty policy
* if the resource exists and does not have a policy set.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
* @param {Object} [request.options]
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`. This field is only used by Cloud IAM.
*
* This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*/
getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of
* permissions, not a NOT_FOUND error.
*
* Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization
* checking. This operation may "fail open" without warning.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
* @param {string[]} request.permissions
* The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*/
setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;
/**
* Returns permissions that a caller has on the specified resource. If the
* resource does not exist, this will return an empty set of
* permissions, not a NOT_FOUND error.
*
* Note: This operation is designed to be used for building
* permission-aware UIs and command-line tools, not for authorization
* checking. This operation may "fail open" without warning.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
* @param {string[]} request.permissions
* The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
*/
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;
/**
* Gets information about a location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Resource name for the location.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/m