@BetaApi @Generated(value="by gapic-generator-java") public class NotebookServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `OperationFuture`, which is used to track polling of the service.
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 `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
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 `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. |
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
NotebookServiceClient.ListLocationsFixedSizeCollection |
static class |
NotebookServiceClient.ListLocationsPage |
static class |
NotebookServiceClient.ListLocationsPagedResponse |
static class |
NotebookServiceClient.ListNotebookExecutionJobsFixedSizeCollection |
static class |
NotebookServiceClient.ListNotebookExecutionJobsPage |
static class |
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
static class |
NotebookServiceClient.ListNotebookRuntimesFixedSizeCollection |
static class |
NotebookServiceClient.ListNotebookRuntimesPage |
static class |
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
static class |
NotebookServiceClient.ListNotebookRuntimeTemplatesFixedSizeCollection |
static class |
NotebookServiceClient.ListNotebookRuntimeTemplatesPage |
static class |
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
NotebookServiceClient(NotebookServiceSettings settings)
Constructs an instance of NotebookServiceClient, using the given settings.
|
protected |
NotebookServiceClient(NotebookServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request)
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
assignNotebookRuntimeAsync(LocationName parent,
NotebookRuntimeTemplateName notebookRuntimeTemplate,
NotebookRuntime notebookRuntime,
String notebookRuntimeId)
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
assignNotebookRuntimeAsync(LocationName parent,
String notebookRuntimeTemplate,
NotebookRuntime notebookRuntime,
String notebookRuntimeId)
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
assignNotebookRuntimeAsync(String parent,
NotebookRuntimeTemplateName notebookRuntimeTemplate,
NotebookRuntime notebookRuntime,
String notebookRuntimeId)
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
assignNotebookRuntimeAsync(String parent,
String notebookRuntimeTemplate,
NotebookRuntime notebookRuntime,
String notebookRuntimeId)
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
com.google.api.gax.rpc.UnaryCallable<AssignNotebookRuntimeRequest,com.google.longrunning.Operation> |
assignNotebookRuntimeCallable()
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
com.google.api.gax.rpc.OperationCallable<AssignNotebookRuntimeRequest,NotebookRuntime,AssignNotebookRuntimeOperationMetadata> |
assignNotebookRuntimeOperationCallable()
Assigns a NotebookRuntime to a user for a particular Notebook file.
|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static NotebookServiceClient |
create()
Constructs an instance of NotebookServiceClient with default settings.
|
static NotebookServiceClient |
create(NotebookServiceSettings settings)
Constructs an instance of NotebookServiceClient, using the given settings.
|
static NotebookServiceClient |
create(NotebookServiceStub stub)
Constructs an instance of NotebookServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
createNotebookExecutionJobAsync(CreateNotebookExecutionJobRequest request)
Creates a NotebookExecutionJob.
|
com.google.api.gax.longrunning.OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
createNotebookExecutionJobAsync(LocationName parent,
NotebookExecutionJob notebookExecutionJob,
String notebookExecutionJobId)
Creates a NotebookExecutionJob.
|
com.google.api.gax.longrunning.OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
createNotebookExecutionJobAsync(String parent,
NotebookExecutionJob notebookExecutionJob,
String notebookExecutionJobId)
Creates a NotebookExecutionJob.
|
com.google.api.gax.rpc.UnaryCallable<CreateNotebookExecutionJobRequest,com.google.longrunning.Operation> |
createNotebookExecutionJobCallable()
Creates a NotebookExecutionJob.
|
com.google.api.gax.rpc.OperationCallable<CreateNotebookExecutionJobRequest,NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> |
createNotebookExecutionJobOperationCallable()
Creates a NotebookExecutionJob.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request)
Creates a NotebookRuntimeTemplate.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
createNotebookRuntimeTemplateAsync(LocationName parent,
NotebookRuntimeTemplate notebookRuntimeTemplate,
String notebookRuntimeTemplateId)
Creates a NotebookRuntimeTemplate.
|
com.google.api.gax.longrunning.OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
createNotebookRuntimeTemplateAsync(String parent,
NotebookRuntimeTemplate notebookRuntimeTemplate,
String notebookRuntimeTemplateId)
Creates a NotebookRuntimeTemplate.
|
com.google.api.gax.rpc.UnaryCallable<CreateNotebookRuntimeTemplateRequest,com.google.longrunning.Operation> |
createNotebookRuntimeTemplateCallable()
Creates a NotebookRuntimeTemplate.
|
com.google.api.gax.rpc.OperationCallable<CreateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> |
createNotebookRuntimeTemplateOperationCallable()
Creates a NotebookRuntimeTemplate.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookExecutionJobAsync(DeleteNotebookExecutionJobRequest request)
Deletes a NotebookExecutionJob.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookExecutionJobAsync(NotebookExecutionJobName name)
Deletes a NotebookExecutionJob.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookExecutionJobAsync(String name)
Deletes a NotebookExecutionJob.
|
com.google.api.gax.rpc.UnaryCallable<DeleteNotebookExecutionJobRequest,com.google.longrunning.Operation> |
deleteNotebookExecutionJobCallable()
Deletes a NotebookExecutionJob.
|
com.google.api.gax.rpc.OperationCallable<DeleteNotebookExecutionJobRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookExecutionJobOperationCallable()
Deletes a NotebookExecutionJob.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request)
Deletes a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeAsync(NotebookRuntimeName name)
Deletes a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeAsync(String name)
Deletes a NotebookRuntime.
|
com.google.api.gax.rpc.UnaryCallable<DeleteNotebookRuntimeRequest,com.google.longrunning.Operation> |
deleteNotebookRuntimeCallable()
Deletes a NotebookRuntime.
|
com.google.api.gax.rpc.OperationCallable<DeleteNotebookRuntimeRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeOperationCallable()
Deletes a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request)
Deletes a NotebookRuntimeTemplate.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name)
Deletes a NotebookRuntimeTemplate.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeTemplateAsync(String name)
Deletes a NotebookRuntimeTemplate.
|
com.google.api.gax.rpc.UnaryCallable<DeleteNotebookRuntimeTemplateRequest,com.google.longrunning.Operation> |
deleteNotebookRuntimeTemplateCallable()
Deletes a NotebookRuntimeTemplate.
|
com.google.api.gax.rpc.OperationCallable<DeleteNotebookRuntimeTemplateRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteNotebookRuntimeTemplateOperationCallable()
Deletes a NotebookRuntimeTemplate.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyCallable()
Gets the access control policy for a resource.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
NotebookExecutionJob |
getNotebookExecutionJob(GetNotebookExecutionJobRequest request)
Gets a NotebookExecutionJob.
|
NotebookExecutionJob |
getNotebookExecutionJob(NotebookExecutionJobName name)
Gets a NotebookExecutionJob.
|
NotebookExecutionJob |
getNotebookExecutionJob(String name)
Gets a NotebookExecutionJob.
|
com.google.api.gax.rpc.UnaryCallable<GetNotebookExecutionJobRequest,NotebookExecutionJob> |
getNotebookExecutionJobCallable()
Gets a NotebookExecutionJob.
|
NotebookRuntime |
getNotebookRuntime(GetNotebookRuntimeRequest request)
Gets a NotebookRuntime.
|
NotebookRuntime |
getNotebookRuntime(NotebookRuntimeName name)
Gets a NotebookRuntime.
|
NotebookRuntime |
getNotebookRuntime(String name)
Gets a NotebookRuntime.
|
com.google.api.gax.rpc.UnaryCallable<GetNotebookRuntimeRequest,NotebookRuntime> |
getNotebookRuntimeCallable()
Gets a NotebookRuntime.
|
NotebookRuntimeTemplate |
getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request)
Gets a NotebookRuntimeTemplate.
|
NotebookRuntimeTemplate |
getNotebookRuntimeTemplate(NotebookRuntimeTemplateName name)
Gets a NotebookRuntimeTemplate.
|
NotebookRuntimeTemplate |
getNotebookRuntimeTemplate(String name)
Gets a NotebookRuntimeTemplate.
|
com.google.api.gax.rpc.UnaryCallable<GetNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> |
getNotebookRuntimeTemplateCallable()
Gets a NotebookRuntimeTemplate.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
NotebookServiceSettings |
getSettings() |
NotebookServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
NotebookServiceClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,NotebookServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
listNotebookExecutionJobs(ListNotebookExecutionJobsRequest request)
Lists NotebookExecutionJobs in a Location.
|
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
listNotebookExecutionJobs(LocationName parent)
Lists NotebookExecutionJobs in a Location.
|
NotebookServiceClient.ListNotebookExecutionJobsPagedResponse |
listNotebookExecutionJobs(String parent)
Lists NotebookExecutionJobs in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListNotebookExecutionJobsRequest,ListNotebookExecutionJobsResponse> |
listNotebookExecutionJobsCallable()
Lists NotebookExecutionJobs in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListNotebookExecutionJobsRequest,NotebookServiceClient.ListNotebookExecutionJobsPagedResponse> |
listNotebookExecutionJobsPagedCallable()
Lists NotebookExecutionJobs in a Location.
|
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
listNotebookRuntimes(ListNotebookRuntimesRequest request)
Lists NotebookRuntimes in a Location.
|
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
listNotebookRuntimes(LocationName parent)
Lists NotebookRuntimes in a Location.
|
NotebookServiceClient.ListNotebookRuntimesPagedResponse |
listNotebookRuntimes(String parent)
Lists NotebookRuntimes in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimesRequest,ListNotebookRuntimesResponse> |
listNotebookRuntimesCallable()
Lists NotebookRuntimes in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimesRequest,NotebookServiceClient.ListNotebookRuntimesPagedResponse> |
listNotebookRuntimesPagedCallable()
Lists NotebookRuntimes in a Location.
|
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request)
Lists NotebookRuntimeTemplates in a Location.
|
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
listNotebookRuntimeTemplates(LocationName parent)
Lists NotebookRuntimeTemplates in a Location.
|
NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse |
listNotebookRuntimeTemplates(String parent)
Lists NotebookRuntimeTemplates in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimeTemplatesRequest,ListNotebookRuntimeTemplatesResponse> |
listNotebookRuntimeTemplatesCallable()
Lists NotebookRuntimeTemplates in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimeTemplatesRequest,NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse> |
listNotebookRuntimeTemplatesPagedCallable()
Lists NotebookRuntimeTemplates in a Location.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyCallable()
Sets the access control policy on the specified resource.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
startNotebookRuntimeAsync(NotebookRuntimeName name)
Starts a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
startNotebookRuntimeAsync(StartNotebookRuntimeRequest request)
Starts a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
startNotebookRuntimeAsync(String name)
Starts a NotebookRuntime.
|
com.google.api.gax.rpc.UnaryCallable<StartNotebookRuntimeRequest,com.google.longrunning.Operation> |
startNotebookRuntimeCallable()
Starts a NotebookRuntime.
|
com.google.api.gax.rpc.OperationCallable<StartNotebookRuntimeRequest,StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> |
startNotebookRuntimeOperationCallable()
Starts a NotebookRuntime.
|
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.
|
NotebookRuntimeTemplate |
updateNotebookRuntimeTemplate(NotebookRuntimeTemplate notebookRuntimeTemplate,
com.google.protobuf.FieldMask updateMask)
Updates a NotebookRuntimeTemplate.
|
NotebookRuntimeTemplate |
updateNotebookRuntimeTemplate(UpdateNotebookRuntimeTemplateRequest request)
Updates a NotebookRuntimeTemplate.
|
com.google.api.gax.rpc.UnaryCallable<UpdateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> |
updateNotebookRuntimeTemplateCallable()
Updates a NotebookRuntimeTemplate.
|
com.google.api.gax.longrunning.OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
upgradeNotebookRuntimeAsync(NotebookRuntimeName name)
Upgrades a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
upgradeNotebookRuntimeAsync(String name)
Upgrades a NotebookRuntime.
|
com.google.api.gax.longrunning.OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request)
Upgrades a NotebookRuntime.
|
com.google.api.gax.rpc.UnaryCallable<UpgradeNotebookRuntimeRequest,com.google.longrunning.Operation> |
upgradeNotebookRuntimeCallable()
Upgrades a NotebookRuntime.
|
com.google.api.gax.rpc.OperationCallable<UpgradeNotebookRuntimeRequest,UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> |
upgradeNotebookRuntimeOperationCallable()
Upgrades a NotebookRuntime.
|
protected NotebookServiceClient(NotebookServiceSettings settings) throws IOException
IOExceptionprotected NotebookServiceClient(NotebookServiceStub stub)
public static final NotebookServiceClient create() throws IOException
IOExceptionpublic static final NotebookServiceClient create(NotebookServiceSettings settings) throws IOException
IOExceptionpublic static final NotebookServiceClient create(NotebookServiceStub stub)
public final NotebookServiceSettings getSettings()
public NotebookServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateAsync(LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId)
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();
}
parent - Required. The resource name of the Location to create the
NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`notebookRuntimeTemplate - Required. The NotebookRuntimeTemplate to create.notebookRuntimeTemplateId - Optional. User specified ID for the notebook runtime template.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateAsync(String parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId)
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();
}
parent - Required. The resource name of the Location to create the
NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`notebookRuntimeTemplate - Required. The NotebookRuntimeTemplate to create.notebookRuntimeTemplateId - Optional. User specified ID for the notebook runtime template.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate,CreateNotebookRuntimeTemplateOperationMetadata> createNotebookRuntimeTemplateOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateNotebookRuntimeTemplateRequest,com.google.longrunning.Operation> createNotebookRuntimeTemplateCallable()
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();
}
public final NotebookRuntimeTemplate getNotebookRuntimeTemplate(NotebookRuntimeTemplateName name)
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);
}
name - Required. The name of the NotebookRuntimeTemplate resource. Format:
`projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookRuntimeTemplate getNotebookRuntimeTemplate(String name)
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);
}
name - Required. The name of the NotebookRuntimeTemplate resource. Format:
`projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookRuntimeTemplate getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> getNotebookRuntimeTemplateCallable()
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();
}
public final NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates(LocationName parent)
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);
}
}
parent - Required. The resource name of the Location from which to list the
NotebookRuntimeTemplates. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates(String parent)
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);
}
}
parent - Required. The resource name of the Location from which to list the
NotebookRuntimeTemplates. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request)
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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimeTemplatesRequest,NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse> listNotebookRuntimeTemplatesPagedCallable()
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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimeTemplatesRequest,ListNotebookRuntimeTemplatesResponse> listNotebookRuntimeTemplatesCallable()
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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name)
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();
}
name - Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format:
`projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateAsync(String name)
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();
}
name - Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format:
`projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteNotebookRuntimeTemplateRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeTemplateOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteNotebookRuntimeTemplateRequest,com.google.longrunning.Operation> deleteNotebookRuntimeTemplateCallable()
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();
}
public final NotebookRuntimeTemplate updateNotebookRuntimeTemplate(NotebookRuntimeTemplate notebookRuntimeTemplate, com.google.protobuf.FieldMask updateMask)
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);
}
notebookRuntimeTemplate - Required. The NotebookRuntimeTemplate to update.updateMask - Required. The update mask applies to the resource. For the `FieldMask`
definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask]. Input format:
`{paths: "${updated_filed}"}` Updatable fields:
* `encryption_spec.kms_key_name`
com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookRuntimeTemplate updateNotebookRuntimeTemplate(UpdateNotebookRuntimeTemplateRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateNotebookRuntimeTemplateRequest,NotebookRuntimeTemplate> updateNotebookRuntimeTemplateCallable()
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();
}
public final com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(LocationName parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
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();
}
parent - Required. The resource name of the Location to get the NotebookRuntime
assignment. Format: `projects/{project}/locations/{location}`notebookRuntimeTemplate - Required. The resource name of the NotebookRuntimeTemplate based
on which a NotebookRuntime will be assigned (reuse or create a new one).notebookRuntime - Required. Provide runtime specific information (e.g. runtime owner,
notebook id) used for NotebookRuntime assignment.notebookRuntimeId - Optional. User specified ID for the notebook runtime.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(LocationName parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
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();
}
parent - Required. The resource name of the Location to get the NotebookRuntime
assignment. Format: `projects/{project}/locations/{location}`notebookRuntimeTemplate - Required. The resource name of the NotebookRuntimeTemplate based
on which a NotebookRuntime will be assigned (reuse or create a new one).notebookRuntime - Required. Provide runtime specific information (e.g. runtime owner,
notebook id) used for NotebookRuntime assignment.notebookRuntimeId - Optional. User specified ID for the notebook runtime.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(String parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
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();
}
parent - Required. The resource name of the Location to get the NotebookRuntime
assignment. Format: `projects/{project}/locations/{location}`notebookRuntimeTemplate - Required. The resource name of the NotebookRuntimeTemplate based
on which a NotebookRuntime will be assigned (reuse or create a new one).notebookRuntime - Required. Provide runtime specific information (e.g. runtime owner,
notebook id) used for NotebookRuntime assignment.notebookRuntimeId - Optional. User specified ID for the notebook runtime.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(String parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId)
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();
}
parent - Required. The resource name of the Location to get the NotebookRuntime
assignment. Format: `projects/{project}/locations/{location}`notebookRuntimeTemplate - Required. The resource name of the NotebookRuntimeTemplate based
on which a NotebookRuntime will be assigned (reuse or create a new one).notebookRuntime - Required. Provide runtime specific information (e.g. runtime owner,
notebook id) used for NotebookRuntime assignment.notebookRuntimeId - Optional. User specified ID for the notebook runtime.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<AssignNotebookRuntimeRequest,NotebookRuntime,AssignNotebookRuntimeOperationMetadata> assignNotebookRuntimeOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<AssignNotebookRuntimeRequest,com.google.longrunning.Operation> assignNotebookRuntimeCallable()
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();
}
public final NotebookRuntime getNotebookRuntime(NotebookRuntimeName name)
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);
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookRuntime getNotebookRuntime(String name)
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);
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookRuntime getNotebookRuntime(GetNotebookRuntimeRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetNotebookRuntimeRequest,NotebookRuntime> getNotebookRuntimeCallable()
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();
}
public final NotebookServiceClient.ListNotebookRuntimesPagedResponse listNotebookRuntimes(LocationName parent)
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);
}
}
parent - Required. The resource name of the Location from which to list the
NotebookRuntimes. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookServiceClient.ListNotebookRuntimesPagedResponse listNotebookRuntimes(String parent)
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);
}
}
parent - Required. The resource name of the Location from which to list the
NotebookRuntimes. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookServiceClient.ListNotebookRuntimesPagedResponse listNotebookRuntimes(ListNotebookRuntimesRequest request)
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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimesRequest,NotebookServiceClient.ListNotebookRuntimesPagedResponse> listNotebookRuntimesPagedCallable()
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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListNotebookRuntimesRequest,ListNotebookRuntimesResponse> listNotebookRuntimesCallable()
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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeAsync(NotebookRuntimeName name)
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();
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeAsync(String name)
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();
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteNotebookRuntimeRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookRuntimeOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteNotebookRuntimeRequest,com.google.longrunning.Operation> deleteNotebookRuntimeCallable()
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();
}
public final com.google.api.gax.longrunning.OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeAsync(NotebookRuntimeName name)
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();
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeAsync(String name)
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();
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpgradeNotebookRuntimeRequest,UpgradeNotebookRuntimeResponse,UpgradeNotebookRuntimeOperationMetadata> upgradeNotebookRuntimeOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<UpgradeNotebookRuntimeRequest,com.google.longrunning.Operation> upgradeNotebookRuntimeCallable()
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();
}
public final com.google.api.gax.longrunning.OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeAsync(NotebookRuntimeName name)
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();
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeAsync(String name)
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();
}
name - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeAsync(StartNotebookRuntimeRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<StartNotebookRuntimeRequest,StartNotebookRuntimeResponse,StartNotebookRuntimeOperationMetadata> startNotebookRuntimeOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<StartNotebookRuntimeRequest,com.google.longrunning.Operation> startNotebookRuntimeCallable()
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();
}
public final com.google.api.gax.longrunning.OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobAsync(LocationName parent, NotebookExecutionJob notebookExecutionJob, String notebookExecutionJobId)
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();
}
parent - Required. The resource name of the Location to create the NotebookExecutionJob.
Format: `projects/{project}/locations/{location}`notebookExecutionJob - Required. The NotebookExecutionJob to create.notebookExecutionJobId - Optional. User specified ID for the NotebookExecutionJob.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobAsync(String parent, NotebookExecutionJob notebookExecutionJob, String notebookExecutionJobId)
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();
}
parent - Required. The resource name of the Location to create the NotebookExecutionJob.
Format: `projects/{project}/locations/{location}`notebookExecutionJob - Required. The NotebookExecutionJob to create.notebookExecutionJobId - Optional. User specified ID for the NotebookExecutionJob.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobAsync(CreateNotebookExecutionJobRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateNotebookExecutionJobRequest,NotebookExecutionJob,CreateNotebookExecutionJobOperationMetadata> createNotebookExecutionJobOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateNotebookExecutionJobRequest,com.google.longrunning.Operation> createNotebookExecutionJobCallable()
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();
}
public final NotebookExecutionJob getNotebookExecutionJob(NotebookExecutionJobName name)
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);
}
name - Required. The name of the NotebookExecutionJob resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookExecutionJob getNotebookExecutionJob(String name)
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);
}
name - Required. The name of the NotebookExecutionJob resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookExecutionJob getNotebookExecutionJob(GetNotebookExecutionJobRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetNotebookExecutionJobRequest,NotebookExecutionJob> getNotebookExecutionJobCallable()
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();
}
public final NotebookServiceClient.ListNotebookExecutionJobsPagedResponse listNotebookExecutionJobs(LocationName parent)
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);
}
}
parent - Required. The resource name of the Location from which to list the
NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookServiceClient.ListNotebookExecutionJobsPagedResponse listNotebookExecutionJobs(String parent)
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);
}
}
parent - Required. The resource name of the Location from which to list the
NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final NotebookServiceClient.ListNotebookExecutionJobsPagedResponse listNotebookExecutionJobs(ListNotebookExecutionJobsRequest request)
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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListNotebookExecutionJobsRequest,NotebookServiceClient.ListNotebookExecutionJobsPagedResponse> listNotebookExecutionJobsPagedCallable()
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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListNotebookExecutionJobsRequest,ListNotebookExecutionJobsResponse> listNotebookExecutionJobsCallable()
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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookExecutionJobAsync(NotebookExecutionJobName name)
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();
}
name - Required. The name of the NotebookExecutionJob resource to be deleted.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookExecutionJobAsync(String name)
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();
}
name - Required. The name of the NotebookExecutionJob resource to be deleted.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookExecutionJobAsync(DeleteNotebookExecutionJobRequest request)
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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteNotebookExecutionJobRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteNotebookExecutionJobOperationCallable()
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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteNotebookExecutionJobRequest,com.google.longrunning.Operation> deleteNotebookExecutionJobCallable()
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();
}
public final NotebookServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,NotebookServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
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;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
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();
}
public final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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();
}
public final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
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();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
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();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.