Skip navigation links

Package com.google.cloud.dlp.v2beta1

A client to DLP API.

See: Description

Package com.google.cloud.dlp.v2beta1 Description

A client to DLP API.

The interfaces provided are listed below, along with usage samples.

================ DlpServiceClient ================

Service Description: The DLP API is a service that allows clients to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data in user-supplied, unstructured data streams, like text blocks or images. The service also includes methods for sensitive data redaction and scheduling of data scans on Google Cloud Platform based data sets.

Sample for DlpServiceClient:

 
 try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
   String name = "EMAIL_ADDRESS";
   InfoType infoTypesElement = InfoType.newBuilder()
     .setName(name)
     .build();
   List<InfoType> infoTypes = Arrays.asList(infoTypesElement);
   InspectConfig inspectConfig = InspectConfig.newBuilder()
     .addAllInfoTypes(infoTypes)
     .build();
   String type = "text/plain";
   String value = "My email is example @example.com.";
   ContentItem itemsElement = ContentItem.newBuilder()
     .setType(type)
     .setValue(value)
     .build();
   List<ContentItem> items = Arrays.asList(itemsElement);
   InspectContentResponse response = dlpServiceClient.inspectContent(inspectConfig, items);
 }
 
 
Skip navigation links

Copyright © 2018 Google LLC. All rights reserved.