AI Platform Notebooks v1 API - Class NotebookServiceClient (2.2.0)

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

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

NotebookService client wrapper, for convenient use.

Inheritance

Object > NotebookServiceClient

Namespace

Google.Cloud.Notebooks.V1

Assembly

Google.Cloud.Notebooks.V1.dll

Remarks

API v1 service for Cloud AI Platform Notebooks.

Properties

CreateEnvironmentOperationsClient

public virtual OperationsClient CreateEnvironmentOperationsClient { get; }

The long-running operations client for CreateEnvironment.

Property Value
TypeDescription
OperationsClient

CreateExecutionOperationsClient

public virtual OperationsClient CreateExecutionOperationsClient { get; }

The long-running operations client for CreateExecution.

Property Value
TypeDescription
OperationsClient

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
TypeDescription
OperationsClient

CreateScheduleOperationsClient

public virtual OperationsClient CreateScheduleOperationsClient { get; }

The long-running operations client for CreateSchedule.

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

DeleteExecutionOperationsClient

public virtual OperationsClient DeleteExecutionOperationsClient { get; }

The long-running operations client for DeleteExecution.

Property Value
TypeDescription
OperationsClient

DeleteInstanceOperationsClient

public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
TypeDescription
OperationsClient

DeleteScheduleOperationsClient

public virtual OperationsClient DeleteScheduleOperationsClient { get; }

The long-running operations client for DeleteSchedule.

Property Value
TypeDescription
OperationsClient

DiagnoseInstanceOperationsClient

public virtual OperationsClient DiagnoseInstanceOperationsClient { get; }

The long-running operations client for DiagnoseInstance.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual NotebookService.NotebookServiceClient GrpcClient { get; }

The underlying gRPC NotebookService client

Property Value
TypeDescription
NotebookService.NotebookServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

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

RollbackInstanceOperationsClient

public virtual OperationsClient RollbackInstanceOperationsClient { get; }

The long-running operations client for RollbackInstance.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

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

TriggerScheduleOperationsClient

public virtual OperationsClient TriggerScheduleOperationsClient { get; }

The long-running operations client for TriggerSchedule.

Property Value
TypeDescription
OperationsClient

UpdateInstanceConfigOperationsClient

public virtual OperationsClient UpdateInstanceConfigOperationsClient { get; }

The long-running operations client for UpdateInstanceConfig.

Property Value
TypeDescription
OperationsClient

UpdateShieldedInstanceConfigOperationsClient

public virtual OperationsClient UpdateShieldedInstanceConfigOperationsClient { get; }

The long-running operations client for UpdateShieldedInstanceConfig.

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;
}

CreateEnvironment(String, Environment, String, CallSettings)

public virtual Operation<Environment, OperationMetadata> CreateEnvironment(string parent, Environment environment, string environmentId, CallSettings callSettings = null)

Creates a new Environment.

Parameters
NameDescription
parentString

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

environmentEnvironment

Required. The environment to be created.

environmentIdString

Required. User-defined unique ID of this environment. The environment_id must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.

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)
string parent = "";
gcnv::Environment environment = new gcnv::Environment();
string environmentId = "";
// Make the request
Operation<gcnv::Environment, OperationMetadata> response = notebookServiceClient.CreateEnvironment(parent, environment, environmentId);

// 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;
}

CreateEnvironmentAsync(String, Environment, String, CallSettings)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(string parent, Environment environment, string environmentId, CallSettings callSettings = null)

Creates a new Environment.

Parameters
NameDescription
parentString

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

environmentEnvironment

Required. The environment to be created.

environmentIdString

Required. User-defined unique ID of this environment. The environment_id must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.

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)
string parent = "";
gcnv::Environment environment = new gcnv::Environment();
string environmentId = "";
// Make the request
Operation<gcnv::Environment, OperationMetadata> response = await notebookServiceClient.CreateEnvironmentAsync(parent, environment, environmentId);

// 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(String, Environment, String, CancellationToken)

public virtual Task<Operation<Environment, OperationMetadata>> CreateEnvironmentAsync(string parent, Environment environment, string environmentId, CancellationToken cancellationToken)

Creates a new Environment.

Parameters
NameDescription
parentString

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

environmentEnvironment

Required. The environment to be created.

environmentIdString

