AI Platform Notebooks v1 API - Class ManagedNotebookServiceClient (2.0.0)

Stay organized with collections Save and categorize content based on your preferences.
public abstract class ManagedNotebookServiceClient

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

ManagedNotebookService client wrapper, for convenient use.

Inheritance

Object > ManagedNotebookServiceClient

Namespace

Google.Cloud.Notebooks.V1

Assembly

Google.Cloud.Notebooks.V1.dll

Remarks

API v1 service for Managed Notebooks.

Properties

CreateRuntimeOperationsClient

public virtual OperationsClient CreateRuntimeOperationsClient { get; }

The long-running operations client for CreateRuntime.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ManagedNotebookService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default ManagedNotebookService scopes are:

DeleteRuntimeOperationsClient

public virtual OperationsClient DeleteRuntimeOperationsClient { get; }

The long-running operations client for DeleteRuntime.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual ManagedNotebookService.ManagedNotebookServiceClient GrpcClient { get; }

The underlying gRPC ManagedNotebookService client

Property Value
TypeDescription
ManagedNotebookService.ManagedNotebookServiceClient

ReportRuntimeEventOperationsClient

public virtual OperationsClient ReportRuntimeEventOperationsClient { get; }

The long-running operations client for ReportRuntimeEvent.

Property Value
TypeDescription
OperationsClient

ResetRuntimeOperationsClient

public virtual OperationsClient ResetRuntimeOperationsClient { get; }

The long-running operations client for ResetRuntime.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

StartRuntimeOperationsClient

public virtual OperationsClient StartRuntimeOperationsClient { get; }

The long-running operations client for StartRuntime.

Property Value
TypeDescription
OperationsClient

StopRuntimeOperationsClient

public virtual OperationsClient StopRuntimeOperationsClient { get; }

The long-running operations client for StopRuntime.

Property Value
TypeDescription
OperationsClient

SwitchRuntimeOperationsClient

public virtual OperationsClient SwitchRuntimeOperationsClient { get; }

The long-running operations client for SwitchRuntime.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static ManagedNotebookServiceClient Create()

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

Returns
TypeDescription
ManagedNotebookServiceClient

The created ManagedNotebookServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ManagedNotebookServiceClient>

The task representing the created ManagedNotebookServiceClient.

CreateRuntime(CreateRuntimeRequest, CallSettings)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
requestCreateRuntimeRequest

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<Runtime, OperationMetadata>

The RPC response.

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

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

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

CreateRuntime(RuntimeName, String, Runtime, CallSettings)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
parentRuntimeName

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

runtimeIdString

Required. User-defined unique ID of this Runtime.

runtimeRuntime

Required. The Runtime to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Runtime, OperationMetadata>

The RPC response.

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

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

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

CreateRuntime(String, String, Runtime, CallSettings)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
parentString

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

runtimeIdString

Required. User-defined unique ID of this Runtime.

runtimeRuntime

Required. The Runtime to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Runtime, OperationMetadata>

The RPC response.

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

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

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

CreateRuntimeAsync(CreateRuntimeRequest, CallSettings)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
requestCreateRuntimeRequest

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<Runtime, OperationMetadata>>

A Task containing the RPC response.

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

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

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

CreateRuntimeAsync(CreateRuntimeRequest, CancellationToken)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
requestCreateRuntimeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Runtime, OperationMetadata>>

A Task containing the RPC response.

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

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

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

CreateRuntimeAsync(RuntimeName, String, Runtime, CallSettings)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
parentRuntimeName

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

runtimeIdString

Required. User-defined unique ID of this Runtime.

runtimeRuntime

Required. The Runtime to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Runtime, OperationMetadata>>

A Task containing the RPC response.

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

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

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

CreateRuntimeAsync(RuntimeName, String, Runtime, CancellationToken)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
parentRuntimeName

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

runtimeIdString

Required. User-defined unique ID of this Runtime.

runtimeRuntime

