@Generated(value="by gapic-generator-java") public class DataplexServiceClient 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName name = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
Lake response = dataplexServiceClient.getLake(name);
}
Note: close() needs to be called on the DataplexServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
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 DataplexServiceSettings 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
DataplexServiceSettings dataplexServiceSettings =
DataplexServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataplexServiceClient dataplexServiceClient =
DataplexServiceClient.create(dataplexServiceSettings);
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
DataplexServiceSettings dataplexServiceSettings =
DataplexServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DataplexServiceClient dataplexServiceClient =
DataplexServiceClient.create(dataplexServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// 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
DataplexServiceSettings dataplexServiceSettings =
DataplexServiceSettings.newHttpJsonBuilder().build();
DataplexServiceClient dataplexServiceClient =
DataplexServiceClient.create(dataplexServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier | Constructor and Description |
|---|---|
protected |
DataplexServiceClient(DataplexServiceSettings settings)
Constructs an instance of DataplexServiceClient, using the given settings.
|
protected |
DataplexServiceClient(DataplexServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
cancelJob(CancelJobRequest request)
Cancel jobs running for the task resource.
|
void |
cancelJob(JobName name)
Cancel jobs running for the task resource.
|
void |
cancelJob(String name)
Cancel jobs running for the task resource.
|
com.google.api.gax.rpc.UnaryCallable<CancelJobRequest,com.google.protobuf.Empty> |
cancelJobCallable()
Cancel jobs running for the task resource.
|
void |
close() |
static DataplexServiceClient |
create()
Constructs an instance of DataplexServiceClient with default settings.
|
static DataplexServiceClient |
create(DataplexServiceSettings settings)
Constructs an instance of DataplexServiceClient, using the given settings.
|
static DataplexServiceClient |
create(DataplexServiceStub stub)
Constructs an instance of DataplexServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> |
createAssetAsync(CreateAssetRequest request)
Creates an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> |
createAssetAsync(String parent,
Asset asset,
String assetId)
Creates an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> |
createAssetAsync(ZoneName parent,
Asset asset,
String assetId)
Creates an asset resource.
|
com.google.api.gax.rpc.UnaryCallable<CreateAssetRequest,com.google.longrunning.Operation> |
createAssetCallable()
Creates an asset resource.
|
com.google.api.gax.rpc.OperationCallable<CreateAssetRequest,Asset,OperationMetadata> |
createAssetOperationCallable()
Creates an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> |
createEnvironmentAsync(CreateEnvironmentRequest request)
Create an environment resource.
|
com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> |
createEnvironmentAsync(LakeName parent,
Environment environment,
String environmentId)
Create an environment resource.
|
com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> |
createEnvironmentAsync(String parent,
Environment environment,
String environmentId)
Create an environment resource.
|
com.google.api.gax.rpc.UnaryCallable<CreateEnvironmentRequest,com.google.longrunning.Operation> |
createEnvironmentCallable()
Create an environment resource.
|
com.google.api.gax.rpc.OperationCallable<CreateEnvironmentRequest,Environment,OperationMetadata> |
createEnvironmentOperationCallable()
Create an environment resource.
|
com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> |
createLakeAsync(CreateLakeRequest request)
Creates a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> |
createLakeAsync(LocationName parent,
Lake lake,
String lakeId)
Creates a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> |
createLakeAsync(String parent,
Lake lake,
String lakeId)
Creates a lake resource.
|
com.google.api.gax.rpc.UnaryCallable<CreateLakeRequest,com.google.longrunning.Operation> |
createLakeCallable()
Creates a lake resource.
|
com.google.api.gax.rpc.OperationCallable<CreateLakeRequest,Lake,OperationMetadata> |
createLakeOperationCallable()
Creates a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> |
createTaskAsync(CreateTaskRequest request)
Creates a task resource within a lake.
|
com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> |
createTaskAsync(LakeName parent,
Task task,
String taskId)
Creates a task resource within a lake.
|
com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> |
createTaskAsync(String parent,
Task task,
String taskId)
Creates a task resource within a lake.
|
com.google.api.gax.rpc.UnaryCallable<CreateTaskRequest,com.google.longrunning.Operation> |
createTaskCallable()
Creates a task resource within a lake.
|
com.google.api.gax.rpc.OperationCallable<CreateTaskRequest,Task,OperationMetadata> |
createTaskOperationCallable()
Creates a task resource within a lake.
|
com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> |
createZoneAsync(CreateZoneRequest request)
Creates a zone resource within a lake.
|
com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> |
createZoneAsync(LakeName parent,
Zone zone,
String zoneId)
Creates a zone resource within a lake.
|
com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> |
createZoneAsync(String parent,
Zone zone,
String zoneId)
Creates a zone resource within a lake.
|
com.google.api.gax.rpc.UnaryCallable<CreateZoneRequest,com.google.longrunning.Operation> |
createZoneCallable()
Creates a zone resource within a lake.
|
com.google.api.gax.rpc.OperationCallable<CreateZoneRequest,Zone,OperationMetadata> |
createZoneOperationCallable()
Creates a zone resource within a lake.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAssetAsync(AssetName name)
Deletes an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAssetAsync(DeleteAssetRequest request)
Deletes an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAssetAsync(String name)
Deletes an asset resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAssetRequest,com.google.longrunning.Operation> |
deleteAssetCallable()
Deletes an asset resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAssetOperationCallable()
Deletes an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEnvironmentAsync(DeleteEnvironmentRequest request)
Delete the environment resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEnvironmentAsync(EnvironmentName name)
Delete the environment resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEnvironmentAsync(String name)
Delete the environment resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteEnvironmentRequest,com.google.longrunning.Operation> |
deleteEnvironmentCallable()
Delete the environment resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteEnvironmentRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteEnvironmentOperationCallable()
Delete the environment resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteLakeAsync(DeleteLakeRequest request)
Deletes a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteLakeAsync(LakeName name)
Deletes a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteLakeAsync(String name)
Deletes a lake resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteLakeRequest,com.google.longrunning.Operation> |
deleteLakeCallable()
Deletes a lake resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteLakeRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteLakeOperationCallable()
Deletes a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteTaskAsync(DeleteTaskRequest request)
Delete the task resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteTaskAsync(String name)
Delete the task resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteTaskAsync(TaskName name)
Delete the task resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTaskRequest,com.google.longrunning.Operation> |
deleteTaskCallable()
Delete the task resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteTaskRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteTaskOperationCallable()
Delete the task resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteZoneAsync(DeleteZoneRequest request)
Deletes a zone resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteZoneAsync(String name)
Deletes a zone resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteZoneAsync(ZoneName name)
Deletes a zone resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteZoneRequest,com.google.longrunning.Operation> |
deleteZoneCallable()
Deletes a zone resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteZoneRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteZoneOperationCallable()
Deletes a zone resource.
|
Asset |
getAsset(AssetName name)
Retrieves an asset resource.
|
Asset |
getAsset(GetAssetRequest request)
Retrieves an asset resource.
|
Asset |
getAsset(String name)
Retrieves an asset resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAssetRequest,Asset> |
getAssetCallable()
Retrieves an asset resource.
|
Environment |
getEnvironment(EnvironmentName name)
Get environment resource.
|
Environment |
getEnvironment(GetEnvironmentRequest request)
Get environment resource.
|
Environment |
getEnvironment(String name)
Get environment resource.
|
com.google.api.gax.rpc.UnaryCallable<GetEnvironmentRequest,Environment> |
getEnvironmentCallable()
Get environment resource.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
Job |
getJob(GetJobRequest request)
Get job resource.
|
Job |
getJob(JobName name)
Get job resource.
|
Job |
getJob(String name)
Get job resource.
|
com.google.api.gax.rpc.UnaryCallable<GetJobRequest,Job> |
getJobCallable()
Get job resource.
|
Lake |
getLake(GetLakeRequest request)
Retrieves a lake resource.
|
Lake |
getLake(LakeName name)
Retrieves a lake resource.
|
Lake |
getLake(String name)
Retrieves a lake resource.
|
com.google.api.gax.rpc.UnaryCallable<GetLakeRequest,Lake> |
getLakeCallable()
Retrieves a lake 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.
|
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.
|
DataplexServiceSettings |
getSettings() |
DataplexServiceStub |
getStub() |
Task |
getTask(GetTaskRequest request)
Get task resource.
|
Task |
getTask(String name)
Get task resource.
|
Task |
getTask(TaskName name)
Get task resource.
|
com.google.api.gax.rpc.UnaryCallable<GetTaskRequest,Task> |
getTaskCallable()
Get task resource.
|
Zone |
getZone(GetZoneRequest request)
Retrieves a zone resource.
|
Zone |
getZone(String name)
Retrieves a zone resource.
|
Zone |
getZone(ZoneName name)
Retrieves a zone resource.
|
com.google.api.gax.rpc.UnaryCallable<GetZoneRequest,Zone> |
getZoneCallable()
Retrieves a zone resource.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
DataplexServiceClient.ListAssetActionsPagedResponse |
listAssetActions(AssetName parent)
Lists action resources in an asset.
|
DataplexServiceClient.ListAssetActionsPagedResponse |
listAssetActions(ListAssetActionsRequest request)
Lists action resources in an asset.
|
DataplexServiceClient.ListAssetActionsPagedResponse |
listAssetActions(String parent)
Lists action resources in an asset.
|
com.google.api.gax.rpc.UnaryCallable<ListAssetActionsRequest,ListActionsResponse> |
listAssetActionsCallable()
Lists action resources in an asset.
|
com.google.api.gax.rpc.UnaryCallable<ListAssetActionsRequest,DataplexServiceClient.ListAssetActionsPagedResponse> |
listAssetActionsPagedCallable()
Lists action resources in an asset.
|
DataplexServiceClient.ListAssetsPagedResponse |
listAssets(ListAssetsRequest request)
Lists asset resources in a zone.
|
DataplexServiceClient.ListAssetsPagedResponse |
listAssets(String parent)
Lists asset resources in a zone.
|
DataplexServiceClient.ListAssetsPagedResponse |
listAssets(ZoneName parent)
Lists asset resources in a zone.
|
com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,ListAssetsResponse> |
listAssetsCallable()
Lists asset resources in a zone.
|
com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,DataplexServiceClient.ListAssetsPagedResponse> |
listAssetsPagedCallable()
Lists asset resources in a zone.
|
DataplexServiceClient.ListEnvironmentsPagedResponse |
listEnvironments(LakeName parent)
Lists environments under the given lake.
|
DataplexServiceClient.ListEnvironmentsPagedResponse |
listEnvironments(ListEnvironmentsRequest request)
Lists environments under the given lake.
|
DataplexServiceClient.ListEnvironmentsPagedResponse |
listEnvironments(String parent)
Lists environments under the given lake.
|
com.google.api.gax.rpc.UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsResponse> |
listEnvironmentsCallable()
Lists environments under the given lake.
|
com.google.api.gax.rpc.UnaryCallable<ListEnvironmentsRequest,DataplexServiceClient.ListEnvironmentsPagedResponse> |
listEnvironmentsPagedCallable()
Lists environments under the given lake.
|
DataplexServiceClient.ListJobsPagedResponse |
listJobs(ListJobsRequest request)
Lists Jobs under the given task.
|
DataplexServiceClient.ListJobsPagedResponse |
listJobs(String parent)
Lists Jobs under the given task.
|
DataplexServiceClient.ListJobsPagedResponse |
listJobs(TaskName parent)
Lists Jobs under the given task.
|
com.google.api.gax.rpc.UnaryCallable<ListJobsRequest,ListJobsResponse> |
listJobsCallable()
Lists Jobs under the given task.
|
com.google.api.gax.rpc.UnaryCallable<ListJobsRequest,DataplexServiceClient.ListJobsPagedResponse> |
listJobsPagedCallable()
Lists Jobs under the given task.
|
DataplexServiceClient.ListLakeActionsPagedResponse |
listLakeActions(LakeName parent)
Lists action resources in a lake.
|
DataplexServiceClient.ListLakeActionsPagedResponse |
listLakeActions(ListLakeActionsRequest request)
Lists action resources in a lake.
|
DataplexServiceClient.ListLakeActionsPagedResponse |
listLakeActions(String parent)
Lists action resources in a lake.
|
com.google.api.gax.rpc.UnaryCallable<ListLakeActionsRequest,ListActionsResponse> |
listLakeActionsCallable()
Lists action resources in a lake.
|
com.google.api.gax.rpc.UnaryCallable<ListLakeActionsRequest,DataplexServiceClient.ListLakeActionsPagedResponse> |
listLakeActionsPagedCallable()
Lists action resources in a lake.
|
DataplexServiceClient.ListLakesPagedResponse |
listLakes(ListLakesRequest request)
Lists lake resources in a project and location.
|
DataplexServiceClient.ListLakesPagedResponse |
listLakes(LocationName parent)
Lists lake resources in a project and location.
|
DataplexServiceClient.ListLakesPagedResponse |
listLakes(String parent)
Lists lake resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListLakesRequest,ListLakesResponse> |
listLakesCallable()
Lists lake resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListLakesRequest,DataplexServiceClient.ListLakesPagedResponse> |
listLakesPagedCallable()
Lists lake resources in a project and location.
|
DataplexServiceClient.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,DataplexServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
DataplexServiceClient.ListSessionsPagedResponse |
listSessions(EnvironmentName parent)
Lists session resources in an environment.
|
DataplexServiceClient.ListSessionsPagedResponse |
listSessions(ListSessionsRequest request)
Lists session resources in an environment.
|
DataplexServiceClient.ListSessionsPagedResponse |
listSessions(String parent)
Lists session resources in an environment.
|
com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,ListSessionsResponse> |
listSessionsCallable()
Lists session resources in an environment.
|
com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,DataplexServiceClient.ListSessionsPagedResponse> |
listSessionsPagedCallable()
Lists session resources in an environment.
|
DataplexServiceClient.ListTasksPagedResponse |
listTasks(LakeName parent)
Lists tasks under the given lake.
|
DataplexServiceClient.ListTasksPagedResponse |
listTasks(ListTasksRequest request)
Lists tasks under the given lake.
|
DataplexServiceClient.ListTasksPagedResponse |
listTasks(String parent)
Lists tasks under the given lake.
|
com.google.api.gax.rpc.UnaryCallable<ListTasksRequest,ListTasksResponse> |
listTasksCallable()
Lists tasks under the given lake.
|
com.google.api.gax.rpc.UnaryCallable<ListTasksRequest,DataplexServiceClient.ListTasksPagedResponse> |
listTasksPagedCallable()
Lists tasks under the given lake.
|
DataplexServiceClient.ListZoneActionsPagedResponse |
listZoneActions(ListZoneActionsRequest request)
Lists action resources in a zone.
|
DataplexServiceClient.ListZoneActionsPagedResponse |
listZoneActions(String parent)
Lists action resources in a zone.
|
DataplexServiceClient.ListZoneActionsPagedResponse |
listZoneActions(ZoneName parent)
Lists action resources in a zone.
|
com.google.api.gax.rpc.UnaryCallable<ListZoneActionsRequest,ListActionsResponse> |
listZoneActionsCallable()
Lists action resources in a zone.
|
com.google.api.gax.rpc.UnaryCallable<ListZoneActionsRequest,DataplexServiceClient.ListZoneActionsPagedResponse> |
listZoneActionsPagedCallable()
Lists action resources in a zone.
|
DataplexServiceClient.ListZonesPagedResponse |
listZones(LakeName parent)
Lists zone resources in a lake.
|
DataplexServiceClient.ListZonesPagedResponse |
listZones(ListZonesRequest request)
Lists zone resources in a lake.
|
DataplexServiceClient.ListZonesPagedResponse |
listZones(String parent)
Lists zone resources in a lake.
|
com.google.api.gax.rpc.UnaryCallable<ListZonesRequest,ListZonesResponse> |
listZonesCallable()
Lists zone resources in a lake.
|
com.google.api.gax.rpc.UnaryCallable<ListZonesRequest,DataplexServiceClient.ListZonesPagedResponse> |
listZonesPagedCallable()
Lists zone resources in a lake.
|
RunTaskResponse |
runTask(RunTaskRequest request)
Run an on demand execution of a Task.
|
RunTaskResponse |
runTask(String name)
Run an on demand execution of a Task.
|
RunTaskResponse |
runTask(TaskName name)
Run an on demand execution of a Task.
|
com.google.api.gax.rpc.UnaryCallable<RunTaskRequest,RunTaskResponse> |
runTaskCallable()
Run an on demand execution of a Task.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> |
updateAssetAsync(Asset asset,
com.google.protobuf.FieldMask updateMask)
Updates an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> |
updateAssetAsync(UpdateAssetRequest request)
Updates an asset resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateAssetRequest,com.google.longrunning.Operation> |
updateAssetCallable()
Updates an asset resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateAssetRequest,Asset,OperationMetadata> |
updateAssetOperationCallable()
Updates an asset resource.
|
com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> |
updateEnvironmentAsync(Environment environment,
com.google.protobuf.FieldMask updateMask)
Update the environment resource.
|
com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> |
updateEnvironmentAsync(UpdateEnvironmentRequest request)
Update the environment resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateEnvironmentRequest,com.google.longrunning.Operation> |
updateEnvironmentCallable()
Update the environment resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateEnvironmentRequest,Environment,OperationMetadata> |
updateEnvironmentOperationCallable()
Update the environment resource.
|
com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> |
updateLakeAsync(Lake lake,
com.google.protobuf.FieldMask updateMask)
Updates a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> |
updateLakeAsync(UpdateLakeRequest request)
Updates a lake resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateLakeRequest,com.google.longrunning.Operation> |
updateLakeCallable()
Updates a lake resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateLakeRequest,Lake,OperationMetadata> |
updateLakeOperationCallable()
Updates a lake resource.
|
com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> |
updateTaskAsync(Task task,
com.google.protobuf.FieldMask updateMask)
Update the task resource.
|
com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> |
updateTaskAsync(UpdateTaskRequest request)
Update the task resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTaskRequest,com.google.longrunning.Operation> |
updateTaskCallable()
Update the task resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateTaskRequest,Task,OperationMetadata> |
updateTaskOperationCallable()
Update the task resource.
|
com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> |
updateZoneAsync(UpdateZoneRequest request)
Updates a zone resource.
|
com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> |
updateZoneAsync(Zone zone,
com.google.protobuf.FieldMask updateMask)
Updates a zone resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateZoneRequest,com.google.longrunning.Operation> |
updateZoneCallable()
Updates a zone resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateZoneRequest,Zone,OperationMetadata> |
updateZoneOperationCallable()
Updates a zone resource.
|
protected DataplexServiceClient(DataplexServiceSettings settings) throws IOException
IOExceptionprotected DataplexServiceClient(DataplexServiceStub stub)
public static final DataplexServiceClient create() throws IOException
IOExceptionpublic static final DataplexServiceClient create(DataplexServiceSettings settings) throws IOException
IOExceptionpublic static final DataplexServiceClient create(DataplexServiceStub stub)
public final DataplexServiceSettings getSettings()
public DataplexServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> createLakeAsync(LocationName parent, Lake lake, String lakeId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Lake lake = Lake.newBuilder().build();
String lakeId = "lakeId-1110150390";
Lake response = dataplexServiceClient.createLakeAsync(parent, lake, lakeId).get();
}
parent - Required. The resource name of the lake location, of the form:
projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
region.lake - Required. Lake resourcelakeId - Required. Lake identifier. This ID will be used to generate names such as
database and dataset names when publishing metadata to Hive Metastore and BigQuery.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> createLakeAsync(String parent, Lake lake, String lakeId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Lake lake = Lake.newBuilder().build();
String lakeId = "lakeId-1110150390";
Lake response = dataplexServiceClient.createLakeAsync(parent, lake, lakeId).get();
}
parent - Required. The resource name of the lake location, of the form:
projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
region.lake - Required. Lake resourcelakeId - Required. Lake identifier. This ID will be used to generate names such as
database and dataset names when publishing metadata to Hive Metastore and BigQuery.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> createLakeAsync(CreateLakeRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateLakeRequest request =
CreateLakeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLakeId("lakeId-1110150390")
.setLake(Lake.newBuilder().build())
.setValidateOnly(true)
.build();
Lake response = dataplexServiceClient.createLakeAsync(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<CreateLakeRequest,Lake,OperationMetadata> createLakeOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateLakeRequest request =
CreateLakeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLakeId("lakeId-1110150390")
.setLake(Lake.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Lake, OperationMetadata> future =
dataplexServiceClient.createLakeOperationCallable().futureCall(request);
// Do something.
Lake response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateLakeRequest,com.google.longrunning.Operation> createLakeCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateLakeRequest request =
CreateLakeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLakeId("lakeId-1110150390")
.setLake(Lake.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.createLakeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> updateLakeAsync(Lake lake, 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
Lake lake = Lake.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Lake response = dataplexServiceClient.updateLakeAsync(lake, updateMask).get();
}
lake - Required. Update description. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> updateLakeAsync(UpdateLakeRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateLakeRequest request =
UpdateLakeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLake(Lake.newBuilder().build())
.setValidateOnly(true)
.build();
Lake response = dataplexServiceClient.updateLakeAsync(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<UpdateLakeRequest,Lake,OperationMetadata> updateLakeOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateLakeRequest request =
UpdateLakeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLake(Lake.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Lake, OperationMetadata> future =
dataplexServiceClient.updateLakeOperationCallable().futureCall(request);
// Do something.
Lake response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateLakeRequest,com.google.longrunning.Operation> updateLakeCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateLakeRequest request =
UpdateLakeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLake(Lake.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.updateLakeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLakeAsync(LakeName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName name = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
dataplexServiceClient.deleteLakeAsync(name).get();
}
name - Required. The resource name of the lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLakeAsync(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
dataplexServiceClient.deleteLakeAsync(name).get();
}
name - Required. The resource name of the lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLakeAsync(DeleteLakeRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteLakeRequest request =
DeleteLakeRequest.newBuilder()
.setName(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.build();
dataplexServiceClient.deleteLakeAsync(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<DeleteLakeRequest,com.google.protobuf.Empty,OperationMetadata> deleteLakeOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteLakeRequest request =
DeleteLakeRequest.newBuilder()
.setName(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
dataplexServiceClient.deleteLakeOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteLakeRequest,com.google.longrunning.Operation> deleteLakeCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteLakeRequest request =
DeleteLakeRequest.newBuilder()
.setName(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.build();
ApiFuture<Operation> future = dataplexServiceClient.deleteLakeCallable().futureCall(request);
// Do something.
future.get();
}
public final DataplexServiceClient.ListLakesPagedResponse listLakes(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Lake element : dataplexServiceClient.listLakes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the lake location, of the form:
`projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
region.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListLakesPagedResponse listLakes(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Lake element : dataplexServiceClient.listLakes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the lake location, of the form:
`projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
region.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListLakesPagedResponse listLakes(ListLakesRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLakesRequest request =
ListLakesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Lake element : dataplexServiceClient.listLakes(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<ListLakesRequest,DataplexServiceClient.ListLakesPagedResponse> listLakesPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLakesRequest request =
ListLakesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Lake> future = dataplexServiceClient.listLakesPagedCallable().futureCall(request);
// Do something.
for (Lake element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListLakesRequest,ListLakesResponse> listLakesCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLakesRequest request =
ListLakesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListLakesResponse response = dataplexServiceClient.listLakesCallable().call(request);
for (Lake element : response.getLakesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Lake getLake(LakeName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName name = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
Lake response = dataplexServiceClient.getLake(name);
}
name - Required. The resource name of the lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Lake getLake(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
Lake response = dataplexServiceClient.getLake(name);
}
name - Required. The resource name of the lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Lake getLake(GetLakeRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetLakeRequest request =
GetLakeRequest.newBuilder()
.setName(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.build();
Lake response = dataplexServiceClient.getLake(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<GetLakeRequest,Lake> getLakeCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetLakeRequest request =
GetLakeRequest.newBuilder()
.setName(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.build();
ApiFuture<Lake> future = dataplexServiceClient.getLakeCallable().futureCall(request);
// Do something.
Lake response = future.get();
}
public final DataplexServiceClient.ListLakeActionsPagedResponse listLakeActions(LakeName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
for (Action element : dataplexServiceClient.listLakeActions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListLakeActionsPagedResponse listLakeActions(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
for (Action element : dataplexServiceClient.listLakeActions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListLakeActionsPagedResponse listLakeActions(ListLakeActionsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLakeActionsRequest request =
ListLakeActionsRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Action element : dataplexServiceClient.listLakeActions(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<ListLakeActionsRequest,DataplexServiceClient.ListLakeActionsPagedResponse> listLakeActionsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLakeActionsRequest request =
ListLakeActionsRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Action> future =
dataplexServiceClient.listLakeActionsPagedCallable().futureCall(request);
// Do something.
for (Action element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListLakeActionsRequest,ListActionsResponse> listLakeActionsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLakeActionsRequest request =
ListLakeActionsRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListActionsResponse response =
dataplexServiceClient.listLakeActionsCallable().call(request);
for (Action element : response.getActionsList()) {
// 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<Zone,OperationMetadata> createZoneAsync(LakeName parent, Zone zone, String zoneId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
Zone zone = Zone.newBuilder().build();
String zoneId = "zoneId-696323609";
Zone response = dataplexServiceClient.createZoneAsync(parent, zone, zoneId).get();
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.zone - Required. Zone resource.zoneId - Required. Zone identifier. This ID will be used to generate names such as
database and dataset names when publishing metadata to Hive Metastore and BigQuery.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> createZoneAsync(String parent, Zone zone, String zoneId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
Zone zone = Zone.newBuilder().build();
String zoneId = "zoneId-696323609";
Zone response = dataplexServiceClient.createZoneAsync(parent, zone, zoneId).get();
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.zone - Required. Zone resource.zoneId - Required. Zone identifier. This ID will be used to generate names such as
database and dataset names when publishing metadata to Hive Metastore and BigQuery.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> createZoneAsync(CreateZoneRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateZoneRequest request =
CreateZoneRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setZoneId("zoneId-696323609")
.setZone(Zone.newBuilder().build())
.setValidateOnly(true)
.build();
Zone response = dataplexServiceClient.createZoneAsync(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<CreateZoneRequest,Zone,OperationMetadata> createZoneOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateZoneRequest request =
CreateZoneRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setZoneId("zoneId-696323609")
.setZone(Zone.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Zone, OperationMetadata> future =
dataplexServiceClient.createZoneOperationCallable().futureCall(request);
// Do something.
Zone response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateZoneRequest,com.google.longrunning.Operation> createZoneCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateZoneRequest request =
CreateZoneRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setZoneId("zoneId-696323609")
.setZone(Zone.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.createZoneCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> updateZoneAsync(Zone zone, 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
Zone zone = Zone.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Zone response = dataplexServiceClient.updateZoneAsync(zone, updateMask).get();
}
zone - Required. Update description. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> updateZoneAsync(UpdateZoneRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateZoneRequest request =
UpdateZoneRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setZone(Zone.newBuilder().build())
.setValidateOnly(true)
.build();
Zone response = dataplexServiceClient.updateZoneAsync(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<UpdateZoneRequest,Zone,OperationMetadata> updateZoneOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateZoneRequest request =
UpdateZoneRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setZone(Zone.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Zone, OperationMetadata> future =
dataplexServiceClient.updateZoneOperationCallable().futureCall(request);
// Do something.
Zone response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateZoneRequest,com.google.longrunning.Operation> updateZoneCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateZoneRequest request =
UpdateZoneRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setZone(Zone.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.updateZoneCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(ZoneName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
dataplexServiceClient.deleteZoneAsync(name).get();
}
name - Required. The resource name of the zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
dataplexServiceClient.deleteZoneAsync(name).get();
}
name - Required. The resource name of the zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(DeleteZoneRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteZoneRequest request =
DeleteZoneRequest.newBuilder()
.setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.build();
dataplexServiceClient.deleteZoneAsync(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<DeleteZoneRequest,com.google.protobuf.Empty,OperationMetadata> deleteZoneOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteZoneRequest request =
DeleteZoneRequest.newBuilder()
.setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
dataplexServiceClient.deleteZoneOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteZoneRequest,com.google.longrunning.Operation> deleteZoneCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteZoneRequest request =
DeleteZoneRequest.newBuilder()
.setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.build();
ApiFuture<Operation> future = dataplexServiceClient.deleteZoneCallable().futureCall(request);
// Do something.
future.get();
}
public final DataplexServiceClient.ListZonesPagedResponse listZones(LakeName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
for (Zone element : dataplexServiceClient.listZones(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListZonesPagedResponse listZones(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
for (Zone element : dataplexServiceClient.listZones(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListZonesPagedResponse listZones(ListZonesRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListZonesRequest request =
ListZonesRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Zone element : dataplexServiceClient.listZones(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<ListZonesRequest,DataplexServiceClient.ListZonesPagedResponse> listZonesPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListZonesRequest request =
ListZonesRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Zone> future = dataplexServiceClient.listZonesPagedCallable().futureCall(request);
// Do something.
for (Zone element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListZonesRequest,ListZonesResponse> listZonesCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListZonesRequest request =
ListZonesRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListZonesResponse response = dataplexServiceClient.listZonesCallable().call(request);
for (Zone element : response.getZonesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Zone getZone(ZoneName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
Zone response = dataplexServiceClient.getZone(name);
}
name - Required. The resource name of the zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Zone getZone(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
Zone response = dataplexServiceClient.getZone(name);
}
name - Required. The resource name of the zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Zone getZone(GetZoneRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetZoneRequest request =
GetZoneRequest.newBuilder()
.setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.build();
Zone response = dataplexServiceClient.getZone(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<GetZoneRequest,Zone> getZoneCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetZoneRequest request =
GetZoneRequest.newBuilder()
.setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.build();
ApiFuture<Zone> future = dataplexServiceClient.getZoneCallable().futureCall(request);
// Do something.
Zone response = future.get();
}
public final DataplexServiceClient.ListZoneActionsPagedResponse listZoneActions(ZoneName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
for (Action element : dataplexServiceClient.listZoneActions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListZoneActionsPagedResponse listZoneActions(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
for (Action element : dataplexServiceClient.listZoneActions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListZoneActionsPagedResponse listZoneActions(ListZoneActionsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListZoneActionsRequest request =
ListZoneActionsRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Action element : dataplexServiceClient.listZoneActions(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<ListZoneActionsRequest,DataplexServiceClient.ListZoneActionsPagedResponse> listZoneActionsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListZoneActionsRequest request =
ListZoneActionsRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Action> future =
dataplexServiceClient.listZoneActionsPagedCallable().futureCall(request);
// Do something.
for (Action element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListZoneActionsRequest,ListActionsResponse> listZoneActionsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListZoneActionsRequest request =
ListZoneActionsRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListActionsResponse response =
dataplexServiceClient.listZoneActionsCallable().call(request);
for (Action element : response.getActionsList()) {
// 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<Asset,OperationMetadata> createAssetAsync(ZoneName parent, Asset asset, String assetId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
Asset asset = Asset.newBuilder().build();
String assetId = "assetId-704776149";
Asset response = dataplexServiceClient.createAssetAsync(parent, asset, assetId).get();
}
parent - Required. The resource name of the parent zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.asset - Required. Asset resource.assetId - Required. Asset identifier. This ID will be used to generate names such as table
names when publishing metadata to Hive Metastore and BigQuery.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> createAssetAsync(String parent, Asset asset, String assetId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
Asset asset = Asset.newBuilder().build();
String assetId = "assetId-704776149";
Asset response = dataplexServiceClient.createAssetAsync(parent, asset, assetId).get();
}
parent - Required. The resource name of the parent zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.asset - Required. Asset resource.assetId - Required. Asset identifier. This ID will be used to generate names such as table
names when publishing metadata to Hive Metastore and BigQuery.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> createAssetAsync(CreateAssetRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateAssetRequest request =
CreateAssetRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setAssetId("assetId-704776149")
.setAsset(Asset.newBuilder().build())
.setValidateOnly(true)
.build();
Asset response = dataplexServiceClient.createAssetAsync(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<CreateAssetRequest,Asset,OperationMetadata> createAssetOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateAssetRequest request =
CreateAssetRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setAssetId("assetId-704776149")
.setAsset(Asset.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Asset, OperationMetadata> future =
dataplexServiceClient.createAssetOperationCallable().futureCall(request);
// Do something.
Asset response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAssetRequest,com.google.longrunning.Operation> createAssetCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateAssetRequest request =
CreateAssetRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setAssetId("assetId-704776149")
.setAsset(Asset.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.createAssetCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> updateAssetAsync(Asset asset, 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
Asset asset = Asset.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Asset response = dataplexServiceClient.updateAssetAsync(asset, updateMask).get();
}
asset - Required. Update description. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> updateAssetAsync(UpdateAssetRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateAssetRequest request =
UpdateAssetRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAsset(Asset.newBuilder().build())
.setValidateOnly(true)
.build();
Asset response = dataplexServiceClient.updateAssetAsync(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<UpdateAssetRequest,Asset,OperationMetadata> updateAssetOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateAssetRequest request =
UpdateAssetRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAsset(Asset.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Asset, OperationMetadata> future =
dataplexServiceClient.updateAssetOperationCallable().futureCall(request);
// Do something.
Asset response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAssetRequest,com.google.longrunning.Operation> updateAssetCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateAssetRequest request =
UpdateAssetRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAsset(Asset.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.updateAssetCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(AssetName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]");
dataplexServiceClient.deleteAssetAsync(name).get();
}
name - Required. The resource name of the asset:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name =
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString();
dataplexServiceClient.deleteAssetAsync(name).get();
}
name - Required. The resource name of the asset:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(DeleteAssetRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteAssetRequest request =
DeleteAssetRequest.newBuilder()
.setName(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.build();
dataplexServiceClient.deleteAssetAsync(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<DeleteAssetRequest,com.google.protobuf.Empty,OperationMetadata> deleteAssetOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteAssetRequest request =
DeleteAssetRequest.newBuilder()
.setName(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
dataplexServiceClient.deleteAssetOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAssetRequest,com.google.longrunning.Operation> deleteAssetCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteAssetRequest request =
DeleteAssetRequest.newBuilder()
.setName(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.build();
ApiFuture<Operation> future = dataplexServiceClient.deleteAssetCallable().futureCall(request);
// Do something.
future.get();
}
public final DataplexServiceClient.ListAssetsPagedResponse listAssets(ZoneName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
for (Asset element : dataplexServiceClient.listAssets(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListAssetsPagedResponse listAssets(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
for (Asset element : dataplexServiceClient.listAssets(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent zone:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListAssetsPagedResponse listAssets(ListAssetsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListAssetsRequest request =
ListAssetsRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Asset element : dataplexServiceClient.listAssets(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<ListAssetsRequest,DataplexServiceClient.ListAssetsPagedResponse> listAssetsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListAssetsRequest request =
ListAssetsRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Asset> future = dataplexServiceClient.listAssetsPagedCallable().futureCall(request);
// Do something.
for (Asset element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListAssetsRequest request =
ListAssetsRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAssetsResponse response = dataplexServiceClient.listAssetsCallable().call(request);
for (Asset element : response.getAssetsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Asset getAsset(AssetName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]");
Asset response = dataplexServiceClient.getAsset(name);
}
name - Required. The resource name of the asset:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset getAsset(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name =
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString();
Asset response = dataplexServiceClient.getAsset(name);
}
name - Required. The resource name of the asset:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset getAsset(GetAssetRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetAssetRequest request =
GetAssetRequest.newBuilder()
.setName(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.build();
Asset response = dataplexServiceClient.getAsset(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<GetAssetRequest,Asset> getAssetCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetAssetRequest request =
GetAssetRequest.newBuilder()
.setName(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.build();
ApiFuture<Asset> future = dataplexServiceClient.getAssetCallable().futureCall(request);
// Do something.
Asset response = future.get();
}
public final DataplexServiceClient.ListAssetActionsPagedResponse listAssetActions(AssetName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
AssetName parent = AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]");
for (Action element : dataplexServiceClient.listAssetActions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent asset:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListAssetActionsPagedResponse listAssetActions(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent =
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString();
for (Action element : dataplexServiceClient.listAssetActions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent asset:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListAssetActionsPagedResponse listAssetActions(ListAssetActionsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListAssetActionsRequest request =
ListAssetActionsRequest.newBuilder()
.setParent(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Action element : dataplexServiceClient.listAssetActions(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<ListAssetActionsRequest,DataplexServiceClient.ListAssetActionsPagedResponse> listAssetActionsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListAssetActionsRequest request =
ListAssetActionsRequest.newBuilder()
.setParent(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Action> future =
dataplexServiceClient.listAssetActionsPagedCallable().futureCall(request);
// Do something.
for (Action element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAssetActionsRequest,ListActionsResponse> listAssetActionsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListAssetActionsRequest request =
ListAssetActionsRequest.newBuilder()
.setParent(
AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListActionsResponse response =
dataplexServiceClient.listAssetActionsCallable().call(request);
for (Action element : response.getActionsList()) {
// 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<Task,OperationMetadata> createTaskAsync(LakeName parent, Task task, String taskId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
Task task = Task.newBuilder().build();
String taskId = "taskId-880873088";
Task response = dataplexServiceClient.createTaskAsync(parent, task, taskId).get();
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.task - Required. Task resource.taskId - Required. Task identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> createTaskAsync(String parent, Task task, String taskId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
Task task = Task.newBuilder().build();
String taskId = "taskId-880873088";
Task response = dataplexServiceClient.createTaskAsync(parent, task, taskId).get();
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.task - Required. Task resource.taskId - Required. Task identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> createTaskAsync(CreateTaskRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateTaskRequest request =
CreateTaskRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setTaskId("taskId-880873088")
.setTask(Task.newBuilder().build())
.setValidateOnly(true)
.build();
Task response = dataplexServiceClient.createTaskAsync(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<CreateTaskRequest,Task,OperationMetadata> createTaskOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateTaskRequest request =
CreateTaskRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setTaskId("taskId-880873088")
.setTask(Task.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Task, OperationMetadata> future =
dataplexServiceClient.createTaskOperationCallable().futureCall(request);
// Do something.
Task response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateTaskRequest,com.google.longrunning.Operation> createTaskCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateTaskRequest request =
CreateTaskRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setTaskId("taskId-880873088")
.setTask(Task.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.createTaskCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> updateTaskAsync(Task task, 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
Task task = Task.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Task response = dataplexServiceClient.updateTaskAsync(task, updateMask).get();
}
task - Required. Update description. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> updateTaskAsync(UpdateTaskRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateTaskRequest request =
UpdateTaskRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTask(Task.newBuilder().build())
.setValidateOnly(true)
.build();
Task response = dataplexServiceClient.updateTaskAsync(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<UpdateTaskRequest,Task,OperationMetadata> updateTaskOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateTaskRequest request =
UpdateTaskRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTask(Task.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Task, OperationMetadata> future =
dataplexServiceClient.updateTaskOperationCallable().futureCall(request);
// Do something.
Task response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateTaskRequest,com.google.longrunning.Operation> updateTaskCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateTaskRequest request =
UpdateTaskRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTask(Task.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = dataplexServiceClient.updateTaskCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTaskAsync(TaskName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]");
dataplexServiceClient.deleteTaskAsync(name).get();
}
name - Required. The resource name of the task:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTaskAsync(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString();
dataplexServiceClient.deleteTaskAsync(name).get();
}
name - Required. The resource name of the task:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTaskAsync(DeleteTaskRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteTaskRequest request =
DeleteTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.build();
dataplexServiceClient.deleteTaskAsync(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<DeleteTaskRequest,com.google.protobuf.Empty,OperationMetadata> deleteTaskOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteTaskRequest request =
DeleteTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
dataplexServiceClient.deleteTaskOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteTaskRequest,com.google.longrunning.Operation> deleteTaskCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteTaskRequest request =
DeleteTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.build();
ApiFuture<Operation> future = dataplexServiceClient.deleteTaskCallable().futureCall(request);
// Do something.
future.get();
}
public final DataplexServiceClient.ListTasksPagedResponse listTasks(LakeName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
for (Task element : dataplexServiceClient.listTasks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListTasksPagedResponse listTasks(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
for (Task element : dataplexServiceClient.listTasks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListTasksPagedResponse listTasks(ListTasksRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListTasksRequest request =
ListTasksRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Task element : dataplexServiceClient.listTasks(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<ListTasksRequest,DataplexServiceClient.ListTasksPagedResponse> listTasksPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListTasksRequest request =
ListTasksRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Task> future = dataplexServiceClient.listTasksPagedCallable().futureCall(request);
// Do something.
for (Task element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTasksRequest,ListTasksResponse> listTasksCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListTasksRequest request =
ListTasksRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListTasksResponse response = dataplexServiceClient.listTasksCallable().call(request);
for (Task element : response.getTasksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Task getTask(TaskName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]");
Task response = dataplexServiceClient.getTask(name);
}
name - Required. The resource name of the task:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Task getTask(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString();
Task response = dataplexServiceClient.getTask(name);
}
name - Required. The resource name of the task:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Task getTask(GetTaskRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetTaskRequest request =
GetTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.build();
Task response = dataplexServiceClient.getTask(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<GetTaskRequest,Task> getTaskCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetTaskRequest request =
GetTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.build();
ApiFuture<Task> future = dataplexServiceClient.getTaskCallable().futureCall(request);
// Do something.
Task response = future.get();
}
public final DataplexServiceClient.ListJobsPagedResponse listJobs(TaskName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
TaskName parent = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]");
for (Job element : dataplexServiceClient.listJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent environment:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListJobsPagedResponse listJobs(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString();
for (Job element : dataplexServiceClient.listJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent environment:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListJobsPagedResponse listJobs(ListJobsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListJobsRequest request =
ListJobsRequest.newBuilder()
.setParent(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Job element : dataplexServiceClient.listJobs(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<ListJobsRequest,DataplexServiceClient.ListJobsPagedResponse> listJobsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListJobsRequest request =
ListJobsRequest.newBuilder()
.setParent(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Job> future = dataplexServiceClient.listJobsPagedCallable().futureCall(request);
// Do something.
for (Job element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListJobsRequest,ListJobsResponse> listJobsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListJobsRequest request =
ListJobsRequest.newBuilder()
.setParent(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListJobsResponse response = dataplexServiceClient.listJobsCallable().call(request);
for (Job element : response.getJobsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final RunTaskResponse runTask(TaskName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]");
RunTaskResponse response = dataplexServiceClient.runTask(name);
}
name - Required. The resource name of the task:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RunTaskResponse runTask(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString();
RunTaskResponse response = dataplexServiceClient.runTask(name);
}
name - Required. The resource name of the task:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RunTaskResponse runTask(RunTaskRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
RunTaskRequest request =
RunTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.putAllLabels(new HashMap<String, String>())
.putAllArgs(new HashMap<String, String>())
.build();
RunTaskResponse response = dataplexServiceClient.runTask(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<RunTaskRequest,RunTaskResponse> runTaskCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
RunTaskRequest request =
RunTaskRequest.newBuilder()
.setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString())
.putAllLabels(new HashMap<String, String>())
.putAllArgs(new HashMap<String, String>())
.build();
ApiFuture<RunTaskResponse> future =
dataplexServiceClient.runTaskCallable().futureCall(request);
// Do something.
RunTaskResponse response = future.get();
}
public final Job getJob(JobName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]");
Job response = dataplexServiceClient.getJob(name);
}
name - Required. The resource name of the job:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Job getJob(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]").toString();
Job response = dataplexServiceClient.getJob(name);
}
name - Required. The resource name of the job:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Job getJob(GetJobRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetJobRequest request =
GetJobRequest.newBuilder()
.setName(
JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]").toString())
.build();
Job response = dataplexServiceClient.getJob(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<GetJobRequest,Job> getJobCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetJobRequest request =
GetJobRequest.newBuilder()
.setName(
JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]").toString())
.build();
ApiFuture<Job> future = dataplexServiceClient.getJobCallable().futureCall(request);
// Do something.
Job response = future.get();
}
public final void cancelJob(JobName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]");
dataplexServiceClient.cancelJob(name);
}
name - Required. The resource name of the job:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void cancelJob(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name = JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]").toString();
dataplexServiceClient.cancelJob(name);
}
name - Required. The resource name of the job:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void cancelJob(CancelJobRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CancelJobRequest request =
CancelJobRequest.newBuilder()
.setName(
JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]").toString())
.build();
dataplexServiceClient.cancelJob(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<CancelJobRequest,com.google.protobuf.Empty> cancelJobCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CancelJobRequest request =
CancelJobRequest.newBuilder()
.setName(
JobName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]", "[JOB]").toString())
.build();
ApiFuture<Empty> future = dataplexServiceClient.cancelJobCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(LakeName parent, Environment environment, String environmentId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
Environment environment = Environment.newBuilder().build();
String environmentId = "environmentId-950205810";
Environment response =
dataplexServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
}
parent - Required. The resource name of the parent lake:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.environment - Required. Environment resource.environmentId - Required. Environment identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(String parent, Environment environment, String environmentId)
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
Environment environment = Environment.newBuilder().build();
String environmentId = "environmentId-950205810";
Environment response =
dataplexServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
}
parent - Required. The resource name of the parent lake:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.environment - Required. Environment resource.environmentId - Required. Environment identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(CreateEnvironmentRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateEnvironmentRequest request =
CreateEnvironmentRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setEnvironmentId("environmentId-950205810")
.setEnvironment(Environment.newBuilder().build())
.setValidateOnly(true)
.build();
Environment response = dataplexServiceClient.createEnvironmentAsync(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<CreateEnvironmentRequest,Environment,OperationMetadata> createEnvironmentOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateEnvironmentRequest request =
CreateEnvironmentRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setEnvironmentId("environmentId-950205810")
.setEnvironment(Environment.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Environment, OperationMetadata> future =
dataplexServiceClient.createEnvironmentOperationCallable().futureCall(request);
// Do something.
Environment response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateEnvironmentRequest,com.google.longrunning.Operation> createEnvironmentCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
CreateEnvironmentRequest request =
CreateEnvironmentRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setEnvironmentId("environmentId-950205810")
.setEnvironment(Environment.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataplexServiceClient.createEnvironmentCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> updateEnvironmentAsync(Environment environment, 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
Environment environment = Environment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Environment response =
dataplexServiceClient.updateEnvironmentAsync(environment, updateMask).get();
}
environment - Required. Update description. Only fields specified in `update_mask` are
updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> updateEnvironmentAsync(UpdateEnvironmentRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateEnvironmentRequest request =
UpdateEnvironmentRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setEnvironment(Environment.newBuilder().build())
.setValidateOnly(true)
.build();
Environment response = dataplexServiceClient.updateEnvironmentAsync(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<UpdateEnvironmentRequest,Environment,OperationMetadata> updateEnvironmentOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateEnvironmentRequest request =
UpdateEnvironmentRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setEnvironment(Environment.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Environment, OperationMetadata> future =
dataplexServiceClient.updateEnvironmentOperationCallable().futureCall(request);
// Do something.
Environment response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateEnvironmentRequest,com.google.longrunning.Operation> updateEnvironmentCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
UpdateEnvironmentRequest request =
UpdateEnvironmentRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setEnvironment(Environment.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataplexServiceClient.updateEnvironmentCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentAsync(EnvironmentName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
EnvironmentName name =
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]");
dataplexServiceClient.deleteEnvironmentAsync(name).get();
}
name - Required. The resource name of the environment:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentAsync(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name =
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]").toString();
dataplexServiceClient.deleteEnvironmentAsync(name).get();
}
name - Required. The resource name of the environment:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentAsync(DeleteEnvironmentRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteEnvironmentRequest request =
DeleteEnvironmentRequest.newBuilder()
.setName(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.build();
dataplexServiceClient.deleteEnvironmentAsync(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<DeleteEnvironmentRequest,com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentOperationCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteEnvironmentRequest request =
DeleteEnvironmentRequest.newBuilder()
.setName(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
dataplexServiceClient.deleteEnvironmentOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteEnvironmentRequest,com.google.longrunning.Operation> deleteEnvironmentCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
DeleteEnvironmentRequest request =
DeleteEnvironmentRequest.newBuilder()
.setName(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.build();
ApiFuture<Operation> future =
dataplexServiceClient.deleteEnvironmentCallable().futureCall(request);
// Do something.
future.get();
}
public final DataplexServiceClient.ListEnvironmentsPagedResponse listEnvironments(LakeName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
for (Environment element : dataplexServiceClient.listEnvironments(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListEnvironmentsPagedResponse listEnvironments(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
for (Environment element : dataplexServiceClient.listEnvironments(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent lake:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListEnvironmentsRequest request =
ListEnvironmentsRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Environment element : dataplexServiceClient.listEnvironments(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<ListEnvironmentsRequest,DataplexServiceClient.ListEnvironmentsPagedResponse> listEnvironmentsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListEnvironmentsRequest request =
ListEnvironmentsRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Environment> future =
dataplexServiceClient.listEnvironmentsPagedCallable().futureCall(request);
// Do something.
for (Environment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsResponse> listEnvironmentsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListEnvironmentsRequest request =
ListEnvironmentsRequest.newBuilder()
.setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListEnvironmentsResponse response =
dataplexServiceClient.listEnvironmentsCallable().call(request);
for (Environment element : response.getEnvironmentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Environment getEnvironment(EnvironmentName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
EnvironmentName name =
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]");
Environment response = dataplexServiceClient.getEnvironment(name);
}
name - Required. The resource name of the environment:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Environment getEnvironment(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String name =
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]").toString();
Environment response = dataplexServiceClient.getEnvironment(name);
}
name - Required. The resource name of the environment:
`projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Environment getEnvironment(GetEnvironmentRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetEnvironmentRequest request =
GetEnvironmentRequest.newBuilder()
.setName(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.build();
Environment response = dataplexServiceClient.getEnvironment(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<GetEnvironmentRequest,Environment> getEnvironmentCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetEnvironmentRequest request =
GetEnvironmentRequest.newBuilder()
.setName(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.build();
ApiFuture<Environment> future =
dataplexServiceClient.getEnvironmentCallable().futureCall(request);
// Do something.
Environment response = future.get();
}
public final DataplexServiceClient.ListSessionsPagedResponse listSessions(EnvironmentName 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
EnvironmentName parent =
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]");
for (Session element : dataplexServiceClient.listSessions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent environment:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListSessionsPagedResponse listSessions(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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
String parent =
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]").toString();
for (Session element : dataplexServiceClient.listSessions(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent environment:
`projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataplexServiceClient.ListSessionsPagedResponse listSessions(ListSessionsRequest 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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListSessionsRequest request =
ListSessionsRequest.newBuilder()
.setParent(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (Session element : dataplexServiceClient.listSessions(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<ListSessionsRequest,DataplexServiceClient.ListSessionsPagedResponse> listSessionsPagedCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListSessionsRequest request =
ListSessionsRequest.newBuilder()
.setParent(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<Session> future =
dataplexServiceClient.listSessionsPagedCallable().futureCall(request);
// Do something.
for (Session element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,ListSessionsResponse> listSessionsCallable()
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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListSessionsRequest request =
ListSessionsRequest.newBuilder()
.setParent(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListSessionsResponse response = dataplexServiceClient.listSessionsCallable().call(request);
for (Session element : response.getSessionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DataplexServiceClient.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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : dataplexServiceClient.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,DataplexServiceClient.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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
dataplexServiceClient.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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
dataplexServiceClient.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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = dataplexServiceClient.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 (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = dataplexServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location 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 © 2023 Google LLC. All rights reserved.