Required. User-defined unique ID of this environment. The environment_id must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.

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)
string parent = "";
gcnv::Environment environment = new gcnv::Environment();
string environmentId = "";
// Make the request
Operation<gcnv::Environment, OperationMetadata> response = await notebookServiceClient.CreateEnvironmentAsync(parent, environment, environmentId);

// 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;
}

CreateExecution(CreateExecutionRequest, CallSettings)

public virtual Operation<Execution, OperationMetadata> CreateExecution(CreateExecutionRequest request, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
NameDescription
requestCreateExecutionRequest

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

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
CreateExecutionRequest request = new CreateExecutionRequest
{
    ParentAsExecutionName = ExecutionName.FromProjectLocationExecution("[PROJECT]", "[LOCATION]", "[EXECUTION]"),
    ExecutionId = "",
    Execution = new Execution(),
};
// Make the request
Operation<Execution, OperationMetadata> response = notebookServiceClient.CreateExecution(request);

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

CreateExecution(ExecutionName, Execution, String, CallSettings)

public virtual Operation<Execution, OperationMetadata> CreateExecution(ExecutionName parent, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
NameDescription
parentExecutionName

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

executionExecution

Required. The execution to be created.

executionIdString

Required. User-defined unique ID of this execution.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Execution, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ExecutionName parent = ExecutionName.FromProjectLocationExecution("[PROJECT]", "[LOCATION]", "[EXECUTION]");
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = notebookServiceClient.CreateExecution(parent, execution, executionId);

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

CreateExecution(String, Execution, String, CallSettings)

public virtual Operation<Execution, OperationMetadata> CreateExecution(string parent, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
NameDescription
parentString

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

executionExecution

Required. The execution to be created.

executionIdString

Required. User-defined unique ID of this execution.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Execution, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/location/[LOCATION]/executions/[EXECUTION]";
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = notebookServiceClient.CreateExecution(parent, execution, executionId);

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

CreateExecutionAsync(CreateExecutionRequest, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> CreateExecutionAsync(CreateExecutionRequest request, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
NameDescription
requestCreateExecutionRequest

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

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateExecutionRequest request = new CreateExecutionRequest
{
    ParentAsExecutionName = ExecutionName.FromProjectLocationExecution("[PROJECT]", "[LOCATION]", "[EXECUTION]"),
    ExecutionId = "",
    Execution = new Execution(),
};
// Make the request
Operation<Execution, OperationMetadata> response = await notebookServiceClient.CreateExecutionAsync(request);

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

CreateExecutionAsync(CreateExecutionRequest, CancellationToken)

public virtual Task<Operation<Execution, OperationMetadata>> CreateExecutionAsync(CreateExecutionRequest request, CancellationToken cancellationToken)

Creates a new Execution in a given project and location.

Parameters
NameDescription
requestCreateExecutionRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Execution, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
CreateExecutionRequest request = new CreateExecutionRequest
{
    ParentAsExecutionName = ExecutionName.FromProjectLocationExecution("[PROJECT]", "[LOCATION]", "[EXECUTION]"),
    ExecutionId = "",
    Execution = new Execution(),
};
// Make the request
Operation<Execution, OperationMetadata> response = await notebookServiceClient.CreateExecutionAsync(request);

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

CreateExecutionAsync(ExecutionName, Execution, String, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> CreateExecutionAsync(ExecutionName parent, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
NameDescription
parentExecutionName

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

executionExecution

Required. The execution to be created.

executionIdString

Required. User-defined unique ID of this execution.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Execution, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ExecutionName parent = ExecutionName.FromProjectLocationExecution("[PROJECT]", "[LOCATION]", "[EXECUTION]");
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await notebookServiceClient.CreateExecutionAsync(parent, execution, executionId);

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

CreateExecutionAsync(ExecutionName, Execution, String, CancellationToken)

public virtual Task<Operation<Execution, OperationMetadata>> CreateExecutionAsync(ExecutionName parent, Execution execution, string executionId, CancellationToken cancellationToken)

Creates a new Execution in a given project and location.

Parameters
NameDescription
parentExecutionName

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

executionExecution

Required. The execution to be created.

executionIdString

Required. User-defined unique ID of this execution.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Execution, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
ExecutionName parent = ExecutionName.FromProjectLocationExecution("[PROJECT]", "[LOCATION]", "[EXECUTION]");
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await notebookServiceClient.CreateExecutionAsync(parent, execution, executionId);

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

CreateExecutionAsync(String, Execution, String, CallSettings)

public virtual Task<Operation<Execution, OperationMetadata>> CreateExecutionAsync(string parent, Execution execution, string executionId, CallSettings callSettings = null)

Creates a new Execution in a given project and location.

Parameters
NameDescription
parentString

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

executionExecution

Required. The execution to be created.

executionIdString

Required. User-defined unique ID of this execution.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Execution, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/location/[LOCATION]/executions/[EXECUTION]";
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await notebookServiceClient.CreateExecutionAsync(parent, execution, executionId);

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

CreateExecutionAsync(String, Execution, String, CancellationToken)

public virtual Task<Operation<Execution, OperationMetadata>> CreateExecutionAsync(string parent, Execution execution, string executionId, CancellationToken cancellationToken)

Creates a new Execution in a given project and location.

Parameters
NameDescription
parentString

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

executionExecution

Required. The execution to be created.

executionIdString

Required. User-defined unique ID of this execution.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Execution, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = await NotebookServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/location/[LOCATION]/executions/[EXECUTION]";
Execution execution = new Execution();
string executionId = "";
// Make the request
Operation<Execution, OperationMetadata> response = await notebookServiceClient.CreateExecutionAsync(parent, execution, executionId);

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

CreateInstance(String, Instance, String, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
NameDescription
parentString

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

instanceInstance

Required. The instance to be created.

instanceIdString

Required. User-defined unique ID of this instance.

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)
string parent = "";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = notebookServiceClient.CreateInstance(parent, instance, instanceId);

// 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;
}

CreateInstanceAsync(String, Instance, String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
NameDescription
parentString

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

instanceInstance

Required. The instance to be created.

instanceIdString

Required. User-defined unique ID of this instance.

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)
string parent = "";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.CreateInstanceAsync(parent, instance, instanceId);

// 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(String, Instance, String, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
NameDescription
parentString

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

instanceInstance

Required. The instance to be created.

instanceIdString

Required. User-defined unique ID of this instance.

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)
string parent = "";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await notebookServiceClient.CreateInstanceAsync(parent, instance, instanceId);

// 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;
}

CreateSchedule(CreateScheduleRequest, CallSettings)

public virtual Operation<Schedule, OperationMetadata> CreateSchedule(CreateScheduleRequest request, CallSettings callSettings = null)

Creates a new Scheduled Notebook in a given project and location.

Parameters
NameDescription
requestCreateScheduleRequest

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

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
CreateScheduleRequest request = new CreateScheduleRequest
{
    ParentAsScheduleName = ScheduleName.FromProjectLocationSchedule("[PROJECT]", "[LOCATION]", "[SCHEDULE]"),
    ScheduleId = "",
    Schedule = new Schedule(),
};
// Make the request
Operation<Schedule, OperationMetadata> response = notebookServiceClient.CreateSchedule(request);

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

CreateSchedule(ScheduleName, Schedule, String, CallSettings)

public virtual Operation<Schedule, OperationMetadata> CreateSchedule(ScheduleName parent, Schedule schedule, string scheduleId, CallSettings callSettings = null)

Creates a new Scheduled Notebook in a given project and location.

Parameters
NameDescription
parentScheduleName

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

scheduleSchedule

Required. The schedule to be created.

scheduleIdString

Required. User-defined unique ID of this schedule.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Schedule, OperationMetadata>

The RPC response.

Example
// Create client
NotebookServiceClient notebookServiceClient = NotebookServiceClient.Create();
// Initialize request argument(s)
ScheduleName parent = ScheduleName.FromProjectLocationSchedule("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
Schedule schedule = new Schedule();
string scheduleId = "";
// Make the request
Operation<Schedule, OperationMetadata> response = notebookServiceClient.CreateSchedule(parent, schedule, scheduleId);

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

CreateSchedule(String, Schedule, String, CallSettings)

public virtual Operation<Schedule, OperationMetadata> CreateSchedule(string parent, Schedule schedule, string scheduleId, CallSettings callSettings = null)

Creates a new Scheduled Notebook in a given project and location.

Parameters
NameDescription
parentString

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

scheduleSchedule

Required. The schedule to be created.

scheduleIdString

Required. User-defined unique ID of this schedule.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription