| GitHub Repository | Product Reference | REST Documentation | RPC Documentation |
Service Description: The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeTemplateName name =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
}
Note: close() needs to be called on the NotebookServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateNotebookRuntimeTemplate |
Creates a NotebookRuntimeTemplate. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNotebookRuntimeTemplate |
Gets a NotebookRuntimeTemplate. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNotebookRuntimeTemplates |
Lists NotebookRuntimeTemplates in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNotebookRuntimeTemplate |
Deletes a NotebookRuntimeTemplate. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateNotebookRuntimeTemplate |
Updates a NotebookRuntimeTemplate. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AssignNotebookRuntime |
Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNotebookRuntime |
Gets a NotebookRuntime. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNotebookRuntimes |
Lists NotebookRuntimes in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNotebookRuntime |
Deletes a NotebookRuntime. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpgradeNotebookRuntime |
Upgrades a NotebookRuntime. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StartNotebookRuntime |
Starts a NotebookRuntime. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StopNotebookRuntime |
Stops a NotebookRuntime. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateNotebookExecutionJob |
Creates a NotebookExecutionJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNotebookExecutionJob |
Gets a NotebookExecutionJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNotebookExecutionJobs |
Lists NotebookExecutionJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNotebookExecutionJob |
Deletes a NotebookExecutionJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of NotebookServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
NotebookServiceSettings notebookServiceSettings =
NotebookServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
NotebookServiceClient notebookServiceClient =
NotebookServiceClient.create(notebookServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
NotebookServiceSettings notebookServiceSettings =
NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
NotebookServiceClient notebookServiceClient =
NotebookServiceClient.create(notebookServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final NotebookServiceClient create()Constructs an instance of NotebookServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(NotebookServiceSettings settings)
public static final NotebookServiceClient create(NotebookServiceSettings settings)Constructs an instance of NotebookServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
NotebookServiceSettings |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(NotebookServiceStub stub)
public static final NotebookServiceClient create(NotebookServiceStub stub)Constructs an instance of NotebookServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(NotebookServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
NotebookServiceStub |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient |
|
Constructors
NotebookServiceClient(NotebookServiceSettings settings)
protected NotebookServiceClient(NotebookServiceSettings settings)Constructs an instance of NotebookServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
NotebookServiceSettings |
NotebookServiceClient(NotebookServiceStub stub)
protected NotebookServiceClient(NotebookServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
NotebookServiceStub |
Methods
assignNotebookRuntimeAsync(@Nullable LocationName parent, @Nullable NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
public final OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(@Nullable LocationName parent, @Nullable NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplateName notebookRuntimeTemplate =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
String notebookRuntimeId = "notebookRuntimeId400795512";
NotebookRuntime response =
notebookServiceClient
.assignNotebookRuntimeAsync(
parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location to get the NotebookRuntime
assignment. Format: |
notebookRuntimeTemplate |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateNameRequired. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one). |
notebookRuntime |
NotebookRuntimeRequired. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment. |
notebookRuntimeId |
StringOptional. User specified ID for the notebook runtime. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
|
assignNotebookRuntimeAsync(@Nullable LocationName parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
public final OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(@Nullable LocationName parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
String notebookRuntimeTemplate =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString();
NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
String notebookRuntimeId = "notebookRuntimeId400795512";
NotebookRuntime response =
notebookServiceClient
.assignNotebookRuntimeAsync(
parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location to get the NotebookRuntime
assignment. Format: |
notebookRuntimeTemplate |
StringRequired. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one). |
notebookRuntime |
NotebookRuntimeRequired. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment. |
notebookRuntimeId |
StringOptional. User specified ID for the notebook runtime. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
|
assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request)
public final OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request)Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
AssignNotebookRuntimeRequest request =
AssignNotebookRuntimeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookRuntimeTemplate(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.setNotebookRuntime(NotebookRuntime.newBuilder().build())
.setNotebookRuntimeId("notebookRuntimeId400795512")
.build();
NotebookRuntime response = notebookServiceClient.assignNotebookRuntimeAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
AssignNotebookRuntimeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
|
assignNotebookRuntimeAsync(String parent, @Nullable NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
public final OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(String parent, @Nullable NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
NotebookRuntimeTemplateName notebookRuntimeTemplate =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
String notebookRuntimeId = "notebookRuntimeId400795512";
NotebookRuntime response =
notebookServiceClient
.assignNotebookRuntimeAsync(
parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location to get the NotebookRuntime
assignment. Format: |
notebookRuntimeTemplate |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateNameRequired. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one). |
notebookRuntime |
NotebookRuntimeRequired. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment. |
notebookRuntimeId |
StringOptional. User specified ID for the notebook runtime. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
|
assignNotebookRuntimeAsync(String parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
public final OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(String parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String notebookRuntimeTemplate =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString();
NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
String notebookRuntimeId = "notebookRuntimeId400795512";
NotebookRuntime response =
notebookServiceClient
.assignNotebookRuntimeAsync(
parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location to get the NotebookRuntime
assignment. Format: |
notebookRuntimeTemplate |
StringRequired. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one). |
notebookRuntime |
NotebookRuntimeRequired. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment. |
notebookRuntimeId |
StringOptional. User specified ID for the notebook runtime. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
|
assignNotebookRuntimeCallable()
public final UnaryCallable<AssignNotebookRuntimeRequest,Operation> assignNotebookRuntimeCallable()Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
AssignNotebookRuntimeRequest request =
AssignNotebookRuntimeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookRuntimeTemplate(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.setNotebookRuntime(NotebookRuntime.newBuilder().build())
.setNotebookRuntimeId("notebookRuntimeId400795512")
.build();
ApiFuture<Operation> future =
notebookServiceClient.assignNotebookRuntimeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<AssignNotebookRuntimeRequest,Operation> |
|
assignNotebookRuntimeOperationCallable()
public final OperationCallable<AssignNotebookRuntimeRequest,NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeOperationCallable()Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
AssignNotebookRuntimeRequest request =
AssignNotebookRuntimeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookRuntimeTemplate(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.setNotebookRuntime(NotebookRuntime.newBuilder().build())
.setNotebookRuntimeId("notebookRuntimeId400795512")
.build();
OperationFuture<NotebookRuntime, AssignNotebookRuntimeOperationMetadata> future =
notebookServiceClient.assignNotebookRuntimeOperationCallable().futureCall(request);
// Do something.
NotebookRuntime response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<AssignNotebookRuntimeRequest,NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
|
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
public final void close()createNotebookExecutionJobAsync(@Nullable LocationName parent, NotebookExecutionJob notebookExecutionJob, String notebookExecutionJobId)
public final OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobAsync(@Nullable LocationName parent, NotebookExecutionJob notebookExecutionJob, String notebookExecutionJobId)Creates a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
NotebookExecutionJob notebookExecutionJob = NotebookExecutionJob.newBuilder().build();
String notebookExecutionJobId = "notebookExecutionJobId1598189627";
NotebookExecutionJob response =
notebookServiceClient
.createNotebookExecutionJobAsync(parent, notebookExecutionJob, notebookExecutionJobId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location to create the NotebookExecutionJob.
Format: |
notebookExecutionJob |
NotebookExecutionJobRequired. The NotebookExecutionJob to create. |
notebookExecutionJobId |
StringOptional. User specified ID for the NotebookExecutionJob. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
|
createNotebookExecutionJobAsync(CreateNotebookExecutionJobRequest request)
public final OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobAsync(CreateNotebookExecutionJobRequest request)Creates a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateNotebookExecutionJobRequest request =
CreateNotebookExecutionJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookExecutionJob(NotebookExecutionJob.newBuilder().build())
.setNotebookExecutionJobId("notebookExecutionJobId1598189627")
.build();
NotebookExecutionJob response =
notebookServiceClient.createNotebookExecutionJobAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateNotebookExecutionJobRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
|
createNotebookExecutionJobAsync(String parent, NotebookExecutionJob notebookExecutionJob, String notebookExecutionJobId)
public final OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobAsync(String parent, NotebookExecutionJob notebookExecutionJob, String notebookExecutionJobId)Creates a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
NotebookExecutionJob notebookExecutionJob = NotebookExecutionJob.newBuilder().build();
String notebookExecutionJobId = "notebookExecutionJobId1598189627";
NotebookExecutionJob response =
notebookServiceClient
.createNotebookExecutionJobAsync(parent, notebookExecutionJob, notebookExecutionJobId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location to create the NotebookExecutionJob.
Format: |
notebookExecutionJob |
NotebookExecutionJobRequired. The NotebookExecutionJob to create. |
notebookExecutionJobId |
StringOptional. User specified ID for the NotebookExecutionJob. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
|
createNotebookExecutionJobCallable()
public final UnaryCallable<CreateNotebookExecutionJobRequest,Operation> createNotebookExecutionJobCallable()Creates a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateNotebookExecutionJobRequest request =
CreateNotebookExecutionJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookExecutionJob(NotebookExecutionJob.newBuilder().build())
.setNotebookExecutionJobId("notebookExecutionJobId1598189627")
.build();
ApiFuture<Operation> future =
notebookServiceClient.createNotebookExecutionJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateNotebookExecutionJobRequest,Operation> |
|
createNotebookExecutionJobOperationCallable()
public final OperationCallable<CreateNotebookExecutionJobRequest,NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobOperationCallable()Creates a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateNotebookExecutionJobRequest request =
CreateNotebookExecutionJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookExecutionJob(NotebookExecutionJob.newBuilder().build())
.setNotebookExecutionJobId("notebookExecutionJobId1598189627")
.build();
OperationFuture<NotebookExecutionJob, CreateNotebookExecutionJobOperationMetadata> future =
notebookServiceClient.createNotebookExecutionJobOperationCallable().futureCall(request);
// Do something.
NotebookExecutionJob response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateNotebookExecutionJobRequest,NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
|
createNotebookRuntimeTemplateAsync(@Nullable LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId)
public final OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateAsync(@Nullable LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId)Creates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
NotebookRuntimeTemplate notebookRuntimeTemplate =
NotebookRuntimeTemplate.newBuilder().build();
String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454";
NotebookRuntimeTemplate response =
notebookServiceClient
.createNotebookRuntimeTemplateAsync(
parent, notebookRuntimeTemplate, notebookRuntimeTemplateId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location to create the
NotebookRuntimeTemplate. Format: |
notebookRuntimeTemplate |
NotebookRuntimeTemplateRequired. The NotebookRuntimeTemplate to create. |
notebookRuntimeTemplateId |
StringOptional. User specified ID for the notebook runtime template. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
|
createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request)
public final OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request)Creates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateNotebookRuntimeTemplateRequest request =
CreateNotebookRuntimeTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
.setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
.build();
NotebookRuntimeTemplate response =
notebookServiceClient.createNotebookRuntimeTemplateAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateNotebookRuntimeTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
|
createNotebookRuntimeTemplateAsync(String parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId)
public final OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateAsync(String parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId)Creates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
NotebookRuntimeTemplate notebookRuntimeTemplate =
NotebookRuntimeTemplate.newBuilder().build();
String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454";
NotebookRuntimeTemplate response =
notebookServiceClient
.createNotebookRuntimeTemplateAsync(
parent, notebookRuntimeTemplate, notebookRuntimeTemplateId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location to create the
NotebookRuntimeTemplate. Format: |
notebookRuntimeTemplate |
NotebookRuntimeTemplateRequired. The NotebookRuntimeTemplate to create. |
notebookRuntimeTemplateId |
StringOptional. User specified ID for the notebook runtime template. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
|
createNotebookRuntimeTemplateCallable()
public final UnaryCallable<CreateNotebookRuntimeTemplateRequest,Operation> createNotebookRuntimeTemplateCallable()Creates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateNotebookRuntimeTemplateRequest request =
CreateNotebookRuntimeTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
.setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
.build();
ApiFuture<Operation> future =
notebookServiceClient.createNotebookRuntimeTemplateCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateNotebookRuntimeTemplateRequest,Operation> |
|
createNotebookRuntimeTemplateOperationCallable()
public final OperationCallable<CreateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateOperationCallable()Creates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateNotebookRuntimeTemplateRequest request =
CreateNotebookRuntimeTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
.setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
.build();
OperationFuture<NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata>
future =
notebookServiceClient
.createNotebookRuntimeTemplateOperationCallable()
.futureCall(request);
// Do something.
NotebookRuntimeTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
|
deleteNotebookExecutionJobAsync(@Nullable NotebookExecutionJobName name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookExecutionJobAsync(@Nullable NotebookExecutionJobName name)Deletes a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookExecutionJobName name =
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]");
notebookServiceClient.deleteNotebookExecutionJobAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookExecutionJobNameRequired. The name of the NotebookExecutionJob resource to be deleted. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookExecutionJobAsync(DeleteNotebookExecutionJobRequest request)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookExecutionJobAsync(DeleteNotebookExecutionJobRequest request)Deletes a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookExecutionJobRequest request =
DeleteNotebookExecutionJobRequest.newBuilder()
.setName(
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString())
.build();
notebookServiceClient.deleteNotebookExecutionJobAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteNotebookExecutionJobRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookExecutionJobAsync(String name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookExecutionJobAsync(String name)Deletes a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString();
notebookServiceClient.deleteNotebookExecutionJobAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookExecutionJob resource to be deleted. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookExecutionJobCallable()
public final UnaryCallable<DeleteNotebookExecutionJobRequest,Operation> deleteNotebookExecutionJobCallable()Deletes a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookExecutionJobRequest request =
DeleteNotebookExecutionJobRequest.newBuilder()
.setName(
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.deleteNotebookExecutionJobCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteNotebookExecutionJobRequest,Operation> |
|
deleteNotebookExecutionJobOperationCallable()
public final OperationCallable<DeleteNotebookExecutionJobRequest,Empty,DeleteOperationMetadata> deleteNotebookExecutionJobOperationCallable()Deletes a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookExecutionJobRequest request =
DeleteNotebookExecutionJobRequest.newBuilder()
.setName(
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
notebookServiceClient.deleteNotebookExecutionJobOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteNotebookExecutionJobRequest,Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)Deletes a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeName name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
notebookServiceClient.deleteNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeNameRequired. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request)Deletes a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookRuntimeRequest request =
DeleteNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
notebookServiceClient.deleteNotebookRuntimeAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteNotebookRuntimeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeAsync(String name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookRuntimeAsync(String name)Deletes a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
notebookServiceClient.deleteNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeCallable()
public final UnaryCallable<DeleteNotebookRuntimeRequest,Operation> deleteNotebookRuntimeCallable()Deletes a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookRuntimeRequest request =
DeleteNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.deleteNotebookRuntimeCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteNotebookRuntimeRequest,Operation> |
|
deleteNotebookRuntimeOperationCallable()
public final OperationCallable<DeleteNotebookRuntimeRequest,Empty,DeleteOperationMetadata> deleteNotebookRuntimeOperationCallable()Deletes a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookRuntimeRequest request =
DeleteNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
notebookServiceClient.deleteNotebookRuntimeOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteNotebookRuntimeRequest,Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeTemplateAsync(@Nullable NotebookRuntimeTemplateName name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateAsync(@Nullable NotebookRuntimeTemplateName name)Deletes a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeTemplateName name =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateNameRequired. The name of the NotebookRuntimeTemplate resource to be deleted. Format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request)Deletes a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookRuntimeTemplateRequest request =
DeleteNotebookRuntimeTemplateRequest.newBuilder()
.setName(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.build();
notebookServiceClient.deleteNotebookRuntimeTemplateAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteNotebookRuntimeTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeTemplateAsync(String name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateAsync(String name)Deletes a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString();
notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntimeTemplate resource to be deleted. Format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
|
deleteNotebookRuntimeTemplateCallable()
public final UnaryCallable<DeleteNotebookRuntimeTemplateRequest,Operation> deleteNotebookRuntimeTemplateCallable()Deletes a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookRuntimeTemplateRequest request =
DeleteNotebookRuntimeTemplateRequest.newBuilder()
.setName(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.deleteNotebookRuntimeTemplateCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteNotebookRuntimeTemplateRequest,Operation> |
|
deleteNotebookRuntimeTemplateOperationCallable()
public final OperationCallable<DeleteNotebookRuntimeTemplateRequest,Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateOperationCallable()Deletes a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteNotebookRuntimeTemplateRequest request =
DeleteNotebookRuntimeTemplateRequest.newBuilder()
.setName(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
notebookServiceClient
.deleteNotebookRuntimeTemplateOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteNotebookRuntimeTemplateRequest,Empty,DeleteOperationMetadata> |
|
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = notebookServiceClient.getIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = notebookServiceClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
|
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = notebookServiceClient.getLocation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = notebookServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getNotebookExecutionJob(@Nullable NotebookExecutionJobName name)
public final NotebookExecutionJob getNotebookExecutionJob(@Nullable NotebookExecutionJobName name)Gets a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookExecutionJobName name =
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]");
NotebookExecutionJob response = notebookServiceClient.getNotebookExecutionJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookExecutionJobNameRequired. The name of the NotebookExecutionJob resource. |
| Returns | |
|---|---|
| Type | Description |
NotebookExecutionJob |
|
getNotebookExecutionJob(GetNotebookExecutionJobRequest request)
public final NotebookExecutionJob getNotebookExecutionJob(GetNotebookExecutionJobRequest request)Gets a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetNotebookExecutionJobRequest request =
GetNotebookExecutionJobRequest.newBuilder()
.setName(
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString())
.setView(NotebookExecutionJobView.forNumber(0))
.build();
NotebookExecutionJob response = notebookServiceClient.getNotebookExecutionJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetNotebookExecutionJobRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookExecutionJob |
|
getNotebookExecutionJob(String name)
public final NotebookExecutionJob getNotebookExecutionJob(String name)Gets a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString();
NotebookExecutionJob response = notebookServiceClient.getNotebookExecutionJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookExecutionJob resource. |
| Returns | |
|---|---|
| Type | Description |
NotebookExecutionJob |
|
getNotebookExecutionJobCallable()
public final UnaryCallable<GetNotebookExecutionJobRequest,NotebookExecutionJob> getNotebookExecutionJobCallable()Gets a NotebookExecutionJob.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetNotebookExecutionJobRequest request =
GetNotebookExecutionJobRequest.newBuilder()
.setName(
NotebookExecutionJobName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_EXECUTION_JOB]")
.toString())
.setView(NotebookExecutionJobView.forNumber(0))
.build();
ApiFuture<NotebookExecutionJob> future =
notebookServiceClient.getNotebookExecutionJobCallable().futureCall(request);
// Do something.
NotebookExecutionJob response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetNotebookExecutionJobRequest,NotebookExecutionJob> |
|
getNotebookRuntime(@Nullable NotebookRuntimeName name)
public final NotebookRuntime getNotebookRuntime(@Nullable NotebookRuntimeName name)Gets a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeName name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeNameRequired. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
NotebookRuntime |
|
getNotebookRuntime(GetNotebookRuntimeRequest request)
public final NotebookRuntime getNotebookRuntime(GetNotebookRuntimeRequest request)Gets a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetNotebookRuntimeRequest request =
GetNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
NotebookRuntime response = notebookServiceClient.getNotebookRuntime(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetNotebookRuntimeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookRuntime |
|
getNotebookRuntime(String name)
public final NotebookRuntime getNotebookRuntime(String name)Gets a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
NotebookRuntime |
|
getNotebookRuntimeCallable()
public final UnaryCallable<GetNotebookRuntimeRequest,NotebookRuntime> getNotebookRuntimeCallable()Gets a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetNotebookRuntimeRequest request =
GetNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
ApiFuture<NotebookRuntime> future =
notebookServiceClient.getNotebookRuntimeCallable().futureCall(request);
// Do something.
NotebookRuntime response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetNotebookRuntimeRequest,NotebookRuntime> |
|
getNotebookRuntimeTemplate(@Nullable NotebookRuntimeTemplateName name)
public final NotebookRuntimeTemplate getNotebookRuntimeTemplate(@Nullable NotebookRuntimeTemplateName name)Gets a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeTemplateName name =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateNameRequired. The name of the NotebookRuntimeTemplate resource. Format:
|
| Returns | |
|---|---|
| Type | Description |
NotebookRuntimeTemplate |
|
getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request)
public final NotebookRuntimeTemplate getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request)Gets a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetNotebookRuntimeTemplateRequest request =
GetNotebookRuntimeTemplateRequest.newBuilder()
.setName(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.build();
NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetNotebookRuntimeTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookRuntimeTemplate |
|
getNotebookRuntimeTemplate(String name)
public final NotebookRuntimeTemplate getNotebookRuntimeTemplate(String name)Gets a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString();
NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntimeTemplate resource. Format:
|
| Returns | |
|---|---|
| Type | Description |
NotebookRuntimeTemplate |
|
getNotebookRuntimeTemplateCallable()
public final UnaryCallable<GetNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> getNotebookRuntimeTemplateCallable()Gets a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetNotebookRuntimeTemplateRequest request =
GetNotebookRuntimeTemplateRequest.newBuilder()
.setName(
NotebookRuntimeTemplateName.of(
"[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
.toString())
.build();
ApiFuture<NotebookRuntimeTemplate> future =
notebookServiceClient.getNotebookRuntimeTemplateCallable().futureCall(request);
// Do something.
NotebookRuntimeTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> |
|
getOperationsClient()
public final OperationsClient getOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getSettings()
public final @Nullable NotebookServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookServiceSettings |
|
getStub()
public NotebookServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
NotebookServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listLocations(ListLocationsRequest request)
public final NotebookServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : notebookServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
notebookServiceClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,NotebookServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
notebookServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
listNotebookExecutionJobs(@Nullable LocationName parent)
public final NotebookServiceClient.ListNotebookExecutionJobsPagedResponse listNotebookExecutionJobs(@Nullable LocationName parent)Lists NotebookExecutionJobs in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (NotebookExecutionJob element :
notebookServiceClient.listNotebookExecutionJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location from which to list the
NotebookExecutionJobs. Format: |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
|
listNotebookExecutionJobs(ListNotebookExecutionJobsRequest request)
public final NotebookServiceClient.ListNotebookExecutionJobsPagedResponse listNotebookExecutionJobs(ListNotebookExecutionJobsRequest request)Lists NotebookExecutionJobs in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookExecutionJobsRequest request =
ListNotebookExecutionJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setView(NotebookExecutionJobView.forNumber(0))
.build();
for (NotebookExecutionJob element :
notebookServiceClient.listNotebookExecutionJobs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListNotebookExecutionJobsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
|
listNotebookExecutionJobs(String parent)
public final NotebookServiceClient.ListNotebookExecutionJobsPagedResponse listNotebookExecutionJobs(String parent)Lists NotebookExecutionJobs in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (NotebookExecutionJob element :
notebookServiceClient.listNotebookExecutionJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location from which to list the
NotebookExecutionJobs. Format: |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
|
listNotebookExecutionJobsCallable()
public final UnaryCallable<ListNotebookExecutionJobsRequest,ListNotebookExecutionJobsResponse> listNotebookExecutionJobsCallable()Lists NotebookExecutionJobs in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookExecutionJobsRequest request =
ListNotebookExecutionJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setView(NotebookExecutionJobView.forNumber(0))
.build();
while (true) {
ListNotebookExecutionJobsResponse response =
notebookServiceClient.listNotebookExecutionJobsCallable().call(request);
for (NotebookExecutionJob element : response.getNotebookExecutionJobsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListNotebookExecutionJobsRequest,ListNotebookExecutionJobsResponse> |
|
listNotebookExecutionJobsPagedCallable()
public final UnaryCallable<ListNotebookExecutionJobsRequest,NotebookServiceClient.ListNotebookExecutionJobsPagedResponse> listNotebookExecutionJobsPagedCallable()Lists NotebookExecutionJobs in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookExecutionJobsRequest request =
ListNotebookExecutionJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setView(NotebookExecutionJobView.forNumber(0))
.build();
ApiFuture<NotebookExecutionJob> future =
notebookServiceClient.listNotebookExecutionJobsPagedCallable().futureCall(request);
// Do something.
for (NotebookExecutionJob element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListNotebookExecutionJobsRequest,ListNotebookExecutionJobsPagedResponse> |
|
listNotebookRuntimeTemplates(@Nullable LocationName parent)
public final NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates(@Nullable LocationName parent)Lists NotebookRuntimeTemplates in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (NotebookRuntimeTemplate element :
notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location from which to list the
NotebookRuntimeTemplates. Format: |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
|
listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request)
public final NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request)Lists NotebookRuntimeTemplates in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookRuntimeTemplatesRequest request =
ListNotebookRuntimeTemplatesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
for (NotebookRuntimeTemplate element :
notebookServiceClient.listNotebookRuntimeTemplates(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListNotebookRuntimeTemplatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
|
listNotebookRuntimeTemplates(String parent)
public final NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates(String parent)Lists NotebookRuntimeTemplates in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (NotebookRuntimeTemplate element :
notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location from which to list the
NotebookRuntimeTemplates. Format: |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
|
listNotebookRuntimeTemplatesCallable()
public final UnaryCallable<ListNotebookRuntimeTemplatesRequest,ListNotebookRuntimeTemplatesResponse> listNotebookRuntimeTemplatesCallable()Lists NotebookRuntimeTemplates in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookRuntimeTemplatesRequest request =
ListNotebookRuntimeTemplatesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListNotebookRuntimeTemplatesResponse response =
notebookServiceClient.listNotebookRuntimeTemplatesCallable().call(request);
for (NotebookRuntimeTemplate element : response.getNotebookRuntimeTemplatesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListNotebookRuntimeTemplatesRequest,ListNotebookRuntimeTemplatesResponse> |
|
listNotebookRuntimeTemplatesPagedCallable()
public final UnaryCallable<ListNotebookRuntimeTemplatesRequest,NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse> listNotebookRuntimeTemplatesPagedCallable()Lists NotebookRuntimeTemplates in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookRuntimeTemplatesRequest request =
ListNotebookRuntimeTemplatesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<NotebookRuntimeTemplate> future =
notebookServiceClient.listNotebookRuntimeTemplatesPagedCallable().futureCall(request);
// Do something.
for (NotebookRuntimeTemplate element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListNotebookRuntimeTemplatesRequest,ListNotebookRuntimeTemplatesPagedResponse> |
|
listNotebookRuntimes(@Nullable LocationName parent)
public final NotebookServiceClient.ListNotebookRuntimesPagedResponse listNotebookRuntimes(@Nullable LocationName parent)Lists NotebookRuntimes in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (NotebookRuntime element :
notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.LocationNameRequired. The resource name of the Location from which to list the
NotebookRuntimes. Format: |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
|
listNotebookRuntimes(ListNotebookRuntimesRequest request)
public final NotebookServiceClient.ListNotebookRuntimesPagedResponse listNotebookRuntimes(ListNotebookRuntimesRequest request)Lists NotebookRuntimes in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookRuntimesRequest request =
ListNotebookRuntimesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
for (NotebookRuntime element :
notebookServiceClient.listNotebookRuntimes(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListNotebookRuntimesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
|
listNotebookRuntimes(String parent)
public final NotebookServiceClient.ListNotebookRuntimesPagedResponse listNotebookRuntimes(String parent)Lists NotebookRuntimes in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (NotebookRuntime element :
notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the Location from which to list the
NotebookRuntimes. Format: |
| Returns | |
|---|---|
| Type | Description |
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
|
listNotebookRuntimesCallable()
public final UnaryCallable<ListNotebookRuntimesRequest,ListNotebookRuntimesResponse> listNotebookRuntimesCallable()Lists NotebookRuntimes in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookRuntimesRequest request =
ListNotebookRuntimesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListNotebookRuntimesResponse response =
notebookServiceClient.listNotebookRuntimesCallable().call(request);
for (NotebookRuntime element : response.getNotebookRuntimesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListNotebookRuntimesRequest,ListNotebookRuntimesResponse> |
|
listNotebookRuntimesPagedCallable()
public final UnaryCallable<ListNotebookRuntimesRequest,NotebookServiceClient.ListNotebookRuntimesPagedResponse> listNotebookRuntimesPagedCallable()Lists NotebookRuntimes in a Location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListNotebookRuntimesRequest request =
ListNotebookRuntimesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<NotebookRuntime> future =
notebookServiceClient.listNotebookRuntimesPagedCallable().futureCall(request);
// Do something.
for (NotebookRuntime element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListNotebookRuntimesRequest,ListNotebookRuntimesPagedResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = notebookServiceClient.setIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future = notebookServiceClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()startNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)
public final OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)Starts a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeName name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
StartNotebookRuntimeResponse response =
notebookServiceClient.startNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeNameRequired. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
|
startNotebookRuntimeAsync(StartNotebookRuntimeRequest request)
public final OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeAsync(StartNotebookRuntimeRequest request)Starts a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StartNotebookRuntimeRequest request =
StartNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
StartNotebookRuntimeResponse response =
notebookServiceClient.startNotebookRuntimeAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
StartNotebookRuntimeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
|
startNotebookRuntimeAsync(String name)
public final OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeAsync(String name)Starts a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
StartNotebookRuntimeResponse response =
notebookServiceClient.startNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
|
startNotebookRuntimeCallable()
public final UnaryCallable<StartNotebookRuntimeRequest,Operation> startNotebookRuntimeCallable()Starts a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StartNotebookRuntimeRequest request =
StartNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.startNotebookRuntimeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<StartNotebookRuntimeRequest,Operation> |
|
startNotebookRuntimeOperationCallable()
public final OperationCallable<StartNotebookRuntimeRequest,StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeOperationCallable()Starts a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StartNotebookRuntimeRequest request =
StartNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
OperationFuture<StartNotebookRuntimeResponse, StartNotebookRuntimeOperationMetadata> future =
notebookServiceClient.startNotebookRuntimeOperationCallable().futureCall(request);
// Do something.
StartNotebookRuntimeResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<StartNotebookRuntimeRequest,StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
|
stopNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)
public final OperationFuture<StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> stopNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)Stops a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeName name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
StopNotebookRuntimeResponse response =
notebookServiceClient.stopNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeNameRequired. The name of the NotebookRuntime resource to be stopped. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> |
|
stopNotebookRuntimeAsync(StopNotebookRuntimeRequest request)
public final OperationFuture<StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> stopNotebookRuntimeAsync(StopNotebookRuntimeRequest request)Stops a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StopNotebookRuntimeRequest request =
StopNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
StopNotebookRuntimeResponse response =
notebookServiceClient.stopNotebookRuntimeAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
StopNotebookRuntimeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> |
|
stopNotebookRuntimeAsync(String name)
public final OperationFuture<StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> stopNotebookRuntimeAsync(String name)Stops a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
StopNotebookRuntimeResponse response =
notebookServiceClient.stopNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntime resource to be stopped. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> |
|
stopNotebookRuntimeCallable()
public final UnaryCallable<StopNotebookRuntimeRequest,Operation> stopNotebookRuntimeCallable()Stops a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StopNotebookRuntimeRequest request =
StopNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.stopNotebookRuntimeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<StopNotebookRuntimeRequest,Operation> |
|
stopNotebookRuntimeOperationCallable()
public final OperationCallable<StopNotebookRuntimeRequest,StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> stopNotebookRuntimeOperationCallable()Stops a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StopNotebookRuntimeRequest request =
StopNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
OperationFuture<StopNotebookRuntimeResponse, StopNotebookRuntimeOperationMetadata> future =
notebookServiceClient.stopNotebookRuntimeOperationCallable().futureCall(request);
// Do something.
StopNotebookRuntimeResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<StopNotebookRuntimeRequest,StopNotebookRuntimeResponse,StopNotebookRuntimeOperationMetadata> |
|
testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = notebookServiceClient.testIamPermissions(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
|
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
notebookServiceClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateNotebookRuntimeTemplate(NotebookRuntimeTemplate notebookRuntimeTemplate, FieldMask updateMask)
public final NotebookRuntimeTemplate updateNotebookRuntimeTemplate(NotebookRuntimeTemplate notebookRuntimeTemplate, FieldMask updateMask)Updates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeTemplate notebookRuntimeTemplate =
NotebookRuntimeTemplate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
NotebookRuntimeTemplate response =
notebookServiceClient.updateNotebookRuntimeTemplate(notebookRuntimeTemplate, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
notebookRuntimeTemplate |
NotebookRuntimeTemplateRequired. The NotebookRuntimeTemplate to update. |
updateMask |
FieldMaskRequired. The update mask applies to the resource. For the * |
| Returns | |
|---|---|
| Type | Description |
NotebookRuntimeTemplate |
|
updateNotebookRuntimeTemplate(UpdateNotebookRuntimeTemplateRequest request)
public final NotebookRuntimeTemplate updateNotebookRuntimeTemplate(UpdateNotebookRuntimeTemplateRequest request)Updates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateNotebookRuntimeTemplateRequest request =
UpdateNotebookRuntimeTemplateRequest.newBuilder()
.setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
NotebookRuntimeTemplate response =
notebookServiceClient.updateNotebookRuntimeTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateNotebookRuntimeTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NotebookRuntimeTemplate |
|
updateNotebookRuntimeTemplateCallable()
public final UnaryCallable<UpdateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> updateNotebookRuntimeTemplateCallable()Updates a NotebookRuntimeTemplate.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateNotebookRuntimeTemplateRequest request =
UpdateNotebookRuntimeTemplateRequest.newBuilder()
.setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<NotebookRuntimeTemplate> future =
notebookServiceClient.updateNotebookRuntimeTemplateCallable().futureCall(request);
// Do something.
NotebookRuntimeTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> |
|
upgradeNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)
public final OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeAsync(@Nullable NotebookRuntimeName name)Upgrades a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
NotebookRuntimeName name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
UpgradeNotebookRuntimeResponse response =
notebookServiceClient.upgradeNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.aiplatform.v1.NotebookRuntimeNameRequired. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
|
upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request)
public final OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request)Upgrades a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeNotebookRuntimeRequest request =
UpgradeNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
UpgradeNotebookRuntimeResponse response =
notebookServiceClient.upgradeNotebookRuntimeAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpgradeNotebookRuntimeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
|
upgradeNotebookRuntimeAsync(String name)
public final OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeAsync(String name)Upgrades a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name =
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
UpgradeNotebookRuntimeResponse response =
notebookServiceClient.upgradeNotebookRuntimeAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
|
upgradeNotebookRuntimeCallable()
public final UnaryCallable<UpgradeNotebookRuntimeRequest,Operation> upgradeNotebookRuntimeCallable()Upgrades a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeNotebookRuntimeRequest request =
UpgradeNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.upgradeNotebookRuntimeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpgradeNotebookRuntimeRequest,Operation> |
|
upgradeNotebookRuntimeOperationCallable()
public final OperationCallable<UpgradeNotebookRuntimeRequest,UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeOperationCallable()Upgrades a NotebookRuntime.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeNotebookRuntimeRequest request =
UpgradeNotebookRuntimeRequest.newBuilder()
.setName(
NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
.toString())
.build();
OperationFuture<UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata>
future =
notebookServiceClient.upgradeNotebookRuntimeOperationCallable().futureCall(request);
// Do something.
UpgradeNotebookRuntimeResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpgradeNotebookRuntimeRequest,UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
|