Cloud AI Platform v1 API - Class NotebookServiceClient (2.28.0)

public abstract class NotebookServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class NotebookServiceClient.

NotebookService client wrapper, for convenient use.

Inheritance

object > NotebookServiceClient

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

The interface for Vertex Notebook service (a.k.a. Colab on Workbench).

Properties

AssignNotebookRuntimeOperationsClient

public virtual OperationsClient AssignNotebookRuntimeOperationsClient { get; }

The long-running operations client for AssignNotebookRuntime.

Property Value
Type Description
OperationsClient

CreateNotebookRuntimeTemplateOperationsClient

public virtual OperationsClient CreateNotebookRuntimeTemplateOperationsClient { get; }

The long-running operations client for CreateNotebookRuntimeTemplate.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default NotebookService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default NotebookService scopes are:

DeleteNotebookRuntimeOperationsClient

public virtual OperationsClient DeleteNotebookRuntimeOperationsClient { get; }

The long-running operations client for DeleteNotebookRuntime.

Property Value
Type Description
OperationsClient

DeleteNotebookRuntimeTemplateOperationsClient

public virtual OperationsClient DeleteNotebookRuntimeTemplateOperationsClient { get; }

The long-running operations client for DeleteNotebookRuntimeTemplate.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual NotebookService.NotebookServiceClient GrpcClient { get; }

The underlying gRPC NotebookService client

Property Value
Type Description
NotebookServiceNotebookServiceClient

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

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

StartNotebookRuntimeOperationsClient

public virtual OperationsClient StartNotebookRuntimeOperationsClient { get; }

The long-running operations client for StartNotebookRuntime.

Property Value
Type Description
OperationsClient

UpgradeNotebookRuntimeOperationsClient

public virtual OperationsClient UpgradeNotebookRuntimeOperationsClient { get; }

The long-running operations client for UpgradeNotebookRuntime.

Property Value
Type Description
OperationsClient

Methods

AssignNotebookRuntime(LocationName, NotebookRuntimeTemplateName, NotebookRuntime, string, CallSettings)

public virtual Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> AssignNotebookRuntime(LocationName parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, string notebookRuntimeId, CallSettings callSettings = null)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplateName

Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).

notebookRuntime NotebookRuntime

Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.

notebookRuntimeId string

Optional. User specified ID for the notebook runtime.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplateName notebookRuntimeTemplate = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntime notebookRuntime = new NotebookRuntime();
string notebookRuntimeId = "";
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = notebookServiceClient.AssignNotebookRuntime(parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceAssignNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntime(AssignNotebookRuntimeRequest, CallSettings)

public virtual Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> AssignNotebookRuntime(AssignNotebookRuntimeRequest request, CallSettings callSettings = null)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
request AssignNotebookRuntimeRequest

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
OperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
AssignNotebookRuntimeRequest request = new AssignNotebookRuntimeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NotebookRuntimeTemplateAsNotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
    NotebookRuntime = new NotebookRuntime(),
    NotebookRuntimeId = "",
};
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = notebookServiceClient.AssignNotebookRuntime(request);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceAssignNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntime(string, string, NotebookRuntime, string, CallSettings)

public virtual Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> AssignNotebookRuntime(string parent, string notebookRuntimeTemplate, NotebookRuntime notebookRuntime, string notebookRuntimeId, CallSettings callSettings = null)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
parent string

Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate string

Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).

notebookRuntime NotebookRuntime

Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.

notebookRuntimeId string

Optional. User specified ID for the notebook runtime.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string notebookRuntimeTemplate = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
NotebookRuntime notebookRuntime = new NotebookRuntime();
string notebookRuntimeId = "";
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = notebookServiceClient.AssignNotebookRuntime(parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceAssignNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntimeAsync(LocationName, NotebookRuntimeTemplateName, NotebookRuntime, string, CallSettings)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> AssignNotebookRuntimeAsync(LocationName parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, string notebookRuntimeId, CallSettings callSettings = null)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplateName

Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).

notebookRuntime NotebookRuntime

Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.

notebookRuntimeId string

Optional. User specified ID for the notebook runtime.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplateName notebookRuntimeTemplate = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntime notebookRuntime = new NotebookRuntime();
string notebookRuntimeId = "";
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = await notebookServiceClient.AssignNotebookRuntimeAsync(parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceAssignNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntimeAsync(LocationName, NotebookRuntimeTemplateName, NotebookRuntime, string, CancellationToken)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> AssignNotebookRuntimeAsync(LocationName parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, string notebookRuntimeId, CancellationToken cancellationToken)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplateName

Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).

notebookRuntime NotebookRuntime

Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.

notebookRuntimeId string

