AI Platform Notebooks v1 API - Class ManagedNotebookServiceClient (2.5.0)

public abstract class ManagedNotebookServiceClient

Reference documentation and code samples for the AI Platform Notebooks v1 API class ManagedNotebookServiceClient.

ManagedNotebookService client wrapper, for convenient use.

Inheritance

object > ManagedNotebookServiceClient

Namespace

Google.Cloud.Notebooks.V1

Assembly

Google.Cloud.Notebooks.V1.dll

Remarks

API v1 service for Managed Notebooks.

Properties

CreateRuntimeOperationsClient

public virtual OperationsClient CreateRuntimeOperationsClient { get; }

The long-running operations client for CreateRuntime.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ManagedNotebookService service, which is a host of "notebooks.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ManagedNotebookService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default ManagedNotebookService scopes are:

DeleteRuntimeOperationsClient

public virtual OperationsClient DeleteRuntimeOperationsClient { get; }

The long-running operations client for DeleteRuntime.

Property Value
Type Description
OperationsClient

DiagnoseRuntimeOperationsClient

public virtual OperationsClient DiagnoseRuntimeOperationsClient { get; }

The long-running operations client for DiagnoseRuntime.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual ManagedNotebookService.ManagedNotebookServiceClient GrpcClient { get; }

The underlying gRPC ManagedNotebookService client

Property Value
Type Description
ManagedNotebookServiceManagedNotebookServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ReportRuntimeEventOperationsClient

public virtual OperationsClient ReportRuntimeEventOperationsClient { get; }

The long-running operations client for ReportRuntimeEvent.

Property Value
Type Description
OperationsClient

ResetRuntimeOperationsClient

public virtual OperationsClient ResetRuntimeOperationsClient { get; }

The long-running operations client for ResetRuntime.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

StartRuntimeOperationsClient

public virtual OperationsClient StartRuntimeOperationsClient { get; }

The long-running operations client for StartRuntime.

Property Value
Type Description
OperationsClient

StopRuntimeOperationsClient

public virtual OperationsClient StopRuntimeOperationsClient { get; }

The long-running operations client for StopRuntime.

Property Value
Type Description
OperationsClient

SwitchRuntimeOperationsClient

public virtual OperationsClient SwitchRuntimeOperationsClient { get; }

The long-running operations client for SwitchRuntime.

Property Value
Type Description
OperationsClient

UpdateRuntimeOperationsClient

public virtual OperationsClient UpdateRuntimeOperationsClient { get; }

The long-running operations client for UpdateRuntime.

Property Value
Type Description
OperationsClient

UpgradeRuntimeOperationsClient

public virtual OperationsClient UpgradeRuntimeOperationsClient { get; }

The long-running operations client for UpgradeRuntime.

Property Value
Type Description
OperationsClient

Methods

Create()

public static ManagedNotebookServiceClient Create()

Synchronously creates a ManagedNotebookServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ManagedNotebookServiceClientBuilder.

Returns
Type Description
ManagedNotebookServiceClient

The created ManagedNotebookServiceClient.

CreateAsync(CancellationToken)

public static Task<ManagedNotebookServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ManagedNotebookServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ManagedNotebookServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskManagedNotebookServiceClient

The task representing the created ManagedNotebookServiceClient.

