API v1 service for Managed Notebooks. v1
Package
@google-cloud/notebooksConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of ManagedNotebookServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
iamClient
iamClient: IamClient;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
locationsClient
locationsClient: LocationsClient;
managedNotebookServiceStub
managedNotebookServiceStub?: Promise<{
[name: string]: Function;
}>;
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
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, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.CancelOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateRuntimeProgress(name)
checkCreateRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by createRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `parent=projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Required. User-defined unique ID of this Runtime.
*/
// const runtimeId = 'abc123'
/**
* Required. The Runtime to be created.
*/
// const runtime = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callCreateRuntime() {
// Construct request
const request = {
parent,
runtimeId,
runtime,
};
// Run request
const [operation] = await notebooksClient.createRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateRuntime();
checkDeleteRuntimeProgress(name)
checkDeleteRuntimeProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callDeleteRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.deleteRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteRuntime();
checkDiagnoseRuntimeProgress(name)
checkDiagnoseRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by diagnoseRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}`
*/
// const name = 'abc123'
/**
* Required. Defines flags that are used to run the diagnostic tool
*/
// const diagnosticConfig = {}
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callDiagnoseRuntime() {
// Construct request
const request = {
name,
diagnosticConfig,
};
// Run request
const [operation] = await notebooksClient.diagnoseRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callDiagnoseRuntime();
checkReportRuntimeEventProgress(name)
checkReportRuntimeEventProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by reportRuntimeEvent()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Required. The VM hardware token for authenticating the VM.
* http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/verifying-instance-identity
*/
// const vmId = 'abc123'
/**
* Required. The Event to be reported.
*/
// const event = {}
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callReportRuntimeEvent() {
// Construct request
const request = {
name,
vmId,
event,
};
// Run request
const [operation] = await notebooksClient.reportRuntimeEvent(request);
const [response] = await operation.promise();
console.log(response);
}
callReportRuntimeEvent();
checkResetRuntimeProgress(name)
checkResetRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by resetRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callResetRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.resetRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callResetRuntime();
checkStartRuntimeProgress(name)
checkStartRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by startRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callStartRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.startRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callStartRuntime();
checkStopRuntimeProgress(name)
checkStopRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by stopRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callStopRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.stopRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callStopRuntime();
checkSwitchRuntimeProgress(name)
checkSwitchRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by switchRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* machine type.
*/
// const machineType = 'abc123'
/**
* accelerator config.
*/
// const acceleratorConfig = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callSwitchRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.switchRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callSwitchRuntime();
checkUpdateRuntimeProgress(name)
checkUpdateRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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 Runtime to be updated.
*/
// const runtime = {}
/**
* Required. Specifies the path, relative to `Runtime`, of
* the field to update. For example, to change the software configuration
* kernels, the `update_mask` parameter would be
* specified as `software_config.kernels`,
* and the `PATCH` request body would specify the new value, as follows:
* {
* "software_config":{
* "kernels": {
* 'repository':
* 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag':
* 'latest' },
* }
* }
* Currently, only the following fields can be updated:
* - `software_config.kernels`
* - `software_config.post_startup_script`
* - `software_config.custom_gpu_driver_path`
* - `software_config.idle_shutdown`
* - `software_config.idle_shutdown_timeout`
* - `software_config.disable_terminal`
*/
// const updateMask = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callUpdateRuntime() {
// Construct request
const request = {
runtime,
updateMask,
};
// Run request
const [operation] = await notebooksClient.updateRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateRuntime();
checkUpgradeRuntimeProgress(name)
checkUpgradeRuntimeProgress(name: string): Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>>;
Check the status of the long running operation returned by upgradeRuntime()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.notebooks.v1.Runtime, protos.google.cloud.notebooks.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callUpgradeRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.upgradeRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callUpgradeRuntime();
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createRuntime(request, options)
createRuntime(request?: protos.google.cloud.notebooks.v1.ICreateRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new Runtime in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.ICreateRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `parent=projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Required. User-defined unique ID of this Runtime.
*/
// const runtimeId = 'abc123'
/**
* Required. The Runtime to be created.
*/
// const runtime = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callCreateRuntime() {
// Construct request
const request = {
parent,
runtimeId,
runtime,
};
// Run request
const [operation] = await notebooksClient.createRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateRuntime();
createRuntime(request, options, callback)
createRuntime(request: protos.google.cloud.notebooks.v1.ICreateRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.ICreateRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createRuntime(request, callback)
createRuntime(request: protos.google.cloud.notebooks.v1.ICreateRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.ICreateRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteOperation(request, options, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.DeleteOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
deleteRuntime(request, options)
deleteRuntime(request?: protos.google.cloud.notebooks.v1.IDeleteRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a single Runtime.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IDeleteRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callDeleteRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.deleteRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteRuntime();
deleteRuntime(request, options, callback)
deleteRuntime(request: protos.google.cloud.notebooks.v1.IDeleteRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IDeleteRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteRuntime(request, callback)
deleteRuntime(request: protos.google.cloud.notebooks.v1.IDeleteRuntimeRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IDeleteRuntimeRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
diagnoseRuntime(request, options)
diagnoseRuntime(request?: protos.google.cloud.notebooks.v1.IDiagnoseRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IDiagnoseRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}`
*/
// const name = 'abc123'
/**
* Required. Defines flags that are used to run the diagnostic tool
*/
// const diagnosticConfig = {}
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callDiagnoseRuntime() {
// Construct request
const request = {
name,
diagnosticConfig,
};
// Run request
const [operation] = await notebooksClient.diagnoseRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callDiagnoseRuntime();
diagnoseRuntime(request, options, callback)
diagnoseRuntime(request: protos.google.cloud.notebooks.v1.IDiagnoseRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IDiagnoseRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
diagnoseRuntime(request, callback)
diagnoseRuntime(request: protos.google.cloud.notebooks.v1.IDiagnoseRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IDiagnoseRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
environmentPath(project, environment)
environmentPath(project: string, environment: string): string;
Return a fully-qualified environment resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
environment |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
executionPath(project, location, execution)
executionPath(project: string, location: string, execution: string): string;
Return a fully-qualified execution resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
execution |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getIamPolicy(request, options, callback)
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>;
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.GetIamPolicyRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.Policy> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
Gets information about a location.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
Promise<LocationProtos.google.cloud.location.ILocation> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, options, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.GetOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
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 | |
---|---|
Type | Description |
void |
getRuntime(request, options)
getRuntime(request?: protos.google.cloud.notebooks.v1.IGetRuntimeRequest, options?: CallOptions): Promise<[
protos.google.cloud.notebooks.v1.IRuntime,
protos.google.cloud.notebooks.v1.IGetRuntimeRequest | undefined,
{} | undefined
]>;
Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IGetRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.notebooks.v1.IRuntime,
protos.google.cloud.notebooks.v1.IGetRuntimeRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callGetRuntime() {
// Construct request
const request = {
name,
};
// Run request
const response = await notebooksClient.getRuntime(request);
console.log(response);
}
callGetRuntime();
getRuntime(request, options, callback)
getRuntime(request: protos.google.cloud.notebooks.v1.IGetRuntimeRequest, options: CallOptions, callback: Callback<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IGetRuntimeRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IGetRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IGetRuntimeRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getRuntime(request, callback)
getRuntime(request: protos.google.cloud.notebooks.v1.IGetRuntimeRequest, callback: Callback<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IGetRuntimeRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IGetRuntimeRequest
|
callback |
Callback<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IGetRuntimeRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns | |
---|---|
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
instancePath(project, instance)
instancePath(project: string, instance: string): string;
Return a fully-qualified instance resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
instance |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
Lists information about the supported locations for this service. Returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<LocationProtos.google.cloud.location.ILocation> | {Object} An iterable Object that allows [async iteration](http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.ListOperationsRequest
The request object that will be sent. |
options |
gax.CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
listRuntimes(request, options)
listRuntimes(request?: protos.google.cloud.notebooks.v1.IListRuntimesRequest, options?: CallOptions): Promise<[
protos.google.cloud.notebooks.v1.IRuntime[],
protos.google.cloud.notebooks.v1.IListRuntimesRequest | null,
protos.google.cloud.notebooks.v1.IListRuntimesResponse
]>;
Lists Runtimes in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IListRuntimesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.notebooks.v1.IRuntime[],
protos.google.cloud.notebooks.v1.IListRuntimesRequest | null,
protos.google.cloud.notebooks.v1.IListRuntimesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listRuntimes(request, options, callback)
listRuntimes(request: protos.google.cloud.notebooks.v1.IListRuntimesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.notebooks.v1.IListRuntimesRequest, protos.google.cloud.notebooks.v1.IListRuntimesResponse | null | undefined, protos.google.cloud.notebooks.v1.IRuntime>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IListRuntimesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.notebooks.v1.IListRuntimesRequest, protos.google.cloud.notebooks.v1.IListRuntimesResponse | null | undefined, protos.google.cloud.notebooks.v1.IRuntime>
|
Returns | |
---|---|
Type | Description |
void |
listRuntimes(request, callback)
listRuntimes(request: protos.google.cloud.notebooks.v1.IListRuntimesRequest, callback: PaginationCallback<protos.google.cloud.notebooks.v1.IListRuntimesRequest, protos.google.cloud.notebooks.v1.IListRuntimesResponse | null | undefined, protos.google.cloud.notebooks.v1.IRuntime>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IListRuntimesRequest
|
callback |
PaginationCallback<protos.google.cloud.notebooks.v1.IListRuntimesRequest, protos.google.cloud.notebooks.v1.IListRuntimesResponse | null | undefined, protos.google.cloud.notebooks.v1.IRuntime>
|
Returns | |
---|---|
Type | Description |
void |
listRuntimesAsync(request, options)
listRuntimesAsync(request?: protos.google.cloud.notebooks.v1.IListRuntimesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.notebooks.v1.IRuntime>;
Equivalent to listRuntimes
, 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.cloud.notebooks.v1.IListRuntimesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.notebooks.v1.IRuntime> | {Object} An iterable Object that allows [async iteration](http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* 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. Format:
* `parent=projects/{project_id}/locations/{location}`
*/
// const parent = 'abc123'
/**
* Maximum return size of the list call.
*/
// const pageSize = 1234
/**
* A previous returned page token that can be used to continue listing
* from the last result.
*/
// const pageToken = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callListRuntimes() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await notebooksClient.listRuntimesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListRuntimes();
listRuntimesStream(request, options)
listRuntimesStream(request?: protos.google.cloud.notebooks.v1.IListRuntimesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IListRuntimesRequest
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 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 |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchEnvironmentFromEnvironmentName(environmentName)
matchEnvironmentFromEnvironmentName(environmentName: string): string | number;
Parse the environment from Environment resource.
Parameter | |
---|---|
Name | Description |
environmentName |
string
A fully-qualified path representing Environment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the environment. |
matchExecutionFromExecutionName(executionName)
matchExecutionFromExecutionName(executionName: string): string | number;
Parse the execution from Execution resource.
Parameter | |
---|---|
Name | Description |
executionName |
string
A fully-qualified path representing Execution resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the execution. |
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName(instanceName: string): string | number;
Parse the instance from Instance resource.
Parameter | |
---|---|
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the instance. |
matchLocationFromExecutionName(executionName)
matchLocationFromExecutionName(executionName: string): string | number;
Parse the location from Execution resource.
Parameter | |
---|---|
Name | Description |
executionName |
string
A fully-qualified path representing Execution resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromRuntimeName(runtimeName)
matchLocationFromRuntimeName(runtimeName: string): string | number;
Parse the location from Runtime resource.
Parameter | |
---|---|
Name | Description |
runtimeName |
string
A fully-qualified path representing Runtime resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromScheduleName(scheduleName)
matchLocationFromScheduleName(scheduleName: string): string | number;
Parse the location from Schedule resource.
Parameter | |
---|---|
Name | Description |
scheduleName |
string
A fully-qualified path representing Schedule resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromEnvironmentName(environmentName)
matchProjectFromEnvironmentName(environmentName: string): string | number;
Parse the project from Environment resource.
Parameter | |
---|---|
Name | Description |
environmentName |
string
A fully-qualified path representing Environment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromExecutionName(executionName)
matchProjectFromExecutionName(executionName: string): string | number;
Parse the project from Execution resource.
Parameter | |
---|---|
Name | Description |
executionName |
string
A fully-qualified path representing Execution resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName(instanceName: string): string | number;
Parse the project from Instance resource.
Parameter | |
---|---|
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRuntimeName(runtimeName)
matchProjectFromRuntimeName(runtimeName: string): string | number;
Parse the project from Runtime resource.
Parameter | |
---|---|
Name | Description |
runtimeName |
string
A fully-qualified path representing Runtime resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromScheduleName(scheduleName)
matchProjectFromScheduleName(scheduleName: string): string | number;
Parse the project from Schedule resource.
Parameter | |
---|---|
Name | Description |
scheduleName |
string
A fully-qualified path representing Schedule resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchRuntimeFromRuntimeName(runtimeName)
matchRuntimeFromRuntimeName(runtimeName: string): string | number;
Parse the runtime from Runtime resource.
Parameter | |
---|---|
Name | Description |
runtimeName |
string
A fully-qualified path representing Runtime resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the runtime. |
matchScheduleFromScheduleName(scheduleName)
matchScheduleFromScheduleName(scheduleName: string): string | number;
Parse the schedule from Schedule resource.
Parameter | |
---|---|
Name | Description |
scheduleName |
string
A fully-qualified path representing Schedule resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the schedule. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
refreshRuntimeTokenInternal(request, options)
refreshRuntimeTokenInternal(request?: protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest, options?: CallOptions): Promise<[
protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalResponse,
(protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest | undefined),
{} | undefined
]>;
Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalResponse,
(protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](http://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Required. The VM hardware token for authenticating the VM.
* http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/verifying-instance-identity
*/
// const vmId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callRefreshRuntimeTokenInternal() {
// Construct request
const request = {
name,
vmId,
};
// Run request
const response = await notebooksClient.refreshRuntimeTokenInternal(request);
console.log(response);
}
callRefreshRuntimeTokenInternal();
refreshRuntimeTokenInternal(request, options, callback)
refreshRuntimeTokenInternal(request: protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest, options: CallOptions, callback: Callback<protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalResponse, protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalResponse, protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
refreshRuntimeTokenInternal(request, callback)
refreshRuntimeTokenInternal(request: protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest, callback: Callback<protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalResponse, protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest
|
callback |
Callback<protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalResponse, protos.google.cloud.notebooks.v1.IRefreshRuntimeTokenInternalRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
reportRuntimeEvent(request, options)
reportRuntimeEvent(request?: protos.google.cloud.notebooks.v1.IReportRuntimeEventRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Report and process a runtime event.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IReportRuntimeEventRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Required. The VM hardware token for authenticating the VM.
* http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/verifying-instance-identity
*/
// const vmId = 'abc123'
/**
* Required. The Event to be reported.
*/
// const event = {}
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callReportRuntimeEvent() {
// Construct request
const request = {
name,
vmId,
event,
};
// Run request
const [operation] = await notebooksClient.reportRuntimeEvent(request);
const [response] = await operation.promise();
console.log(response);
}
callReportRuntimeEvent();
reportRuntimeEvent(request, options, callback)
reportRuntimeEvent(request: protos.google.cloud.notebooks.v1.IReportRuntimeEventRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IReportRuntimeEventRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
reportRuntimeEvent(request, callback)
reportRuntimeEvent(request: protos.google.cloud.notebooks.v1.IReportRuntimeEventRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IReportRuntimeEventRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
resetRuntime(request, options)
resetRuntime(request?: protos.google.cloud.notebooks.v1.IResetRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Resets a Managed Notebook Runtime.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IResetRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callResetRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.resetRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callResetRuntime();
resetRuntime(request, options, callback)
resetRuntime(request: protos.google.cloud.notebooks.v1.IResetRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IResetRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
resetRuntime(request, callback)
resetRuntime(request: protos.google.cloud.notebooks.v1.IResetRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IResetRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
runtimePath(project, location, runtime)
runtimePath(project: string, location: string, runtime: string): string;
Return a fully-qualified runtime resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
runtime |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
schedulePath(project, location, schedule)
schedulePath(project: string, location: string, schedule: string): string;
Return a fully-qualified schedule resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
schedule |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
setIamPolicy(request, options, callback)
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.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.Policy> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
startRuntime(request, options)
startRuntime(request?: protos.google.cloud.notebooks.v1.IStartRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/stop-start-instance http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/suspend-resume-instance
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IStartRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callStartRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.startRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callStartRuntime();
startRuntime(request, options, callback)
startRuntime(request: protos.google.cloud.notebooks.v1.IStartRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IStartRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
startRuntime(request, callback)
startRuntime(request: protos.google.cloud.notebooks.v1.IStartRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IStartRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
stopRuntime(request, options)
stopRuntime(request?: protos.google.cloud.notebooks.v1.IStopRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/stop-start-instance http://cloud.go888ogle.com.fqhub.com/compute/docs/instances/suspend-resume-instance
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IStopRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callStopRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.stopRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callStopRuntime();
stopRuntime(request, options, callback)
stopRuntime(request: protos.google.cloud.notebooks.v1.IStopRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IStopRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
stopRuntime(request, callback)
stopRuntime(request: protos.google.cloud.notebooks.v1.IStopRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IStopRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
switchRuntime(request, options)
switchRuntime(request?: protos.google.cloud.notebooks.v1.ISwitchRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Switch a Managed Notebook Runtime.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.ISwitchRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* machine type.
*/
// const machineType = 'abc123'
/**
* accelerator config.
*/
// const acceleratorConfig = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callSwitchRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.switchRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callSwitchRuntime();
switchRuntime(request, options, callback)
switchRuntime(request: protos.google.cloud.notebooks.v1.ISwitchRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.ISwitchRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
switchRuntime(request, callback)
switchRuntime(request: protos.google.cloud.notebooks.v1.ISwitchRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.ISwitchRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
testIamPermissions(request, options, callback)
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>;
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.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
updateRuntime(request, options)
updateRuntime(request?: protos.google.cloud.notebooks.v1.IUpdateRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Update Notebook Runtime configuration.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IUpdateRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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 Runtime to be updated.
*/
// const runtime = {}
/**
* Required. Specifies the path, relative to `Runtime`, of
* the field to update. For example, to change the software configuration
* kernels, the `update_mask` parameter would be
* specified as `software_config.kernels`,
* and the `PATCH` request body would specify the new value, as follows:
* {
* "software_config":{
* "kernels": {
* 'repository':
* 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag':
* 'latest' },
* }
* }
* Currently, only the following fields can be updated:
* - `software_config.kernels`
* - `software_config.post_startup_script`
* - `software_config.custom_gpu_driver_path`
* - `software_config.idle_shutdown`
* - `software_config.idle_shutdown_timeout`
* - `software_config.disable_terminal`
*/
// const updateMask = {}
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callUpdateRuntime() {
// Construct request
const request = {
runtime,
updateMask,
};
// Run request
const [operation] = await notebooksClient.updateRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateRuntime();
updateRuntime(request, options, callback)
updateRuntime(request: protos.google.cloud.notebooks.v1.IUpdateRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IUpdateRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateRuntime(request, callback)
updateRuntime(request: protos.google.cloud.notebooks.v1.IUpdateRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IUpdateRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
upgradeRuntime(request, options)
upgradeRuntime(request?: protos.google.cloud.notebooks.v1.IUpgradeRuntimeRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Upgrades a Managed Notebook Runtime to the latest version.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IUpgradeRuntimeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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. Format:
* `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
*/
// const name = 'abc123'
/**
* Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Notebooks library
const {ManagedNotebookServiceClient} = require('@google-cloud/notebooks').v1;
// Instantiates a client
const notebooksClient = new ManagedNotebookServiceClient();
async function callUpgradeRuntime() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await notebooksClient.upgradeRuntime(request);
const [response] = await operation.promise();
console.log(response);
}
callUpgradeRuntime();
upgradeRuntime(request, options, callback)
upgradeRuntime(request: protos.google.cloud.notebooks.v1.IUpgradeRuntimeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IUpgradeRuntimeRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
upgradeRuntime(request, callback)
upgradeRuntime(request: protos.google.cloud.notebooks.v1.IUpgradeRuntimeRequest, callback: Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.notebooks.v1.IUpgradeRuntimeRequest
|
callback |
Callback<LROperation<protos.google.cloud.notebooks.v1.IRuntime, protos.google.cloud.notebooks.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |