Class NotebookServiceClient (1.0.0-beta04)

public abstract class NotebookServiceClient

NotebookService client wrapper, for convenient use.

Inheritance

Object > NotebookServiceClient

Namespace

Google.Cloud.Notebooks.V1Beta1

Assembly

Google.Cloud.Notebooks.V1Beta1.dll

Remarks

API v1beta1 service for Cloud AI Platform Notebooks.

Properties

CreateEnvironmentOperationsClient

public virtual OperationsClient CreateEnvironmentOperationsClient { get; }

The long-running operations client for CreateEnvironment.

Property Value
TypeDescription
OperationsClient

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default NotebookService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default NotebookService scopes are:

DeleteEnvironmentOperationsClient

public virtual OperationsClient DeleteEnvironmentOperationsClient { get; }

The long-running operations client for DeleteEnvironment.

Property Value
TypeDescription
OperationsClient

DeleteInstanceOperationsClient

public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual NotebookService.NotebookServiceClient GrpcClient { get; }

The underlying gRPC NotebookService client

Property Value
TypeDescription
NotebookService.NotebookServiceClient

RegisterInstanceOperationsClient

public virtual OperationsClient RegisterInstanceOperationsClient { get; }

The long-running operations client for RegisterInstance.

Property Value
TypeDescription
OperationsClient

ReportInstanceInfoOperationsClient

public virtual OperationsClient ReportInstanceInfoOperationsClient { get; }

The long-running operations client for ReportInstanceInfo.

Property Value
TypeDescription
OperationsClient

ResetInstanceOperationsClient

public virtual OperationsClient ResetInstanceOperationsClient { get; }

The long-running operations client for ResetInstance.

Property Value
TypeDescription
OperationsClient

SetInstanceAcceleratorOperationsClient

public virtual OperationsClient SetInstanceAcceleratorOperationsClient { get; }

The long-running operations client for SetInstanceAccelerator.

Property Value
TypeDescription
OperationsClient

SetInstanceLabelsOperationsClient

public virtual OperationsClient SetInstanceLabelsOperationsClient { get; }

The long-running operations client for SetInstanceLabels.

Property Value
TypeDescription
OperationsClient

SetInstanceMachineTypeOperationsClient

public virtual OperationsClient SetInstanceMachineTypeOperationsClient { get; }

The long-running operations client for SetInstanceMachineType.

Property Value
TypeDescription
OperationsClient

StartInstanceOperationsClient

public virtual OperationsClient StartInstanceOperationsClient { get; }

The long-running operations client for StartInstance.

Property Value
TypeDescription
OperationsClient

StopInstanceOperationsClient

public virtual OperationsClient StopInstanceOperationsClient { get; }

The long-running operations client for StopInstance.

Property Value
TypeDescription
OperationsClient

UpgradeInstanceInternalOperationsClient

public virtual OperationsClient UpgradeInstanceInternalOperationsClient { get; }

The long-running operations client for UpgradeInstanceInternal.

Property Value
TypeDescription
OperationsClient

UpgradeInstanceOperationsClient

public virtual OperationsClient UpgradeInstanceOperationsClient { get; }

The long-running operations client for UpgradeInstance.

Property Value
TypeDescription
OperationsClient

Methods

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
TypeDescription
NotebookServiceClient

The created NotebookServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<NotebookServiceClient>

The task representing the created NotebookServiceClient.

CreateEnvironment(CreateEnvironmentRequest, CallSettings)

public virtual Operation<Environment, OperationMetadata> CreateEnvironment(CreateEnvironmentRequest request, CallSettings callSettings = null)

Creates a new Environment.

Parameters
NameDescription
requestCreateEnvironmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Environment, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
CreateEnvironmentRequest request = new CreateEnvironmentRequest
{
    Parent = "",
    EnvironmentId = "",
    Environment = new gcnv::Environment(),
};
// Make the request
Operation<gcnv::Environment, OperationMetadata> response = notebookServiceClient.CreateEnvironment(request);

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

CreateEnvironmentAsync(CreateEnvironmentRequest, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(CreateEnvironmentRequest request, CallSettings callSettings = null)

Creates a new Environment.

Parameters
NameDescription
requestCreateEnvironmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Environment, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEnvironmentRequest request = new CreateEnvironmentRequest
{
    Parent = "",
    EnvironmentId = "",
    Environment = new gcnv::Environment(),
};
// Make the request
Operation<gcnv::Environment, OperationMetadata> response = await notebookServiceClient.CreateEnvironmentAsync(request);

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

CreateEnvironmentAsync(CreateEnvironmentRequest, CancellationToken)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(CreateEnvironmentRequest request, CancellationToken cancellationToken)

Creates a new Environment.

Parameters
NameDescription
requestCreateEnvironmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Environment, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEnvironmentRequest request = new CreateEnvironmentRequest
{
    Parent = "",
    EnvironmentId = "",
    Environment = new gcnv::Environment(),
};
// Make the request
Operation<gcnv::Environment, OperationMetadata> response = await notebookServiceClient.CreateEnvironmentAsync(request);

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

CreateInstance(CreateInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    Parent = "",
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.CreateInstance(request);

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

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    Parent = "",
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.CreateInstanceAsync(request);

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

CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
NameDescription
requestCreateInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    Parent = "",
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.CreateInstanceAsync(request);

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

DeleteEnvironment(DeleteEnvironmentRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteEnvironment(DeleteEnvironmentRequest request, CallSettings callSettings = null)

Deletes a single Environment.

Parameters
NameDescription
requestDeleteEnvironmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
DeleteEnvironmentRequest request = new DeleteEnvironmentRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadata> response = notebookServiceClient.DeleteEnvironment(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteEnvironment(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;
}

DeleteEnvironmentAsync(DeleteEnvironmentRequest, CallSettings)

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

Deletes a single Environment.

Parameters
NameDescription
requestDeleteEnvironmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteEnvironmentRequest request = new DeleteEnvironmentRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadata> response = await notebookServiceClient.DeleteEnvironmentAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteEnvironmentAsync(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;
}

DeleteEnvironmentAsync(DeleteEnvironmentRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteEnvironmentAsync(DeleteEnvironmentRequest request, CancellationToken cancellationToken)

Deletes a single Environment.

Parameters
NameDescription
requestDeleteEnvironmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteEnvironmentRequest request = new DeleteEnvironmentRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadata> response = await notebookServiceClient.DeleteEnvironmentAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteEnvironmentAsync(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;
}

DeleteInstance(DeleteInstanceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a single Instance.

Parameters
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadata> response = notebookServiceClient.DeleteInstance(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = notebookServiceClient.PollOnceDeleteInstance(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

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

Deletes a single Instance.

Parameters
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadata> response = await notebookServiceClient.DeleteInstanceAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes a single Instance.

Parameters
NameDescription
requestDeleteInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadata> response = await notebookServiceClient.DeleteInstanceAsync(request);

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

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await notebookServiceClient.PollOnceDeleteInstanceAsync(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;
}

GetEnvironment(GetEnvironmentRequest, CallSettings)

public virtual Environment GetEnvironment(GetEnvironmentRequest request, CallSettings callSettings = null)

Gets details of a single Environment.

Parameters
NameDescription
requestGetEnvironmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Environment

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
GetEnvironmentRequest request = new GetEnvironmentRequest { Name = "", };
// Make the request
gcnv::Environment response = notebookServiceClient.GetEnvironment(request);

GetEnvironmentAsync(GetEnvironmentRequest, CallSettings)

public virtual Task<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, CallSettings callSettings = null)

Gets details of a single Environment.

Parameters
NameDescription
requestGetEnvironmentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Environment>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetEnvironmentRequest request = new GetEnvironmentRequest { Name = "", };
// Make the request
gcnv::Environment response = await notebookServiceClient.GetEnvironmentAsync(request);

GetEnvironmentAsync(GetEnvironmentRequest, CancellationToken)

public virtual Task<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, CancellationToken cancellationToken)

Gets details of a single Environment.

Parameters
NameDescription
requestGetEnvironmentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Environment>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetEnvironmentRequest request = new GetEnvironmentRequest { Name = "", };
// Make the request
gcnv::Environment response = await notebookServiceClient.GetEnvironmentAsync(request);

GetInstance(GetInstanceRequest, CallSettings)

public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest { Name = "", };
// Make the request
Instance response = notebookServiceClient.GetInstance(request);

GetInstanceAsync(GetInstanceRequest, CallSettings)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest { Name = "", };
// Make the request
Instance response = await notebookServiceClient.GetInstanceAsync(request);

GetInstanceAsync(GetInstanceRequest, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
NameDescription
requestGetInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest { Name = "", };
// Make the request
Instance response = await notebookServiceClient.GetInstanceAsync(request);

IsInstanceUpgradeable(IsInstanceUpgradeableRequest, CallSettings)

public virtual IsInstanceUpgradeableResponse IsInstanceUpgradeable(IsInstanceUpgradeableRequest request, CallSettings callSettings = null)

Check if a notebook instance is upgradable.

Parameters
NameDescription
requestIsInstanceUpgradeableRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
IsInstanceUpgradeableResponse

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
IsInstanceUpgradeableRequest request = new IsInstanceUpgradeableRequest
{
    NotebookInstance = "",
};
// Make the request
IsInstanceUpgradeableResponse response = notebookServiceClient.IsInstanceUpgradeable(request);

IsInstanceUpgradeableAsync(IsInstanceUpgradeableRequest, CallSettings)

public virtual Task<IsInstanceUpgradeableResponse> IsInstanceUpgradeableAsync(IsInstanceUpgradeableRequest request, CallSettings callSettings = null)

Check if a notebook instance is upgradable.

Parameters
NameDescription
requestIsInstanceUpgradeableRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<IsInstanceUpgradeableResponse>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
IsInstanceUpgradeableRequest request = new IsInstanceUpgradeableRequest
{
    NotebookInstance = "",
};
// Make the request
IsInstanceUpgradeableResponse response = await notebookServiceClient.IsInstanceUpgradeableAsync(request);

IsInstanceUpgradeableAsync(IsInstanceUpgradeableRequest, CancellationToken)

public virtual Task<IsInstanceUpgradeableResponse> IsInstanceUpgradeableAsync(IsInstanceUpgradeableRequest request, CancellationToken cancellationToken)

Check if a notebook instance is upgradable.

Parameters
NameDescription
requestIsInstanceUpgradeableRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<IsInstanceUpgradeableResponse>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
IsInstanceUpgradeableRequest request = new IsInstanceUpgradeableRequest
{
    NotebookInstance = "",
};
// Make the request
IsInstanceUpgradeableResponse response = await notebookServiceClient.IsInstanceUpgradeableAsync(request);

ListEnvironments(ListEnvironmentsRequest, CallSettings)

public virtual PagedEnumerable<ListEnvironmentsResponse, Environment> ListEnvironments(ListEnvironmentsRequest request, CallSettings callSettings = null)

Lists environments in a project.

Parameters
NameDescription
requestListEnvironmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListEnvironmentsResponse, Environment>

A pageable sequence of Environment resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ListEnvironmentsRequest request = new ListEnvironmentsRequest { Parent = "", };
// Make the request
PagedEnumerable<ListEnvironmentsResponse, gcnv::Environment> response = notebookServiceClient.ListEnvironments(request);

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

ListEnvironmentsAsync(ListEnvironmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEnvironmentsResponse, Environment> ListEnvironmentsAsync(ListEnvironmentsRequest request, CallSettings callSettings = null)

Lists environments in a project.

Parameters
NameDescription
requestListEnvironmentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListEnvironmentsResponse, Environment>

A pageable asynchronous sequence of Environment resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ListEnvironmentsRequest request = new ListEnvironmentsRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<ListEnvironmentsResponse, gcnv::Environment> response = notebookServiceClient.ListEnvironmentsAsync(request);

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

ListInstances(ListInstancesRequest, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(ListInstancesRequest request, CallSettings callSettings = null)

Lists instances in a given project and location.

Parameters
NameDescription
requestListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListInstancesResponse, Instance>

A pageable sequence of Instance resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest { Parent = "", };
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = notebookServiceClient.ListInstances(request);

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

ListInstancesAsync(ListInstancesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(ListInstancesRequest request, CallSettings callSettings = null)

Lists instances in a given project and location.

Parameters
NameDescription
requestListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListInstancesResponse, Instance>

A pageable asynchronous sequence of Instance resources.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = notebookServiceClient.ListInstancesAsync(request);

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

PollOnceCreateEnvironment(String, CallSettings)

public virtual Operation<Environment, OperationMetadata> PollOnceCreateEnvironment(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Environment, OperationMetadata>

The result of polling the operation.

PollOnceCreateEnvironmentAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Environment, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceCreateInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceCreateInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceCreateInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteEnvironment(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The result of polling the operation.

PollOnceDeleteEnvironmentAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteInstance(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The result of polling the operation.

PollOnceDeleteInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceRegisterInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceRegisterInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceRegisterInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceReportInstanceInfo(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceReportInstanceInfo(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceReportInstanceInfoAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceResetInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceResetInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceResetInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceSetInstanceAccelerator(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceSetInstanceAccelerator(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceSetInstanceAcceleratorAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceSetInstanceLabels(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceSetInstanceLabels(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceSetInstanceLabelsAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceSetInstanceMachineType(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceSetInstanceMachineType(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceSetInstanceMachineTypeAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceStartInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceStartInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceStartInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceStopInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceStopInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceStopInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpgradeInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceUpgradeInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceUpgradeInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpgradeInstanceInternal(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceUpgradeInstanceInternal(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceUpgradeInstanceInternalAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

RegisterInstance(RegisterInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> RegisterInstance(RegisterInstanceRequest request, CallSettings callSettings = null)

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Parameters
NameDescription
requestRegisterInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
RegisterInstanceRequest request = new RegisterInstanceRequest
{
    Parent = "",
    InstanceId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.RegisterInstance(request);

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

RegisterInstanceAsync(RegisterInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RegisterInstanceAsync(RegisterInstanceRequest request, CallSettings callSettings = null)

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Parameters
NameDescription
requestRegisterInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RegisterInstanceRequest request = new RegisterInstanceRequest
{
    Parent = "",
    InstanceId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.RegisterInstanceAsync(request);

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

RegisterInstanceAsync(RegisterInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RegisterInstanceAsync(RegisterInstanceRequest request, CancellationToken cancellationToken)

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Parameters
NameDescription
requestRegisterInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RegisterInstanceRequest request = new RegisterInstanceRequest
{
    Parent = "",
    InstanceId = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.RegisterInstanceAsync(request);

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

ReportInstanceInfo(ReportInstanceInfoRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> ReportInstanceInfo(ReportInstanceInfoRequest request, CallSettings callSettings = null)

Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.

Parameters
NameDescription
requestReportInstanceInfoRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ReportInstanceInfoRequest request = new ReportInstanceInfoRequest
{
    Name = "",
    VmId = "",
    Metadata = { { "", "" }, },
};
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.ReportInstanceInfo(request);

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

ReportInstanceInfoAsync(ReportInstanceInfoRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> ReportInstanceInfoAsync(ReportInstanceInfoRequest request, CallSettings callSettings = null)

Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.

Parameters
NameDescription
requestReportInstanceInfoRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ReportInstanceInfoRequest request = new ReportInstanceInfoRequest
{
    Name = "",
    VmId = "",
    Metadata = { { "", "" }, },
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.ReportInstanceInfoAsync(request);

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

ReportInstanceInfoAsync(ReportInstanceInfoRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> ReportInstanceInfoAsync(ReportInstanceInfoRequest request, CancellationToken cancellationToken)

Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.

Parameters
NameDescription
requestReportInstanceInfoRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ReportInstanceInfoRequest request = new ReportInstanceInfoRequest
{
    Name = "",
    VmId = "",
    Metadata = { { "", "" }, },
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.ReportInstanceInfoAsync(request);

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

ResetInstance(ResetInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> ResetInstance(ResetInstanceRequest request, CallSettings callSettings = null)

Resets a notebook instance.

Parameters
NameDescription
requestResetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.ResetInstance(request);

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

ResetInstanceAsync(ResetInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> ResetInstanceAsync(ResetInstanceRequest request, CallSettings callSettings = null)

Resets a notebook instance.

Parameters
NameDescription
requestResetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.ResetInstanceAsync(request);

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

ResetInstanceAsync(ResetInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> ResetInstanceAsync(ResetInstanceRequest request, CancellationToken cancellationToken)

Resets a notebook instance.

Parameters
NameDescription
requestResetInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.ResetInstanceAsync(request);

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

SetInstanceAccelerator(SetInstanceAcceleratorRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> SetInstanceAccelerator(SetInstanceAcceleratorRequest request, CallSettings callSettings = null)

Updates the guest accelerators of a single Instance.

Parameters
NameDescription
requestSetInstanceAcceleratorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
SetInstanceAcceleratorRequest request = new SetInstanceAcceleratorRequest
{
    Name = "",
    Type = Instance.Types.AcceleratorType.Unspecified,
    CoreCount = 0L,
};
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.SetInstanceAccelerator(request);

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

SetInstanceAcceleratorAsync(SetInstanceAcceleratorRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> SetInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request, CallSettings callSettings = null)

Updates the guest accelerators of a single Instance.

Parameters
NameDescription
requestSetInstanceAcceleratorRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SetInstanceAcceleratorRequest request = new SetInstanceAcceleratorRequest
{
    Name = "",
    Type = Instance.Types.AcceleratorType.Unspecified,
    CoreCount = 0L,
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.SetInstanceAcceleratorAsync(request);

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

SetInstanceAcceleratorAsync(SetInstanceAcceleratorRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> SetInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request, CancellationToken cancellationToken)

Updates the guest accelerators of a single Instance.

Parameters
NameDescription
requestSetInstanceAcceleratorRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SetInstanceAcceleratorRequest request = new SetInstanceAcceleratorRequest
{
    Name = "",
    Type = Instance.Types.AcceleratorType.Unspecified,
    CoreCount = 0L,
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.SetInstanceAcceleratorAsync(request);

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

SetInstanceLabels(SetInstanceLabelsRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> SetInstanceLabels(SetInstanceLabelsRequest request, CallSettings callSettings = null)

Updates the labels of an Instance.

Parameters
NameDescription
requestSetInstanceLabelsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
SetInstanceLabelsRequest request = new SetInstanceLabelsRequest
{
    Name = "",
    Labels = { { "", "" }, },
};
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.SetInstanceLabels(request);

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

SetInstanceLabelsAsync(SetInstanceLabelsRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> SetInstanceLabelsAsync(SetInstanceLabelsRequest request, CallSettings callSettings = null)

Updates the labels of an Instance.

Parameters
NameDescription
requestSetInstanceLabelsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SetInstanceLabelsRequest request = new SetInstanceLabelsRequest
{
    Name = "",
    Labels = { { "", "" }, },
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.SetInstanceLabelsAsync(request);

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

SetInstanceLabelsAsync(SetInstanceLabelsRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> SetInstanceLabelsAsync(SetInstanceLabelsRequest request, CancellationToken cancellationToken)

Updates the labels of an Instance.

Parameters
NameDescription
requestSetInstanceLabelsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SetInstanceLabelsRequest request = new SetInstanceLabelsRequest
{
    Name = "",
    Labels = { { "", "" }, },
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.SetInstanceLabelsAsync(request);

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

SetInstanceMachineType(SetInstanceMachineTypeRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> SetInstanceMachineType(SetInstanceMachineTypeRequest request, CallSettings callSettings = null)

Updates the machine type of a single Instance.

Parameters
NameDescription
requestSetInstanceMachineTypeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
SetInstanceMachineTypeRequest request = new SetInstanceMachineTypeRequest
{
    Name = "",
    MachineType = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.SetInstanceMachineType(request);

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

SetInstanceMachineTypeAsync(SetInstanceMachineTypeRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> SetInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request, CallSettings callSettings = null)

Updates the machine type of a single Instance.

Parameters
NameDescription
requestSetInstanceMachineTypeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SetInstanceMachineTypeRequest request = new SetInstanceMachineTypeRequest
{
    Name = "",
    MachineType = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.SetInstanceMachineTypeAsync(request);

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

SetInstanceMachineTypeAsync(SetInstanceMachineTypeRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> SetInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request, CancellationToken cancellationToken)

Updates the machine type of a single Instance.

Parameters
NameDescription
requestSetInstanceMachineTypeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
SetInstanceMachineTypeRequest request = new SetInstanceMachineTypeRequest
{
    Name = "",
    MachineType = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.SetInstanceMachineTypeAsync(request);

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
TypeDescription
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.

StartInstance(StartInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> StartInstance(StartInstanceRequest request, CallSettings callSettings = null)

Starts a notebook instance.

Parameters
NameDescription
requestStartInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.StartInstance(request);

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

StartInstanceAsync(StartInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> StartInstanceAsync(StartInstanceRequest request, CallSettings callSettings = null)

Starts a notebook instance.

Parameters
NameDescription
requestStartInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.StartInstanceAsync(request);

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

StartInstanceAsync(StartInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> StartInstanceAsync(StartInstanceRequest request, CancellationToken cancellationToken)

Starts a notebook instance.

Parameters
NameDescription
requestStartInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.StartInstanceAsync(request);

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

StopInstance(StopInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> StopInstance(StopInstanceRequest request, CallSettings callSettings = null)

Stops a notebook instance.

Parameters
NameDescription
requestStopInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.StopInstance(request);

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

StopInstanceAsync(StopInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> StopInstanceAsync(StopInstanceRequest request, CallSettings callSettings = null)

Stops a notebook instance.

Parameters
NameDescription
requestStopInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.StopInstanceAsync(request);

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

StopInstanceAsync(StopInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> StopInstanceAsync(StopInstanceRequest request, CancellationToken cancellationToken)

Stops a notebook instance.

Parameters
NameDescription
requestStopInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.StopInstanceAsync(request);

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

UpgradeInstance(UpgradeInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpgradeInstance(UpgradeInstanceRequest request, CallSettings callSettings = null)

Upgrades a notebook instance to the latest version.

Parameters
NameDescription
requestUpgradeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
UpgradeInstanceRequest request = new UpgradeInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.UpgradeInstance(request);

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

UpgradeInstanceAsync(UpgradeInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(UpgradeInstanceRequest request, CallSettings callSettings = null)

Upgrades a notebook instance to the latest version.

Parameters
NameDescription
requestUpgradeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeInstanceRequest request = new UpgradeInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.UpgradeInstanceAsync(request);

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

UpgradeInstanceAsync(UpgradeInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(UpgradeInstanceRequest request, CancellationToken cancellationToken)

Upgrades a notebook instance to the latest version.

Parameters
NameDescription
requestUpgradeInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeInstanceRequest request = new UpgradeInstanceRequest { Name = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.UpgradeInstanceAsync(request);

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

UpgradeInstanceInternal(UpgradeInstanceInternalRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpgradeInstanceInternal(UpgradeInstanceInternalRequest request, CallSettings callSettings = null)

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.

Parameters
NameDescription
requestUpgradeInstanceInternalRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
UpgradeInstanceInternalRequest request = new UpgradeInstanceInternalRequest { Name = "", VmId = "", };
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.UpgradeInstanceInternal(request);

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

UpgradeInstanceInternalAsync(UpgradeInstanceInternalRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request, CallSettings callSettings = null)

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.

Parameters
NameDescription
requestUpgradeInstanceInternalRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeInstanceInternalRequest request = new UpgradeInstanceInternalRequest { Name = "", VmId = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.UpgradeInstanceInternalAsync(request);

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

UpgradeInstanceInternalAsync(UpgradeInstanceInternalRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request, CancellationToken cancellationToken)

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.

Parameters
NameDescription
requestUpgradeInstanceInternalRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
UpgradeInstanceInternalRequest request = new UpgradeInstanceInternalRequest { Name = "", VmId = "", };
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.UpgradeInstanceInternalAsync(request);

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