Class DataplexServiceClient
- java.lang.Object
-
- com.google.cloud.dataplex.v1.DataplexServiceClient
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@Generated("by gapic-generator-java") public class DataplexServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
Service Description: Dataplex service provides data lakes as a service. The primary resources offered by this service are Lakes, Zones and Assets which collectively allow a data administrator to organize, manage, secure and catalog data across their organization located across cloud projects in a variety of storage systems including Cloud Storage and BigQuery.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:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
-
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
DataplexServiceClient(DataplexServiceSettings settings)
Constructs an instance of DataplexServiceClient, using the given settings.protected
DataplexServiceClient(DataplexServiceStub stub)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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(ZoneName parent, Asset asset, String assetId)
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.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(TaskName name)
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.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(ZoneName name)
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.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(TaskName name)
Get task resource.Task
getTask(String 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(ZoneName name)
Retrieves a zone resource.Zone
getZone(String 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(ZoneName parent)
Lists asset resources in a zone.DataplexServiceClient.ListAssetsPagedResponse
listAssets(String 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(TaskName parent)
Lists Jobs under the given task.DataplexServiceClient.ListJobsPagedResponse
listJobs(String 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(ZoneName parent)
Lists action resources in a zone.DataplexServiceClient.ListZoneActionsPagedResponse
listZoneActions(String 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(TaskName name)
Run an on demand execution of a Task.RunTaskResponse
runTask(String 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.
-
-
-
Constructor Detail
-
DataplexServiceClient
protected DataplexServiceClient(DataplexServiceSettings settings) throws IOException
Constructs an instance of DataplexServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
DataplexServiceClient
protected DataplexServiceClient(DataplexServiceStub stub)
-
-
Method Detail
-
create
public static final DataplexServiceClient create() throws IOException
Constructs an instance of DataplexServiceClient with default settings.- Throws:
IOException
-
create
public static final DataplexServiceClient create(DataplexServiceSettings settings) throws IOException
Constructs an instance of DataplexServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
public static final DataplexServiceClient create(DataplexServiceStub stub)
Constructs an instance of DataplexServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataplexServiceSettings).
-
getSettings
public final DataplexServiceSettings getSettings()
-
getStub
public DataplexServiceStub getStub()
-
getOperationsClient
public final 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.
-
getHttpJsonOperationsClient
@BetaApi public final 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.
-
createLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> createLakeAsync(LocationName parent, Lake lake, String lakeId)
Creates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must end with a number or a letter.
- Must be between 1-63 characters.
- Must be unique within the customer project / location.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> createLakeAsync(String parent, Lake lake, String lakeId)
Creates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must end with a number or a letter.
- Must be between 1-63 characters.
- Must be unique within the customer project / location.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> createLakeAsync(CreateLakeRequest request)
Creates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createLakeOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateLakeRequest,Lake,OperationMetadata> createLakeOperationCallable()
Creates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
createLakeCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateLakeRequest,com.google.longrunning.Operation> createLakeCallable()
Creates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> updateLakeAsync(Lake lake, com.google.protobuf.FieldMask updateMask)
Updates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
lake
- Required. Update description. Only fields specified in `update_mask` are updated.updateMask
- Required. Mask of fields to update.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<Lake,OperationMetadata> updateLakeAsync(UpdateLakeRequest request)
Updates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateLakeOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateLakeRequest,Lake,OperationMetadata> updateLakeOperationCallable()
Updates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateLakeCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateLakeRequest,com.google.longrunning.Operation> updateLakeCallable()
Updates a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLakeAsync(LakeName name)
Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLakeAsync(String name)
Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteLakeAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLakeAsync(DeleteLakeRequest request)
Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteLakeOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteLakeRequest,com.google.protobuf.Empty,OperationMetadata> deleteLakeOperationCallable()
Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteLakeCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteLakeRequest,com.google.longrunning.Operation> deleteLakeCallable()
Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listLakes
public final DataplexServiceClient.ListLakesPagedResponse listLakes(LocationName parent)
Lists lake resources in a project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Lake element : dataplexServiceClient.listLakes(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
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.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLakes
public final DataplexServiceClient.ListLakesPagedResponse listLakes(String parent)
Lists lake resources in a project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Lake element : dataplexServiceClient.listLakes(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
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.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLakes
public final DataplexServiceClient.ListLakesPagedResponse listLakes(ListLakesRequest request)
Lists lake resources in a project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLakesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListLakesRequest,DataplexServiceClient.ListLakesPagedResponse> listLakesPagedCallable()
Lists lake resources in a project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }
-
listLakesCallable
public final com.google.api.gax.rpc.UnaryCallable<ListLakesRequest,ListLakesResponse> listLakesCallable()
Lists lake resources in a project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } }
-
getLake
public final Lake getLake(LakeName name)
Retrieves a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getLake
public final Lake getLake(String name)
Retrieves a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getLake
public final Lake getLake(GetLakeRequest request)
Retrieves a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getLakeCallable
public final com.google.api.gax.rpc.UnaryCallable<GetLakeRequest,Lake> getLakeCallable()
Retrieves a lake resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listLakeActions
public final DataplexServiceClient.ListLakeActionsPagedResponse listLakeActions(LakeName parent)
Lists action resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLakeActions
public final DataplexServiceClient.ListLakeActionsPagedResponse listLakeActions(String parent)
Lists action resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLakeActions
public final DataplexServiceClient.ListLakeActionsPagedResponse listLakeActions(ListLakeActionsRequest request)
Lists action resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLakeActionsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListLakeActionsRequest,DataplexServiceClient.ListLakeActionsPagedResponse> listLakeActionsPagedCallable()
Lists action resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listLakeActionsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListLakeActionsRequest,ListActionsResponse> listLakeActionsCallable()
Lists action resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
createZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> createZoneAsync(LakeName parent, Zone zone, String zoneId)
Creates a zone resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must end with a number or a letter.
- Must be between 1-63 characters.
- Must be unique across all lakes from all locations in a project.
- Must not be one of the reserved IDs (i.e. "default", "global-temp")
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> createZoneAsync(String parent, Zone zone, String zoneId)
Creates a zone resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must end with a number or a letter.
- Must be between 1-63 characters.
- Must be unique across all lakes from all locations in a project.
- Must not be one of the reserved IDs (i.e. "default", "global-temp")
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> createZoneAsync(CreateZoneRequest request)
Creates a zone resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createZoneOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateZoneRequest,Zone,OperationMetadata> createZoneOperationCallable()
Creates a zone resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
createZoneCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateZoneRequest,com.google.longrunning.Operation> createZoneCallable()
Creates a zone resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> updateZoneAsync(Zone zone, com.google.protobuf.FieldMask updateMask)
Updates a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
zone
- Required. Update description. Only fields specified in `update_mask` are updated.updateMask
- Required. Mask of fields to update.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<Zone,OperationMetadata> updateZoneAsync(UpdateZoneRequest request)
Updates a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateZoneOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateZoneRequest,Zone,OperationMetadata> updateZoneOperationCallable()
Updates a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateZoneCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateZoneRequest,com.google.longrunning.Operation> updateZoneCallable()
Updates a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(ZoneName name)
Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(String name)
Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteZoneAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(DeleteZoneRequest request)
Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteZoneOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteZoneRequest,com.google.protobuf.Empty,OperationMetadata> deleteZoneOperationCallable()
Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteZoneCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteZoneRequest,com.google.longrunning.Operation> deleteZoneCallable()
Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listZones
public final DataplexServiceClient.ListZonesPagedResponse listZones(LakeName parent)
Lists zone resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listZones
public final DataplexServiceClient.ListZonesPagedResponse listZones(String parent)
Lists zone resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listZones
public final DataplexServiceClient.ListZonesPagedResponse listZones(ListZonesRequest request)
Lists zone resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listZonesPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListZonesRequest,DataplexServiceClient.ListZonesPagedResponse> listZonesPagedCallable()
Lists zone resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listZonesCallable
public final com.google.api.gax.rpc.UnaryCallable<ListZonesRequest,ListZonesResponse> listZonesCallable()
Lists zone resources in a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
getZone
public final Zone getZone(ZoneName name)
Retrieves a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getZone
public final Zone getZone(String name)
Retrieves a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getZone
public final Zone getZone(GetZoneRequest request)
Retrieves a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getZoneCallable
public final com.google.api.gax.rpc.UnaryCallable<GetZoneRequest,Zone> getZoneCallable()
Retrieves a zone resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listZoneActions
public final DataplexServiceClient.ListZoneActionsPagedResponse listZoneActions(ZoneName parent)
Lists action resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listZoneActions
public final DataplexServiceClient.ListZoneActionsPagedResponse listZoneActions(String parent)
Lists action resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listZoneActions
public final DataplexServiceClient.ListZoneActionsPagedResponse listZoneActions(ListZoneActionsRequest request)
Lists action resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listZoneActionsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListZoneActionsRequest,DataplexServiceClient.ListZoneActionsPagedResponse> listZoneActionsPagedCallable()
Lists action resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listZoneActionsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListZoneActionsRequest,ListActionsResponse> listZoneActionsCallable()
Lists action resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
createAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> createAssetAsync(ZoneName parent, Asset asset, String assetId)
Creates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must end with a number or a letter.
- Must be between 1-63 characters.
- Must be unique within the zone.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> createAssetAsync(String parent, Asset asset, String assetId)
Creates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must end with a number or a letter.
- Must be between 1-63 characters.
- Must be unique within the zone.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> createAssetAsync(CreateAssetRequest request)
Creates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createAssetOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateAssetRequest,Asset,OperationMetadata> createAssetOperationCallable()
Creates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
createAssetCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateAssetRequest,com.google.longrunning.Operation> createAssetCallable()
Creates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> updateAssetAsync(Asset asset, com.google.protobuf.FieldMask updateMask)
Updates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
asset
- Required. Update description. Only fields specified in `update_mask` are updated.updateMask
- Required. Mask of fields to update.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<Asset,OperationMetadata> updateAssetAsync(UpdateAssetRequest request)
Updates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateAssetOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateAssetRequest,Asset,OperationMetadata> updateAssetOperationCallable()
Updates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateAssetCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateAssetRequest,com.google.longrunning.Operation> updateAssetCallable()
Updates an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(AssetName name)
Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the asset: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(String name)
Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the asset: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteAssetAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(DeleteAssetRequest request)
Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteAssetOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty,OperationMetadata> deleteAssetOperationCallable()
Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteAssetCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteAssetRequest,com.google.longrunning.Operation> deleteAssetCallable()
Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listAssets
public final DataplexServiceClient.ListAssetsPagedResponse listAssets(ZoneName parent)
Lists asset resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listAssets
public final DataplexServiceClient.ListAssetsPagedResponse listAssets(String parent)
Lists asset resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent zone: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listAssets
public final DataplexServiceClient.ListAssetsPagedResponse listAssets(ListAssetsRequest request)
Lists asset resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listAssetsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,DataplexServiceClient.ListAssetsPagedResponse> listAssetsPagedCallable()
Lists asset resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listAssetsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()
Lists asset resources in a zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
getAsset
public final Asset getAsset(AssetName name)
Retrieves an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the asset: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getAsset
public final Asset getAsset(String name)
Retrieves an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the asset: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getAsset
public final Asset getAsset(GetAssetRequest request)
Retrieves an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getAssetCallable
public final com.google.api.gax.rpc.UnaryCallable<GetAssetRequest,Asset> getAssetCallable()
Retrieves an asset resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listAssetActions
public final DataplexServiceClient.ListAssetActionsPagedResponse listAssetActions(AssetName parent)
Lists action resources in an asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent asset: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listAssetActions
public final DataplexServiceClient.ListAssetActionsPagedResponse listAssetActions(String parent)
Lists action resources in an asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent asset: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listAssetActions
public final DataplexServiceClient.ListAssetActionsPagedResponse listAssetActions(ListAssetActionsRequest request)
Lists action resources in an asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listAssetActionsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListAssetActionsRequest,DataplexServiceClient.ListAssetActionsPagedResponse> listAssetActionsPagedCallable()
Lists action resources in an asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listAssetActionsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListAssetActionsRequest,ListActionsResponse> listAssetActionsCallable()
Lists action resources in an asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
createTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> createTaskAsync(LakeName parent, Task task, String taskId)
Creates a task resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> createTaskAsync(String parent, Task task, String taskId)
Creates a task resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> createTaskAsync(CreateTaskRequest request)
Creates a task resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createTaskOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateTaskRequest,Task,OperationMetadata> createTaskOperationCallable()
Creates a task resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
createTaskCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateTaskRequest,com.google.longrunning.Operation> createTaskCallable()
Creates a task resource within a lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> updateTaskAsync(Task task, com.google.protobuf.FieldMask updateMask)
Update the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
task
- Required. Update description. Only fields specified in `update_mask` are updated.updateMask
- Required. Mask of fields to update.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<Task,OperationMetadata> updateTaskAsync(UpdateTaskRequest request)
Update the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateTaskOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateTaskRequest,Task,OperationMetadata> updateTaskOperationCallable()
Update the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateTaskCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateTaskRequest,com.google.longrunning.Operation> updateTaskCallable()
Update the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTaskAsync(TaskName name)
Delete the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the task: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTaskAsync(String name)
Delete the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the task: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteTaskAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTaskAsync(DeleteTaskRequest request)
Delete the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteTaskOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteTaskRequest,com.google.protobuf.Empty,OperationMetadata> deleteTaskOperationCallable()
Delete the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteTaskCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteTaskRequest,com.google.longrunning.Operation> deleteTaskCallable()
Delete the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listTasks
public final DataplexServiceClient.ListTasksPagedResponse listTasks(LakeName parent)
Lists tasks under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listTasks
public final DataplexServiceClient.ListTasksPagedResponse listTasks(String parent)
Lists tasks under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listTasks
public final DataplexServiceClient.ListTasksPagedResponse listTasks(ListTasksRequest request)
Lists tasks under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listTasksPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListTasksRequest,DataplexServiceClient.ListTasksPagedResponse> listTasksPagedCallable()
Lists tasks under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listTasksCallable
public final com.google.api.gax.rpc.UnaryCallable<ListTasksRequest,ListTasksResponse> listTasksCallable()
Lists tasks under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
getTask
public final Task getTask(TaskName name)
Get task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the task: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getTask
public final Task getTask(String name)
Get task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the task: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getTask
public final Task getTask(GetTaskRequest request)
Get task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getTaskCallable
public final com.google.api.gax.rpc.UnaryCallable<GetTaskRequest,Task> getTaskCallable()
Get task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listJobs
public final DataplexServiceClient.ListJobsPagedResponse listJobs(TaskName parent)
Lists Jobs under the given task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent environment: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listJobs
public final DataplexServiceClient.ListJobsPagedResponse listJobs(String parent)
Lists Jobs under the given task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent environment: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listJobs
public final DataplexServiceClient.ListJobsPagedResponse listJobs(ListJobsRequest request)
Lists Jobs under the given task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listJobsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListJobsRequest,DataplexServiceClient.ListJobsPagedResponse> listJobsPagedCallable()
Lists Jobs under the given task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listJobsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListJobsRequest,ListJobsResponse> listJobsCallable()
Lists Jobs under the given task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
runTask
public final RunTaskResponse runTask(TaskName name)
Run an on demand execution of a Task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the task: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
runTask
public final RunTaskResponse runTask(String name)
Run an on demand execution of a Task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the task: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
runTask
public final RunTaskResponse runTask(RunTaskRequest request)
Run an on demand execution of a Task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
runTaskCallable
public final com.google.api.gax.rpc.UnaryCallable<RunTaskRequest,RunTaskResponse> runTaskCallable()
Run an on demand execution of a Task.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
getJob
public final Job getJob(JobName name)
Get job resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the job: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getJob
public final Job getJob(String name)
Get job resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the job: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getJob
public final Job getJob(GetJobRequest request)
Get job resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getJobCallable
public final com.google.api.gax.rpc.UnaryCallable<GetJobRequest,Job> getJobCallable()
Get job resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
cancelJob
public final void cancelJob(JobName name)
Cancel jobs running for the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the job: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
cancelJob
public final void cancelJob(String name)
Cancel jobs running for the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the job: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
cancelJob
public final void cancelJob(CancelJobRequest request)
Cancel jobs running for the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
cancelJobCallable
public final com.google.api.gax.rpc.UnaryCallable<CancelJobRequest,com.google.protobuf.Empty> cancelJobCallable()
Cancel jobs running for the task resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
createEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(LakeName parent, Environment environment, String environmentId)
Create an environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the lake.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(String parent, Environment environment, String environmentId)
Create an environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
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.- Must contain only lowercase letters, numbers and hyphens.
- Must start with a letter.
- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the lake.
- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(CreateEnvironmentRequest request)
Create an environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createEnvironmentOperationCallable
public final com.google.api.gax.rpc.OperationCallable<CreateEnvironmentRequest,Environment,OperationMetadata> createEnvironmentOperationCallable()
Create an environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
createEnvironmentCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateEnvironmentRequest,com.google.longrunning.Operation> createEnvironmentCallable()
Create an environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> updateEnvironmentAsync(Environment environment, com.google.protobuf.FieldMask updateMask)
Update the environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
environment
- Required. Update description. Only fields specified in `update_mask` are updated.updateMask
- Required. Mask of fields to update.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<Environment,OperationMetadata> updateEnvironmentAsync(UpdateEnvironmentRequest request)
Update the environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateEnvironmentOperationCallable
public final com.google.api.gax.rpc.OperationCallable<UpdateEnvironmentRequest,Environment,OperationMetadata> updateEnvironmentOperationCallable()
Update the environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
updateEnvironmentCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateEnvironmentRequest,com.google.longrunning.Operation> updateEnvironmentCallable()
Update the environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentAsync(EnvironmentName name)
Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the environment: `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentAsync(String name)
Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
name
- Required. The resource name of the environment: `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEnvironmentAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentAsync(DeleteEnvironmentRequest request)
Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteEnvironmentOperationCallable
public final com.google.api.gax.rpc.OperationCallable<DeleteEnvironmentRequest,com.google.protobuf.Empty,OperationMetadata> deleteEnvironmentOperationCallable()
Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
deleteEnvironmentCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteEnvironmentRequest,com.google.longrunning.Operation> deleteEnvironmentCallable()
Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listEnvironments
public final DataplexServiceClient.ListEnvironmentsPagedResponse listEnvironments(LakeName parent)
Lists environments under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEnvironments
public final DataplexServiceClient.ListEnvironmentsPagedResponse listEnvironments(String parent)
Lists environments under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent lake: `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEnvironments
public final DataplexServiceClient.ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request)
Lists environments under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listEnvironmentsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListEnvironmentsRequest,DataplexServiceClient.ListEnvironmentsPagedResponse> listEnvironmentsPagedCallable()
Lists environments under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listEnvironmentsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsResponse> listEnvironmentsCallable()
Lists environments under the given lake.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
getEnvironment
public final Environment getEnvironment(EnvironmentName name)
Get environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the environment: `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEnvironment
public final Environment getEnvironment(String name)
Get environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
name
- Required. The resource name of the environment: `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEnvironment
public final Environment getEnvironment(GetEnvironmentRequest request)
Get environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getEnvironmentCallable
public final com.google.api.gax.rpc.UnaryCallable<GetEnvironmentRequest,Environment> getEnvironmentCallable()
Get environment resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }
-
listSessions
public final DataplexServiceClient.ListSessionsPagedResponse listSessions(EnvironmentName parent)
Lists session resources in an environment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent environment: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listSessions
public final DataplexServiceClient.ListSessionsPagedResponse listSessions(String parent)
Lists session resources in an environment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
parent
- Required. The resource name of the parent environment: `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listSessions
public final DataplexServiceClient.ListSessionsPagedResponse listSessions(ListSessionsRequest request)
Lists session resources in an environment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listSessionsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,DataplexServiceClient.ListSessionsPagedResponse> listSessionsPagedCallable()
Lists session resources in an environment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }
-
listSessionsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,ListSessionsResponse> listSessionsCallable()
Lists session resources in an environment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
listLocations
public final DataplexServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLocationsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,DataplexServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }
-
listLocationsCallable
public final 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } }
-
getLocation
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = dataplexServiceClient.getLocation(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getLocationCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = dataplexServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); }
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfacecom.google.api.gax.core.BackgroundResource
- Throws:
InterruptedException
-
-