- 1.52.0 (latest)
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.3
- 1.0.6
- 0.6.2
public class NotebookServiceClient implements BackgroundResource
Service Description: API v1 service for Cloud AI Platform Notebooks.
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:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = "name3373707";
Instance response = notebookServiceClient.getInstance(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().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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:
NotebookServiceSettings notebookServiceSettings =
NotebookServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
NotebookServiceClient notebookServiceClient =
NotebookServiceClient.create(notebookServiceSettings);
To customize the endpoint:
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.
Implements
BackgroundResourceStatic Methods
create()
public static final NotebookServiceClient create()
Constructs an instance of NotebookServiceClient with default settings.
Type | Description |
NotebookServiceClient |
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.
Name | Description |
settings | NotebookServiceSettings |
Type | Description |
NotebookServiceClient |
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).
Name | Description |
stub | NotebookServiceStub |
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.
Name | Description |
settings | NotebookServiceSettings |
NotebookServiceClient(NotebookServiceStub stub)
protected NotebookServiceClient(NotebookServiceStub stub)
Name | Description |
stub | NotebookServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createEnvironmentAsync(CreateEnvironmentRequest request)
public final OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(CreateEnvironmentRequest request)
Creates a new Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateEnvironmentRequest request =
CreateEnvironmentRequest.newBuilder()
.setParent("parent-995424086")
.setEnvironmentId("environmentId-950205810")
.setEnvironment(Environment.newBuilder().build())
.build();
Environment response = notebookServiceClient.createEnvironmentAsync(request).get();
}
Name | Description |
request | CreateEnvironmentRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Environment,OperationMetadata> |
createEnvironmentAsync(String parent, Environment environment, String environmentId)
public final OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(String parent, Environment environment, String environmentId)
Creates a new Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = "parent-995424086";
Environment environment = Environment.newBuilder().build();
String environmentId = "environmentId-950205810";
Environment response =
notebookServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
}
Name | Description |
parent | String Required. Format: |
environment | Environment Required. The environment to be created. |
environmentId | String Required. User-defined unique ID of this environment. The |
Type | Description |
OperationFuture<Environment,OperationMetadata> |
createEnvironmentCallable()
public final UnaryCallable<CreateEnvironmentRequest,Operation> createEnvironmentCallable()
Creates a new Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateEnvironmentRequest request =
CreateEnvironmentRequest.newBuilder()
.setParent("parent-995424086")
.setEnvironmentId("environmentId-950205810")
.setEnvironment(Environment.newBuilder().build())
.build();
ApiFuture<Operation> future =
notebookServiceClient.createEnvironmentCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateEnvironmentRequest,Operation> |
createEnvironmentOperationCallable()
public final OperationCallable<CreateEnvironmentRequest,Environment,OperationMetadata> createEnvironmentOperationCallable()
Creates a new Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateEnvironmentRequest request =
CreateEnvironmentRequest.newBuilder()
.setParent("parent-995424086")
.setEnvironmentId("environmentId-950205810")
.setEnvironment(Environment.newBuilder().build())
.build();
OperationFuture<Environment, OperationMetadata> future =
notebookServiceClient.createEnvironmentOperationCallable().futureCall(request);
// Do something.
Environment response = future.get();
}
Type | Description |
OperationCallable<CreateEnvironmentRequest,Environment,OperationMetadata> |
createExecutionAsync(CreateExecutionRequest request)
public final OperationFuture<Execution,OperationMetadata> createExecutionAsync(CreateExecutionRequest request)
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateExecutionRequest request =
CreateExecutionRequest.newBuilder()
.setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.setExecutionId("executionId-454906285")
.setExecution(Execution.newBuilder().build())
.build();
Execution response = notebookServiceClient.createExecutionAsync(request).get();
}
Name | Description |
request | CreateExecutionRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Execution,OperationMetadata> |
createExecutionAsync(ExecutionName parent, Execution execution, String executionId)
public final OperationFuture<Execution,OperationMetadata> createExecutionAsync(ExecutionName parent, Execution execution, String executionId)
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
Execution execution = Execution.newBuilder().build();
String executionId = "executionId-454906285";
Execution response =
notebookServiceClient.createExecutionAsync(parent, execution, executionId).get();
}
Name | Description |
parent | ExecutionName Required. Format: |
execution | Execution Required. The execution to be created. |
executionId | String Required. User-defined unique ID of this execution. |
Type | Description |
OperationFuture<Execution,OperationMetadata> |
createExecutionAsync(String parent, Execution execution, String executionId)
public final OperationFuture<Execution,OperationMetadata> createExecutionAsync(String parent, Execution execution, String executionId)
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
Execution execution = Execution.newBuilder().build();
String executionId = "executionId-454906285";
Execution response =
notebookServiceClient.createExecutionAsync(parent, execution, executionId).get();
}
Name | Description |
parent | String Required. Format: |
execution | Execution Required. The execution to be created. |
executionId | String Required. User-defined unique ID of this execution. |
Type | Description |
OperationFuture<Execution,OperationMetadata> |
createExecutionCallable()
public final UnaryCallable<CreateExecutionRequest,Operation> createExecutionCallable()
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateExecutionRequest request =
CreateExecutionRequest.newBuilder()
.setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.setExecutionId("executionId-454906285")
.setExecution(Execution.newBuilder().build())
.build();
ApiFuture<Operation> future =
notebookServiceClient.createExecutionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateExecutionRequest,Operation> |
createExecutionOperationCallable()
public final OperationCallable<CreateExecutionRequest,Execution,OperationMetadata> createExecutionOperationCallable()
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateExecutionRequest request =
CreateExecutionRequest.newBuilder()
.setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.setExecutionId("executionId-454906285")
.setExecution(Execution.newBuilder().build())
.build();
OperationFuture<Execution, OperationMetadata> future =
notebookServiceClient.createExecutionOperationCallable().futureCall(request);
// Do something.
Execution response = future.get();
}
Type | Description |
OperationCallable<CreateExecutionRequest,Execution,OperationMetadata> |
createInstanceAsync(CreateInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(CreateInstanceRequest request)
Creates a new Instance in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent("parent-995424086")
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.build();
Instance response = notebookServiceClient.createInstanceAsync(request).get();
}
Name | Description |
request | CreateInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
createInstanceAsync(String parent, Instance instance, String instanceId)
public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(String parent, Instance instance, String instanceId)
Creates a new Instance in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = "parent-995424086";
Instance instance = Instance.newBuilder().build();
String instanceId = "instanceId902024336";
Instance response =
notebookServiceClient.createInstanceAsync(parent, instance, instanceId).get();
}
Name | Description |
parent | String Required. Format: |
instance | Instance Required. The instance to be created. |
instanceId | String Required. User-defined unique ID of this instance. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
createInstanceCallable()
public final UnaryCallable<CreateInstanceRequest,Operation> createInstanceCallable()
Creates a new Instance in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent("parent-995424086")
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.build();
ApiFuture<Operation> future =
notebookServiceClient.createInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateInstanceRequest,Operation> |
createInstanceOperationCallable()
public final OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> createInstanceOperationCallable()
Creates a new Instance in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent("parent-995424086")
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.createInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> |
createScheduleAsync(CreateScheduleRequest request)
public final OperationFuture<Schedule,OperationMetadata> createScheduleAsync(CreateScheduleRequest request)
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateScheduleRequest request =
CreateScheduleRequest.newBuilder()
.setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.setScheduleId("scheduleId-687058414")
.setSchedule(Schedule.newBuilder().build())
.build();
Schedule response = notebookServiceClient.createScheduleAsync(request).get();
}
Name | Description |
request | CreateScheduleRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Schedule,OperationMetadata> |
createScheduleAsync(ScheduleName parent, Schedule schedule, String scheduleId)
public final OperationFuture<Schedule,OperationMetadata> createScheduleAsync(ScheduleName parent, Schedule schedule, String scheduleId)
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
Schedule schedule = Schedule.newBuilder().build();
String scheduleId = "scheduleId-687058414";
Schedule response =
notebookServiceClient.createScheduleAsync(parent, schedule, scheduleId).get();
}
Name | Description |
parent | ScheduleName Required. Format: |
schedule | Schedule Required. The schedule to be created. |
scheduleId | String Required. User-defined unique ID of this schedule. |
Type | Description |
OperationFuture<Schedule,OperationMetadata> |
createScheduleAsync(String parent, Schedule schedule, String scheduleId)
public final OperationFuture<Schedule,OperationMetadata> createScheduleAsync(String parent, Schedule schedule, String scheduleId)
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
Schedule schedule = Schedule.newBuilder().build();
String scheduleId = "scheduleId-687058414";
Schedule response =
notebookServiceClient.createScheduleAsync(parent, schedule, scheduleId).get();
}
Name | Description |
parent | String Required. Format: |
schedule | Schedule Required. The schedule to be created. |
scheduleId | String Required. User-defined unique ID of this schedule. |
Type | Description |
OperationFuture<Schedule,OperationMetadata> |
createScheduleCallable()
public final UnaryCallable<CreateScheduleRequest,Operation> createScheduleCallable()
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateScheduleRequest request =
CreateScheduleRequest.newBuilder()
.setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.setScheduleId("scheduleId-687058414")
.setSchedule(Schedule.newBuilder().build())
.build();
ApiFuture<Operation> future =
notebookServiceClient.createScheduleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateScheduleRequest,Operation> |
createScheduleOperationCallable()
public final OperationCallable<CreateScheduleRequest,Schedule,OperationMetadata> createScheduleOperationCallable()
Creates a new Scheduled Notebook in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
CreateScheduleRequest request =
CreateScheduleRequest.newBuilder()
.setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.setScheduleId("scheduleId-687058414")
.setSchedule(Schedule.newBuilder().build())
.build();
OperationFuture<Schedule, OperationMetadata> future =
notebookServiceClient.createScheduleOperationCallable().futureCall(request);
// Do something.
Schedule response = future.get();
}
Type | Description |
OperationCallable<CreateScheduleRequest,Schedule,OperationMetadata> |
deleteEnvironmentAsync(DeleteEnvironmentRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteEnvironmentAsync(DeleteEnvironmentRequest request)
Deletes a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteEnvironmentRequest request =
DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
notebookServiceClient.deleteEnvironmentAsync(request).get();
}
Name | Description |
request | DeleteEnvironmentRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteEnvironmentAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteEnvironmentAsync(String name)
Deletes a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = "name3373707";
notebookServiceClient.deleteEnvironmentAsync(name).get();
}
Name | Description |
name | String Required. Format:
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteEnvironmentCallable()
public final UnaryCallable<DeleteEnvironmentRequest,Operation> deleteEnvironmentCallable()
Deletes a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteEnvironmentRequest request =
DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
ApiFuture<Operation> future =
notebookServiceClient.deleteEnvironmentCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteEnvironmentRequest,Operation> |
deleteEnvironmentOperationCallable()
public final OperationCallable<DeleteEnvironmentRequest,Empty,OperationMetadata> deleteEnvironmentOperationCallable()
Deletes a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteEnvironmentRequest request =
DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
OperationFuture<Empty, OperationMetadata> future =
notebookServiceClient.deleteEnvironmentOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteEnvironmentRequest,Empty,OperationMetadata> |
deleteExecutionAsync(DeleteExecutionRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteExecutionAsync(DeleteExecutionRequest request)
Deletes execution
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteExecutionRequest request =
DeleteExecutionRequest.newBuilder()
.setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.build();
notebookServiceClient.deleteExecutionAsync(request).get();
}
Name | Description |
request | DeleteExecutionRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteExecutionAsync(ExecutionName name)
public final OperationFuture<Empty,OperationMetadata> deleteExecutionAsync(ExecutionName name)
Deletes execution
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
notebookServiceClient.deleteExecutionAsync(name).get();
}
Name | Description |
name | ExecutionName Required. Format:
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteExecutionAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteExecutionAsync(String name)
Deletes execution
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
notebookServiceClient.deleteExecutionAsync(name).get();
}
Name | Description |
name | String Required. Format:
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteExecutionCallable()
public final UnaryCallable<DeleteExecutionRequest,Operation> deleteExecutionCallable()
Deletes execution
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteExecutionRequest request =
DeleteExecutionRequest.newBuilder()
.setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.deleteExecutionCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteExecutionRequest,Operation> |
deleteExecutionOperationCallable()
public final OperationCallable<DeleteExecutionRequest,Empty,OperationMetadata> deleteExecutionOperationCallable()
Deletes execution
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteExecutionRequest request =
DeleteExecutionRequest.newBuilder()
.setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
notebookServiceClient.deleteExecutionOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteExecutionRequest,Empty,OperationMetadata> |
deleteInstanceAsync(DeleteInstanceRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(DeleteInstanceRequest request)
Deletes a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder().setName("name3373707").build();
notebookServiceClient.deleteInstanceAsync(request).get();
}
Name | Description |
request | DeleteInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInstanceAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(String name)
Deletes a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = "name3373707";
notebookServiceClient.deleteInstanceAsync(name).get();
}
Name | Description |
name | String Required. Format:
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInstanceCallable()
public final UnaryCallable<DeleteInstanceRequest,Operation> deleteInstanceCallable()
Deletes a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder().setName("name3373707").build();
ApiFuture<Operation> future =
notebookServiceClient.deleteInstanceCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteInstanceRequest,Operation> |
deleteInstanceOperationCallable()
public final OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata> deleteInstanceOperationCallable()
Deletes a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder().setName("name3373707").build();
OperationFuture<Empty, OperationMetadata> future =
notebookServiceClient.deleteInstanceOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata> |
deleteScheduleAsync(DeleteScheduleRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteScheduleAsync(DeleteScheduleRequest request)
Deletes schedule and all underlying jobs
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteScheduleRequest request =
DeleteScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
notebookServiceClient.deleteScheduleAsync(request).get();
}
Name | Description |
request | DeleteScheduleRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteScheduleAsync(ScheduleName name)
public final OperationFuture<Empty,OperationMetadata> deleteScheduleAsync(ScheduleName name)
Deletes schedule and all underlying jobs
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
notebookServiceClient.deleteScheduleAsync(name).get();
}
Name | Description |
name | ScheduleName Required. Format:
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteScheduleAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteScheduleAsync(String name)
Deletes schedule and all underlying jobs
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
notebookServiceClient.deleteScheduleAsync(name).get();
}
Name | Description |
name | String Required. Format:
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteScheduleCallable()
public final UnaryCallable<DeleteScheduleRequest,Operation> deleteScheduleCallable()
Deletes schedule and all underlying jobs
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteScheduleRequest request =
DeleteScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.deleteScheduleCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteScheduleRequest,Operation> |
deleteScheduleOperationCallable()
public final OperationCallable<DeleteScheduleRequest,Empty,OperationMetadata> deleteScheduleOperationCallable()
Deletes schedule and all underlying jobs
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
DeleteScheduleRequest request =
DeleteScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
notebookServiceClient.deleteScheduleOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteScheduleRequest,Empty,OperationMetadata> |
getEnvironment(GetEnvironmentRequest request)
public final Environment getEnvironment(GetEnvironmentRequest request)
Gets details of a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetEnvironmentRequest request =
GetEnvironmentRequest.newBuilder().setName("name3373707").build();
Environment response = notebookServiceClient.getEnvironment(request);
}
Name | Description |
request | GetEnvironmentRequest The request object containing all of the parameters for the API call. |
Type | Description |
Environment |
getEnvironment(String name)
public final Environment getEnvironment(String name)
Gets details of a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = "name3373707";
Environment response = notebookServiceClient.getEnvironment(name);
}
Name | Description |
name | String Required. Format:
|
Type | Description |
Environment |
getEnvironmentCallable()
public final UnaryCallable<GetEnvironmentRequest,Environment> getEnvironmentCallable()
Gets details of a single Environment.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetEnvironmentRequest request =
GetEnvironmentRequest.newBuilder().setName("name3373707").build();
ApiFuture<Environment> future =
notebookServiceClient.getEnvironmentCallable().futureCall(request);
// Do something.
Environment response = future.get();
}
Type | Description |
UnaryCallable<GetEnvironmentRequest,Environment> |
getExecution(ExecutionName name)
public final Execution getExecution(ExecutionName name)
Gets details of executions
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
Execution response = notebookServiceClient.getExecution(name);
}
Name | Description |
name | ExecutionName Required. Format:
|
Type | Description |
Execution |
getExecution(GetExecutionRequest request)
public final Execution getExecution(GetExecutionRequest request)
Gets details of executions
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetExecutionRequest request =
GetExecutionRequest.newBuilder()
.setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.build();
Execution response = notebookServiceClient.getExecution(request);
}
Name | Description |
request | GetExecutionRequest The request object containing all of the parameters for the API call. |
Type | Description |
Execution |
getExecution(String name)
public final Execution getExecution(String name)
Gets details of executions
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
Execution response = notebookServiceClient.getExecution(name);
}
Name | Description |
name | String Required. Format:
|
Type | Description |
Execution |
getExecutionCallable()
public final UnaryCallable<GetExecutionRequest,Execution> getExecutionCallable()
Gets details of executions
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetExecutionRequest request =
GetExecutionRequest.newBuilder()
.setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.build();
ApiFuture<Execution> future =
notebookServiceClient.getExecutionCallable().futureCall(request);
// Do something.
Execution response = future.get();
}
Type | Description |
UnaryCallable<GetExecutionRequest,Execution> |
getInstance(GetInstanceRequest request)
public final Instance getInstance(GetInstanceRequest request)
Gets details of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
Instance response = notebookServiceClient.getInstance(request);
}
Name | Description |
request | GetInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
Instance |
getInstance(String name)
public final Instance getInstance(String name)
Gets details of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = "name3373707";
Instance response = notebookServiceClient.getInstance(name);
}
Name | Description |
name | String Required. Format:
|
Type | Description |
Instance |
getInstanceCallable()
public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()
Gets details of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
ApiFuture<Instance> future = notebookServiceClient.getInstanceCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
UnaryCallable<GetInstanceRequest,Instance> |
getInstanceHealth(GetInstanceHealthRequest request)
public final GetInstanceHealthResponse getInstanceHealth(GetInstanceHealthRequest request)
Check if a notebook instance is healthy.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetInstanceHealthRequest request =
GetInstanceHealthRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.build();
GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(request);
}
Name | Description |
request | GetInstanceHealthRequest The request object containing all of the parameters for the API call. |
Type | Description |
GetInstanceHealthResponse |
getInstanceHealth(InstanceName name)
public final GetInstanceHealthResponse getInstanceHealth(InstanceName name)
Check if a notebook instance is healthy.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
}
Name | Description |
name | InstanceName Required. Format:
|
Type | Description |
GetInstanceHealthResponse |
getInstanceHealth(String name)
public final GetInstanceHealthResponse getInstanceHealth(String name)
Check if a notebook instance is healthy.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
}
Name | Description |
name | String Required. Format:
|
Type | Description |
GetInstanceHealthResponse |
getInstanceHealthCallable()
public final UnaryCallable<GetInstanceHealthRequest,GetInstanceHealthResponse> getInstanceHealthCallable()
Check if a notebook instance is healthy.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetInstanceHealthRequest request =
GetInstanceHealthRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.build();
ApiFuture<GetInstanceHealthResponse> future =
notebookServiceClient.getInstanceHealthCallable().futureCall(request);
// Do something.
GetInstanceHealthResponse response = future.get();
}
Type | Description |
UnaryCallable<GetInstanceHealthRequest,GetInstanceHealthResponse> |
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.
Type | Description |
OperationsClient |
getSchedule(GetScheduleRequest request)
public final Schedule getSchedule(GetScheduleRequest request)
Gets details of schedule
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetScheduleRequest request =
GetScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
Schedule response = notebookServiceClient.getSchedule(request);
}
Name | Description |
request | GetScheduleRequest The request object containing all of the parameters for the API call. |
Type | Description |
Schedule |
getSchedule(ScheduleName name)
public final Schedule getSchedule(ScheduleName name)
Gets details of schedule
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
Schedule response = notebookServiceClient.getSchedule(name);
}
Name | Description |
name | ScheduleName Required. Format:
|
Type | Description |
Schedule |
getSchedule(String name)
public final Schedule getSchedule(String name)
Gets details of schedule
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
Schedule response = notebookServiceClient.getSchedule(name);
}
Name | Description |
name | String Required. Format:
|
Type | Description |
Schedule |
getScheduleCallable()
public final UnaryCallable<GetScheduleRequest,Schedule> getScheduleCallable()
Gets details of schedule
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
GetScheduleRequest request =
GetScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
ApiFuture<Schedule> future = notebookServiceClient.getScheduleCallable().futureCall(request);
// Do something.
Schedule response = future.get();
}
Type | Description |
UnaryCallable<GetScheduleRequest,Schedule> |
getSettings()
public final NotebookServiceSettings getSettings()
Type | Description |
NotebookServiceSettings |
getStub()
public NotebookServiceStub getStub()
Type | Description |
NotebookServiceStub |
isInstanceUpgradeable(IsInstanceUpgradeableRequest request)
public final IsInstanceUpgradeableResponse isInstanceUpgradeable(IsInstanceUpgradeableRequest request)
Check if a notebook instance is upgradable.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
IsInstanceUpgradeableRequest request =
IsInstanceUpgradeableRequest.newBuilder()
.setNotebookInstance("notebookInstance-544239728")
.build();
IsInstanceUpgradeableResponse response = notebookServiceClient.isInstanceUpgradeable(request);
}
Name | Description |
request | IsInstanceUpgradeableRequest The request object containing all of the parameters for the API call. |
Type | Description |
IsInstanceUpgradeableResponse |
isInstanceUpgradeableCallable()
public final UnaryCallable<IsInstanceUpgradeableRequest,IsInstanceUpgradeableResponse> isInstanceUpgradeableCallable()
Check if a notebook instance is upgradable.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
IsInstanceUpgradeableRequest request =
IsInstanceUpgradeableRequest.newBuilder()
.setNotebookInstance("notebookInstance-544239728")
.build();
ApiFuture<IsInstanceUpgradeableResponse> future =
notebookServiceClient.isInstanceUpgradeableCallable().futureCall(request);
// Do something.
IsInstanceUpgradeableResponse response = future.get();
}
Type | Description |
UnaryCallable<IsInstanceUpgradeableRequest,IsInstanceUpgradeableResponse> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listEnvironments(ListEnvironmentsRequest request)
public final NotebookServiceClient.ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request)
Lists environments in a project.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListEnvironmentsRequest request =
ListEnvironmentsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Environment element : notebookServiceClient.listEnvironments(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListEnvironmentsRequest The request object containing all of the parameters for the API call. |
Type | Description |
NotebookServiceClient.ListEnvironmentsPagedResponse |
listEnvironments(String parent)
public final NotebookServiceClient.ListEnvironmentsPagedResponse listEnvironments(String parent)
Lists environments in a project.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = "parent-995424086";
for (Environment element : notebookServiceClient.listEnvironments(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Format: |
Type | Description |
NotebookServiceClient.ListEnvironmentsPagedResponse |
listEnvironmentsCallable()
public final UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsResponse> listEnvironmentsCallable()
Lists environments in a project.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListEnvironmentsRequest request =
ListEnvironmentsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListEnvironmentsResponse response =
notebookServiceClient.listEnvironmentsCallable().call(request);
for (Environment element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsResponse> |
listEnvironmentsPagedCallable()
public final UnaryCallable<ListEnvironmentsRequest,NotebookServiceClient.ListEnvironmentsPagedResponse> listEnvironmentsPagedCallable()
Lists environments in a project.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListEnvironmentsRequest request =
ListEnvironmentsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Environment> future =
notebookServiceClient.listEnvironmentsPagedCallable().futureCall(request);
// Do something.
for (Environment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsPagedResponse> |
listExecutions(ExecutionName parent)
public final NotebookServiceClient.ListExecutionsPagedResponse listExecutions(ExecutionName parent)
Lists executions in a given project and location
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | ExecutionName Required. Format: |
Type | Description |
NotebookServiceClient.ListExecutionsPagedResponse |
listExecutions(ListExecutionsRequest request)
public final NotebookServiceClient.ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request)
Lists executions in a given project and location
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListExecutionsRequest request =
ListExecutionsRequest.newBuilder()
.setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Execution element : notebookServiceClient.listExecutions(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListExecutionsRequest The request object containing all of the parameters for the API call. |
Type | Description |
NotebookServiceClient.ListExecutionsPagedResponse |
listExecutions(String parent)
public final NotebookServiceClient.ListExecutionsPagedResponse listExecutions(String parent)
Lists executions in a given project and location
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Format: |
Type | Description |
NotebookServiceClient.ListExecutionsPagedResponse |
listExecutionsCallable()
public final UnaryCallable<ListExecutionsRequest,ListExecutionsResponse> listExecutionsCallable()
Lists executions in a given project and location
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListExecutionsRequest request =
ListExecutionsRequest.newBuilder()
.setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListExecutionsResponse response =
notebookServiceClient.listExecutionsCallable().call(request);
for (Execution element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListExecutionsRequest,ListExecutionsResponse> |
listExecutionsPagedCallable()
public final UnaryCallable<ListExecutionsRequest,NotebookServiceClient.ListExecutionsPagedResponse> listExecutionsPagedCallable()
Lists executions in a given project and location
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListExecutionsRequest request =
ListExecutionsRequest.newBuilder()
.setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Execution> future =
notebookServiceClient.listExecutionsPagedCallable().futureCall(request);
// Do something.
for (Execution element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListExecutionsRequest,ListExecutionsPagedResponse> |
listInstances(ListInstancesRequest request)
public final NotebookServiceClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request)
Lists instances in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Instance element : notebookServiceClient.listInstances(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListInstancesRequest The request object containing all of the parameters for the API call. |
Type | Description |
NotebookServiceClient.ListInstancesPagedResponse |
listInstances(String parent)
public final NotebookServiceClient.ListInstancesPagedResponse listInstances(String parent)
Lists instances in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = "parent-995424086";
for (Instance element : notebookServiceClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Format: |
Type | Description |
NotebookServiceClient.ListInstancesPagedResponse |
listInstancesCallable()
public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()
Lists instances in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListInstancesResponse response =
notebookServiceClient.listInstancesCallable().call(request);
for (Instance element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesResponse> |
listInstancesPagedCallable()
public final UnaryCallable<ListInstancesRequest,NotebookServiceClient.ListInstancesPagedResponse> listInstancesPagedCallable()
Lists instances in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Instance> future =
notebookServiceClient.listInstancesPagedCallable().futureCall(request);
// Do something.
for (Instance element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesPagedResponse> |
listSchedules(ListSchedulesRequest request)
public final NotebookServiceClient.ListSchedulesPagedResponse listSchedules(ListSchedulesRequest request)
Lists schedules in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListSchedulesRequest request =
ListSchedulesRequest.newBuilder()
.setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Schedule element : notebookServiceClient.listSchedules(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListSchedulesRequest The request object containing all of the parameters for the API call. |
Type | Description |
NotebookServiceClient.ListSchedulesPagedResponse |
listSchedules(ScheduleName parent)
public final NotebookServiceClient.ListSchedulesPagedResponse listSchedules(ScheduleName parent)
Lists schedules in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | ScheduleName Required. Format: |
Type | Description |
NotebookServiceClient.ListSchedulesPagedResponse |
listSchedules(String parent)
public final NotebookServiceClient.ListSchedulesPagedResponse listSchedules(String parent)
Lists schedules in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Format: |
Type | Description |
NotebookServiceClient.ListSchedulesPagedResponse |
listSchedulesCallable()
public final UnaryCallable<ListSchedulesRequest,ListSchedulesResponse> listSchedulesCallable()
Lists schedules in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListSchedulesRequest request =
ListSchedulesRequest.newBuilder()
.setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListSchedulesResponse response =
notebookServiceClient.listSchedulesCallable().call(request);
for (Schedule element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListSchedulesRequest,ListSchedulesResponse> |
listSchedulesPagedCallable()
public final UnaryCallable<ListSchedulesRequest,NotebookServiceClient.ListSchedulesPagedResponse> listSchedulesPagedCallable()
Lists schedules in a given project and location.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ListSchedulesRequest request =
ListSchedulesRequest.newBuilder()
.setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Schedule> future =
notebookServiceClient.listSchedulesPagedCallable().futureCall(request);
// Do something.
for (Schedule element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListSchedulesRequest,ListSchedulesPagedResponse> |
registerInstanceAsync(RegisterInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> registerInstanceAsync(RegisterInstanceRequest request)
Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
RegisterInstanceRequest request =
RegisterInstanceRequest.newBuilder()
.setParent("parent-995424086")
.setInstanceId("instanceId902024336")
.build();
Instance response = notebookServiceClient.registerInstanceAsync(request).get();
}
Name | Description |
request | RegisterInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
registerInstanceCallable()
public final UnaryCallable<RegisterInstanceRequest,Operation> registerInstanceCallable()
Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
RegisterInstanceRequest request =
RegisterInstanceRequest.newBuilder()
.setParent("parent-995424086")
.setInstanceId("instanceId902024336")
.build();
ApiFuture<Operation> future =
notebookServiceClient.registerInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<RegisterInstanceRequest,Operation> |
registerInstanceOperationCallable()
public final OperationCallable<RegisterInstanceRequest,Instance,OperationMetadata> registerInstanceOperationCallable()
Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
RegisterInstanceRequest request =
RegisterInstanceRequest.newBuilder()
.setParent("parent-995424086")
.setInstanceId("instanceId902024336")
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.registerInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<RegisterInstanceRequest,Instance,OperationMetadata> |
reportInstanceInfoAsync(ReportInstanceInfoRequest request)
public final OperationFuture<Instance,OperationMetadata> reportInstanceInfoAsync(ReportInstanceInfoRequest request)
Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ReportInstanceInfoRequest request =
ReportInstanceInfoRequest.newBuilder()
.setName("name3373707")
.setVmId("vmId3622450")
.putAllMetadata(new HashMap<String, String>())
.build();
Instance response = notebookServiceClient.reportInstanceInfoAsync(request).get();
}
Name | Description |
request | ReportInstanceInfoRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
reportInstanceInfoCallable()
public final UnaryCallable<ReportInstanceInfoRequest,Operation> reportInstanceInfoCallable()
Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ReportInstanceInfoRequest request =
ReportInstanceInfoRequest.newBuilder()
.setName("name3373707")
.setVmId("vmId3622450")
.putAllMetadata(new HashMap<String, String>())
.build();
ApiFuture<Operation> future =
notebookServiceClient.reportInstanceInfoCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ReportInstanceInfoRequest,Operation> |
reportInstanceInfoOperationCallable()
public final OperationCallable<ReportInstanceInfoRequest,Instance,OperationMetadata> reportInstanceInfoOperationCallable()
Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ReportInstanceInfoRequest request =
ReportInstanceInfoRequest.newBuilder()
.setName("name3373707")
.setVmId("vmId3622450")
.putAllMetadata(new HashMap<String, String>())
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.reportInstanceInfoOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<ReportInstanceInfoRequest,Instance,OperationMetadata> |
resetInstanceAsync(ResetInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> resetInstanceAsync(ResetInstanceRequest request)
Resets a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ResetInstanceRequest request =
ResetInstanceRequest.newBuilder().setName("name3373707").build();
Instance response = notebookServiceClient.resetInstanceAsync(request).get();
}
Name | Description |
request | ResetInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
resetInstanceCallable()
public final UnaryCallable<ResetInstanceRequest,Operation> resetInstanceCallable()
Resets a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ResetInstanceRequest request =
ResetInstanceRequest.newBuilder().setName("name3373707").build();
ApiFuture<Operation> future =
notebookServiceClient.resetInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ResetInstanceRequest,Operation> |
resetInstanceOperationCallable()
public final OperationCallable<ResetInstanceRequest,Instance,OperationMetadata> resetInstanceOperationCallable()
Resets a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
ResetInstanceRequest request =
ResetInstanceRequest.newBuilder().setName("name3373707").build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.resetInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<ResetInstanceRequest,Instance,OperationMetadata> |
rollbackInstanceAsync(RollbackInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> rollbackInstanceAsync(RollbackInstanceRequest request)
Rollbacks a notebook instance to the previous version.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
RollbackInstanceRequest request =
RollbackInstanceRequest.newBuilder()
.setName("name3373707")
.setTargetSnapshot("targetSnapshot-1307211147")
.build();
Instance response = notebookServiceClient.rollbackInstanceAsync(request).get();
}
Name | Description |
request | RollbackInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
rollbackInstanceCallable()
public final UnaryCallable<RollbackInstanceRequest,Operation> rollbackInstanceCallable()
Rollbacks a notebook instance to the previous version.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
RollbackInstanceRequest request =
RollbackInstanceRequest.newBuilder()
.setName("name3373707")
.setTargetSnapshot("targetSnapshot-1307211147")
.build();
ApiFuture<Operation> future =
notebookServiceClient.rollbackInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<RollbackInstanceRequest,Operation> |
rollbackInstanceOperationCallable()
public final OperationCallable<RollbackInstanceRequest,Instance,OperationMetadata> rollbackInstanceOperationCallable()
Rollbacks a notebook instance to the previous version.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
RollbackInstanceRequest request =
RollbackInstanceRequest.newBuilder()
.setName("name3373707")
.setTargetSnapshot("targetSnapshot-1307211147")
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.rollbackInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<RollbackInstanceRequest,Instance,OperationMetadata> |
setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request)
public final OperationFuture<Instance,OperationMetadata> setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request)
Updates the guest accelerators of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceAcceleratorRequest request =
SetInstanceAcceleratorRequest.newBuilder()
.setName("name3373707")
.setCoreCount(-1963855761)
.build();
Instance response = notebookServiceClient.setInstanceAcceleratorAsync(request).get();
}
Name | Description |
request | SetInstanceAcceleratorRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
setInstanceAcceleratorCallable()
public final UnaryCallable<SetInstanceAcceleratorRequest,Operation> setInstanceAcceleratorCallable()
Updates the guest accelerators of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceAcceleratorRequest request =
SetInstanceAcceleratorRequest.newBuilder()
.setName("name3373707")
.setCoreCount(-1963855761)
.build();
ApiFuture<Operation> future =
notebookServiceClient.setInstanceAcceleratorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<SetInstanceAcceleratorRequest,Operation> |
setInstanceAcceleratorOperationCallable()
public final OperationCallable<SetInstanceAcceleratorRequest,Instance,OperationMetadata> setInstanceAcceleratorOperationCallable()
Updates the guest accelerators of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceAcceleratorRequest request =
SetInstanceAcceleratorRequest.newBuilder()
.setName("name3373707")
.setCoreCount(-1963855761)
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.setInstanceAcceleratorOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<SetInstanceAcceleratorRequest,Instance,OperationMetadata> |
setInstanceLabelsAsync(SetInstanceLabelsRequest request)
public final OperationFuture<Instance,OperationMetadata> setInstanceLabelsAsync(SetInstanceLabelsRequest request)
Replaces all the labels of an Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceLabelsRequest request =
SetInstanceLabelsRequest.newBuilder()
.setName("name3373707")
.putAllLabels(new HashMap<String, String>())
.build();
Instance response = notebookServiceClient.setInstanceLabelsAsync(request).get();
}
Name | Description |
request | SetInstanceLabelsRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
setInstanceLabelsCallable()
public final UnaryCallable<SetInstanceLabelsRequest,Operation> setInstanceLabelsCallable()
Replaces all the labels of an Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceLabelsRequest request =
SetInstanceLabelsRequest.newBuilder()
.setName("name3373707")
.putAllLabels(new HashMap<String, String>())
.build();
ApiFuture<Operation> future =
notebookServiceClient.setInstanceLabelsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<SetInstanceLabelsRequest,Operation> |
setInstanceLabelsOperationCallable()
public final OperationCallable<SetInstanceLabelsRequest,Instance,OperationMetadata> setInstanceLabelsOperationCallable()
Replaces all the labels of an Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceLabelsRequest request =
SetInstanceLabelsRequest.newBuilder()
.setName("name3373707")
.putAllLabels(new HashMap<String, String>())
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.setInstanceLabelsOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<SetInstanceLabelsRequest,Instance,OperationMetadata> |
setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request)
public final OperationFuture<Instance,OperationMetadata> setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request)
Updates the machine type of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceMachineTypeRequest request =
SetInstanceMachineTypeRequest.newBuilder()
.setName("name3373707")
.setMachineType("machineType-218117087")
.build();
Instance response = notebookServiceClient.setInstanceMachineTypeAsync(request).get();
}
Name | Description |
request | SetInstanceMachineTypeRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
setInstanceMachineTypeCallable()
public final UnaryCallable<SetInstanceMachineTypeRequest,Operation> setInstanceMachineTypeCallable()
Updates the machine type of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceMachineTypeRequest request =
SetInstanceMachineTypeRequest.newBuilder()
.setName("name3373707")
.setMachineType("machineType-218117087")
.build();
ApiFuture<Operation> future =
notebookServiceClient.setInstanceMachineTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<SetInstanceMachineTypeRequest,Operation> |
setInstanceMachineTypeOperationCallable()
public final OperationCallable<SetInstanceMachineTypeRequest,Instance,OperationMetadata> setInstanceMachineTypeOperationCallable()
Updates the machine type of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
SetInstanceMachineTypeRequest request =
SetInstanceMachineTypeRequest.newBuilder()
.setName("name3373707")
.setMachineType("machineType-218117087")
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.setInstanceMachineTypeOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<SetInstanceMachineTypeRequest,Instance,OperationMetadata> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
startInstanceAsync(StartInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> startInstanceAsync(StartInstanceRequest request)
Starts a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StartInstanceRequest request =
StartInstanceRequest.newBuilder().setName("name3373707").build();
Instance response = notebookServiceClient.startInstanceAsync(request).get();
}
Name | Description |
request | StartInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
startInstanceCallable()
public final UnaryCallable<StartInstanceRequest,Operation> startInstanceCallable()
Starts a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StartInstanceRequest request =
StartInstanceRequest.newBuilder().setName("name3373707").build();
ApiFuture<Operation> future =
notebookServiceClient.startInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<StartInstanceRequest,Operation> |
startInstanceOperationCallable()
public final OperationCallable<StartInstanceRequest,Instance,OperationMetadata> startInstanceOperationCallable()
Starts a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StartInstanceRequest request =
StartInstanceRequest.newBuilder().setName("name3373707").build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.startInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<StartInstanceRequest,Instance,OperationMetadata> |
stopInstanceAsync(StopInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> stopInstanceAsync(StopInstanceRequest request)
Stops a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
Instance response = notebookServiceClient.stopInstanceAsync(request).get();
}
Name | Description |
request | StopInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
stopInstanceCallable()
public final UnaryCallable<StopInstanceRequest,Operation> stopInstanceCallable()
Stops a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
ApiFuture<Operation> future =
notebookServiceClient.stopInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<StopInstanceRequest,Operation> |
stopInstanceOperationCallable()
public final OperationCallable<StopInstanceRequest,Instance,OperationMetadata> stopInstanceOperationCallable()
Stops a notebook instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.stopInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<StopInstanceRequest,Instance,OperationMetadata> |
triggerScheduleAsync(TriggerScheduleRequest request)
public final OperationFuture<Schedule,OperationMetadata> triggerScheduleAsync(TriggerScheduleRequest request)
Triggers execution of an existing schedule.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
TriggerScheduleRequest request =
TriggerScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
Schedule response = notebookServiceClient.triggerScheduleAsync(request).get();
}
Name | Description |
request | TriggerScheduleRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Schedule,OperationMetadata> |
triggerScheduleCallable()
public final UnaryCallable<TriggerScheduleRequest,Operation> triggerScheduleCallable()
Triggers execution of an existing schedule.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
TriggerScheduleRequest request =
TriggerScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
ApiFuture<Operation> future =
notebookServiceClient.triggerScheduleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<TriggerScheduleRequest,Operation> |
triggerScheduleOperationCallable()
public final OperationCallable<TriggerScheduleRequest,Schedule,OperationMetadata> triggerScheduleOperationCallable()
Triggers execution of an existing schedule.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
TriggerScheduleRequest request =
TriggerScheduleRequest.newBuilder()
.setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
.build();
OperationFuture<Schedule, OperationMetadata> future =
notebookServiceClient.triggerScheduleOperationCallable().futureCall(request);
// Do something.
Schedule response = future.get();
}
Type | Description |
OperationCallable<TriggerScheduleRequest,Schedule,OperationMetadata> |
updateInstanceConfigAsync(UpdateInstanceConfigRequest request)
public final OperationFuture<Instance,OperationMetadata> updateInstanceConfigAsync(UpdateInstanceConfigRequest request)
Update Notebook Instance configurations.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateInstanceConfigRequest request =
UpdateInstanceConfigRequest.newBuilder()
.setName("name3373707")
.setConfig(InstanceConfig.newBuilder().build())
.build();
Instance response = notebookServiceClient.updateInstanceConfigAsync(request).get();
}
Name | Description |
request | UpdateInstanceConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
updateInstanceConfigCallable()
public final UnaryCallable<UpdateInstanceConfigRequest,Operation> updateInstanceConfigCallable()
Update Notebook Instance configurations.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateInstanceConfigRequest request =
UpdateInstanceConfigRequest.newBuilder()
.setName("name3373707")
.setConfig(InstanceConfig.newBuilder().build())
.build();
ApiFuture<Operation> future =
notebookServiceClient.updateInstanceConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateInstanceConfigRequest,Operation> |
updateInstanceConfigOperationCallable()
public final OperationCallable<UpdateInstanceConfigRequest,Instance,OperationMetadata> updateInstanceConfigOperationCallable()
Update Notebook Instance configurations.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateInstanceConfigRequest request =
UpdateInstanceConfigRequest.newBuilder()
.setName("name3373707")
.setConfig(InstanceConfig.newBuilder().build())
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.updateInstanceConfigOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<UpdateInstanceConfigRequest,Instance,OperationMetadata> |
updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest request)
public final OperationFuture<Instance,OperationMetadata> updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest request)
Updates the Shielded instance configuration of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateShieldedInstanceConfigRequest request =
UpdateShieldedInstanceConfigRequest.newBuilder()
.setName("name3373707")
.setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
.build();
Instance response = notebookServiceClient.updateShieldedInstanceConfigAsync(request).get();
}
Name | Description |
request | UpdateShieldedInstanceConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
updateShieldedInstanceConfigCallable()
public final UnaryCallable<UpdateShieldedInstanceConfigRequest,Operation> updateShieldedInstanceConfigCallable()
Updates the Shielded instance configuration of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateShieldedInstanceConfigRequest request =
UpdateShieldedInstanceConfigRequest.newBuilder()
.setName("name3373707")
.setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
.build();
ApiFuture<Operation> future =
notebookServiceClient.updateShieldedInstanceConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateShieldedInstanceConfigRequest,Operation> |
updateShieldedInstanceConfigOperationCallable()
public final OperationCallable<UpdateShieldedInstanceConfigRequest,Instance,OperationMetadata> updateShieldedInstanceConfigOperationCallable()
Updates the Shielded instance configuration of a single Instance.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpdateShieldedInstanceConfigRequest request =
UpdateShieldedInstanceConfigRequest.newBuilder()
.setName("name3373707")
.setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.updateShieldedInstanceConfigOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<UpdateShieldedInstanceConfigRequest,Instance,OperationMetadata> |
upgradeInstanceAsync(UpgradeInstanceRequest request)
public final OperationFuture<Instance,OperationMetadata> upgradeInstanceAsync(UpgradeInstanceRequest request)
Upgrades a notebook instance to the latest version.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeInstanceRequest request =
UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
Instance response = notebookServiceClient.upgradeInstanceAsync(request).get();
}
Name | Description |
request | UpgradeInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
upgradeInstanceCallable()
public final UnaryCallable<UpgradeInstanceRequest,Operation> upgradeInstanceCallable()
Upgrades a notebook instance to the latest version.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeInstanceRequest request =
UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
ApiFuture<Operation> future =
notebookServiceClient.upgradeInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpgradeInstanceRequest,Operation> |
upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request)
public final OperationFuture<Instance,OperationMetadata> upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request)
Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeInstanceInternalRequest request =
UpgradeInstanceInternalRequest.newBuilder()
.setName("name3373707")
.setVmId("vmId3622450")
.build();
Instance response = notebookServiceClient.upgradeInstanceInternalAsync(request).get();
}
Name | Description |
request | UpgradeInstanceInternalRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Instance,OperationMetadata> |
upgradeInstanceInternalCallable()
public final UnaryCallable<UpgradeInstanceInternalRequest,Operation> upgradeInstanceInternalCallable()
Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeInstanceInternalRequest request =
UpgradeInstanceInternalRequest.newBuilder()
.setName("name3373707")
.setVmId("vmId3622450")
.build();
ApiFuture<Operation> future =
notebookServiceClient.upgradeInstanceInternalCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpgradeInstanceInternalRequest,Operation> |
upgradeInstanceInternalOperationCallable()
public final OperationCallable<UpgradeInstanceInternalRequest,Instance,OperationMetadata> upgradeInstanceInternalOperationCallable()
Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeInstanceInternalRequest request =
UpgradeInstanceInternalRequest.newBuilder()
.setName("name3373707")
.setVmId("vmId3622450")
.build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.upgradeInstanceInternalOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<UpgradeInstanceInternalRequest,Instance,OperationMetadata> |
upgradeInstanceOperationCallable()
public final OperationCallable<UpgradeInstanceRequest,Instance,OperationMetadata> upgradeInstanceOperationCallable()
Upgrades a notebook instance to the latest version.
Sample code:
try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
UpgradeInstanceRequest request =
UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
OperationFuture<Instance, OperationMetadata> future =
notebookServiceClient.upgradeInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
OperationCallable<UpgradeInstanceRequest,Instance,OperationMetadata> |