Required. The Runtime to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Runtime, OperationMetadata>>

A Task containing the RPC response.

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

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

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

CreateRuntimeAsync(String, String, Runtime, CallSettings)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
parentString

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

runtimeIdString

Required. User-defined unique ID of this Runtime.

runtimeRuntime

Required. The Runtime to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Runtime, OperationMetadata>>

A Task containing the RPC response.

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

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

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

CreateRuntimeAsync(String, String, Runtime, CancellationToken)

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

Creates a new Runtime in a given project and location.

Parameters
NameDescription
parentString

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

runtimeIdString

Required. User-defined unique ID of this Runtime.

runtimeRuntime

Required. The Runtime to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Runtime, OperationMetadata>>

A Task containing the RPC response.

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

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

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

DeleteRuntime(DeleteRuntimeRequest, CallSettings)

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

Deletes a single Runtime.

Parameters
NameDescription
requestDeleteRuntimeRequest

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

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

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

DeleteRuntime(RuntimeName, CallSettings)

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

Deletes a single Runtime.

Parameters
NameDescription
nameRuntimeName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

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

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

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

DeleteRuntime(String, CallSettings)

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

Deletes a single Runtime.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

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

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

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

DeleteRuntimeAsync(DeleteRuntimeRequest, CallSettings)

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

Deletes a single Runtime.

Parameters
NameDescription
requestDeleteRuntimeRequest

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

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

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

DeleteRuntimeAsync(DeleteRuntimeRequest, CancellationToken)

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

Deletes a single Runtime.

Parameters
NameDescription
requestDeleteRuntimeRequest

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

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

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

DeleteRuntimeAsync(RuntimeName, CallSettings)

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

Deletes a single Runtime.

Parameters
NameDescription
nameRuntimeName

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

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
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]");
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(name);

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

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

DeleteRuntimeAsync(RuntimeName, CancellationToken)

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

Deletes a single Runtime.

Parameters
NameDescription
nameRuntimeName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

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

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

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

DeleteRuntimeAsync(String, CallSettings)

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

Deletes a single Runtime.

Parameters
NameDescription
nameString

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

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
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]";
// Make the request
Operation<Empty, OperationMetadata> response = await managedNotebookServiceClient.DeleteRuntimeAsync(name);

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

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

DeleteRuntimeAsync(String, CancellationToken)

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

Deletes a single Runtime.

Parameters
NameDescription
nameString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

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

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

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