Optional. User specified ID for the notebook runtime.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplateName notebookRuntimeTemplate = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntime notebookRuntime = new NotebookRuntime();
string notebookRuntimeId = "";
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = await notebookServiceClient.AssignNotebookRuntimeAsync(parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceAssignNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntimeAsync(AssignNotebookRuntimeRequest, CallSettings)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> AssignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request, CallSettings callSettings = null)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
request AssignNotebookRuntimeRequest

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
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
AssignNotebookRuntimeRequest request = new AssignNotebookRuntimeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NotebookRuntimeTemplateAsNotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
    NotebookRuntime = new NotebookRuntime(),
    NotebookRuntimeId = "",
};
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = await notebookServiceClient.AssignNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceAssignNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntimeAsync(AssignNotebookRuntimeRequest, CancellationToken)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> AssignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request, CancellationToken cancellationToken)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
request AssignNotebookRuntimeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
AssignNotebookRuntimeRequest request = new AssignNotebookRuntimeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NotebookRuntimeTemplateAsNotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
    NotebookRuntime = new NotebookRuntime(),
    NotebookRuntimeId = "",
};
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = await notebookServiceClient.AssignNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceAssignNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntimeAsync(string, string, NotebookRuntime, string, CallSettings)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> AssignNotebookRuntimeAsync(string parent, string notebookRuntimeTemplate, NotebookRuntime notebookRuntime, string notebookRuntimeId, CallSettings callSettings = null)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
parent string

Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate string

Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).

notebookRuntime NotebookRuntime

Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.

notebookRuntimeId string

Optional. User specified ID for the notebook runtime.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string notebookRuntimeTemplate = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
NotebookRuntime notebookRuntime = new NotebookRuntime();
string notebookRuntimeId = "";
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = await notebookServiceClient.AssignNotebookRuntimeAsync(parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceAssignNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

AssignNotebookRuntimeAsync(string, string, NotebookRuntime, string, CancellationToken)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> AssignNotebookRuntimeAsync(string parent, string notebookRuntimeTemplate, NotebookRuntime notebookRuntime, string notebookRuntimeId, CancellationToken cancellationToken)

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Parameters
Name Description
parent string

Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate string

Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).

notebookRuntime NotebookRuntime

Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.

notebookRuntimeId string

Optional. User specified ID for the notebook runtime.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string notebookRuntimeTemplate = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
NotebookRuntime notebookRuntime = new NotebookRuntime();
string notebookRuntimeId = "";
// Make the request
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> response = await notebookServiceClient.AssignNotebookRuntimeAsync(parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntime 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<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceAssignNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntime retrievedResult = retrievedResponse.Result;
}

Create()

public static NotebookServiceClient Create()

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

Returns
Type Description
NotebookServiceClient

The created NotebookServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskNotebookServiceClient

The task representing the created NotebookServiceClient.

CreateNotebookRuntimeTemplate(LocationName, NotebookRuntimeTemplate, string, CallSettings)

public virtual Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> CreateNotebookRuntimeTemplate(LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, string notebookRuntimeTemplateId, CallSettings callSettings = null)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplate

Required. The NotebookRuntimeTemplate to create.

notebookRuntimeTemplateId string

Optional. User specified ID for the notebook runtime template.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplate notebookRuntimeTemplate = new NotebookRuntimeTemplate();
string notebookRuntimeTemplateId = "";
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = notebookServiceClient.CreateNotebookRuntimeTemplate(parent, notebookRuntimeTemplate, notebookRuntimeTemplateId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceCreateNotebookRuntimeTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplate(CreateNotebookRuntimeTemplateRequest, CallSettings)

public virtual Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> CreateNotebookRuntimeTemplate(CreateNotebookRuntimeTemplateRequest request, CallSettings callSettings = null)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
request CreateNotebookRuntimeTemplateRequest

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
OperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
CreateNotebookRuntimeTemplateRequest request = new CreateNotebookRuntimeTemplateRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NotebookRuntimeTemplate = new NotebookRuntimeTemplate(),
    NotebookRuntimeTemplateId = "",
};
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = notebookServiceClient.CreateNotebookRuntimeTemplate(request);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceCreateNotebookRuntimeTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplate(string, NotebookRuntimeTemplate, string, CallSettings)

public virtual Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> CreateNotebookRuntimeTemplate(string parent, NotebookRuntimeTemplate notebookRuntimeTemplate, string notebookRuntimeTemplateId, CallSettings callSettings = null)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplate

Required. The NotebookRuntimeTemplate to create.

notebookRuntimeTemplateId string

