| GitHub Repository | Product Reference | REST Documentation | RPC Documentation |
Service Description: Sensitive Data Protection provides access to a powerful sensitive data inspection, classification, and de-identification platform that works on text, images, and Google Cloud storage repositories. To learn more about concepts and find how-to guides see https://cloud.google.com/sensitive-data-protection/docs/.
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 (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
InspectContentRequest request =
InspectContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setLocationId("locationId1541836720")
.build();
InspectContentResponse response = dlpServiceClient.inspectContent(request);
}
Note: close() needs to be called on the DlpServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
InspectContent |
Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. For how to guides, see https://cloud.google.com/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RedactImage |
Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. Only the first frame of each multiframe image is redacted. Metadata and other frames are omitted in the response. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeidentifyContent |
De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ReidentifyContent |
Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListInfoTypes |
Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateInspectTemplate |
Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateInspectTemplate |
Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetInspectTemplate |
Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListInspectTemplates |
Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteInspectTemplate |
Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDeidentifyTemplate |
Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDeidentifyTemplate |
Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDeidentifyTemplate |
Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDeidentifyTemplates |
Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDeidentifyTemplate |
Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateJobTrigger |
Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateJobTrigger |
Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
HybridInspectJobTrigger |
Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetJobTrigger |
Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListJobTriggers |
Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteJobTrigger |
Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ActivateJobTrigger |
Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDiscoveryConfig |
Creates a config for discovery to scan and profile storage. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDiscoveryConfig |
Updates a discovery configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDiscoveryConfig |
Gets a discovery configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDiscoveryConfigs |
Lists discovery configurations. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDiscoveryConfig |
Deletes a discovery configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDlpJob |
Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more. When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDlpJobs |
Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDlpJob |
Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDlpJob |
Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelDlpJob |
Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateStoredInfoType |
Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateStoredInfoType |
Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetStoredInfoType |
Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListStoredInfoTypes |
Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteStoredInfoType |
Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListProjectDataProfiles |
Lists project data profiles for an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTableDataProfiles |
Lists table data profiles for an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListColumnDataProfiles |
Lists column data profiles for an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetProjectDataProfile |
Gets a project data profile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFileStoreDataProfiles |
Lists file store data profiles for an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetFileStoreDataProfile |
Gets a file store data profile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFileStoreDataProfile |
Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTableDataProfile |
Gets a table data profile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetColumnDataProfile |
Gets a column data profile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTableDataProfile |
Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
HybridInspectDlpJob |
Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
FinishDlpJob |
Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateConnection |
Create a Connection to an external data source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConnection |
Get a Connection by name. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListConnections |
Lists Connections in a parent. Use SearchConnections to see all connections within an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SearchConnections |
Searches for Connections in a parent. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteConnection |
Delete a Connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateConnection |
Update a Connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 DlpServiceSettings 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
DlpServiceSettings dlpServiceSettings =
DlpServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
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
DlpServiceSettings dlpServiceSettings =
DlpServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
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
DlpServiceSettings dlpServiceSettings = DlpServiceSettings.newHttpJsonBuilder().build();
DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final DlpServiceClient create()Constructs an instance of DlpServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(DlpServiceSettings settings)
public static final DlpServiceClient create(DlpServiceSettings settings)Constructs an instance of DlpServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
DlpServiceSettings |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(DlpServiceStub stub)
public static final DlpServiceClient create(DlpServiceStub stub)Constructs an instance of DlpServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DlpServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
DlpServiceStub |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient |
|
Constructors
DlpServiceClient(DlpServiceSettings settings)
protected DlpServiceClient(DlpServiceSettings settings)Constructs an instance of DlpServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
DlpServiceSettings |
DlpServiceClient(DlpServiceStub stub)
protected DlpServiceClient(DlpServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
DlpServiceStub |
Methods
activateJobTrigger(ActivateJobTriggerRequest request)
public final DlpJob activateJobTrigger(ActivateJobTriggerRequest request)Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ActivateJobTriggerRequest request =
ActivateJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.build();
DlpJob response = dlpServiceClient.activateJobTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
ActivateJobTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
activateJobTriggerCallable()
public final UnaryCallable<ActivateJobTriggerRequest,DlpJob> activateJobTriggerCallable()Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ActivateJobTriggerRequest request =
ActivateJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.build();
ApiFuture<DlpJob> future = dlpServiceClient.activateJobTriggerCallable().futureCall(request);
// Do something.
DlpJob response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ActivateJobTriggerRequest,DlpJob> |
|
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
cancelDlpJob(CancelDlpJobRequest request)
public final void cancelDlpJob(CancelDlpJobRequest request)Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CancelDlpJobRequest request =
CancelDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.build();
dlpServiceClient.cancelDlpJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CancelDlpJobRequestThe request object containing all of the parameters for the API call. |
cancelDlpJobCallable()
public final UnaryCallable<CancelDlpJobRequest,Empty> cancelDlpJobCallable()Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CancelDlpJobRequest request =
CancelDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.build();
ApiFuture<Empty> future = dlpServiceClient.cancelDlpJobCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CancelDlpJobRequest,Empty> |
|
close()
public final void close()createConnection(@Nullable LocationName parent, Connection connection)
public final Connection createConnection(@Nullable LocationName parent, Connection connection)Create a Connection to an external data source.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Connection connection = Connection.newBuilder().build();
Connection response = dlpServiceClient.createConnection(parent, connection);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: |
connection |
ConnectionRequired. The connection resource. |
| Returns | |
|---|---|
| Type | Description |
Connection |
|
createConnection(@Nullable OrganizationLocationName parent, Connection connection)
public final Connection createConnection(@Nullable OrganizationLocationName parent, Connection connection)Create a Connection to an external data source.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
Connection connection = Connection.newBuilder().build();
Connection response = dlpServiceClient.createConnection(parent, connection);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: |
connection |
ConnectionRequired. The connection resource. |
| Returns | |
|---|---|
| Type | Description |
Connection |
|
createConnection(CreateConnectionRequest request)
public final Connection createConnection(CreateConnectionRequest request)Create a Connection to an external data source.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateConnectionRequest request =
CreateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnection(Connection.newBuilder().build())
.build();
Connection response = dlpServiceClient.createConnection(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateConnectionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Connection |
|
createConnection(String parent, Connection connection)
public final Connection createConnection(String parent, Connection connection)Create a Connection to an external data source.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Connection connection = Connection.newBuilder().build();
Connection response = dlpServiceClient.createConnection(parent, connection);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: |
connection |
ConnectionRequired. The connection resource. |
| Returns | |
|---|---|
| Type | Description |
Connection |
|
createConnectionCallable()
public final UnaryCallable<CreateConnectionRequest,Connection> createConnectionCallable()Create a Connection to an external data source.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateConnectionRequest request =
CreateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setConnection(Connection.newBuilder().build())
.build();
ApiFuture<Connection> future =
dlpServiceClient.createConnectionCallable().futureCall(request);
// Do something.
Connection response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateConnectionRequest,Connection> |
|
createDeidentifyTemplate(@Nullable LocationName parent, DeidentifyTemplate deidentifyTemplate)
public final DeidentifyTemplate createDeidentifyTemplate(@Nullable LocationName parent, DeidentifyTemplate deidentifyTemplate)Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
deidentifyTemplate |
DeidentifyTemplateRequired. The DeidentifyTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
createDeidentifyTemplate(@Nullable OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate)
public final DeidentifyTemplate createDeidentifyTemplate(@Nullable OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate)Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
deidentifyTemplate |
DeidentifyTemplateRequired. The DeidentifyTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
createDeidentifyTemplate(@Nullable OrganizationName parent, DeidentifyTemplate deidentifyTemplate)
public final DeidentifyTemplate createDeidentifyTemplate(@Nullable OrganizationName parent, DeidentifyTemplate deidentifyTemplate)Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
deidentifyTemplate |
DeidentifyTemplateRequired. The DeidentifyTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
createDeidentifyTemplate(@Nullable ProjectName parent, DeidentifyTemplate deidentifyTemplate)
public final DeidentifyTemplate createDeidentifyTemplate(@Nullable ProjectName parent, DeidentifyTemplate deidentifyTemplate)Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
deidentifyTemplate |
DeidentifyTemplateRequired. The DeidentifyTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
createDeidentifyTemplate(CreateDeidentifyTemplateRequest request)
public final DeidentifyTemplate createDeidentifyTemplate(CreateDeidentifyTemplateRequest request)Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateDeidentifyTemplateRequest request =
CreateDeidentifyTemplateRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
.setTemplateId("templateId1304010549")
.setLocationId("locationId1541836720")
.build();
DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateDeidentifyTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
createDeidentifyTemplate(String parent, DeidentifyTemplate deidentifyTemplate)
public final DeidentifyTemplate createDeidentifyTemplate(String parent, DeidentifyTemplate deidentifyTemplate)Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
deidentifyTemplate |
DeidentifyTemplateRequired. The DeidentifyTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
createDeidentifyTemplateCallable()
public final UnaryCallable<CreateDeidentifyTemplateRequest,DeidentifyTemplate> createDeidentifyTemplateCallable()Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateDeidentifyTemplateRequest request =
CreateDeidentifyTemplateRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
.setTemplateId("templateId1304010549")
.setLocationId("locationId1541836720")
.build();
ApiFuture<DeidentifyTemplate> future =
dlpServiceClient.createDeidentifyTemplateCallable().futureCall(request);
// Do something.
DeidentifyTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateDeidentifyTemplateRequest,DeidentifyTemplate> |
|
createDiscoveryConfig(@Nullable LocationName parent, DiscoveryConfig discoveryConfig)
public final DiscoveryConfig createDiscoveryConfig(@Nullable LocationName parent, DiscoveryConfig discoveryConfig)Creates a config for discovery to scan and profile storage.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
DiscoveryConfig discoveryConfig = DiscoveryConfig.newBuilder().build();
DiscoveryConfig response = dlpServiceClient.createDiscoveryConfig(parent, discoveryConfig);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: The following example parent=projects/example-project/locations/europe-west3 |
discoveryConfig |
DiscoveryConfigRequired. The DiscoveryConfig to create. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
createDiscoveryConfig(CreateDiscoveryConfigRequest request)
public final DiscoveryConfig createDiscoveryConfig(CreateDiscoveryConfigRequest request)Creates a config for discovery to scan and profile storage.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateDiscoveryConfigRequest request =
CreateDiscoveryConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDiscoveryConfig(DiscoveryConfig.newBuilder().build())
.setConfigId("configId-580140035")
.build();
DiscoveryConfig response = dlpServiceClient.createDiscoveryConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateDiscoveryConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
createDiscoveryConfig(String parent, DiscoveryConfig discoveryConfig)
public final DiscoveryConfig createDiscoveryConfig(String parent, DiscoveryConfig discoveryConfig)Creates a config for discovery to scan and profile storage.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
DiscoveryConfig discoveryConfig = DiscoveryConfig.newBuilder().build();
DiscoveryConfig response = dlpServiceClient.createDiscoveryConfig(parent, discoveryConfig);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: The following example parent=projects/example-project/locations/europe-west3 |
discoveryConfig |
DiscoveryConfigRequired. The DiscoveryConfig to create. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
createDiscoveryConfigCallable()
public final UnaryCallable<CreateDiscoveryConfigRequest,DiscoveryConfig> createDiscoveryConfigCallable()Creates a config for discovery to scan and profile storage.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateDiscoveryConfigRequest request =
CreateDiscoveryConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDiscoveryConfig(DiscoveryConfig.newBuilder().build())
.setConfigId("configId-580140035")
.build();
ApiFuture<DiscoveryConfig> future =
dlpServiceClient.createDiscoveryConfigCallable().futureCall(request);
// Do something.
DiscoveryConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateDiscoveryConfigRequest,DiscoveryConfig> |
|
createDlpJob(@Nullable LocationName parent, InspectJobConfig inspectJob)
public final DlpJob createDlpJob(@Nullable LocationName parent, InspectJobConfig inspectJob)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectJob |
InspectJobConfigAn inspection job scans a storage repository for InfoTypes. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJob(@Nullable LocationName parent, RiskAnalysisJobConfig riskJob)
public final DlpJob createDlpJob(@Nullable LocationName parent, RiskAnalysisJobConfig riskJob)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
riskJob |
RiskAnalysisJobConfigA risk analysis job calculates re-identification risk metrics for a BigQuery table. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJob(@Nullable ProjectName parent, InspectJobConfig inspectJob)
public final DlpJob createDlpJob(@Nullable ProjectName parent, InspectJobConfig inspectJob)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectJob |
InspectJobConfigAn inspection job scans a storage repository for InfoTypes. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJob(@Nullable ProjectName parent, RiskAnalysisJobConfig riskJob)
public final DlpJob createDlpJob(@Nullable ProjectName parent, RiskAnalysisJobConfig riskJob)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
riskJob |
RiskAnalysisJobConfigA risk analysis job calculates re-identification risk metrics for a BigQuery table. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJob(CreateDlpJobRequest request)
public final DlpJob createDlpJob(CreateDlpJobRequest request)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateDlpJobRequest request =
CreateDlpJobRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setJobId("jobId101296568")
.setLocationId("locationId1541836720")
.build();
DlpJob response = dlpServiceClient.createDlpJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateDlpJobRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJob(String parent, InspectJobConfig inspectJob)
public final DlpJob createDlpJob(String parent, InspectJobConfig inspectJob)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectJob |
InspectJobConfigAn inspection job scans a storage repository for InfoTypes. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJob(String parent, RiskAnalysisJobConfig riskJob)
public final DlpJob createDlpJob(String parent, RiskAnalysisJobConfig riskJob)Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
riskJob |
RiskAnalysisJobConfigA risk analysis job calculates re-identification risk metrics for a BigQuery table. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
createDlpJobCallable()
public final UnaryCallable<CreateDlpJobRequest,DlpJob> createDlpJobCallable()Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateDlpJobRequest request =
CreateDlpJobRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setJobId("jobId101296568")
.setLocationId("locationId1541836720")
.build();
ApiFuture<DlpJob> future = dlpServiceClient.createDlpJobCallable().futureCall(request);
// Do something.
DlpJob response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateDlpJobRequest,DlpJob> |
|
createInspectTemplate(@Nullable LocationName parent, InspectTemplate inspectTemplate)
public final InspectTemplate createInspectTemplate(@Nullable LocationName parent, InspectTemplate inspectTemplate)Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectTemplate |
InspectTemplateRequired. The InspectTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
createInspectTemplate(@Nullable OrganizationLocationName parent, InspectTemplate inspectTemplate)
public final InspectTemplate createInspectTemplate(@Nullable OrganizationLocationName parent, InspectTemplate inspectTemplate)Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectTemplate |
InspectTemplateRequired. The InspectTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
createInspectTemplate(@Nullable OrganizationName parent, InspectTemplate inspectTemplate)
public final InspectTemplate createInspectTemplate(@Nullable OrganizationName parent, InspectTemplate inspectTemplate)Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectTemplate |
InspectTemplateRequired. The InspectTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
createInspectTemplate(@Nullable ProjectName parent, InspectTemplate inspectTemplate)
public final InspectTemplate createInspectTemplate(@Nullable ProjectName parent, InspectTemplate inspectTemplate)Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectTemplate |
InspectTemplateRequired. The InspectTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
createInspectTemplate(CreateInspectTemplateRequest request)
public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest request)Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateInspectTemplateRequest request =
CreateInspectTemplateRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setInspectTemplate(InspectTemplate.newBuilder().build())
.setTemplateId("templateId1304010549")
.setLocationId("locationId1541836720")
.build();
InspectTemplate response = dlpServiceClient.createInspectTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateInspectTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
createInspectTemplate(String parent, InspectTemplate inspectTemplate)
public final InspectTemplate createInspectTemplate(String parent, InspectTemplate inspectTemplate)Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
inspectTemplate |
InspectTemplateRequired. The InspectTemplate to create. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
createInspectTemplateCallable()
public final UnaryCallable<CreateInspectTemplateRequest,InspectTemplate> createInspectTemplateCallable()Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateInspectTemplateRequest request =
CreateInspectTemplateRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setInspectTemplate(InspectTemplate.newBuilder().build())
.setTemplateId("templateId1304010549")
.setLocationId("locationId1541836720")
.build();
ApiFuture<InspectTemplate> future =
dlpServiceClient.createInspectTemplateCallable().futureCall(request);
// Do something.
InspectTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateInspectTemplateRequest,InspectTemplate> |
|
createJobTrigger(@Nullable LocationName parent, JobTrigger jobTrigger)
public final JobTrigger createJobTrigger(@Nullable LocationName parent, JobTrigger jobTrigger)Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
JobTrigger jobTrigger = JobTrigger.newBuilder().build();
JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
jobTrigger |
JobTriggerRequired. The JobTrigger to create. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
createJobTrigger(@Nullable ProjectName parent, JobTrigger jobTrigger)
public final JobTrigger createJobTrigger(@Nullable ProjectName parent, JobTrigger jobTrigger)Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
JobTrigger jobTrigger = JobTrigger.newBuilder().build();
JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
jobTrigger |
JobTriggerRequired. The JobTrigger to create. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
createJobTrigger(CreateJobTriggerRequest request)
public final JobTrigger createJobTrigger(CreateJobTriggerRequest request)Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateJobTriggerRequest request =
CreateJobTriggerRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setJobTrigger(JobTrigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setLocationId("locationId1541836720")
.build();
JobTrigger response = dlpServiceClient.createJobTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateJobTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
createJobTrigger(String parent, JobTrigger jobTrigger)
public final JobTrigger createJobTrigger(String parent, JobTrigger jobTrigger)Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
JobTrigger jobTrigger = JobTrigger.newBuilder().build();
JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
jobTrigger |
JobTriggerRequired. The JobTrigger to create. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
createJobTriggerCallable()
public final UnaryCallable<CreateJobTriggerRequest,JobTrigger> createJobTriggerCallable()Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateJobTriggerRequest request =
CreateJobTriggerRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setJobTrigger(JobTrigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setLocationId("locationId1541836720")
.build();
ApiFuture<JobTrigger> future =
dlpServiceClient.createJobTriggerCallable().futureCall(request);
// Do something.
JobTrigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateJobTriggerRequest,JobTrigger> |
|
createStoredInfoType(@Nullable LocationName parent, StoredInfoTypeConfig config)
public final StoredInfoType createStoredInfoType(@Nullable LocationName parent, StoredInfoTypeConfig config)Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
config |
StoredInfoTypeConfigRequired. Configuration of the storedInfoType to create. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
createStoredInfoType(@Nullable OrganizationLocationName parent, StoredInfoTypeConfig config)
public final StoredInfoType createStoredInfoType(@Nullable OrganizationLocationName parent, StoredInfoTypeConfig config)Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
config |
StoredInfoTypeConfigRequired. Configuration of the storedInfoType to create. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
createStoredInfoType(@Nullable OrganizationName parent, StoredInfoTypeConfig config)
public final StoredInfoType createStoredInfoType(@Nullable OrganizationName parent, StoredInfoTypeConfig config)Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
config |
StoredInfoTypeConfigRequired. Configuration of the storedInfoType to create. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
createStoredInfoType(@Nullable ProjectName parent, StoredInfoTypeConfig config)
public final StoredInfoType createStoredInfoType(@Nullable ProjectName parent, StoredInfoTypeConfig config)Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
config |
StoredInfoTypeConfigRequired. Configuration of the storedInfoType to create. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
createStoredInfoType(CreateStoredInfoTypeRequest request)
public final StoredInfoType createStoredInfoType(CreateStoredInfoTypeRequest request)Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateStoredInfoTypeRequest request =
CreateStoredInfoTypeRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setConfig(StoredInfoTypeConfig.newBuilder().build())
.setStoredInfoTypeId("storedInfoTypeId-1409591226")
.setLocationId("locationId1541836720")
.build();
StoredInfoType response = dlpServiceClient.createStoredInfoType(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateStoredInfoTypeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
createStoredInfoType(String parent, StoredInfoTypeConfig config)
public final StoredInfoType createStoredInfoType(String parent, StoredInfoTypeConfig config)Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
config |
StoredInfoTypeConfigRequired. Configuration of the storedInfoType to create. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
createStoredInfoTypeCallable()
public final UnaryCallable<CreateStoredInfoTypeRequest,StoredInfoType> createStoredInfoTypeCallable()Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
CreateStoredInfoTypeRequest request =
CreateStoredInfoTypeRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setConfig(StoredInfoTypeConfig.newBuilder().build())
.setStoredInfoTypeId("storedInfoTypeId-1409591226")
.setLocationId("locationId1541836720")
.build();
ApiFuture<StoredInfoType> future =
dlpServiceClient.createStoredInfoTypeCallable().futureCall(request);
// Do something.
StoredInfoType response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateStoredInfoTypeRequest,StoredInfoType> |
|
deidentifyContent(DeidentifyContentRequest request)
public final DeidentifyContentResponse deidentifyContent(DeidentifyContentRequest request)De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeidentifyContentRequest request =
DeidentifyContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
.setLocationId("locationId1541836720")
.build();
DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeidentifyContentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyContentResponse |
|
deidentifyContentCallable()
public final UnaryCallable<DeidentifyContentRequest,DeidentifyContentResponse> deidentifyContentCallable()De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeidentifyContentRequest request =
DeidentifyContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
.setLocationId("locationId1541836720")
.build();
ApiFuture<DeidentifyContentResponse> future =
dlpServiceClient.deidentifyContentCallable().futureCall(request);
// Do something.
DeidentifyContentResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeidentifyContentRequest,DeidentifyContentResponse> |
|
deleteConnection(@Nullable ConnectionName name)
public final void deleteConnection(@Nullable ConnectionName name)Delete a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ConnectionName name =
ConnectionName.ofProjectLocationConnectionName("[PROJECT]", "[LOCATION]", "[CONNECTION]");
dlpServiceClient.deleteConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ConnectionNameRequired. Resource name of the Connection to be deleted, in the format:
|
deleteConnection(DeleteConnectionRequest request)
public final void deleteConnection(DeleteConnectionRequest request)Delete a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteConnectionRequest request =
DeleteConnectionRequest.newBuilder()
.setName(
ConnectionName.ofProjectLocationConnectionName(
"[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString())
.build();
dlpServiceClient.deleteConnection(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteConnectionRequestThe request object containing all of the parameters for the API call. |
deleteConnection(String name)
public final void deleteConnection(String name)Delete a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
ConnectionName.ofProjectLocationConnectionName("[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString();
dlpServiceClient.deleteConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the Connection to be deleted, in the format:
|
deleteConnectionCallable()
public final UnaryCallable<DeleteConnectionRequest,Empty> deleteConnectionCallable()Delete a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteConnectionRequest request =
DeleteConnectionRequest.newBuilder()
.setName(
ConnectionName.ofProjectLocationConnectionName(
"[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString())
.build();
ApiFuture<Empty> future = dlpServiceClient.deleteConnectionCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteConnectionRequest,Empty> |
|
deleteDeidentifyTemplate(@Nullable DeidentifyTemplateName name)
public final void deleteDeidentifyTemplate(@Nullable DeidentifyTemplateName name)Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeidentifyTemplateName name =
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
dlpServiceClient.deleteDeidentifyTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DeidentifyTemplateNameRequired. Resource name of the organization and deidentify template to be deleted,
for example |
deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request)
public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request)Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteDeidentifyTemplateRequest request =
DeleteDeidentifyTemplateRequest.newBuilder()
.setName(
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString())
.build();
dlpServiceClient.deleteDeidentifyTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteDeidentifyTemplateRequestThe request object containing all of the parameters for the API call. |
deleteDeidentifyTemplate(String name)
public final void deleteDeidentifyTemplate(String name)Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString();
dlpServiceClient.deleteDeidentifyTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the organization and deidentify template to be deleted,
for example |
deleteDeidentifyTemplateCallable()
public final UnaryCallable<DeleteDeidentifyTemplateRequest,Empty> deleteDeidentifyTemplateCallable()Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteDeidentifyTemplateRequest request =
DeleteDeidentifyTemplateRequest.newBuilder()
.setName(
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString())
.build();
ApiFuture<Empty> future =
dlpServiceClient.deleteDeidentifyTemplateCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteDeidentifyTemplateRequest,Empty> |
|
deleteDiscoveryConfig(@Nullable DiscoveryConfigName name)
public final void deleteDiscoveryConfig(@Nullable DiscoveryConfigName name)Deletes a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DiscoveryConfigName name =
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]");
dlpServiceClient.deleteDiscoveryConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DiscoveryConfigNameRequired. Resource name of the project and the config, for example
|
deleteDiscoveryConfig(DeleteDiscoveryConfigRequest request)
public final void deleteDiscoveryConfig(DeleteDiscoveryConfigRequest request)Deletes a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteDiscoveryConfigRequest request =
DeleteDiscoveryConfigRequest.newBuilder()
.setName(
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]")
.toString())
.build();
dlpServiceClient.deleteDiscoveryConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteDiscoveryConfigRequestThe request object containing all of the parameters for the API call. |
deleteDiscoveryConfig(String name)
public final void deleteDiscoveryConfig(String name)Deletes a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]").toString();
dlpServiceClient.deleteDiscoveryConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the project and the config, for example
|
deleteDiscoveryConfigCallable()
public final UnaryCallable<DeleteDiscoveryConfigRequest,Empty> deleteDiscoveryConfigCallable()Deletes a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteDiscoveryConfigRequest request =
DeleteDiscoveryConfigRequest.newBuilder()
.setName(
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]")
.toString())
.build();
ApiFuture<Empty> future =
dlpServiceClient.deleteDiscoveryConfigCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteDiscoveryConfigRequest,Empty> |
|
deleteDlpJob(@Nullable DlpJobName name)
public final void deleteDlpJob(@Nullable DlpJobName name)Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
dlpServiceClient.deleteDlpJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DlpJobNameRequired. The name of the DlpJob resource to be deleted. |
deleteDlpJob(DeleteDlpJobRequest request)
public final void deleteDlpJob(DeleteDlpJobRequest request)Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteDlpJobRequest request =
DeleteDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.build();
dlpServiceClient.deleteDlpJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteDlpJobRequestThe request object containing all of the parameters for the API call. |
deleteDlpJob(String name)
public final void deleteDlpJob(String name)Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
dlpServiceClient.deleteDlpJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the DlpJob resource to be deleted. |
deleteDlpJobCallable()
public final UnaryCallable<DeleteDlpJobRequest,Empty> deleteDlpJobCallable()Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteDlpJobRequest request =
DeleteDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.build();
ApiFuture<Empty> future = dlpServiceClient.deleteDlpJobCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteDlpJobRequest,Empty> |
|
deleteFileStoreDataProfile(@Nullable FileStoreDataProfileName name)
public final void deleteFileStoreDataProfile(@Nullable FileStoreDataProfileName name)Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
FileStoreDataProfileName name =
FileStoreDataProfileName.ofOrganizationLocationFileStoreDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[FILE_STORE_DATA_PROFILE]");
dlpServiceClient.deleteFileStoreDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.FileStoreDataProfileNameRequired. Resource name of the file store data profile. |
deleteFileStoreDataProfile(DeleteFileStoreDataProfileRequest request)
public final void deleteFileStoreDataProfile(DeleteFileStoreDataProfileRequest request)Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteFileStoreDataProfileRequest request =
DeleteFileStoreDataProfileRequest.newBuilder()
.setName(
FileStoreDataProfileName.ofOrganizationLocationFileStoreDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[FILE_STORE_DATA_PROFILE]")
.toString())
.build();
dlpServiceClient.deleteFileStoreDataProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteFileStoreDataProfileRequestThe request object containing all of the parameters for the API call. |
deleteFileStoreDataProfile(String name)
public final void deleteFileStoreDataProfile(String name)Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
FileStoreDataProfileName.ofOrganizationLocationFileStoreDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[FILE_STORE_DATA_PROFILE]")
.toString();
dlpServiceClient.deleteFileStoreDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the file store data profile. |
deleteFileStoreDataProfileCallable()
public final UnaryCallable<DeleteFileStoreDataProfileRequest,Empty> deleteFileStoreDataProfileCallable()Delete a FileStoreDataProfile. Will not prevent the profile from being regenerated if the resource is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteFileStoreDataProfileRequest request =
DeleteFileStoreDataProfileRequest.newBuilder()
.setName(
FileStoreDataProfileName.ofOrganizationLocationFileStoreDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[FILE_STORE_DATA_PROFILE]")
.toString())
.build();
ApiFuture<Empty> future =
dlpServiceClient.deleteFileStoreDataProfileCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteFileStoreDataProfileRequest,Empty> |
|
deleteInspectTemplate(@Nullable InspectTemplateName name)
public final void deleteInspectTemplate(@Nullable InspectTemplateName name)Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
InspectTemplateName name =
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]");
dlpServiceClient.deleteInspectTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.InspectTemplateNameRequired. Resource name of the organization and inspectTemplate to be deleted, for
example |
deleteInspectTemplate(DeleteInspectTemplateRequest request)
public final void deleteInspectTemplate(DeleteInspectTemplateRequest request)Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteInspectTemplateRequest request =
DeleteInspectTemplateRequest.newBuilder()
.setName(
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]")
.toString())
.build();
dlpServiceClient.deleteInspectTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteInspectTemplateRequestThe request object containing all of the parameters for the API call. |
deleteInspectTemplate(String name)
public final void deleteInspectTemplate(String name)Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
InspectTemplateName.ofOrganizationInspectTemplateName(
"[ORGANIZATION]", "[INSPECT_TEMPLATE]")
.toString();
dlpServiceClient.deleteInspectTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the organization and inspectTemplate to be deleted, for
example |
deleteInspectTemplateCallable()
public final UnaryCallable<DeleteInspectTemplateRequest,Empty> deleteInspectTemplateCallable()Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteInspectTemplateRequest request =
DeleteInspectTemplateRequest.newBuilder()
.setName(
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]")
.toString())
.build();
ApiFuture<Empty> future =
dlpServiceClient.deleteInspectTemplateCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteInspectTemplateRequest,Empty> |
|
deleteJobTrigger(@Nullable JobTriggerName name)
public final void deleteJobTrigger(@Nullable JobTriggerName name)Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
dlpServiceClient.deleteJobTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.JobTriggerNameRequired. Resource name of the project and the triggeredJob, for example
|
deleteJobTrigger(DeleteJobTriggerRequest request)
public final void deleteJobTrigger(DeleteJobTriggerRequest request)Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteJobTriggerRequest request =
DeleteJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.build();
dlpServiceClient.deleteJobTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteJobTriggerRequestThe request object containing all of the parameters for the API call. |
deleteJobTrigger(String name)
public final void deleteJobTrigger(String name)Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
dlpServiceClient.deleteJobTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the project and the triggeredJob, for example
|
deleteJobTriggerCallable()
public final UnaryCallable<DeleteJobTriggerRequest,Empty> deleteJobTriggerCallable()Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteJobTriggerRequest request =
DeleteJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.build();
ApiFuture<Empty> future = dlpServiceClient.deleteJobTriggerCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteJobTriggerRequest,Empty> |
|
deleteStoredInfoType(@Nullable StoredInfoTypeName name)
public final void deleteStoredInfoType(@Nullable StoredInfoTypeName name)Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
StoredInfoTypeName name =
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]");
dlpServiceClient.deleteStoredInfoType(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.StoredInfoTypeNameRequired. Resource name of the organization and storedInfoType to be deleted, for
example |
deleteStoredInfoType(DeleteStoredInfoTypeRequest request)
public final void deleteStoredInfoType(DeleteStoredInfoTypeRequest request)Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteStoredInfoTypeRequest request =
DeleteStoredInfoTypeRequest.newBuilder()
.setName(
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString())
.build();
dlpServiceClient.deleteStoredInfoType(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteStoredInfoTypeRequestThe request object containing all of the parameters for the API call. |
deleteStoredInfoType(String name)
public final void deleteStoredInfoType(String name)Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString();
dlpServiceClient.deleteStoredInfoType(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the organization and storedInfoType to be deleted, for
example |
deleteStoredInfoTypeCallable()
public final UnaryCallable<DeleteStoredInfoTypeRequest,Empty> deleteStoredInfoTypeCallable()Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteStoredInfoTypeRequest request =
DeleteStoredInfoTypeRequest.newBuilder()
.setName(
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString())
.build();
ApiFuture<Empty> future = dlpServiceClient.deleteStoredInfoTypeCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteStoredInfoTypeRequest,Empty> |
|
deleteTableDataProfile(@Nullable TableDataProfileName name)
public final void deleteTableDataProfile(@Nullable TableDataProfileName name)Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
TableDataProfileName name =
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]");
dlpServiceClient.deleteTableDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.TableDataProfileNameRequired. Resource name of the table data profile. |
deleteTableDataProfile(DeleteTableDataProfileRequest request)
public final void deleteTableDataProfile(DeleteTableDataProfileRequest request)Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteTableDataProfileRequest request =
DeleteTableDataProfileRequest.newBuilder()
.setName(
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]")
.toString())
.build();
dlpServiceClient.deleteTableDataProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteTableDataProfileRequestThe request object containing all of the parameters for the API call. |
deleteTableDataProfile(String name)
public final void deleteTableDataProfile(String name)Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]")
.toString();
dlpServiceClient.deleteTableDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the table data profile. |
deleteTableDataProfileCallable()
public final UnaryCallable<DeleteTableDataProfileRequest,Empty> deleteTableDataProfileCallable()Delete a TableDataProfile. Will not prevent the profile from being regenerated if the table is still included in a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeleteTableDataProfileRequest request =
DeleteTableDataProfileRequest.newBuilder()
.setName(
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]")
.toString())
.build();
ApiFuture<Empty> future =
dlpServiceClient.deleteTableDataProfileCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteTableDataProfileRequest,Empty> |
|
finishDlpJob(FinishDlpJobRequest request)
public final void finishDlpJob(FinishDlpJobRequest request)Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
FinishDlpJobRequest request =
FinishDlpJobRequest.newBuilder()
.setName(
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
.toString())
.build();
dlpServiceClient.finishDlpJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
FinishDlpJobRequestThe request object containing all of the parameters for the API call. |
finishDlpJobCallable()
public final UnaryCallable<FinishDlpJobRequest,Empty> finishDlpJobCallable()Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
FinishDlpJobRequest request =
FinishDlpJobRequest.newBuilder()
.setName(
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
.toString())
.build();
ApiFuture<Empty> future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<FinishDlpJobRequest,Empty> |
|
getColumnDataProfile(@Nullable ColumnDataProfileName name)
public final ColumnDataProfile getColumnDataProfile(@Nullable ColumnDataProfileName name)Gets a column data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ColumnDataProfileName name =
ColumnDataProfileName.ofOrganizationLocationColumnDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]");
ColumnDataProfile response = dlpServiceClient.getColumnDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ColumnDataProfileNameRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
ColumnDataProfile |
|
getColumnDataProfile(GetColumnDataProfileRequest request)
public final ColumnDataProfile getColumnDataProfile(GetColumnDataProfileRequest request)Gets a column data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetColumnDataProfileRequest request =
GetColumnDataProfileRequest.newBuilder()
.setName(
ColumnDataProfileName.ofOrganizationLocationColumnDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]")
.toString())
.build();
ColumnDataProfile response = dlpServiceClient.getColumnDataProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetColumnDataProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ColumnDataProfile |
|
getColumnDataProfile(String name)
public final ColumnDataProfile getColumnDataProfile(String name)Gets a column data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
ColumnDataProfileName.ofOrganizationLocationColumnDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]")
.toString();
ColumnDataProfile response = dlpServiceClient.getColumnDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
ColumnDataProfile |
|
getColumnDataProfileCallable()
public final UnaryCallable<GetColumnDataProfileRequest,ColumnDataProfile> getColumnDataProfileCallable()Gets a column data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetColumnDataProfileRequest request =
GetColumnDataProfileRequest.newBuilder()
.setName(
ColumnDataProfileName.ofOrganizationLocationColumnDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[COLUMN_DATA_PROFILE]")
.toString())
.build();
ApiFuture<ColumnDataProfile> future =
dlpServiceClient.getColumnDataProfileCallable().futureCall(request);
// Do something.
ColumnDataProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetColumnDataProfileRequest,ColumnDataProfile> |
|
getConnection(@Nullable ConnectionName name)
public final Connection getConnection(@Nullable ConnectionName name)Get a Connection by name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ConnectionName name =
ConnectionName.ofProjectLocationConnectionName("[PROJECT]", "[LOCATION]", "[CONNECTION]");
Connection response = dlpServiceClient.getConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ConnectionNameRequired. Resource name in the format:
|
| Returns | |
|---|---|
| Type | Description |
Connection |
|
getConnection(GetConnectionRequest request)
public final Connection getConnection(GetConnectionRequest request)Get a Connection by name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetConnectionRequest request =
GetConnectionRequest.newBuilder()
.setName(
ConnectionName.ofProjectLocationConnectionName(
"[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString())
.build();
Connection response = dlpServiceClient.getConnection(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetConnectionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Connection |
|
getConnection(String name)
public final Connection getConnection(String name)Get a Connection by name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
ConnectionName.ofProjectLocationConnectionName("[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString();
Connection response = dlpServiceClient.getConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name in the format:
|
| Returns | |
|---|---|
| Type | Description |
Connection |
|
getConnectionCallable()
public final UnaryCallable<GetConnectionRequest,Connection> getConnectionCallable()Get a Connection by name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetConnectionRequest request =
GetConnectionRequest.newBuilder()
.setName(
ConnectionName.ofProjectLocationConnectionName(
"[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString())
.build();
ApiFuture<Connection> future = dlpServiceClient.getConnectionCallable().futureCall(request);
// Do something.
Connection response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetConnectionRequest,Connection> |
|
getDeidentifyTemplate(@Nullable DeidentifyTemplateName name)
public final DeidentifyTemplate getDeidentifyTemplate(@Nullable DeidentifyTemplateName name)Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeidentifyTemplateName name =
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DeidentifyTemplateNameRequired. Resource name of the organization and deidentify template to be read, for
example |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
getDeidentifyTemplate(GetDeidentifyTemplateRequest request)
public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateRequest request)Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetDeidentifyTemplateRequest request =
GetDeidentifyTemplateRequest.newBuilder()
.setName(
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString())
.build();
DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDeidentifyTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
getDeidentifyTemplate(String name)
public final DeidentifyTemplate getDeidentifyTemplate(String name)Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString();
DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the organization and deidentify template to be read, for
example |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
getDeidentifyTemplateCallable()
public final UnaryCallable<GetDeidentifyTemplateRequest,DeidentifyTemplate> getDeidentifyTemplateCallable()Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetDeidentifyTemplateRequest request =
GetDeidentifyTemplateRequest.newBuilder()
.setName(
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString())
.build();
ApiFuture<DeidentifyTemplate> future =
dlpServiceClient.getDeidentifyTemplateCallable().futureCall(request);
// Do something.
DeidentifyTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDeidentifyTemplateRequest,DeidentifyTemplate> |
|
getDiscoveryConfig(@Nullable DiscoveryConfigName name)
public final DiscoveryConfig getDiscoveryConfig(@Nullable DiscoveryConfigName name)Gets a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DiscoveryConfigName name =
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]");
DiscoveryConfig response = dlpServiceClient.getDiscoveryConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DiscoveryConfigNameRequired. Resource name of the project and the configuration, for example
|
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
getDiscoveryConfig(GetDiscoveryConfigRequest request)
public final DiscoveryConfig getDiscoveryConfig(GetDiscoveryConfigRequest request)Gets a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetDiscoveryConfigRequest request =
GetDiscoveryConfigRequest.newBuilder()
.setName(
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]")
.toString())
.build();
DiscoveryConfig response = dlpServiceClient.getDiscoveryConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDiscoveryConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
getDiscoveryConfig(String name)
public final DiscoveryConfig getDiscoveryConfig(String name)Gets a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]").toString();
DiscoveryConfig response = dlpServiceClient.getDiscoveryConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the project and the configuration, for example
|
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
getDiscoveryConfigCallable()
public final UnaryCallable<GetDiscoveryConfigRequest,DiscoveryConfig> getDiscoveryConfigCallable()Gets a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetDiscoveryConfigRequest request =
GetDiscoveryConfigRequest.newBuilder()
.setName(
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]")
.toString())
.build();
ApiFuture<DiscoveryConfig> future =
dlpServiceClient.getDiscoveryConfigCallable().futureCall(request);
// Do something.
DiscoveryConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDiscoveryConfigRequest,DiscoveryConfig> |
|
getDlpJob(@Nullable DlpJobName name)
public final DlpJob getDlpJob(@Nullable DlpJobName name)Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
DlpJob response = dlpServiceClient.getDlpJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DlpJobNameRequired. The name of the DlpJob resource. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
getDlpJob(GetDlpJobRequest request)
public final DlpJob getDlpJob(GetDlpJobRequest request)Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetDlpJobRequest request =
GetDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.build();
DlpJob response = dlpServiceClient.getDlpJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDlpJobRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
getDlpJob(String name)
public final DlpJob getDlpJob(String name)Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
DlpJob response = dlpServiceClient.getDlpJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the DlpJob resource. |
| Returns | |
|---|---|
| Type | Description |
DlpJob |
|
getDlpJobCallable()
public final UnaryCallable<GetDlpJobRequest,DlpJob> getDlpJobCallable()Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetDlpJobRequest request =
GetDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.build();
ApiFuture<DlpJob> future = dlpServiceClient.getDlpJobCallable().futureCall(request);
// Do something.
DlpJob response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDlpJobRequest,DlpJob> |
|
getFileStoreDataProfile(@Nullable ProjectDataProfileName name)
public final FileStoreDataProfile getFileStoreDataProfile(@Nullable ProjectDataProfileName name)Gets a file store data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectDataProfileName name =
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]");
FileStoreDataProfile response = dlpServiceClient.getFileStoreDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectDataProfileNameRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
FileStoreDataProfile |
|
getFileStoreDataProfile(GetFileStoreDataProfileRequest request)
public final FileStoreDataProfile getFileStoreDataProfile(GetFileStoreDataProfileRequest request)Gets a file store data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetFileStoreDataProfileRequest request =
GetFileStoreDataProfileRequest.newBuilder()
.setName(
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]")
.toString())
.build();
FileStoreDataProfile response = dlpServiceClient.getFileStoreDataProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetFileStoreDataProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FileStoreDataProfile |
|
getFileStoreDataProfile(String name)
public final FileStoreDataProfile getFileStoreDataProfile(String name)Gets a file store data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]")
.toString();
FileStoreDataProfile response = dlpServiceClient.getFileStoreDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
FileStoreDataProfile |
|
getFileStoreDataProfileCallable()
public final UnaryCallable<GetFileStoreDataProfileRequest,FileStoreDataProfile> getFileStoreDataProfileCallable()Gets a file store data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetFileStoreDataProfileRequest request =
GetFileStoreDataProfileRequest.newBuilder()
.setName(
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]")
.toString())
.build();
ApiFuture<FileStoreDataProfile> future =
dlpServiceClient.getFileStoreDataProfileCallable().futureCall(request);
// Do something.
FileStoreDataProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetFileStoreDataProfileRequest,FileStoreDataProfile> |
|
getInspectTemplate(@Nullable InspectTemplateName name)
public final InspectTemplate getInspectTemplate(@Nullable InspectTemplateName name)Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
InspectTemplateName name =
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]");
InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.InspectTemplateNameRequired. Resource name of the organization and inspectTemplate to be read, for
example |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
getInspectTemplate(GetInspectTemplateRequest request)
public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest request)Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetInspectTemplateRequest request =
GetInspectTemplateRequest.newBuilder()
.setName(
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]")
.toString())
.build();
InspectTemplate response = dlpServiceClient.getInspectTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetInspectTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
getInspectTemplate(String name)
public final InspectTemplate getInspectTemplate(String name)Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
InspectTemplateName.ofOrganizationInspectTemplateName(
"[ORGANIZATION]", "[INSPECT_TEMPLATE]")
.toString();
InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the organization and inspectTemplate to be read, for
example |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
getInspectTemplateCallable()
public final UnaryCallable<GetInspectTemplateRequest,InspectTemplate> getInspectTemplateCallable()Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetInspectTemplateRequest request =
GetInspectTemplateRequest.newBuilder()
.setName(
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]")
.toString())
.build();
ApiFuture<InspectTemplate> future =
dlpServiceClient.getInspectTemplateCallable().futureCall(request);
// Do something.
InspectTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetInspectTemplateRequest,InspectTemplate> |
|
getJobTrigger(@Nullable JobTriggerName name)
public final JobTrigger getJobTrigger(@Nullable JobTriggerName name)Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
JobTrigger response = dlpServiceClient.getJobTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.JobTriggerNameRequired. Resource name of the project and the triggeredJob, for example
|
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
getJobTrigger(GetJobTriggerRequest request)
public final JobTrigger getJobTrigger(GetJobTriggerRequest request)Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetJobTriggerRequest request =
GetJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.build();
JobTrigger response = dlpServiceClient.getJobTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetJobTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
getJobTrigger(String name)
public final JobTrigger getJobTrigger(String name)Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
JobTrigger response = dlpServiceClient.getJobTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the project and the triggeredJob, for example
|
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
getJobTriggerCallable()
public final UnaryCallable<GetJobTriggerRequest,JobTrigger> getJobTriggerCallable()Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetJobTriggerRequest request =
GetJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.build();
ApiFuture<JobTrigger> future = dlpServiceClient.getJobTriggerCallable().futureCall(request);
// Do something.
JobTrigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetJobTriggerRequest,JobTrigger> |
|
getProjectDataProfile(@Nullable ProjectDataProfileName name)
public final ProjectDataProfile getProjectDataProfile(@Nullable ProjectDataProfileName name)Gets a project data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectDataProfileName name =
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]");
ProjectDataProfile response = dlpServiceClient.getProjectDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectDataProfileNameRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
ProjectDataProfile |
|
getProjectDataProfile(GetProjectDataProfileRequest request)
public final ProjectDataProfile getProjectDataProfile(GetProjectDataProfileRequest request)Gets a project data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetProjectDataProfileRequest request =
GetProjectDataProfileRequest.newBuilder()
.setName(
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]")
.toString())
.build();
ProjectDataProfile response = dlpServiceClient.getProjectDataProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetProjectDataProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ProjectDataProfile |
|
getProjectDataProfile(String name)
public final ProjectDataProfile getProjectDataProfile(String name)Gets a project data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]")
.toString();
ProjectDataProfile response = dlpServiceClient.getProjectDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
ProjectDataProfile |
|
getProjectDataProfileCallable()
public final UnaryCallable<GetProjectDataProfileRequest,ProjectDataProfile> getProjectDataProfileCallable()Gets a project data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetProjectDataProfileRequest request =
GetProjectDataProfileRequest.newBuilder()
.setName(
ProjectDataProfileName.ofOrganizationLocationProjectDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[PROJECT_DATA_PROFILE]")
.toString())
.build();
ApiFuture<ProjectDataProfile> future =
dlpServiceClient.getProjectDataProfileCallable().futureCall(request);
// Do something.
ProjectDataProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetProjectDataProfileRequest,ProjectDataProfile> |
|
getSettings()
public final @Nullable DlpServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.cloud.dlp.v2.DlpServiceSettings |
|
getStoredInfoType(@Nullable StoredInfoTypeName name)
public final StoredInfoType getStoredInfoType(@Nullable StoredInfoTypeName name)Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
StoredInfoTypeName name =
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]");
StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.StoredInfoTypeNameRequired. Resource name of the organization and storedInfoType to be read, for
example |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
getStoredInfoType(GetStoredInfoTypeRequest request)
public final StoredInfoType getStoredInfoType(GetStoredInfoTypeRequest request)Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetStoredInfoTypeRequest request =
GetStoredInfoTypeRequest.newBuilder()
.setName(
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString())
.build();
StoredInfoType response = dlpServiceClient.getStoredInfoType(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetStoredInfoTypeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
getStoredInfoType(String name)
public final StoredInfoType getStoredInfoType(String name)Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString();
StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the organization and storedInfoType to be read, for
example |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
getStoredInfoTypeCallable()
public final UnaryCallable<GetStoredInfoTypeRequest,StoredInfoType> getStoredInfoTypeCallable()Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetStoredInfoTypeRequest request =
GetStoredInfoTypeRequest.newBuilder()
.setName(
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString())
.build();
ApiFuture<StoredInfoType> future =
dlpServiceClient.getStoredInfoTypeCallable().futureCall(request);
// Do something.
StoredInfoType response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetStoredInfoTypeRequest,StoredInfoType> |
|
getStub()
public DlpServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
DlpServiceStub |
|
getTableDataProfile(@Nullable TableDataProfileName name)
public final TableDataProfile getTableDataProfile(@Nullable TableDataProfileName name)Gets a table data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
TableDataProfileName name =
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]");
TableDataProfile response = dlpServiceClient.getTableDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.TableDataProfileNameRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
TableDataProfile |
|
getTableDataProfile(GetTableDataProfileRequest request)
public final TableDataProfile getTableDataProfile(GetTableDataProfileRequest request)Gets a table data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetTableDataProfileRequest request =
GetTableDataProfileRequest.newBuilder()
.setName(
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]")
.toString())
.build();
TableDataProfile response = dlpServiceClient.getTableDataProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetTableDataProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
TableDataProfile |
|
getTableDataProfile(String name)
public final TableDataProfile getTableDataProfile(String name)Gets a table data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]")
.toString();
TableDataProfile response = dlpServiceClient.getTableDataProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name, for example
|
| Returns | |
|---|---|
| Type | Description |
TableDataProfile |
|
getTableDataProfileCallable()
public final UnaryCallable<GetTableDataProfileRequest,TableDataProfile> getTableDataProfileCallable()Gets a table data profile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
GetTableDataProfileRequest request =
GetTableDataProfileRequest.newBuilder()
.setName(
TableDataProfileName.ofOrganizationLocationTableDataProfileName(
"[ORGANIZATION]", "[LOCATION]", "[TABLE_DATA_PROFILE]")
.toString())
.build();
ApiFuture<TableDataProfile> future =
dlpServiceClient.getTableDataProfileCallable().futureCall(request);
// Do something.
TableDataProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetTableDataProfileRequest,TableDataProfile> |
|
hybridInspectDlpJob(@Nullable DlpJobName name)
public final HybridInspectResponse hybridInspectDlpJob(@Nullable DlpJobName name)Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DlpJobName name =
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");
HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DlpJobNameRequired. Resource name of the job to execute a hybrid inspect on, for example
|
| Returns | |
|---|---|
| Type | Description |
HybridInspectResponse |
|
hybridInspectDlpJob(HybridInspectDlpJobRequest request)
public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobRequest request)Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
HybridInspectDlpJobRequest request =
HybridInspectDlpJobRequest.newBuilder()
.setName(
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
.toString())
.setHybridItem(HybridContentItem.newBuilder().build())
.build();
HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
HybridInspectDlpJobRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
HybridInspectResponse |
|
hybridInspectDlpJob(String name)
public final HybridInspectResponse hybridInspectDlpJob(String name)Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the job to execute a hybrid inspect on, for example
|
| Returns | |
|---|---|
| Type | Description |
HybridInspectResponse |
|
hybridInspectDlpJobCallable()
public final UnaryCallable<HybridInspectDlpJobRequest,HybridInspectResponse> hybridInspectDlpJobCallable()Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
HybridInspectDlpJobRequest request =
HybridInspectDlpJobRequest.newBuilder()
.setName(
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
.toString())
.setHybridItem(HybridContentItem.newBuilder().build())
.build();
ApiFuture<HybridInspectResponse> future =
dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
// Do something.
HybridInspectResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<HybridInspectDlpJobRequest,HybridInspectResponse> |
|
hybridInspectJobTrigger(@Nullable JobTriggerName name)
public final HybridInspectResponse hybridInspectJobTrigger(@Nullable JobTriggerName name)Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
JobTriggerName name =
JobTriggerName.ofProjectLocationJobTriggerName(
"[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");
HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.JobTriggerNameRequired. Resource name of the trigger to execute a hybrid inspect on, for example
|
| Returns | |
|---|---|
| Type | Description |
HybridInspectResponse |
|
hybridInspectJobTrigger(HybridInspectJobTriggerRequest request)
public final HybridInspectResponse hybridInspectJobTrigger(HybridInspectJobTriggerRequest request)Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
HybridInspectJobTriggerRequest request =
HybridInspectJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectLocationJobTriggerName(
"[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
.toString())
.setHybridItem(HybridContentItem.newBuilder().build())
.build();
HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
HybridInspectJobTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
HybridInspectResponse |
|
hybridInspectJobTrigger(String name)
public final HybridInspectResponse hybridInspectJobTrigger(String name)Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the trigger to execute a hybrid inspect on, for example
|
| Returns | |
|---|---|
| Type | Description |
HybridInspectResponse |
|
hybridInspectJobTriggerCallable()
public final UnaryCallable<HybridInspectJobTriggerRequest,HybridInspectResponse> hybridInspectJobTriggerCallable()Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
HybridInspectJobTriggerRequest request =
HybridInspectJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectLocationJobTriggerName(
"[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
.toString())
.setHybridItem(HybridContentItem.newBuilder().build())
.build();
ApiFuture<HybridInspectResponse> future =
dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
// Do something.
HybridInspectResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<HybridInspectJobTriggerRequest,HybridInspectResponse> |
|
inspectContent(InspectContentRequest request)
public final InspectContentResponse inspectContent(InspectContentRequest request)Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
For how to guides, see https://cloud.google.com/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
InspectContentRequest request =
InspectContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setLocationId("locationId1541836720")
.build();
InspectContentResponse response = dlpServiceClient.inspectContent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
InspectContentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
InspectContentResponse |
|
inspectContentCallable()
public final UnaryCallable<InspectContentRequest,InspectContentResponse> inspectContentCallable()Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
For how to guides, see https://cloud.google.com/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
InspectContentRequest request =
InspectContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setLocationId("locationId1541836720")
.build();
ApiFuture<InspectContentResponse> future =
dlpServiceClient.inspectContentCallable().futureCall(request);
// Do something.
InspectContentResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<InspectContentRequest,InspectContentResponse> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listColumnDataProfiles(@Nullable LocationName parent)
public final DlpServiceClient.ListColumnDataProfilesPagedResponse listColumnDataProfiles(@Nullable LocationName parent)Lists column data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ColumnDataProfile element :
dlpServiceClient.listColumnDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListColumnDataProfilesPagedResponse |
|
listColumnDataProfiles(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListColumnDataProfilesPagedResponse listColumnDataProfiles(@Nullable OrganizationLocationName parent)Lists column data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (ColumnDataProfile element :
dlpServiceClient.listColumnDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListColumnDataProfilesPagedResponse |
|
listColumnDataProfiles(ListColumnDataProfilesRequest request)
public final DlpServiceClient.ListColumnDataProfilesPagedResponse listColumnDataProfiles(ListColumnDataProfilesRequest request)Lists column data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListColumnDataProfilesRequest request =
ListColumnDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (ColumnDataProfile element :
dlpServiceClient.listColumnDataProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListColumnDataProfilesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListColumnDataProfilesPagedResponse |
|
listColumnDataProfiles(String parent)
public final DlpServiceClient.ListColumnDataProfilesPagedResponse listColumnDataProfiles(String parent)Lists column data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
for (ColumnDataProfile element :
dlpServiceClient.listColumnDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListColumnDataProfilesPagedResponse |
|
listColumnDataProfilesCallable()
public final UnaryCallable<ListColumnDataProfilesRequest,ListColumnDataProfilesResponse> listColumnDataProfilesCallable()Lists column data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListColumnDataProfilesRequest request =
ListColumnDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListColumnDataProfilesResponse response =
dlpServiceClient.listColumnDataProfilesCallable().call(request);
for (ColumnDataProfile element : response.getColumnDataProfilesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListColumnDataProfilesRequest,ListColumnDataProfilesResponse> |
|
listColumnDataProfilesPagedCallable()
public final UnaryCallable<ListColumnDataProfilesRequest,DlpServiceClient.ListColumnDataProfilesPagedResponse> listColumnDataProfilesPagedCallable()Lists column data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListColumnDataProfilesRequest request =
ListColumnDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<ColumnDataProfile> future =
dlpServiceClient.listColumnDataProfilesPagedCallable().futureCall(request);
// Do something.
for (ColumnDataProfile element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListColumnDataProfilesRequest,ListColumnDataProfilesPagedResponse> |
|
listConnections(@Nullable LocationName parent)
public final DlpServiceClient.ListConnectionsPagedResponse listConnections(@Nullable LocationName parent)Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Connection element : dlpServiceClient.listConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Resource name of the organization or project, for example,
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListConnectionsPagedResponse |
|
listConnections(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListConnectionsPagedResponse listConnections(@Nullable OrganizationLocationName parent)Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (Connection element : dlpServiceClient.listConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Resource name of the organization or project, for example,
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListConnectionsPagedResponse |
|
listConnections(ListConnectionsRequest request)
public final DlpServiceClient.ListConnectionsPagedResponse listConnections(ListConnectionsRequest request)Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListConnectionsRequest request =
ListConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (Connection element : dlpServiceClient.listConnections(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListConnectionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListConnectionsPagedResponse |
|
listConnections(String parent)
public final DlpServiceClient.ListConnectionsPagedResponse listConnections(String parent)Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Connection element : dlpServiceClient.listConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Resource name of the organization or project, for example,
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListConnectionsPagedResponse |
|
listConnectionsCallable()
public final UnaryCallable<ListConnectionsRequest,ListConnectionsResponse> listConnectionsCallable()Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListConnectionsRequest request =
ListConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListConnectionsResponse response = dlpServiceClient.listConnectionsCallable().call(request);
for (Connection element : response.getConnectionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListConnectionsRequest,ListConnectionsResponse> |
|
listConnectionsPagedCallable()
public final UnaryCallable<ListConnectionsRequest,DlpServiceClient.ListConnectionsPagedResponse> listConnectionsPagedCallable()Lists Connections in a parent. Use SearchConnections to see all connections within an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListConnectionsRequest request =
ListConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<Connection> future =
dlpServiceClient.listConnectionsPagedCallable().futureCall(request);
// Do something.
for (Connection element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListConnectionsRequest,ListConnectionsPagedResponse> |
|
listDeidentifyTemplates(@Nullable LocationName parent)
public final DlpServiceClient.ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(@Nullable LocationName parent)Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DeidentifyTemplate element :
dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDeidentifyTemplatesPagedResponse |
|
listDeidentifyTemplates(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(@Nullable OrganizationLocationName parent)Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (DeidentifyTemplate element :
dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDeidentifyTemplatesPagedResponse |
|
listDeidentifyTemplates(@Nullable OrganizationName parent)
public final DlpServiceClient.ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(@Nullable OrganizationName parent)Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
for (DeidentifyTemplate element :
dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDeidentifyTemplatesPagedResponse |
|
listDeidentifyTemplates(@Nullable ProjectName parent)
public final DlpServiceClient.ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(@Nullable ProjectName parent)Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (DeidentifyTemplate element :
dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDeidentifyTemplatesPagedResponse |
|
listDeidentifyTemplates(ListDeidentifyTemplatesRequest request)
public final DlpServiceClient.ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(ListDeidentifyTemplatesRequest request)Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDeidentifyTemplatesRequest request =
ListDeidentifyTemplatesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
for (DeidentifyTemplate element :
dlpServiceClient.listDeidentifyTemplates(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDeidentifyTemplatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDeidentifyTemplatesPagedResponse |
|
listDeidentifyTemplates(String parent)
public final DlpServiceClient.ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(String parent)Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
for (DeidentifyTemplate element :
dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDeidentifyTemplatesPagedResponse |
|
listDeidentifyTemplatesCallable()
public final UnaryCallable<ListDeidentifyTemplatesRequest,ListDeidentifyTemplatesResponse> listDeidentifyTemplatesCallable()Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDeidentifyTemplatesRequest request =
ListDeidentifyTemplatesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
while (true) {
ListDeidentifyTemplatesResponse response =
dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDeidentifyTemplatesRequest,ListDeidentifyTemplatesResponse> |
|
listDeidentifyTemplatesPagedCallable()
public final UnaryCallable<ListDeidentifyTemplatesRequest,DlpServiceClient.ListDeidentifyTemplatesPagedResponse> listDeidentifyTemplatesPagedCallable()Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDeidentifyTemplatesRequest request =
ListDeidentifyTemplatesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
ApiFuture<DeidentifyTemplate> future =
dlpServiceClient.listDeidentifyTemplatesPagedCallable().futureCall(request);
// Do something.
for (DeidentifyTemplate element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDeidentifyTemplatesRequest,ListDeidentifyTemplatesPagedResponse> |
|
listDiscoveryConfigs(@Nullable LocationName parent)
public final DlpServiceClient.ListDiscoveryConfigsPagedResponse listDiscoveryConfigs(@Nullable LocationName parent)Lists discovery configurations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DiscoveryConfig element : dlpServiceClient.listDiscoveryConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value is as follows: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDiscoveryConfigsPagedResponse |
|
listDiscoveryConfigs(ListDiscoveryConfigsRequest request)
public final DlpServiceClient.ListDiscoveryConfigsPagedResponse listDiscoveryConfigs(ListDiscoveryConfigsRequest request)Lists discovery configurations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDiscoveryConfigsRequest request =
ListDiscoveryConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.build();
for (DiscoveryConfig element : dlpServiceClient.listDiscoveryConfigs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDiscoveryConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDiscoveryConfigsPagedResponse |
|
listDiscoveryConfigs(String parent)
public final DlpServiceClient.ListDiscoveryConfigsPagedResponse listDiscoveryConfigs(String parent)Lists discovery configurations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (DiscoveryConfig element : dlpServiceClient.listDiscoveryConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value is as follows: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDiscoveryConfigsPagedResponse |
|
listDiscoveryConfigsCallable()
public final UnaryCallable<ListDiscoveryConfigsRequest,ListDiscoveryConfigsResponse> listDiscoveryConfigsCallable()Lists discovery configurations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDiscoveryConfigsRequest request =
ListDiscoveryConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDiscoveryConfigsResponse response =
dlpServiceClient.listDiscoveryConfigsCallable().call(request);
for (DiscoveryConfig element : response.getDiscoveryConfigsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDiscoveryConfigsRequest,ListDiscoveryConfigsResponse> |
|
listDiscoveryConfigsPagedCallable()
public final UnaryCallable<ListDiscoveryConfigsRequest,DlpServiceClient.ListDiscoveryConfigsPagedResponse> listDiscoveryConfigsPagedCallable()Lists discovery configurations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDiscoveryConfigsRequest request =
ListDiscoveryConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DiscoveryConfig> future =
dlpServiceClient.listDiscoveryConfigsPagedCallable().futureCall(request);
// Do something.
for (DiscoveryConfig element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDiscoveryConfigsRequest,ListDiscoveryConfigsPagedResponse> |
|
listDlpJobs(@Nullable LocationName parent)
public final DlpServiceClient.ListDlpJobsPagedResponse listDlpJobs(@Nullable LocationName parent)Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDlpJobsPagedResponse |
|
listDlpJobs(@Nullable ProjectName parent)
public final DlpServiceClient.ListDlpJobsPagedResponse listDlpJobs(@Nullable ProjectName parent)Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDlpJobsPagedResponse |
|
listDlpJobs(ListDlpJobsRequest request)
public final DlpServiceClient.ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request)Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDlpJobsRequest request =
ListDlpJobsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setType(DlpJobType.forNumber(0))
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
for (DlpJob element : dlpServiceClient.listDlpJobs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDlpJobsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDlpJobsPagedResponse |
|
listDlpJobs(String parent)
public final DlpServiceClient.ListDlpJobsPagedResponse listDlpJobs(String parent)Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListDlpJobsPagedResponse |
|
listDlpJobsCallable()
public final UnaryCallable<ListDlpJobsRequest,ListDlpJobsResponse> listDlpJobsCallable()Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDlpJobsRequest request =
ListDlpJobsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setType(DlpJobType.forNumber(0))
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
while (true) {
ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
for (DlpJob element : response.getJobsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDlpJobsRequest,ListDlpJobsResponse> |
|
listDlpJobsPagedCallable()
public final UnaryCallable<ListDlpJobsRequest,DlpServiceClient.ListDlpJobsPagedResponse> listDlpJobsPagedCallable()Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListDlpJobsRequest request =
ListDlpJobsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setType(DlpJobType.forNumber(0))
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
ApiFuture<DlpJob> future = dlpServiceClient.listDlpJobsPagedCallable().futureCall(request);
// Do something.
for (DlpJob element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDlpJobsRequest,ListDlpJobsPagedResponse> |
|
listFileStoreDataProfiles(@Nullable LocationName parent)
public final DlpServiceClient.ListFileStoreDataProfilesPagedResponse listFileStoreDataProfiles(@Nullable LocationName parent)Lists file store data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (FileStoreDataProfile element :
dlpServiceClient.listFileStoreDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListFileStoreDataProfilesPagedResponse |
|
listFileStoreDataProfiles(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListFileStoreDataProfilesPagedResponse listFileStoreDataProfiles(@Nullable OrganizationLocationName parent)Lists file store data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (FileStoreDataProfile element :
dlpServiceClient.listFileStoreDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListFileStoreDataProfilesPagedResponse |
|
listFileStoreDataProfiles(ListFileStoreDataProfilesRequest request)
public final DlpServiceClient.ListFileStoreDataProfilesPagedResponse listFileStoreDataProfiles(ListFileStoreDataProfilesRequest request)Lists file store data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListFileStoreDataProfilesRequest request =
ListFileStoreDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (FileStoreDataProfile element :
dlpServiceClient.listFileStoreDataProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFileStoreDataProfilesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListFileStoreDataProfilesPagedResponse |
|
listFileStoreDataProfiles(String parent)
public final DlpServiceClient.ListFileStoreDataProfilesPagedResponse listFileStoreDataProfiles(String parent)Lists file store data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
for (FileStoreDataProfile element :
dlpServiceClient.listFileStoreDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListFileStoreDataProfilesPagedResponse |
|
listFileStoreDataProfilesCallable()
public final UnaryCallable<ListFileStoreDataProfilesRequest,ListFileStoreDataProfilesResponse> listFileStoreDataProfilesCallable()Lists file store data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListFileStoreDataProfilesRequest request =
ListFileStoreDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListFileStoreDataProfilesResponse response =
dlpServiceClient.listFileStoreDataProfilesCallable().call(request);
for (FileStoreDataProfile element : response.getFileStoreDataProfilesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFileStoreDataProfilesRequest,ListFileStoreDataProfilesResponse> |
|
listFileStoreDataProfilesPagedCallable()
public final UnaryCallable<ListFileStoreDataProfilesRequest,DlpServiceClient.ListFileStoreDataProfilesPagedResponse> listFileStoreDataProfilesPagedCallable()Lists file store data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListFileStoreDataProfilesRequest request =
ListFileStoreDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<FileStoreDataProfile> future =
dlpServiceClient.listFileStoreDataProfilesPagedCallable().futureCall(request);
// Do something.
for (FileStoreDataProfile element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFileStoreDataProfilesRequest,ListFileStoreDataProfilesPagedResponse> |
|
listInfoTypes(ListInfoTypesRequest request)
public final ListInfoTypesResponse listInfoTypes(ListInfoTypesRequest request)Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListInfoTypesRequest request =
ListInfoTypesRequest.newBuilder()
.setParent("parent-995424086")
.setLanguageCode("languageCode-2092349083")
.setFilter("filter-1274492040")
.setLocationId("locationId1541836720")
.build();
ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListInfoTypesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ListInfoTypesResponse |
|
listInfoTypes(String parent)
public final ListInfoTypesResponse listInfoTypes(String parent)Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = "parent-995424086";
ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(parent);
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringThe parent resource name. The format of this value is as follows:
|
| Returns | |
|---|---|
| Type | Description |
ListInfoTypesResponse |
|
listInfoTypesCallable()
public final UnaryCallable<ListInfoTypesRequest,ListInfoTypesResponse> listInfoTypesCallable()Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListInfoTypesRequest request =
ListInfoTypesRequest.newBuilder()
.setParent("parent-995424086")
.setLanguageCode("languageCode-2092349083")
.setFilter("filter-1274492040")
.setLocationId("locationId1541836720")
.build();
ApiFuture<ListInfoTypesResponse> future =
dlpServiceClient.listInfoTypesCallable().futureCall(request);
// Do something.
ListInfoTypesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListInfoTypesRequest,ListInfoTypesResponse> |
|
listInspectTemplates(@Nullable LocationName parent)
public final DlpServiceClient.ListInspectTemplatesPagedResponse listInspectTemplates(@Nullable LocationName parent)Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListInspectTemplatesPagedResponse |
|
listInspectTemplates(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListInspectTemplatesPagedResponse listInspectTemplates(@Nullable OrganizationLocationName parent)Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListInspectTemplatesPagedResponse |
|
listInspectTemplates(@Nullable OrganizationName parent)
public final DlpServiceClient.ListInspectTemplatesPagedResponse listInspectTemplates(@Nullable OrganizationName parent)Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListInspectTemplatesPagedResponse |
|
listInspectTemplates(@Nullable ProjectName parent)
public final DlpServiceClient.ListInspectTemplatesPagedResponse listInspectTemplates(@Nullable ProjectName parent)Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListInspectTemplatesPagedResponse |
|
listInspectTemplates(ListInspectTemplatesRequest request)
public final DlpServiceClient.ListInspectTemplatesPagedResponse listInspectTemplates(ListInspectTemplatesRequest request)Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListInspectTemplatesRequest request =
ListInspectTemplatesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
for (InspectTemplate element : dlpServiceClient.listInspectTemplates(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListInspectTemplatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListInspectTemplatesPagedResponse |
|
listInspectTemplates(String parent)
public final DlpServiceClient.ListInspectTemplatesPagedResponse listInspectTemplates(String parent)Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListInspectTemplatesPagedResponse |
|
listInspectTemplatesCallable()
public final UnaryCallable<ListInspectTemplatesRequest,ListInspectTemplatesResponse> listInspectTemplatesCallable()Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListInspectTemplatesRequest request =
ListInspectTemplatesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
while (true) {
ListInspectTemplatesResponse response =
dlpServiceClient.listInspectTemplatesCallable().call(request);
for (InspectTemplate element : response.getInspectTemplatesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListInspectTemplatesRequest,ListInspectTemplatesResponse> |
|
listInspectTemplatesPagedCallable()
public final UnaryCallable<ListInspectTemplatesRequest,DlpServiceClient.ListInspectTemplatesPagedResponse> listInspectTemplatesPagedCallable()Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListInspectTemplatesRequest request =
ListInspectTemplatesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
ApiFuture<InspectTemplate> future =
dlpServiceClient.listInspectTemplatesPagedCallable().futureCall(request);
// Do something.
for (InspectTemplate element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListInspectTemplatesRequest,ListInspectTemplatesPagedResponse> |
|
listJobTriggers(@Nullable LocationName parent)
public final DlpServiceClient.ListJobTriggersPagedResponse listJobTriggers(@Nullable LocationName parent)Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListJobTriggersPagedResponse |
|
listJobTriggers(@Nullable ProjectName parent)
public final DlpServiceClient.ListJobTriggersPagedResponse listJobTriggers(@Nullable ProjectName parent)Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListJobTriggersPagedResponse |
|
listJobTriggers(ListJobTriggersRequest request)
public final DlpServiceClient.ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest request)Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListJobTriggersRequest request =
ListJobTriggersRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.setType(DlpJobType.forNumber(0))
.setLocationId("locationId1541836720")
.build();
for (JobTrigger element : dlpServiceClient.listJobTriggers(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListJobTriggersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListJobTriggersPagedResponse |
|
listJobTriggers(String parent)
public final DlpServiceClient.ListJobTriggersPagedResponse listJobTriggers(String parent)Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListJobTriggersPagedResponse |
|
listJobTriggersCallable()
public final UnaryCallable<ListJobTriggersRequest,ListJobTriggersResponse> listJobTriggersCallable()Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListJobTriggersRequest request =
ListJobTriggersRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.setType(DlpJobType.forNumber(0))
.setLocationId("locationId1541836720")
.build();
while (true) {
ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
for (JobTrigger element : response.getJobTriggersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListJobTriggersRequest,ListJobTriggersResponse> |
|
listJobTriggersPagedCallable()
public final UnaryCallable<ListJobTriggersRequest,DlpServiceClient.ListJobTriggersPagedResponse> listJobTriggersPagedCallable()Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListJobTriggersRequest request =
ListJobTriggersRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.setType(DlpJobType.forNumber(0))
.setLocationId("locationId1541836720")
.build();
ApiFuture<JobTrigger> future =
dlpServiceClient.listJobTriggersPagedCallable().futureCall(request);
// Do something.
for (JobTrigger element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListJobTriggersRequest,ListJobTriggersPagedResponse> |
|
listProjectDataProfiles(@Nullable LocationName parent)
public final DlpServiceClient.ListProjectDataProfilesPagedResponse listProjectDataProfiles(@Nullable LocationName parent)Lists project data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ProjectDataProfile element :
dlpServiceClient.listProjectDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. organizations/{org_id}/locations/{loc_id} |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListProjectDataProfilesPagedResponse |
|
listProjectDataProfiles(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListProjectDataProfilesPagedResponse listProjectDataProfiles(@Nullable OrganizationLocationName parent)Lists project data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (ProjectDataProfile element :
dlpServiceClient.listProjectDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. organizations/{org_id}/locations/{loc_id} |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListProjectDataProfilesPagedResponse |
|
listProjectDataProfiles(ListProjectDataProfilesRequest request)
public final DlpServiceClient.ListProjectDataProfilesPagedResponse listProjectDataProfiles(ListProjectDataProfilesRequest request)Lists project data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListProjectDataProfilesRequest request =
ListProjectDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (ProjectDataProfile element :
dlpServiceClient.listProjectDataProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListProjectDataProfilesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListProjectDataProfilesPagedResponse |
|
listProjectDataProfiles(String parent)
public final DlpServiceClient.ListProjectDataProfilesPagedResponse listProjectDataProfiles(String parent)Lists project data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
for (ProjectDataProfile element :
dlpServiceClient.listProjectDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. organizations/{org_id}/locations/{loc_id} |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListProjectDataProfilesPagedResponse |
|
listProjectDataProfilesCallable()
public final UnaryCallable<ListProjectDataProfilesRequest,ListProjectDataProfilesResponse> listProjectDataProfilesCallable()Lists project data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListProjectDataProfilesRequest request =
ListProjectDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListProjectDataProfilesResponse response =
dlpServiceClient.listProjectDataProfilesCallable().call(request);
for (ProjectDataProfile element : response.getProjectDataProfilesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListProjectDataProfilesRequest,ListProjectDataProfilesResponse> |
|
listProjectDataProfilesPagedCallable()
public final UnaryCallable<ListProjectDataProfilesRequest,DlpServiceClient.ListProjectDataProfilesPagedResponse> listProjectDataProfilesPagedCallable()Lists project data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListProjectDataProfilesRequest request =
ListProjectDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<ProjectDataProfile> future =
dlpServiceClient.listProjectDataProfilesPagedCallable().futureCall(request);
// Do something.
for (ProjectDataProfile element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListProjectDataProfilesRequest,ListProjectDataProfilesPagedResponse> |
|
listStoredInfoTypes(@Nullable LocationName parent)
public final DlpServiceClient.ListStoredInfoTypesPagedResponse listStoredInfoTypes(@Nullable LocationName parent)Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListStoredInfoTypesPagedResponse |
|
listStoredInfoTypes(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListStoredInfoTypesPagedResponse listStoredInfoTypes(@Nullable OrganizationLocationName parent)Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListStoredInfoTypesPagedResponse |
|
listStoredInfoTypes(@Nullable OrganizationName parent)
public final DlpServiceClient.ListStoredInfoTypesPagedResponse listStoredInfoTypes(@Nullable OrganizationName parent)Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListStoredInfoTypesPagedResponse |
|
listStoredInfoTypes(@Nullable ProjectName parent)
public final DlpServiceClient.ListStoredInfoTypesPagedResponse listStoredInfoTypes(@Nullable ProjectName parent)Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ProjectNameRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListStoredInfoTypesPagedResponse |
|
listStoredInfoTypes(ListStoredInfoTypesRequest request)
public final DlpServiceClient.ListStoredInfoTypesPagedResponse listStoredInfoTypes(ListStoredInfoTypesRequest request)Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListStoredInfoTypesRequest request =
ListStoredInfoTypesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListStoredInfoTypesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListStoredInfoTypesPagedResponse |
|
listStoredInfoTypes(String parent)
public final DlpServiceClient.ListStoredInfoTypesPagedResponse listStoredInfoTypes(String parent)Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have specified a processing location: + Projects scope, location specified: The following example parent=projects/example-project/locations/europe-west3 |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListStoredInfoTypesPagedResponse |
|
listStoredInfoTypesCallable()
public final UnaryCallable<ListStoredInfoTypesRequest,ListStoredInfoTypesResponse> listStoredInfoTypesCallable()Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListStoredInfoTypesRequest request =
ListStoredInfoTypesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
while (true) {
ListStoredInfoTypesResponse response =
dlpServiceClient.listStoredInfoTypesCallable().call(request);
for (StoredInfoType element : response.getStoredInfoTypesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListStoredInfoTypesRequest,ListStoredInfoTypesResponse> |
|
listStoredInfoTypesPagedCallable()
public final UnaryCallable<ListStoredInfoTypesRequest,DlpServiceClient.ListStoredInfoTypesPagedResponse> listStoredInfoTypesPagedCallable()Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListStoredInfoTypesRequest request =
ListStoredInfoTypesRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setLocationId("locationId1541836720")
.build();
ApiFuture<StoredInfoType> future =
dlpServiceClient.listStoredInfoTypesPagedCallable().futureCall(request);
// Do something.
for (StoredInfoType element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListStoredInfoTypesRequest,ListStoredInfoTypesPagedResponse> |
|
listTableDataProfiles(@Nullable LocationName parent)
public final DlpServiceClient.ListTableDataProfilesPagedResponse listTableDataProfiles(@Nullable LocationName parent)Lists table data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (TableDataProfile element : dlpServiceClient.listTableDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListTableDataProfilesPagedResponse |
|
listTableDataProfiles(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.ListTableDataProfilesPagedResponse listTableDataProfiles(@Nullable OrganizationLocationName parent)Lists table data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (TableDataProfile element : dlpServiceClient.listTableDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListTableDataProfilesPagedResponse |
|
listTableDataProfiles(ListTableDataProfilesRequest request)
public final DlpServiceClient.ListTableDataProfilesPagedResponse listTableDataProfiles(ListTableDataProfilesRequest request)Lists table data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListTableDataProfilesRequest request =
ListTableDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (TableDataProfile element :
dlpServiceClient.listTableDataProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListTableDataProfilesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListTableDataProfilesPagedResponse |
|
listTableDataProfiles(String parent)
public final DlpServiceClient.ListTableDataProfilesPagedResponse listTableDataProfiles(String parent)Lists table data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
for (TableDataProfile element : dlpServiceClient.listTableDataProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Resource name of the organization or project, for example
|
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.ListTableDataProfilesPagedResponse |
|
listTableDataProfilesCallable()
public final UnaryCallable<ListTableDataProfilesRequest,ListTableDataProfilesResponse> listTableDataProfilesCallable()Lists table data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListTableDataProfilesRequest request =
ListTableDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListTableDataProfilesResponse response =
dlpServiceClient.listTableDataProfilesCallable().call(request);
for (TableDataProfile element : response.getTableDataProfilesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTableDataProfilesRequest,ListTableDataProfilesResponse> |
|
listTableDataProfilesPagedCallable()
public final UnaryCallable<ListTableDataProfilesRequest,DlpServiceClient.ListTableDataProfilesPagedResponse> listTableDataProfilesPagedCallable()Lists table data profiles for an organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ListTableDataProfilesRequest request =
ListTableDataProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageToken("pageToken873572522")
.setPageSize(883849137)
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<TableDataProfile> future =
dlpServiceClient.listTableDataProfilesPagedCallable().futureCall(request);
// Do something.
for (TableDataProfile element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTableDataProfilesRequest,ListTableDataProfilesPagedResponse> |
|
redactImage(RedactImageRequest request)
public final RedactImageResponse redactImage(RedactImageRequest request)Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Only the first frame of each multiframe image is redacted. Metadata and other frames are omitted in the response.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
RedactImageRequest request =
RedactImageRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setLocationId("locationId1541836720")
.setInspectConfig(InspectConfig.newBuilder().build())
.addAllImageRedactionConfigs(new ArrayList<RedactImageRequest.ImageRedactionConfig>())
.setIncludeFindings(true)
.setByteItem(ByteContentItem.newBuilder().build())
.setInspectTemplate("inspectTemplate-2053620050")
.setDeidentifyTemplate("deidentifyTemplate-2141929945")
.build();
RedactImageResponse response = dlpServiceClient.redactImage(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
RedactImageRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
RedactImageResponse |
|
redactImageCallable()
public final UnaryCallable<RedactImageRequest,RedactImageResponse> redactImageCallable()Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images to learn more.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Only the first frame of each multiframe image is redacted. Metadata and other frames are omitted in the response.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
RedactImageRequest request =
RedactImageRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setLocationId("locationId1541836720")
.setInspectConfig(InspectConfig.newBuilder().build())
.addAllImageRedactionConfigs(new ArrayList<RedactImageRequest.ImageRedactionConfig>())
.setIncludeFindings(true)
.setByteItem(ByteContentItem.newBuilder().build())
.setInspectTemplate("inspectTemplate-2053620050")
.setDeidentifyTemplate("deidentifyTemplate-2141929945")
.build();
ApiFuture<RedactImageResponse> future =
dlpServiceClient.redactImageCallable().futureCall(request);
// Do something.
RedactImageResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<RedactImageRequest,RedactImageResponse> |
|
reidentifyContent(ReidentifyContentRequest request)
public final ReidentifyContentResponse reidentifyContent(ReidentifyContentRequest request)Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ReidentifyContentRequest request =
ReidentifyContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setReidentifyConfig(DeidentifyConfig.newBuilder().build())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setReidentifyTemplateName("reidentifyTemplateName157316612")
.setLocationId("locationId1541836720")
.build();
ReidentifyContentResponse response = dlpServiceClient.reidentifyContent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
ReidentifyContentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ReidentifyContentResponse |
|
reidentifyContentCallable()
public final UnaryCallable<ReidentifyContentRequest,ReidentifyContentResponse> reidentifyContentCallable()Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ReidentifyContentRequest request =
ReidentifyContentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setReidentifyConfig(DeidentifyConfig.newBuilder().build())
.setInspectConfig(InspectConfig.newBuilder().build())
.setItem(ContentItem.newBuilder().build())
.setInspectTemplateName("inspectTemplateName1828857433")
.setReidentifyTemplateName("reidentifyTemplateName157316612")
.setLocationId("locationId1541836720")
.build();
ApiFuture<ReidentifyContentResponse> future =
dlpServiceClient.reidentifyContentCallable().futureCall(request);
// Do something.
ReidentifyContentResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ReidentifyContentRequest,ReidentifyContentResponse> |
|
searchConnections(@Nullable LocationName parent)
public final DlpServiceClient.SearchConnectionsPagedResponse searchConnections(@Nullable LocationName parent)Searches for Connections in a parent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Connection element : dlpServiceClient.searchConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.LocationNameRequired. Resource name of the organization or project with a wildcard location,
for example, |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.SearchConnectionsPagedResponse |
|
searchConnections(@Nullable OrganizationLocationName parent)
public final DlpServiceClient.SearchConnectionsPagedResponse searchConnections(@Nullable OrganizationLocationName parent)Searches for Connections in a parent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (Connection element : dlpServiceClient.searchConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.OrganizationLocationNameRequired. Resource name of the organization or project with a wildcard location,
for example, |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.SearchConnectionsPagedResponse |
|
searchConnections(SearchConnectionsRequest request)
public final DlpServiceClient.SearchConnectionsPagedResponse searchConnections(SearchConnectionsRequest request)Searches for Connections in a parent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
SearchConnectionsRequest request =
SearchConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (Connection element : dlpServiceClient.searchConnections(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
SearchConnectionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.SearchConnectionsPagedResponse |
|
searchConnections(String parent)
public final DlpServiceClient.SearchConnectionsPagedResponse searchConnections(String parent)Searches for Connections in a parent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Connection element : dlpServiceClient.searchConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Resource name of the organization or project with a wildcard location,
for example, |
| Returns | |
|---|---|
| Type | Description |
DlpServiceClient.SearchConnectionsPagedResponse |
|
searchConnectionsCallable()
public final UnaryCallable<SearchConnectionsRequest,SearchConnectionsResponse> searchConnectionsCallable()Searches for Connections in a parent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
SearchConnectionsRequest request =
SearchConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
SearchConnectionsResponse response =
dlpServiceClient.searchConnectionsCallable().call(request);
for (Connection element : response.getConnectionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<SearchConnectionsRequest,SearchConnectionsResponse> |
|
searchConnectionsPagedCallable()
public final UnaryCallable<SearchConnectionsRequest,DlpServiceClient.SearchConnectionsPagedResponse> searchConnectionsPagedCallable()Searches for Connections in a parent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
SearchConnectionsRequest request =
SearchConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<Connection> future =
dlpServiceClient.searchConnectionsPagedCallable().futureCall(request);
// Do something.
for (Connection element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<SearchConnectionsRequest,SearchConnectionsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateConnection(@Nullable ConnectionName name)
public final Connection updateConnection(@Nullable ConnectionName name)Update a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
ConnectionName name =
ConnectionName.ofProjectLocationConnectionName("[PROJECT]", "[LOCATION]", "[CONNECTION]");
Connection response = dlpServiceClient.updateConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.ConnectionNameRequired. Resource name in the format:
|
| Returns | |
|---|---|
| Type | Description |
Connection |
|
updateConnection(UpdateConnectionRequest request)
public final Connection updateConnection(UpdateConnectionRequest request)Update a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateConnectionRequest request =
UpdateConnectionRequest.newBuilder()
.setName(
ConnectionName.ofProjectLocationConnectionName(
"[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString())
.setConnection(Connection.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Connection response = dlpServiceClient.updateConnection(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateConnectionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Connection |
|
updateConnection(String name)
public final Connection updateConnection(String name)Update a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
ConnectionName.ofProjectLocationConnectionName("[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString();
Connection response = dlpServiceClient.updateConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name in the format:
|
| Returns | |
|---|---|
| Type | Description |
Connection |
|
updateConnectionCallable()
public final UnaryCallable<UpdateConnectionRequest,Connection> updateConnectionCallable()Update a Connection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateConnectionRequest request =
UpdateConnectionRequest.newBuilder()
.setName(
ConnectionName.ofProjectLocationConnectionName(
"[PROJECT]", "[LOCATION]", "[CONNECTION]")
.toString())
.setConnection(Connection.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Connection> future =
dlpServiceClient.updateConnectionCallable().futureCall(request);
// Do something.
Connection response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateConnectionRequest,Connection> |
|
updateDeidentifyTemplate(@Nullable DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask)
public final DeidentifyTemplate updateDeidentifyTemplate(@Nullable DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask)Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DeidentifyTemplateName name =
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DeidentifyTemplateNameRequired. Resource name of organization and deidentify template to be updated, for
example |
deidentifyTemplate |
DeidentifyTemplateNew DeidentifyTemplate value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
updateDeidentifyTemplate(UpdateDeidentifyTemplateRequest request)
public final DeidentifyTemplate updateDeidentifyTemplate(UpdateDeidentifyTemplateRequest request)Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateDeidentifyTemplateRequest request =
UpdateDeidentifyTemplateRequest.newBuilder()
.setName(
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString())
.setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateDeidentifyTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
updateDeidentifyTemplate(String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask)
public final DeidentifyTemplate updateDeidentifyTemplate(String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask)Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString();
DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DeidentifyTemplate response =
dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of organization and deidentify template to be updated, for
example |
deidentifyTemplate |
DeidentifyTemplateNew DeidentifyTemplate value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
DeidentifyTemplate |
|
updateDeidentifyTemplateCallable()
public final UnaryCallable<UpdateDeidentifyTemplateRequest,DeidentifyTemplate> updateDeidentifyTemplateCallable()Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateDeidentifyTemplateRequest request =
UpdateDeidentifyTemplateRequest.newBuilder()
.setName(
DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
"[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
.toString())
.setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<DeidentifyTemplate> future =
dlpServiceClient.updateDeidentifyTemplateCallable().futureCall(request);
// Do something.
DeidentifyTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateDeidentifyTemplateRequest,DeidentifyTemplate> |
|
updateDiscoveryConfig(@Nullable DiscoveryConfigName name, DiscoveryConfig discoveryConfig, FieldMask updateMask)
public final DiscoveryConfig updateDiscoveryConfig(@Nullable DiscoveryConfigName name, DiscoveryConfig discoveryConfig, FieldMask updateMask)Updates a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
DiscoveryConfigName name =
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]");
DiscoveryConfig discoveryConfig = DiscoveryConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DiscoveryConfig response =
dlpServiceClient.updateDiscoveryConfig(name, discoveryConfig, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.DiscoveryConfigNameRequired. Resource name of the project and the configuration, for example
|
discoveryConfig |
DiscoveryConfigRequired. New DiscoveryConfig value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
updateDiscoveryConfig(UpdateDiscoveryConfigRequest request)
public final DiscoveryConfig updateDiscoveryConfig(UpdateDiscoveryConfigRequest request)Updates a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateDiscoveryConfigRequest request =
UpdateDiscoveryConfigRequest.newBuilder()
.setName(
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]")
.toString())
.setDiscoveryConfig(DiscoveryConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
DiscoveryConfig response = dlpServiceClient.updateDiscoveryConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateDiscoveryConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
updateDiscoveryConfig(String name, DiscoveryConfig discoveryConfig, FieldMask updateMask)
public final DiscoveryConfig updateDiscoveryConfig(String name, DiscoveryConfig discoveryConfig, FieldMask updateMask)Updates a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]").toString();
DiscoveryConfig discoveryConfig = DiscoveryConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DiscoveryConfig response =
dlpServiceClient.updateDiscoveryConfig(name, discoveryConfig, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the project and the configuration, for example
|
discoveryConfig |
DiscoveryConfigRequired. New DiscoveryConfig value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
DiscoveryConfig |
|
updateDiscoveryConfigCallable()
public final UnaryCallable<UpdateDiscoveryConfigRequest,DiscoveryConfig> updateDiscoveryConfigCallable()Updates a discovery configuration.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateDiscoveryConfigRequest request =
UpdateDiscoveryConfigRequest.newBuilder()
.setName(
DiscoveryConfigName.of("[PROJECT]", "[LOCATION]", "[DISCOVERY_CONFIG]")
.toString())
.setDiscoveryConfig(DiscoveryConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<DiscoveryConfig> future =
dlpServiceClient.updateDiscoveryConfigCallable().futureCall(request);
// Do something.
DiscoveryConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateDiscoveryConfigRequest,DiscoveryConfig> |
|
updateInspectTemplate(@Nullable InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask)
public final InspectTemplate updateInspectTemplate(@Nullable InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask)Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
InspectTemplateName name =
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]");
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
InspectTemplate response =
dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.InspectTemplateNameRequired. Resource name of organization and inspectTemplate to be updated, for
example |
inspectTemplate |
InspectTemplateNew InspectTemplate value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
updateInspectTemplate(UpdateInspectTemplateRequest request)
public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest request)Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateInspectTemplateRequest request =
UpdateInspectTemplateRequest.newBuilder()
.setName(
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]")
.toString())
.setInspectTemplate(InspectTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
InspectTemplate response = dlpServiceClient.updateInspectTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateInspectTemplateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
updateInspectTemplate(String name, InspectTemplate inspectTemplate, FieldMask updateMask)
public final InspectTemplate updateInspectTemplate(String name, InspectTemplate inspectTemplate, FieldMask updateMask)Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
InspectTemplateName.ofOrganizationInspectTemplateName(
"[ORGANIZATION]", "[INSPECT_TEMPLATE]")
.toString();
InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
InspectTemplate response =
dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of organization and inspectTemplate to be updated, for
example |
inspectTemplate |
InspectTemplateNew InspectTemplate value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
InspectTemplate |
|
updateInspectTemplateCallable()
public final UnaryCallable<UpdateInspectTemplateRequest,InspectTemplate> updateInspectTemplateCallable()Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateInspectTemplateRequest request =
UpdateInspectTemplateRequest.newBuilder()
.setName(
InspectTemplateName.ofProjectLocationInspectTemplateName(
"[PROJECT]", "[LOCATION]", "[INSPECT_TEMPLATE]")
.toString())
.setInspectTemplate(InspectTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<InspectTemplate> future =
dlpServiceClient.updateInspectTemplateCallable().futureCall(request);
// Do something.
InspectTemplate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateInspectTemplateRequest,InspectTemplate> |
|
updateJobTrigger(@Nullable JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask)
public final JobTrigger updateJobTrigger(@Nullable JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask)Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
JobTrigger jobTrigger = JobTrigger.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.JobTriggerNameRequired. Resource name of the project and the triggeredJob, for example
|
jobTrigger |
JobTriggerNew JobTrigger value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
updateJobTrigger(UpdateJobTriggerRequest request)
public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request)Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateJobTriggerRequest request =
UpdateJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.setJobTrigger(JobTrigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
JobTrigger response = dlpServiceClient.updateJobTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateJobTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
updateJobTrigger(String name, JobTrigger jobTrigger, FieldMask updateMask)
public final JobTrigger updateJobTrigger(String name, JobTrigger jobTrigger, FieldMask updateMask)Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
JobTrigger jobTrigger = JobTrigger.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of the project and the triggeredJob, for example
|
jobTrigger |
JobTriggerNew JobTrigger value. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
JobTrigger |
|
updateJobTriggerCallable()
public final UnaryCallable<UpdateJobTriggerRequest,JobTrigger> updateJobTriggerCallable()Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateJobTriggerRequest request =
UpdateJobTriggerRequest.newBuilder()
.setName(
JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
.setJobTrigger(JobTrigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<JobTrigger> future =
dlpServiceClient.updateJobTriggerCallable().futureCall(request);
// Do something.
JobTrigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateJobTriggerRequest,JobTrigger> |
|
updateStoredInfoType(@Nullable StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask)
public final StoredInfoType updateStoredInfoType(@Nullable StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask)Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
StoredInfoTypeName name =
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]");
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.privacy.dlp.v2.StoredInfoTypeNameRequired. Resource name of organization and storedInfoType to be updated, for
example |
config |
StoredInfoTypeConfigUpdated configuration for the storedInfoType. If not provided, a new version of the storedInfoType will be created with the existing configuration. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
updateStoredInfoType(UpdateStoredInfoTypeRequest request)
public final StoredInfoType updateStoredInfoType(UpdateStoredInfoTypeRequest request)Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateStoredInfoTypeRequest request =
UpdateStoredInfoTypeRequest.newBuilder()
.setName(
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString())
.setConfig(StoredInfoTypeConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
StoredInfoType response = dlpServiceClient.updateStoredInfoType(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateStoredInfoTypeRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
updateStoredInfoType(String name, StoredInfoTypeConfig config, FieldMask updateMask)
public final StoredInfoType updateStoredInfoType(String name, StoredInfoTypeConfig config, FieldMask updateMask)Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
String name =
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString();
StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. Resource name of organization and storedInfoType to be updated, for
example |
config |
StoredInfoTypeConfigUpdated configuration for the storedInfoType. If not provided, a new version of the storedInfoType will be created with the existing configuration. |
updateMask |
FieldMaskMask to control which fields get updated. |
| Returns | |
|---|---|
| Type | Description |
StoredInfoType |
|
updateStoredInfoTypeCallable()
public final UnaryCallable<UpdateStoredInfoTypeRequest,StoredInfoType> updateStoredInfoTypeCallable()Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
UpdateStoredInfoTypeRequest request =
UpdateStoredInfoTypeRequest.newBuilder()
.setName(
StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
"[ORGANIZATION]", "[STORED_INFO_TYPE]")
.toString())
.setConfig(StoredInfoTypeConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<StoredInfoType> future =
dlpServiceClient.updateStoredInfoTypeCallable().futureCall(request);
// Do something.
StoredInfoType response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateStoredInfoTypeRequest,StoredInfoType> |
|