GetRuntime(GetRuntimeRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetRuntimeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Runtime

The RPC response.

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

GetRuntime(RuntimeName, CallSettings)

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

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

Parameters
NameDescription
nameRuntimeName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Runtime

The RPC response.

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

GetRuntime(String, CallSettings)

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

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

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Runtime

The RPC response.

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

GetRuntimeAsync(GetRuntimeRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetRuntimeRequest

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<Runtime>

A Task containing the RPC response.

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

GetRuntimeAsync(GetRuntimeRequest, CancellationToken)

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

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

Parameters
NameDescription
requestGetRuntimeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Runtime>

A Task containing the RPC response.

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

GetRuntimeAsync(RuntimeName, CallSettings)

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

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

Parameters
NameDescription
nameRuntimeName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Runtime>

A Task containing the RPC response.

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

GetRuntimeAsync(RuntimeName, CancellationToken)

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

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

Parameters
NameDescription
nameRuntimeName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Runtime>

A Task containing the RPC response.

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

GetRuntimeAsync(String, CallSettings)

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

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

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Runtime>

A Task containing the RPC response.

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

GetRuntimeAsync(String, CancellationToken)

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

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

Parameters
NameDescription
nameString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Runtime>

A Task containing the RPC response.

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

ListRuntimes(LocationName, String, Nullable<Int32>, CallSettings)

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

Lists Runtimes in a given project and location.

Parameters
NameDescription
parentLocationName

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

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListRuntimesResponse, Runtime>

A pageable sequence of Runtime resources.

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

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

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

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

ListRuntimes(ListRuntimesRequest, CallSettings)

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

Lists Runtimes in a given project and location.

Parameters
NameDescription
requestListRuntimesRequest

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<ListRuntimesResponse, Runtime>

A pageable sequence of Runtime resources.

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

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

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

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

ListRuntimes(String, String, Nullable<Int32>, CallSettings)

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

Lists Runtimes in a given project and location.

Parameters
NameDescription
parentString

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

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListRuntimesResponse, Runtime>

A pageable sequence of Runtime resources.

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

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

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

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

ListRuntimesAsync(LocationName, String, Nullable<Int32>, CallSettings)

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

Lists Runtimes in a given project and location.

Parameters
NameDescription
parentLocationName

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

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListRuntimesResponse, Runtime>

A pageable asynchronous sequence of Runtime resources.

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

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

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

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

ListRuntimesAsync(ListRuntimesRequest, CallSettings)

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

Lists Runtimes in a given project and location.

Parameters
NameDescription
requestListRuntimesRequest

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<ListRuntimesResponse, Runtime>

A pageable asynchronous sequence of Runtime resources.

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

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

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

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

ListRuntimesAsync(String, String, Nullable<Int32>, CallSettings)

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

Lists Runtimes in a given project and location.

Parameters
NameDescription
parentString

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

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListRuntimesResponse, Runtime>

A pageable asynchronous sequence of Runtime resources.

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

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

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

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

PollOnceCreateRuntime(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>

The result of polling the operation.

PollOnceCreateRuntimeAsync(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteRuntime(String, CallSettings)

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

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

Parameters
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.

PollOnceDeleteRuntimeAsync(String, CallSettings)

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

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

Parameters
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.

PollOnceReportRuntimeEvent(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>

The result of polling the operation.

PollOnceReportRuntimeEventAsync(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceResetRuntime(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>

The result of polling the operation.

PollOnceResetRuntimeAsync(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceStartRuntime(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>

The result of polling the operation.

PollOnceStartRuntimeAsync(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceStopRuntime(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>

The result of polling the operation.

PollOnceStopRuntimeAsync(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceSwitchRuntime(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>

The result of polling the operation.

PollOnceSwitchRuntimeAsync(String, CallSettings)

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

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

Parameters
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<Runtime, OperationMetadata>>

A task representing the result of polling the operation.

RefreshRuntimeTokenInternal(RefreshRuntimeTokenInternalRequest, CallSettings)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
requestRefreshRuntimeTokenInternalRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RefreshRuntimeTokenInternalResponse

The RPC response.

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

RefreshRuntimeTokenInternal(RuntimeName, String, CallSettings)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
nameRuntimeName

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

vmIdString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RefreshRuntimeTokenInternalResponse

The RPC response.

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

RefreshRuntimeTokenInternal(String, String, CallSettings)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
nameString

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

vmIdString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RefreshRuntimeTokenInternalResponse

The RPC response.

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

RefreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest, CallSettings)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
requestRefreshRuntimeTokenInternalRequest

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<RefreshRuntimeTokenInternalResponse>

A Task containing the RPC response.

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

RefreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest, CancellationToken)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
requestRefreshRuntimeTokenInternalRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<RefreshRuntimeTokenInternalResponse>

A Task containing the RPC response.

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

RefreshRuntimeTokenInternalAsync(RuntimeName, String, CallSettings)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
nameRuntimeName

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

vmIdString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RefreshRuntimeTokenInternalResponse>

A Task containing the RPC response.

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

RefreshRuntimeTokenInternalAsync(RuntimeName, String, CancellationToken)

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

Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.

Parameters
NameDescription
nameRuntimeName

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

vmIdString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<RefreshRuntimeTokenInternalResponse>

A Task containing the RPC response.

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

RefreshRuntimeTokenInternalAsync(String, String, CallSettings)