Optional. User specified ID for the notebook runtime template.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
NotebookRuntimeTemplate notebookRuntimeTemplate = new NotebookRuntimeTemplate();
string notebookRuntimeTemplateId = "";
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = notebookServiceClient.CreateNotebookRuntimeTemplate(parent, notebookRuntimeTemplate, notebookRuntimeTemplateId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceCreateNotebookRuntimeTemplate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplateAsync(LocationName, NotebookRuntimeTemplate, string, CallSettings)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> CreateNotebookRuntimeTemplateAsync(LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, string notebookRuntimeTemplateId, CallSettings callSettings = null)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplate

Required. The NotebookRuntimeTemplate to create.

notebookRuntimeTemplateId string

Optional. User specified ID for the notebook runtime template.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplate notebookRuntimeTemplate = new NotebookRuntimeTemplate();
string notebookRuntimeTemplateId = "";
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = await notebookServiceClient.CreateNotebookRuntimeTemplateAsync(parent, notebookRuntimeTemplate, notebookRuntimeTemplateId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceCreateNotebookRuntimeTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplateAsync(LocationName, NotebookRuntimeTemplate, string, CancellationToken)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> CreateNotebookRuntimeTemplateAsync(LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, string notebookRuntimeTemplateId, CancellationToken cancellationToken)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplate

Required. The NotebookRuntimeTemplate to create.

notebookRuntimeTemplateId string

Optional. User specified ID for the notebook runtime template.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplate notebookRuntimeTemplate = new NotebookRuntimeTemplate();
string notebookRuntimeTemplateId = "";
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = await notebookServiceClient.CreateNotebookRuntimeTemplateAsync(parent, notebookRuntimeTemplate, notebookRuntimeTemplateId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceCreateNotebookRuntimeTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest, CallSettings)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> CreateNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request, CallSettings callSettings = null)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
request CreateNotebookRuntimeTemplateRequest

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
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateNotebookRuntimeTemplateRequest request = new CreateNotebookRuntimeTemplateRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NotebookRuntimeTemplate = new NotebookRuntimeTemplate(),
    NotebookRuntimeTemplateId = "",
};
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = await notebookServiceClient.CreateNotebookRuntimeTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceCreateNotebookRuntimeTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest, CancellationToken)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> CreateNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request, CancellationToken cancellationToken)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
request CreateNotebookRuntimeTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateNotebookRuntimeTemplateRequest request = new CreateNotebookRuntimeTemplateRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    NotebookRuntimeTemplate = new NotebookRuntimeTemplate(),
    NotebookRuntimeTemplateId = "",
};
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = await notebookServiceClient.CreateNotebookRuntimeTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceCreateNotebookRuntimeTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplateAsync(string, NotebookRuntimeTemplate, string, CallSettings)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> CreateNotebookRuntimeTemplateAsync(string parent, NotebookRuntimeTemplate notebookRuntimeTemplate, string notebookRuntimeTemplateId, CallSettings callSettings = null)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplate

Required. The NotebookRuntimeTemplate to create.

notebookRuntimeTemplateId string

Optional. User specified ID for the notebook runtime template.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
NotebookRuntimeTemplate notebookRuntimeTemplate = new NotebookRuntimeTemplate();
string notebookRuntimeTemplateId = "";
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = await notebookServiceClient.CreateNotebookRuntimeTemplateAsync(parent, notebookRuntimeTemplate, notebookRuntimeTemplateId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceCreateNotebookRuntimeTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

CreateNotebookRuntimeTemplateAsync(string, NotebookRuntimeTemplate, string, CancellationToken)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> CreateNotebookRuntimeTemplateAsync(string parent, NotebookRuntimeTemplate notebookRuntimeTemplate, string notebookRuntimeTemplateId, CancellationToken cancellationToken)

Creates a NotebookRuntimeTemplate.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}

notebookRuntimeTemplate NotebookRuntimeTemplate

Required. The NotebookRuntimeTemplate to create.

notebookRuntimeTemplateId string

Optional. User specified ID for the notebook runtime template.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
NotebookRuntimeTemplate notebookRuntimeTemplate = new NotebookRuntimeTemplate();
string notebookRuntimeTemplateId = "";
// Make the request
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> response = await notebookServiceClient.CreateNotebookRuntimeTemplateAsync(parent, notebookRuntimeTemplate, notebookRuntimeTemplateId);

// Poll until the returned long-running operation is complete
Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
NotebookRuntimeTemplate 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<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceCreateNotebookRuntimeTemplateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    NotebookRuntimeTemplate retrievedResult = retrievedResponse.Result;
}