CreateRuntime(CreateRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> CreateRuntime(CreateRuntimeRequest request, CallSettings callSettings = null)

Creates a new Runtime in a given project and location.

Parameters
Name Description
request CreateRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
CreateRuntimeRequest request = new CreateRuntimeRequest
{
    ParentAsRuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    RuntimeId = "",
    Runtime = new Runtime(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.CreateRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceCreateRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntime(RuntimeName, string, Runtime, CallSettings)

public virtual Operation<Runtime, OperationMetadata> CreateRuntime(RuntimeName parent, string runtimeId, Runtime runtime, CallSettings callSettings = null)

Creates a new Runtime in a given project and location.

Parameters
Name Description
parent RuntimeName

Required. Format: parent=projects/{project_id}/locations/{location}

runtimeId string

Required. User-defined unique ID of this Runtime.

runtime Runtime

Required. The Runtime to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RuntimeName parent = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
string runtimeId = "";
Runtime runtime = new Runtime();
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.CreateRuntime(parent, runtimeId, runtime);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceCreateRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntime(string, string, Runtime, CallSettings)

public virtual Operation<Runtime, OperationMetadata> CreateRuntime(string parent, string runtimeId, Runtime runtime, CallSettings callSettings = null)

Creates a new Runtime in a given project and location.

Parameters
Name Description
parent string

Required. Format: parent=projects/{project_id}/locations/{location}

runtimeId string

Required. User-defined unique ID of this Runtime.

runtime Runtime

Required. The Runtime to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
string runtimeId = "";
Runtime runtime = new Runtime();
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.CreateRuntime(parent, runtimeId, runtime);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceCreateRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntimeAsync(CreateRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> CreateRuntimeAsync(CreateRuntimeRequest request, CallSettings callSettings = null)

Creates a new Runtime in a given project and location.

Parameters
Name Description
request CreateRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateRuntimeRequest request = new CreateRuntimeRequest
{
    ParentAsRuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    RuntimeId = "",
    Runtime = new Runtime(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.CreateRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceCreateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntimeAsync(CreateRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> CreateRuntimeAsync(CreateRuntimeRequest request, CancellationToken cancellationToken)

Creates a new Runtime in a given project and location.

Parameters
Name Description
request CreateRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateRuntimeRequest request = new CreateRuntimeRequest
{
    ParentAsRuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    RuntimeId = "",
    Runtime = new Runtime(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.CreateRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceCreateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntimeAsync(RuntimeName, string, Runtime, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> CreateRuntimeAsync(RuntimeName parent, string runtimeId, Runtime runtime, CallSettings callSettings = null)

Creates a new Runtime in a given project and location.

Parameters
Name Description
parent RuntimeName

Required. Format: parent=projects/{project_id}/locations/{location}

runtimeId string

Required. User-defined unique ID of this Runtime.

runtime Runtime

Required. The Runtime to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName parent = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
string runtimeId = "";
Runtime runtime = new Runtime();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.CreateRuntimeAsync(parent, runtimeId, runtime);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceCreateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntimeAsync(RuntimeName, string, Runtime, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> CreateRuntimeAsync(RuntimeName parent, string runtimeId, Runtime runtime, CancellationToken cancellationToken)

Creates a new Runtime in a given project and location.

Parameters
Name Description
parent RuntimeName

Required. Format: parent=projects/{project_id}/locations/{location}

runtimeId string

Required. User-defined unique ID of this Runtime.

runtime Runtime

Required. The Runtime to be created.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName parent = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
string runtimeId = "";
Runtime runtime = new Runtime();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.CreateRuntimeAsync(parent, runtimeId, runtime);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceCreateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntimeAsync(string, string, Runtime, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> CreateRuntimeAsync(string parent, string runtimeId, Runtime runtime, CallSettings callSettings = null)

Creates a new Runtime in a given project and location.

Parameters
Name Description
parent string

Required. Format: parent=projects/{project_id}/locations/{location}

runtimeId string

Required. User-defined unique ID of this Runtime.

runtime Runtime

Required. The Runtime to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
string runtimeId = "";
Runtime runtime = new Runtime();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.CreateRuntimeAsync(parent, runtimeId, runtime);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceCreateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

CreateRuntimeAsync(string, string, Runtime, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> CreateRuntimeAsync(string parent, string runtimeId, Runtime runtime, CancellationToken cancellationToken)

Creates a new Runtime in a given project and location.

Parameters
Name Description
parent string

Required. Format: parent=projects/{project_id}/locations/{location}

runtimeId string

Required. User-defined unique ID of this Runtime.

runtime Runtime

Required. The Runtime to be created.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
string runtimeId = "";
Runtime runtime = new Runtime();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.CreateRuntimeAsync(parent, runtimeId, runtime);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceCreateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DeleteRuntime(DeleteRuntimeRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteRuntime(DeleteRuntimeRequest request, CallSettings callSettings = null)

Deletes a single Runtime.

Parameters
Name Description
request DeleteRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
DeleteRuntimeRequest request = new DeleteRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = managedNotebookServiceClient.DeleteRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDeleteRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntime(RuntimeName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteRuntime(RuntimeName name, CallSettings callSettings = null)

Deletes a single Runtime.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Empty, OperationMetadata> response = managedNotebookServiceClient.DeleteRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDeleteRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntime(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteRuntime(string name, CallSettings callSettings = null)

Deletes a single Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Empty, OperationMetadata> response = managedNotebookServiceClient.DeleteRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDeleteRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntimeAsync(DeleteRuntimeRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteRuntimeAsync(DeleteRuntimeRequest request, CallSettings callSettings = null)

Deletes a single Runtime.

Parameters
Name Description
request DeleteRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteRuntimeRequest request = new DeleteRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDeleteRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntimeAsync(DeleteRuntimeRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteRuntimeAsync(DeleteRuntimeRequest request, CancellationToken cancellationToken)

Deletes a single Runtime.

Parameters
Name Description
request DeleteRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteRuntimeRequest request = new DeleteRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDeleteRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntimeAsync(RuntimeName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteRuntimeAsync(RuntimeName name, CallSettings callSettings = null)

Deletes a single Runtime.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDeleteRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntimeAsync(RuntimeName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteRuntimeAsync(RuntimeName name, CancellationToken cancellationToken)

Deletes a single Runtime.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDeleteRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteRuntimeAsync(string name, CallSettings callSettings = null)

Deletes a single Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDeleteRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteRuntimeAsync(string name, CancellationToken cancellationToken)

Deletes a single Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDeleteRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntime(DiagnoseRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> DiagnoseRuntime(DiagnoseRuntimeRequest request, CallSettings callSettings = null)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
request DiagnoseRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
DiagnoseRuntimeRequest request = new DiagnoseRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    DiagnosticConfig = new DiagnosticConfig(),
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.DiagnoseRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDiagnoseRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntime(RuntimeName, DiagnosticConfig, CallSettings)

public virtual Operation<Runtime, OperationMetadata> DiagnoseRuntime(RuntimeName name, DiagnosticConfig diagnosticConfig, CallSettings callSettings = null)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtimes_id}

diagnosticConfig DiagnosticConfig

Required. Defines flags that are used to run the diagnostic tool

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
DiagnosticConfig diagnosticConfig = new DiagnosticConfig();
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.DiagnoseRuntime(name, diagnosticConfig);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDiagnoseRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntime(string, DiagnosticConfig, CallSettings)

public virtual Operation<Runtime, OperationMetadata> DiagnoseRuntime(string name, DiagnosticConfig diagnosticConfig, CallSettings callSettings = null)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtimes_id}

diagnosticConfig DiagnosticConfig

Required. Defines flags that are used to run the diagnostic tool

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
DiagnosticConfig diagnosticConfig = new DiagnosticConfig();
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.DiagnoseRuntime(name, diagnosticConfig);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDiagnoseRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntimeAsync(DiagnoseRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> DiagnoseRuntimeAsync(DiagnoseRuntimeRequest request, CallSettings callSettings = null)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
request DiagnoseRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DiagnoseRuntimeRequest request = new DiagnoseRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    DiagnosticConfig = new DiagnosticConfig(),
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntimeAsync(DiagnoseRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> DiagnoseRuntimeAsync(DiagnoseRuntimeRequest request, CancellationToken cancellationToken)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
request DiagnoseRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DiagnoseRuntimeRequest request = new DiagnoseRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    DiagnosticConfig = new DiagnosticConfig(),
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntimeAsync(RuntimeName, DiagnosticConfig, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> DiagnoseRuntimeAsync(RuntimeName name, DiagnosticConfig diagnosticConfig, CallSettings callSettings = null)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtimes_id}

diagnosticConfig DiagnosticConfig

Required. Defines flags that are used to run the diagnostic tool

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
DiagnosticConfig diagnosticConfig = new DiagnosticConfig();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(name, diagnosticConfig);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntimeAsync(RuntimeName, DiagnosticConfig, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> DiagnoseRuntimeAsync(RuntimeName name, DiagnosticConfig diagnosticConfig, CancellationToken cancellationToken)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtimes_id}

diagnosticConfig DiagnosticConfig

Required. Defines flags that are used to run the diagnostic tool

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
DiagnosticConfig diagnosticConfig = new DiagnosticConfig();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(name, diagnosticConfig);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntimeAsync(string, DiagnosticConfig, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> DiagnoseRuntimeAsync(string name, DiagnosticConfig diagnosticConfig, CallSettings callSettings = null)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtimes_id}

diagnosticConfig DiagnosticConfig

Required. Defines flags that are used to run the diagnostic tool

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
DiagnosticConfig diagnosticConfig = new DiagnosticConfig();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(name, diagnosticConfig);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

DiagnoseRuntimeAsync(string, DiagnosticConfig, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> DiagnoseRuntimeAsync(string name, DiagnosticConfig diagnosticConfig, CancellationToken cancellationToken)

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtimes_id}

diagnosticConfig DiagnosticConfig

Required. Defines flags that are used to run the diagnostic tool

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
DiagnosticConfig diagnosticConfig = new DiagnosticConfig();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(name, diagnosticConfig);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

GetRuntime(GetRuntimeRequest, CallSettings)

public virtual Runtime GetRuntime(GetRuntimeRequest request, CallSettings callSettings = null)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
request GetRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Runtime

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
GetRuntimeRequest request = new GetRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
};
// Make the request
Runtime response = managedNotebookServiceClient.GetRuntime(request);

GetRuntime(RuntimeName, CallSettings)

public virtual Runtime GetRuntime(RuntimeName name, CallSettings callSettings = null)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Runtime

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Runtime response = managedNotebookServiceClient.GetRuntime(name);

GetRuntime(string, CallSettings)

public virtual Runtime GetRuntime(string name, CallSettings callSettings = null)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Runtime

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Runtime response = managedNotebookServiceClient.GetRuntime(name);

GetRuntimeAsync(GetRuntimeRequest, CallSettings)

public virtual Task<Runtime> GetRuntimeAsync(GetRuntimeRequest request, CallSettings callSettings = null)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
request GetRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRuntime

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetRuntimeRequest request = new GetRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
};
// Make the request
Runtime response = await managedNotebookServiceClient.GetRuntimeAsync(request);

GetRuntimeAsync(GetRuntimeRequest, CancellationToken)

public virtual Task<Runtime> GetRuntimeAsync(GetRuntimeRequest request, CancellationToken cancellationToken)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
request GetRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRuntime

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetRuntimeRequest request = new GetRuntimeRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
};
// Make the request
Runtime response = await managedNotebookServiceClient.GetRuntimeAsync(request);

GetRuntimeAsync(RuntimeName, CallSettings)

public virtual Task<Runtime> GetRuntimeAsync(RuntimeName name, CallSettings callSettings = null)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRuntime

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Runtime response = await managedNotebookServiceClient.GetRuntimeAsync(name);

GetRuntimeAsync(RuntimeName, CancellationToken)

public virtual Task<Runtime> GetRuntimeAsync(RuntimeName name, CancellationToken cancellationToken)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRuntime

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Runtime response = await managedNotebookServiceClient.GetRuntimeAsync(name);

GetRuntimeAsync(string, CallSettings)

public virtual Task<Runtime> GetRuntimeAsync(string name, CallSettings callSettings = null)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRuntime

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Runtime response = await managedNotebookServiceClient.GetRuntimeAsync(name);

GetRuntimeAsync(string, CancellationToken)

public virtual Task<Runtime> GetRuntimeAsync(string name, CancellationToken cancellationToken)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRuntime

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Runtime response = await managedNotebookServiceClient.GetRuntimeAsync(name);

ListRuntimes(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListRuntimesResponse, Runtime> ListRuntimes(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Runtimes in a given project and location.

Parameters
Name Description
parent LocationName

Required. Format: parent=projects/{project_id}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListRuntimesResponseRuntime

A pageable sequence of Runtime resources.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListRuntimesResponse, Runtime> response = managedNotebookServiceClient.ListRuntimes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Runtime item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRuntimesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Runtime item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Runtime> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Runtime item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRuntimes(ListRuntimesRequest, CallSettings)

public virtual PagedEnumerable<ListRuntimesResponse, Runtime> ListRuntimes(ListRuntimesRequest request, CallSettings callSettings = null)

Lists Runtimes in a given project and location.

Parameters
Name Description
request ListRuntimesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListRuntimesResponseRuntime

A pageable sequence of Runtime resources.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
ListRuntimesRequest request = new ListRuntimesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListRuntimesResponse, Runtime> response = managedNotebookServiceClient.ListRuntimes(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Runtime item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRuntimesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Runtime item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Runtime> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Runtime item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRuntimes(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListRuntimesResponse, Runtime> ListRuntimes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Runtimes in a given project and location.

Parameters
Name Description
parent string

Required. Format: parent=projects/{project_id}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListRuntimesResponseRuntime

A pageable sequence of Runtime resources.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListRuntimesResponse, Runtime> response = managedNotebookServiceClient.ListRuntimes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Runtime item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRuntimesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Runtime item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Runtime> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Runtime item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRuntimesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRuntimesResponse, Runtime> ListRuntimesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Runtimes in a given project and location.

Parameters
Name Description
parent LocationName

Required. Format: parent=projects/{project_id}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListRuntimesResponseRuntime

A pageable asynchronous sequence of Runtime resources.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListRuntimesResponse, Runtime> response = managedNotebookServiceClient.ListRuntimesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Runtime item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRuntimesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Runtime item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Runtime> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Runtime item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRuntimesAsync(ListRuntimesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListRuntimesResponse, Runtime> ListRuntimesAsync(ListRuntimesRequest request, CallSettings callSettings = null)

Lists Runtimes in a given project and location.

Parameters
Name Description
request ListRuntimesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListRuntimesResponseRuntime

A pageable asynchronous sequence of Runtime resources.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ListRuntimesRequest request = new ListRuntimesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListRuntimesResponse, Runtime> response = managedNotebookServiceClient.ListRuntimesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Runtime item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRuntimesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Runtime item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Runtime> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Runtime item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListRuntimesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRuntimesResponse, Runtime> ListRuntimesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Runtimes in a given project and location.

Parameters
Name Description
parent string

Required. Format: parent=projects/{project_id}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListRuntimesResponseRuntime

A pageable asynchronous sequence of Runtime resources.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListRuntimesResponse, Runtime> response = managedNotebookServiceClient.ListRuntimesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Runtime item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRuntimesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Runtime item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Runtime> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Runtime item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceCreateRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceCreateRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceCreateRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceCreateRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteRuntime(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDiagnoseRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceDiagnoseRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DiagnoseRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceDiagnoseRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceDiagnoseRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DiagnoseRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceReportRuntimeEvent(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceReportRuntimeEvent(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ReportRuntimeEvent .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceReportRuntimeEventAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceReportRuntimeEventAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ReportRuntimeEvent.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceResetRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceResetRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ResetRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceResetRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceResetRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ResetRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceStartRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceStartRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of StartRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceStartRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceStartRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of StartRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceStopRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceStopRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of StopRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceStopRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceStopRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of StopRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceSwitchRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceSwitchRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SwitchRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceSwitchRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceSwitchRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SwitchRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceUpdateRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceUpdateRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceUpdateRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceUpgradeRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> PollOnceUpgradeRuntime(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpgradeRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The result of polling the operation.

PollOnceUpgradeRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> PollOnceUpgradeRuntimeAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpgradeRuntime.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A task representing the result of polling the operation.

RefreshRuntimeTokenInternal(RefreshRuntimeTokenInternalRequest, CallSettings)

public virtual RefreshRuntimeTokenInternalResponse RefreshRuntimeTokenInternal(RefreshRuntimeTokenInternalRequest request, CallSettings callSettings = null)

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 RefreshRuntimeTokenInternalRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RefreshRuntimeTokenInternalResponse

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RefreshRuntimeTokenInternalRequest request = new RefreshRuntimeTokenInternalRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    VmId = "",
};
// Make the request
RefreshRuntimeTokenInternalResponse response = managedNotebookServiceClient.RefreshRuntimeTokenInternal(request);

RefreshRuntimeTokenInternal(RuntimeName, string, CallSettings)

public virtual RefreshRuntimeTokenInternalResponse RefreshRuntimeTokenInternal(RuntimeName name, string vmId, CallSettings callSettings = null)

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

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

vmId string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RefreshRuntimeTokenInternalResponse

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
string vmId = "";
// Make the request
RefreshRuntimeTokenInternalResponse response = managedNotebookServiceClient.RefreshRuntimeTokenInternal(name, vmId);

RefreshRuntimeTokenInternal(string, string, CallSettings)

public virtual RefreshRuntimeTokenInternalResponse RefreshRuntimeTokenInternal(string name, string vmId, CallSettings callSettings = null)

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

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

vmId string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RefreshRuntimeTokenInternalResponse

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
string vmId = "";
// Make the request
RefreshRuntimeTokenInternalResponse response = managedNotebookServiceClient.RefreshRuntimeTokenInternal(name, vmId);

RefreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest, CallSettings)

public virtual Task<RefreshRuntimeTokenInternalResponse> RefreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest request, CallSettings callSettings = null)

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 RefreshRuntimeTokenInternalRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRefreshRuntimeTokenInternalResponse

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RefreshRuntimeTokenInternalRequest request = new RefreshRuntimeTokenInternalRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    VmId = "",
};
// Make the request
RefreshRuntimeTokenInternalResponse response = await managedNotebookServiceClient.RefreshRuntimeTokenInternalAsync(request);

RefreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest, CancellationToken)

public virtual Task<RefreshRuntimeTokenInternalResponse> RefreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest request, CancellationToken cancellationToken)

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 RefreshRuntimeTokenInternalRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRefreshRuntimeTokenInternalResponse

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RefreshRuntimeTokenInternalRequest request = new RefreshRuntimeTokenInternalRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    VmId = "",
};
// Make the request
RefreshRuntimeTokenInternalResponse response = await managedNotebookServiceClient.RefreshRuntimeTokenInternalAsync(request);

RefreshRuntimeTokenInternalAsync(RuntimeName, string, CallSettings)

public virtual Task<RefreshRuntimeTokenInternalResponse> RefreshRuntimeTokenInternalAsync(RuntimeName name, string vmId, CallSettings callSettings = null)

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

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

vmId string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRefreshRuntimeTokenInternalResponse

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
string vmId = "";
// Make the request
RefreshRuntimeTokenInternalResponse response = await managedNotebookServiceClient.RefreshRuntimeTokenInternalAsync(name, vmId);

RefreshRuntimeTokenInternalAsync(RuntimeName, string, CancellationToken)

public virtual Task<RefreshRuntimeTokenInternalResponse> RefreshRuntimeTokenInternalAsync(RuntimeName name, string vmId, CancellationToken cancellationToken)

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

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

vmId string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRefreshRuntimeTokenInternalResponse

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
string vmId = "";
// Make the request
RefreshRuntimeTokenInternalResponse response = await managedNotebookServiceClient.RefreshRuntimeTokenInternalAsync(name, vmId);

RefreshRuntimeTokenInternalAsync(string, string, CallSettings)

public virtual Task<RefreshRuntimeTokenInternalResponse> RefreshRuntimeTokenInternalAsync(string name, string vmId, CallSettings callSettings = null)

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

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

vmId string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRefreshRuntimeTokenInternalResponse

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
string vmId = "";
// Make the request
RefreshRuntimeTokenInternalResponse response = await managedNotebookServiceClient.RefreshRuntimeTokenInternalAsync(name, vmId);

RefreshRuntimeTokenInternalAsync(string, string, CancellationToken)

public virtual Task<RefreshRuntimeTokenInternalResponse> RefreshRuntimeTokenInternalAsync(string name, string vmId, CancellationToken cancellationToken)

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

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

vmId string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRefreshRuntimeTokenInternalResponse

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
string vmId = "";
// Make the request
RefreshRuntimeTokenInternalResponse response = await managedNotebookServiceClient.RefreshRuntimeTokenInternalAsync(name, vmId);

ReportRuntimeEvent(ReportRuntimeEventRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> ReportRuntimeEvent(ReportRuntimeEventRequest request, CallSettings callSettings = null)

Report and process a runtime event.

Parameters
Name Description
request ReportRuntimeEventRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
ReportRuntimeEventRequest request = new ReportRuntimeEventRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    VmId = "",
    Event = new Event(),
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.ReportRuntimeEvent(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceReportRuntimeEvent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEvent(RuntimeName, CallSettings)

public virtual Operation<Runtime, OperationMetadata> ReportRuntimeEvent(RuntimeName name, CallSettings callSettings = null)

Report and process a runtime event.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.ReportRuntimeEvent(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceReportRuntimeEvent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEvent(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> ReportRuntimeEvent(string name, CallSettings callSettings = null)

Report and process a runtime event.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.ReportRuntimeEvent(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceReportRuntimeEvent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEventAsync(ReportRuntimeEventRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> ReportRuntimeEventAsync(ReportRuntimeEventRequest request, CallSettings callSettings = null)

Report and process a runtime event.

Parameters
Name Description
request ReportRuntimeEventRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ReportRuntimeEventRequest request = new ReportRuntimeEventRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    VmId = "",
    Event = new Event(),
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ReportRuntimeEventAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceReportRuntimeEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEventAsync(ReportRuntimeEventRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> ReportRuntimeEventAsync(ReportRuntimeEventRequest request, CancellationToken cancellationToken)

Report and process a runtime event.

Parameters
Name Description
request ReportRuntimeEventRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ReportRuntimeEventRequest request = new ReportRuntimeEventRequest
{
    RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"),
    VmId = "",
    Event = new Event(),
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ReportRuntimeEventAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceReportRuntimeEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEventAsync(RuntimeName, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> ReportRuntimeEventAsync(RuntimeName name, CallSettings callSettings = null)

Report and process a runtime event.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ReportRuntimeEventAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceReportRuntimeEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEventAsync(RuntimeName, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> ReportRuntimeEventAsync(RuntimeName name, CancellationToken cancellationToken)

Report and process a runtime event.

Parameters
Name Description
name RuntimeName

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ReportRuntimeEventAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceReportRuntimeEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEventAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> ReportRuntimeEventAsync(string name, CallSettings callSettings = null)

Report and process a runtime event.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ReportRuntimeEventAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceReportRuntimeEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ReportRuntimeEventAsync(string, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> ReportRuntimeEventAsync(string name, CancellationToken cancellationToken)

Report and process a runtime event.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ReportRuntimeEventAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceReportRuntimeEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ResetRuntime(ResetRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> ResetRuntime(ResetRuntimeRequest request, CallSettings callSettings = null)

Resets a Managed Notebook Runtime.

Parameters
Name Description
request ResetRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
ResetRuntimeRequest request = new ResetRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.ResetRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceResetRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ResetRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> ResetRuntime(string name, CallSettings callSettings = null)

Resets a Managed Notebook Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.ResetRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceResetRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ResetRuntimeAsync(ResetRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> ResetRuntimeAsync(ResetRuntimeRequest request, CallSettings callSettings = null)

Resets a Managed Notebook Runtime.

Parameters
Name Description
request ResetRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ResetRuntimeRequest request = new ResetRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ResetRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceResetRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ResetRuntimeAsync(ResetRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> ResetRuntimeAsync(ResetRuntimeRequest request, CancellationToken cancellationToken)

Resets a Managed Notebook Runtime.

Parameters
Name Description
request ResetRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ResetRuntimeRequest request = new ResetRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ResetRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceResetRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ResetRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> ResetRuntimeAsync(string name, CallSettings callSettings = null)

Resets a Managed Notebook Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ResetRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceResetRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ResetRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> ResetRuntimeAsync(string name, CancellationToken cancellationToken)

Resets a Managed Notebook Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.ResetRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceResetRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

StartRuntime(StartRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> StartRuntime(StartRuntimeRequest request, CallSettings callSettings = null)

Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
request StartRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
StartRuntimeRequest request = new StartRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.StartRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceStartRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StartRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> StartRuntime(string name, CallSettings callSettings = null)

Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.StartRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceStartRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StartRuntimeAsync(StartRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> StartRuntimeAsync(StartRuntimeRequest request, CallSettings callSettings = null)

Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
request StartRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StartRuntimeRequest request = new StartRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StartRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStartRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StartRuntimeAsync(StartRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> StartRuntimeAsync(StartRuntimeRequest request, CancellationToken cancellationToken)

Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
request StartRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StartRuntimeRequest request = new StartRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StartRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStartRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StartRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> StartRuntimeAsync(string name, CallSettings callSettings = null)

Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StartRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStartRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StartRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> StartRuntimeAsync(string name, CancellationToken cancellationToken)

Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StartRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStartRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StopRuntime(StopRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> StopRuntime(StopRuntimeRequest request, CallSettings callSettings = null)

Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
request StopRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
StopRuntimeRequest request = new StopRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.StopRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceStopRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StopRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> StopRuntime(string name, CallSettings callSettings = null)

Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.StopRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceStopRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StopRuntimeAsync(StopRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> StopRuntimeAsync(StopRuntimeRequest request, CallSettings callSettings = null)

Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
request StopRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StopRuntimeRequest request = new StopRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StopRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStopRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StopRuntimeAsync(StopRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> StopRuntimeAsync(StopRuntimeRequest request, CancellationToken cancellationToken)

Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
request StopRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StopRuntimeRequest request = new StopRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StopRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStopRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StopRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> StopRuntimeAsync(string name, CallSettings callSettings = null)

Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StopRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStopRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

StopRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> StopRuntimeAsync(string name, CancellationToken cancellationToken)

Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.StopRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceStopRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

SwitchRuntime(SwitchRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> SwitchRuntime(SwitchRuntimeRequest request, CallSettings callSettings = null)

Switch a Managed Notebook Runtime.

Parameters
Name Description
request SwitchRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
SwitchRuntimeRequest request = new SwitchRuntimeRequest
{
    Name = "",
    MachineType = "",
    AcceleratorConfig = new RuntimeAcceleratorConfig(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.SwitchRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceSwitchRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

SwitchRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> SwitchRuntime(string name, CallSettings callSettings = null)

Switch a Managed Notebook Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.SwitchRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceSwitchRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

SwitchRuntimeAsync(SwitchRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> SwitchRuntimeAsync(SwitchRuntimeRequest request, CallSettings callSettings = null)

Switch a Managed Notebook Runtime.

Parameters
Name Description
request SwitchRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SwitchRuntimeRequest request = new SwitchRuntimeRequest
{
    Name = "",
    MachineType = "",
    AcceleratorConfig = new RuntimeAcceleratorConfig(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.SwitchRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceSwitchRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

SwitchRuntimeAsync(SwitchRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> SwitchRuntimeAsync(SwitchRuntimeRequest request, CancellationToken cancellationToken)

Switch a Managed Notebook Runtime.

Parameters
Name Description
request SwitchRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SwitchRuntimeRequest request = new SwitchRuntimeRequest
{
    Name = "",
    MachineType = "",
    AcceleratorConfig = new RuntimeAcceleratorConfig(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.SwitchRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceSwitchRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

SwitchRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> SwitchRuntimeAsync(string name, CallSettings callSettings = null)

Switch a Managed Notebook Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.SwitchRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceSwitchRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

SwitchRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> SwitchRuntimeAsync(string name, CancellationToken cancellationToken)

Switch a Managed Notebook Runtime.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.SwitchRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceSwitchRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpdateRuntime(Runtime, FieldMask, CallSettings)

public virtual Operation<Runtime, OperationMetadata> UpdateRuntime(Runtime runtime, FieldMask updateMask, CallSettings callSettings = null)

Update Notebook Runtime configuration.

Parameters
Name Description
runtime Runtime

Required. The Runtime to be updated.

updateMask FieldMask

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
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
Runtime runtime = new Runtime();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.UpdateRuntime(runtime, updateMask);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceUpdateRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpdateRuntime(UpdateRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> UpdateRuntime(UpdateRuntimeRequest request, CallSettings callSettings = null)

Update Notebook Runtime configuration.

Parameters
Name Description
request UpdateRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
UpdateRuntimeRequest request = new UpdateRuntimeRequest
{
    Runtime = new Runtime(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.UpdateRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceUpdateRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpdateRuntimeAsync(Runtime, FieldMask, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> UpdateRuntimeAsync(Runtime runtime, FieldMask updateMask, CallSettings callSettings = null)

Update Notebook Runtime configuration.

Parameters
Name Description
runtime Runtime

Required. The Runtime to be updated.

updateMask FieldMask

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
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
Runtime runtime = new Runtime();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpdateRuntimeAsync(runtime, updateMask);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpdateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpdateRuntimeAsync(Runtime, FieldMask, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> UpdateRuntimeAsync(Runtime runtime, FieldMask updateMask, CancellationToken cancellationToken)

Update Notebook Runtime configuration.

Parameters
Name Description
runtime Runtime

Required. The Runtime to be updated.

updateMask FieldMask

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
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
Runtime runtime = new Runtime();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpdateRuntimeAsync(runtime, updateMask);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpdateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpdateRuntimeAsync(UpdateRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> UpdateRuntimeAsync(UpdateRuntimeRequest request, CallSettings callSettings = null)

Update Notebook Runtime configuration.

Parameters
Name Description
request UpdateRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateRuntimeRequest request = new UpdateRuntimeRequest
{
    Runtime = new Runtime(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpdateRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpdateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpdateRuntimeAsync(UpdateRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> UpdateRuntimeAsync(UpdateRuntimeRequest request, CancellationToken cancellationToken)

Update Notebook Runtime configuration.

Parameters
Name Description
request UpdateRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateRuntimeRequest request = new UpdateRuntimeRequest
{
    Runtime = new Runtime(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpdateRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpdateRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpgradeRuntime(UpgradeRuntimeRequest, CallSettings)

public virtual Operation<Runtime, OperationMetadata> UpgradeRuntime(UpgradeRuntimeRequest request, CallSettings callSettings = null)

Upgrades a Managed Notebook Runtime to the latest version.

Parameters
Name Description
request UpgradeRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
UpgradeRuntimeRequest request = new UpgradeRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.UpgradeRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceUpgradeRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpgradeRuntime(string, CallSettings)

public virtual Operation<Runtime, OperationMetadata> UpgradeRuntime(string name, CallSettings callSettings = null)

Upgrades a Managed Notebook Runtime to the latest version.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRuntimeOperationMetadata

The RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.UpgradeRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceUpgradeRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpgradeRuntimeAsync(UpgradeRuntimeRequest, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> UpgradeRuntimeAsync(UpgradeRuntimeRequest request, CallSettings callSettings = null)

Upgrades a Managed Notebook Runtime to the latest version.

Parameters
Name Description
request UpgradeRuntimeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeRuntimeRequest request = new UpgradeRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpgradeRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpgradeRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpgradeRuntimeAsync(UpgradeRuntimeRequest, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> UpgradeRuntimeAsync(UpgradeRuntimeRequest request, CancellationToken cancellationToken)

Upgrades a Managed Notebook Runtime to the latest version.

Parameters
Name Description
request UpgradeRuntimeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeRuntimeRequest request = new UpgradeRuntimeRequest
{
    Name = "",
    RequestId = "",
};
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpgradeRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpgradeRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpgradeRuntimeAsync(string, CallSettings)

public virtual Task<Operation<Runtime, OperationMetadata>> UpgradeRuntimeAsync(string name, CallSettings callSettings = null)

Upgrades a Managed Notebook Runtime to the latest version.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpgradeRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpgradeRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}

UpgradeRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Runtime, OperationMetadata>> UpgradeRuntimeAsync(string name, CancellationToken cancellationToken)

Upgrades a Managed Notebook Runtime to the latest version.

Parameters
Name Description
name string

Required. Format: projects/{project_id}/locations/{location}/runtimes/{runtime_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.UpgradeRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Runtime result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceUpgradeRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Runtime retrievedResult = retrievedResponse.Result;
}