DeleteNotebookRuntime(DeleteNotebookRuntimeRequest, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteNotebookRuntime(DeleteNotebookRuntimeRequest request, CallSettings callSettings = null)

Deletes a NotebookRuntime.

Parameters
Name Description
request DeleteNotebookRuntimeRequest

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
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
DeleteNotebookRuntimeRequest request = new DeleteNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = notebookServiceClient.DeleteNotebookRuntime(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteNotebookRuntime(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;
}

DeleteNotebookRuntime(NotebookRuntimeName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteNotebookRuntime(NotebookRuntimeName name, CallSettings callSettings = null)

Deletes a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = notebookServiceClient.DeleteNotebookRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteNotebookRuntime(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;
}

DeleteNotebookRuntime(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteNotebookRuntime(string name, CallSettings callSettings = null)

Deletes a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = notebookServiceClient.DeleteNotebookRuntime(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteNotebookRuntime(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;
}

DeleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request, CallSettings callSettings = null)

Deletes a NotebookRuntime.

Parameters
Name Description
request DeleteNotebookRuntimeRequest

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
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotebookRuntimeRequest request = new DeleteNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeAsync(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;
}

DeleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request, CancellationToken cancellationToken)

Deletes a NotebookRuntime.

Parameters
Name Description
request DeleteNotebookRuntimeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotebookRuntimeRequest request = new DeleteNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeAsync(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;
}

DeleteNotebookRuntimeAsync(NotebookRuntimeName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeAsync(NotebookRuntimeName name, CallSettings callSettings = null)

Deletes a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeAsync(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;
}

DeleteNotebookRuntimeAsync(NotebookRuntimeName, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeAsync(NotebookRuntimeName name, CancellationToken cancellationToken)

Deletes a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeAsync(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;
}

DeleteNotebookRuntimeAsync(string, CallSettings)

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

Deletes a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeAsync(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;
}

DeleteNotebookRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeAsync(string name, CancellationToken cancellationToken)

Deletes a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeAsync(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;
}

DeleteNotebookRuntimeTemplate(DeleteNotebookRuntimeTemplateRequest, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteNotebookRuntimeTemplate(DeleteNotebookRuntimeTemplateRequest request, CallSettings callSettings = null)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
request DeleteNotebookRuntimeTemplateRequest

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
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
DeleteNotebookRuntimeTemplateRequest request = new DeleteNotebookRuntimeTemplateRequest
{
    NotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = notebookServiceClient.DeleteNotebookRuntimeTemplate(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplate(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;
}

DeleteNotebookRuntimeTemplate(NotebookRuntimeTemplateName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteNotebookRuntimeTemplate(NotebookRuntimeTemplateName name, CallSettings callSettings = null)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
name NotebookRuntimeTemplateName

Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
NotebookRuntimeTemplateName name = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = notebookServiceClient.DeleteNotebookRuntimeTemplate(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplate(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;
}

DeleteNotebookRuntimeTemplate(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteNotebookRuntimeTemplate(string name, CallSettings callSettings = null)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
name string

Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = notebookServiceClient.DeleteNotebookRuntimeTemplate(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplate(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;
}

DeleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request, CallSettings callSettings = null)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
request DeleteNotebookRuntimeTemplateRequest

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
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotebookRuntimeTemplateRequest request = new DeleteNotebookRuntimeTemplateRequest
{
    NotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplateAsync(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;
}

DeleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request, CancellationToken cancellationToken)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
request DeleteNotebookRuntimeTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotebookRuntimeTemplateRequest request = new DeleteNotebookRuntimeTemplateRequest
{
    NotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeTemplateAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplateAsync(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;
}

DeleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name, CallSettings callSettings = null)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
name NotebookRuntimeTemplateName

Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeTemplateName name = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplateAsync(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;
}

DeleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name, CancellationToken cancellationToken)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
name NotebookRuntimeTemplateName

Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeTemplateName name = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplateAsync(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;
}

DeleteNotebookRuntimeTemplateAsync(string, CallSettings)

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

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
name string

Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplateAsync(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;
}

DeleteNotebookRuntimeTemplateAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteNotebookRuntimeTemplateAsync(string name, CancellationToken cancellationToken)

Deletes a NotebookRuntimeTemplate.

Parameters
Name Description
name string

Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await notebookServiceClient.DeleteNotebookRuntimeTemplateAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> 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, DeleteOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteNotebookRuntimeTemplateAsync(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;
}

GetNotebookRuntime(GetNotebookRuntimeRequest, CallSettings)

public virtual NotebookRuntime GetNotebookRuntime(GetNotebookRuntimeRequest request, CallSettings callSettings = null)

Gets a NotebookRuntime.

Parameters
Name Description
request GetNotebookRuntimeRequest

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
NotebookRuntime

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
GetNotebookRuntimeRequest request = new GetNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
NotebookRuntime response = notebookServiceClient.GetNotebookRuntime(request);

GetNotebookRuntime(NotebookRuntimeName, CallSettings)

public virtual NotebookRuntime GetNotebookRuntime(NotebookRuntimeName name, CallSettings callSettings = null)

Gets a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotebookRuntime

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
NotebookRuntime response = notebookServiceClient.GetNotebookRuntime(name);

GetNotebookRuntime(string, CallSettings)

public virtual NotebookRuntime GetNotebookRuntime(string name, CallSettings callSettings = null)

Gets a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotebookRuntime

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
NotebookRuntime response = notebookServiceClient.GetNotebookRuntime(name);

GetNotebookRuntimeAsync(GetNotebookRuntimeRequest, CallSettings)

public virtual Task<NotebookRuntime> GetNotebookRuntimeAsync(GetNotebookRuntimeRequest request, CallSettings callSettings = null)

Gets a NotebookRuntime.

Parameters
Name Description
request GetNotebookRuntimeRequest

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
TaskNotebookRuntime

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotebookRuntimeRequest request = new GetNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
NotebookRuntime response = await notebookServiceClient.GetNotebookRuntimeAsync(request);

GetNotebookRuntimeAsync(GetNotebookRuntimeRequest, CancellationToken)

public virtual Task<NotebookRuntime> GetNotebookRuntimeAsync(GetNotebookRuntimeRequest request, CancellationToken cancellationToken)

Gets a NotebookRuntime.

Parameters
Name Description
request GetNotebookRuntimeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotebookRuntime

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotebookRuntimeRequest request = new GetNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
NotebookRuntime response = await notebookServiceClient.GetNotebookRuntimeAsync(request);

GetNotebookRuntimeAsync(NotebookRuntimeName, CallSettings)

public virtual Task<NotebookRuntime> GetNotebookRuntimeAsync(NotebookRuntimeName name, CallSettings callSettings = null)

Gets a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotebookRuntime

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
NotebookRuntime response = await notebookServiceClient.GetNotebookRuntimeAsync(name);

GetNotebookRuntimeAsync(NotebookRuntimeName, CancellationToken)

public virtual Task<NotebookRuntime> GetNotebookRuntimeAsync(NotebookRuntimeName name, CancellationToken cancellationToken)

Gets a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotebookRuntime

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
NotebookRuntime response = await notebookServiceClient.GetNotebookRuntimeAsync(name);

GetNotebookRuntimeAsync(string, CallSettings)

public virtual Task<NotebookRuntime> GetNotebookRuntimeAsync(string name, CallSettings callSettings = null)

Gets a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotebookRuntime

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
NotebookRuntime response = await notebookServiceClient.GetNotebookRuntimeAsync(name);

GetNotebookRuntimeAsync(string, CancellationToken)

public virtual Task<NotebookRuntime> GetNotebookRuntimeAsync(string name, CancellationToken cancellationToken)

Gets a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotebookRuntime

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
NotebookRuntime response = await notebookServiceClient.GetNotebookRuntimeAsync(name);

GetNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest, CallSettings)

public virtual NotebookRuntimeTemplate GetNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request, CallSettings callSettings = null)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
request GetNotebookRuntimeTemplateRequest

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
NotebookRuntimeTemplate

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
GetNotebookRuntimeTemplateRequest request = new GetNotebookRuntimeTemplateRequest
{
    NotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
};
// Make the request
NotebookRuntimeTemplate response = notebookServiceClient.GetNotebookRuntimeTemplate(request);

GetNotebookRuntimeTemplate(NotebookRuntimeTemplateName, CallSettings)

public virtual NotebookRuntimeTemplate GetNotebookRuntimeTemplate(NotebookRuntimeTemplateName name, CallSettings callSettings = null)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
name NotebookRuntimeTemplateName

Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotebookRuntimeTemplate

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
NotebookRuntimeTemplateName name = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
// Make the request
NotebookRuntimeTemplate response = notebookServiceClient.GetNotebookRuntimeTemplate(name);

GetNotebookRuntimeTemplate(string, CallSettings)

public virtual NotebookRuntimeTemplate GetNotebookRuntimeTemplate(string name, CallSettings callSettings = null)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
name string

Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotebookRuntimeTemplate

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
// Make the request
NotebookRuntimeTemplate response = notebookServiceClient.GetNotebookRuntimeTemplate(name);

GetNotebookRuntimeTemplateAsync(GetNotebookRuntimeTemplateRequest, CallSettings)

public virtual Task<NotebookRuntimeTemplate> GetNotebookRuntimeTemplateAsync(GetNotebookRuntimeTemplateRequest request, CallSettings callSettings = null)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
request GetNotebookRuntimeTemplateRequest

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
TaskNotebookRuntimeTemplate

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotebookRuntimeTemplateRequest request = new GetNotebookRuntimeTemplateRequest
{
    NotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
};
// Make the request
NotebookRuntimeTemplate response = await notebookServiceClient.GetNotebookRuntimeTemplateAsync(request);

GetNotebookRuntimeTemplateAsync(GetNotebookRuntimeTemplateRequest, CancellationToken)

public virtual Task<NotebookRuntimeTemplate> GetNotebookRuntimeTemplateAsync(GetNotebookRuntimeTemplateRequest request, CancellationToken cancellationToken)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
request GetNotebookRuntimeTemplateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotebookRuntimeTemplate

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotebookRuntimeTemplateRequest request = new GetNotebookRuntimeTemplateRequest
{
    NotebookRuntimeTemplateName = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"),
};
// Make the request
NotebookRuntimeTemplate response = await notebookServiceClient.GetNotebookRuntimeTemplateAsync(request);

GetNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName, CallSettings)

public virtual Task<NotebookRuntimeTemplate> GetNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name, CallSettings callSettings = null)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
name NotebookRuntimeTemplateName

Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotebookRuntimeTemplate

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeTemplateName name = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
// Make the request
NotebookRuntimeTemplate response = await notebookServiceClient.GetNotebookRuntimeTemplateAsync(name);

GetNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName, CancellationToken)

public virtual Task<NotebookRuntimeTemplate> GetNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name, CancellationToken cancellationToken)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
name NotebookRuntimeTemplateName

Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotebookRuntimeTemplate

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeTemplateName name = NotebookRuntimeTemplateName.FromProjectLocationNotebookRuntimeTemplate("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
// Make the request
NotebookRuntimeTemplate response = await notebookServiceClient.GetNotebookRuntimeTemplateAsync(name);

GetNotebookRuntimeTemplateAsync(string, CallSettings)

public virtual Task<NotebookRuntimeTemplate> GetNotebookRuntimeTemplateAsync(string name, CallSettings callSettings = null)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
name string

Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotebookRuntimeTemplate

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
// Make the request
NotebookRuntimeTemplate response = await notebookServiceClient.GetNotebookRuntimeTemplateAsync(name);

GetNotebookRuntimeTemplateAsync(string, CancellationToken)

public virtual Task<NotebookRuntimeTemplate> GetNotebookRuntimeTemplateAsync(string name, CancellationToken cancellationToken)

Gets a NotebookRuntimeTemplate.

Parameters
Name Description
name string

Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotebookRuntimeTemplate

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimeTemplates/[NOTEBOOK_RUNTIME_TEMPLATE]";
// Make the request
NotebookRuntimeTemplate response = await notebookServiceClient.GetNotebookRuntimeTemplateAsync(name);

ListNotebookRuntimeTemplates(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> ListNotebookRuntimeTemplates(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimeTemplates in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location from which to list the NotebookRuntimeTemplates. Format: projects/{project}/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
PagedEnumerableListNotebookRuntimeTemplatesResponseNotebookRuntimeTemplate

A pageable sequence of NotebookRuntimeTemplate resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> response = notebookServiceClient.ListNotebookRuntimeTemplates(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotebookRuntimeTemplate 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 (ListNotebookRuntimeTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntimeTemplate 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<NotebookRuntimeTemplate> 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 (NotebookRuntimeTemplate 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;

ListNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest, CallSettings)

public virtual PagedEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> ListNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request, CallSettings callSettings = null)

Lists NotebookRuntimeTemplates in a Location.

Parameters
Name Description
request ListNotebookRuntimeTemplatesRequest

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
PagedEnumerableListNotebookRuntimeTemplatesResponseNotebookRuntimeTemplate

A pageable sequence of NotebookRuntimeTemplate resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ListNotebookRuntimeTemplatesRequest request = new ListNotebookRuntimeTemplatesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> response = notebookServiceClient.ListNotebookRuntimeTemplates(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotebookRuntimeTemplate 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 (ListNotebookRuntimeTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntimeTemplate 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<NotebookRuntimeTemplate> 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 (NotebookRuntimeTemplate 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;

ListNotebookRuntimeTemplates(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> ListNotebookRuntimeTemplates(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimeTemplates in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location from which to list the NotebookRuntimeTemplates. Format: projects/{project}/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
PagedEnumerableListNotebookRuntimeTemplatesResponseNotebookRuntimeTemplate

A pageable sequence of NotebookRuntimeTemplate resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> response = notebookServiceClient.ListNotebookRuntimeTemplates(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotebookRuntimeTemplate 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 (ListNotebookRuntimeTemplatesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntimeTemplate 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<NotebookRuntimeTemplate> 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 (NotebookRuntimeTemplate 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;

ListNotebookRuntimeTemplatesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> ListNotebookRuntimeTemplatesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimeTemplates in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location from which to list the NotebookRuntimeTemplates. Format: projects/{project}/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
PagedAsyncEnumerableListNotebookRuntimeTemplatesResponseNotebookRuntimeTemplate

A pageable asynchronous sequence of NotebookRuntimeTemplate resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> response = notebookServiceClient.ListNotebookRuntimeTemplatesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotebookRuntimeTemplate 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((ListNotebookRuntimeTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntimeTemplate 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<NotebookRuntimeTemplate> 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 (NotebookRuntimeTemplate 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;

ListNotebookRuntimeTemplatesAsync(ListNotebookRuntimeTemplatesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> ListNotebookRuntimeTemplatesAsync(ListNotebookRuntimeTemplatesRequest request, CallSettings callSettings = null)

Lists NotebookRuntimeTemplates in a Location.

Parameters
Name Description
request ListNotebookRuntimeTemplatesRequest

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
PagedAsyncEnumerableListNotebookRuntimeTemplatesResponseNotebookRuntimeTemplate

A pageable asynchronous sequence of NotebookRuntimeTemplate resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ListNotebookRuntimeTemplatesRequest request = new ListNotebookRuntimeTemplatesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> response = notebookServiceClient.ListNotebookRuntimeTemplatesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotebookRuntimeTemplate 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((ListNotebookRuntimeTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntimeTemplate 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<NotebookRuntimeTemplate> 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 (NotebookRuntimeTemplate 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;

ListNotebookRuntimeTemplatesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> ListNotebookRuntimeTemplatesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimeTemplates in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location from which to list the NotebookRuntimeTemplates. Format: projects/{project}/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
PagedAsyncEnumerableListNotebookRuntimeTemplatesResponseNotebookRuntimeTemplate

A pageable asynchronous sequence of NotebookRuntimeTemplate resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListNotebookRuntimeTemplatesResponse, NotebookRuntimeTemplate> response = notebookServiceClient.ListNotebookRuntimeTemplatesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotebookRuntimeTemplate 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((ListNotebookRuntimeTemplatesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntimeTemplate 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<NotebookRuntimeTemplate> 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 (NotebookRuntimeTemplate 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;

ListNotebookRuntimes(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> ListNotebookRuntimes(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimes in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location from which to list the NotebookRuntimes. Format: projects/{project}/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
PagedEnumerableListNotebookRuntimesResponseNotebookRuntime

A pageable sequence of NotebookRuntime resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> response = notebookServiceClient.ListNotebookRuntimes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotebookRuntime 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 (ListNotebookRuntimesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntime 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<NotebookRuntime> 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 (NotebookRuntime 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;

ListNotebookRuntimes(ListNotebookRuntimesRequest, CallSettings)

public virtual PagedEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> ListNotebookRuntimes(ListNotebookRuntimesRequest request, CallSettings callSettings = null)

Lists NotebookRuntimes in a Location.

Parameters
Name Description
request ListNotebookRuntimesRequest

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
PagedEnumerableListNotebookRuntimesResponseNotebookRuntime

A pageable sequence of NotebookRuntime resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ListNotebookRuntimesRequest request = new ListNotebookRuntimesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> response = notebookServiceClient.ListNotebookRuntimes(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotebookRuntime 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 (ListNotebookRuntimesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntime 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<NotebookRuntime> 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 (NotebookRuntime 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;

ListNotebookRuntimes(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> ListNotebookRuntimes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimes in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location from which to list the NotebookRuntimes. Format: projects/{project}/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
PagedEnumerableListNotebookRuntimesResponseNotebookRuntime

A pageable sequence of NotebookRuntime resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> response = notebookServiceClient.ListNotebookRuntimes(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotebookRuntime 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 (ListNotebookRuntimesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntime 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<NotebookRuntime> 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 (NotebookRuntime 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;

ListNotebookRuntimesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> ListNotebookRuntimesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimes in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location from which to list the NotebookRuntimes. Format: projects/{project}/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
PagedAsyncEnumerableListNotebookRuntimesResponseNotebookRuntime

A pageable asynchronous sequence of NotebookRuntime resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> response = notebookServiceClient.ListNotebookRuntimesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotebookRuntime 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((ListNotebookRuntimesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntime 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<NotebookRuntime> 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 (NotebookRuntime 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;

ListNotebookRuntimesAsync(ListNotebookRuntimesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> ListNotebookRuntimesAsync(ListNotebookRuntimesRequest request, CallSettings callSettings = null)

Lists NotebookRuntimes in a Location.

Parameters
Name Description
request ListNotebookRuntimesRequest

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
PagedAsyncEnumerableListNotebookRuntimesResponseNotebookRuntime

A pageable asynchronous sequence of NotebookRuntime resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ListNotebookRuntimesRequest request = new ListNotebookRuntimesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> response = notebookServiceClient.ListNotebookRuntimesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotebookRuntime 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((ListNotebookRuntimesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntime 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<NotebookRuntime> 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 (NotebookRuntime 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;

ListNotebookRuntimesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> ListNotebookRuntimesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists NotebookRuntimes in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location from which to list the NotebookRuntimes. Format: projects/{project}/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
PagedAsyncEnumerableListNotebookRuntimesResponseNotebookRuntime

A pageable asynchronous sequence of NotebookRuntime resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListNotebookRuntimesResponse, NotebookRuntime> response = notebookServiceClient.ListNotebookRuntimesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotebookRuntime 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((ListNotebookRuntimesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotebookRuntime 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<NotebookRuntime> 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 (NotebookRuntime 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;

PollOnceAssignNotebookRuntime(string, CallSettings)

public virtual Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> PollOnceAssignNotebookRuntime(string operationName, CallSettings callSettings = null)

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

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
OperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

The result of polling the operation.

PollOnceAssignNotebookRuntimeAsync(string, CallSettings)

public virtual Task<Operation<NotebookRuntime, AssignNotebookRuntimeOperationMetadata>> PollOnceAssignNotebookRuntimeAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationNotebookRuntimeAssignNotebookRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateNotebookRuntimeTemplate(string, CallSettings)

public virtual Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> PollOnceCreateNotebookRuntimeTemplate(string operationName, CallSettings callSettings = null)

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

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
OperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

The result of polling the operation.

PollOnceCreateNotebookRuntimeTemplateAsync(string, CallSettings)

public virtual Task<Operation<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>> PollOnceCreateNotebookRuntimeTemplateAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationNotebookRuntimeTemplateCreateNotebookRuntimeTemplateOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteNotebookRuntime(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteNotebookRuntime(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyDeleteOperationMetadata

The result of polling the operation.

PollOnceDeleteNotebookRuntimeAsync(string, CallSettings)

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

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

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
TaskOperationEmptyDeleteOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteNotebookRuntimeTemplate(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteNotebookRuntimeTemplate(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyDeleteOperationMetadata

The result of polling the operation.

PollOnceDeleteNotebookRuntimeTemplateAsync(string, CallSettings)

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

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

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
TaskOperationEmptyDeleteOperationMetadata

A task representing the result of polling the operation.

PollOnceStartNotebookRuntime(string, CallSettings)

public virtual Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> PollOnceStartNotebookRuntime(string operationName, CallSettings callSettings = null)

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

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
OperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

The result of polling the operation.

PollOnceStartNotebookRuntimeAsync(string, CallSettings)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> PollOnceStartNotebookRuntimeAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A task representing the result of polling the operation.

PollOnceUpgradeNotebookRuntime(string, CallSettings)

public virtual Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> PollOnceUpgradeNotebookRuntime(string operationName, CallSettings callSettings = null)

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

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
OperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

The result of polling the operation.

PollOnceUpgradeNotebookRuntimeAsync(string, CallSettings)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> PollOnceUpgradeNotebookRuntimeAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A task representing the result of polling the operation.

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.

StartNotebookRuntime(NotebookRuntimeName, CallSettings)

public virtual Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> StartNotebookRuntime(NotebookRuntimeName name, CallSettings callSettings = null)

Starts a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = notebookServiceClient.StartNotebookRuntime(name);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceStartNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntime(StartNotebookRuntimeRequest, CallSettings)

public virtual Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> StartNotebookRuntime(StartNotebookRuntimeRequest request, CallSettings callSettings = null)

Starts a NotebookRuntime.

Parameters
Name Description
request StartNotebookRuntimeRequest

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
OperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
StartNotebookRuntimeRequest request = new StartNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = notebookServiceClient.StartNotebookRuntime(request);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceStartNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntime(string, CallSettings)

public virtual Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> StartNotebookRuntime(string name, CallSettings callSettings = null)

Starts a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = notebookServiceClient.StartNotebookRuntime(name);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceStartNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntimeAsync(NotebookRuntimeName, CallSettings)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> StartNotebookRuntimeAsync(NotebookRuntimeName name, CallSettings callSettings = null)

Starts a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = await notebookServiceClient.StartNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceStartNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntimeAsync(NotebookRuntimeName, CancellationToken)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> StartNotebookRuntimeAsync(NotebookRuntimeName name, CancellationToken cancellationToken)

Starts a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = await notebookServiceClient.StartNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceStartNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntimeAsync(StartNotebookRuntimeRequest, CallSettings)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> StartNotebookRuntimeAsync(StartNotebookRuntimeRequest request, CallSettings callSettings = null)

Starts a NotebookRuntime.

Parameters
Name Description
request StartNotebookRuntimeRequest

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
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StartNotebookRuntimeRequest request = new StartNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = await notebookServiceClient.StartNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceStartNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntimeAsync(StartNotebookRuntimeRequest, CancellationToken)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> StartNotebookRuntimeAsync(StartNotebookRuntimeRequest request, CancellationToken cancellationToken)

Starts a NotebookRuntime.

Parameters
Name Description
request StartNotebookRuntimeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StartNotebookRuntimeRequest request = new StartNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = await notebookServiceClient.StartNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceStartNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntimeAsync(string, CallSettings)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> StartNotebookRuntimeAsync(string name, CallSettings callSettings = null)

Starts a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = await notebookServiceClient.StartNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceStartNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

StartNotebookRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata>> StartNotebookRuntimeAsync(string name, CancellationToken cancellationToken)

Starts a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationStartNotebookRuntimeResponseStartNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> response = await notebookServiceClient.StartNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
StartNotebookRuntimeResponse 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<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceStartNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    StartNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntime(NotebookRuntimeName, CallSettings)

public virtual Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> UpgradeNotebookRuntime(NotebookRuntimeName name, CallSettings callSettings = null)

Upgrades a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = notebookServiceClient.UpgradeNotebookRuntime(name);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceUpgradeNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntime(UpgradeNotebookRuntimeRequest, CallSettings)

public virtual Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> UpgradeNotebookRuntime(UpgradeNotebookRuntimeRequest request, CallSettings callSettings = null)

Upgrades a NotebookRuntime.

Parameters
Name Description
request UpgradeNotebookRuntimeRequest

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
OperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
UpgradeNotebookRuntimeRequest request = new UpgradeNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = notebookServiceClient.UpgradeNotebookRuntime(request);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceUpgradeNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntime(string, CallSettings)

public virtual Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> UpgradeNotebookRuntime(string name, CallSettings callSettings = null)

Upgrades a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = notebookServiceClient.UpgradeNotebookRuntime(name);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = notebookServiceClient.PollOnceUpgradeNotebookRuntime(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntimeAsync(NotebookRuntimeName, CallSettings)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> UpgradeNotebookRuntimeAsync(NotebookRuntimeName name, CallSettings callSettings = null)

Upgrades a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = await notebookServiceClient.UpgradeNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceUpgradeNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntimeAsync(NotebookRuntimeName, CancellationToken)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> UpgradeNotebookRuntimeAsync(NotebookRuntimeName name, CancellationToken cancellationToken)

Upgrades a NotebookRuntime.

Parameters
Name Description
name NotebookRuntimeName

Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
NotebookRuntimeName name = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = await notebookServiceClient.UpgradeNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceUpgradeNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest, CallSettings)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> UpgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request, CallSettings callSettings = null)

Upgrades a NotebookRuntime.

Parameters
Name Description
request UpgradeNotebookRuntimeRequest

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
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeNotebookRuntimeRequest request = new UpgradeNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = await notebookServiceClient.UpgradeNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceUpgradeNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest, CancellationToken)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> UpgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request, CancellationToken cancellationToken)

Upgrades a NotebookRuntime.

Parameters
Name Description
request UpgradeNotebookRuntimeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeNotebookRuntimeRequest request = new UpgradeNotebookRuntimeRequest
{
    NotebookRuntimeName = NotebookRuntimeName.FromProjectLocationNotebookRuntime("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"),
};
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = await notebookServiceClient.UpgradeNotebookRuntimeAsync(request);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceUpgradeNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntimeAsync(string, CallSettings)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> UpgradeNotebookRuntimeAsync(string name, CallSettings callSettings = null)

Upgrades a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = await notebookServiceClient.UpgradeNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceUpgradeNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}

UpgradeNotebookRuntimeAsync(string, CancellationToken)

public virtual Task<Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>> UpgradeNotebookRuntimeAsync(string name, CancellationToken cancellationToken)

Upgrades a NotebookRuntime.

Parameters
Name Description
name string

Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationUpgradeNotebookRuntimeResponseUpgradeNotebookRuntimeOperationMetadata

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/notebookRuntimes/[NOTEBOOK_RUNTIME]";
// Make the request
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> response = await notebookServiceClient.UpgradeNotebookRuntimeAsync(name);

// Poll until the returned long-running operation is complete
Operation<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UpgradeNotebookRuntimeResponse 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<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceUpgradeNotebookRuntimeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UpgradeNotebookRuntimeResponse retrievedResult = retrievedResponse.Result;
}