FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove deprecated references to categories and fix paths. (#1164) · cjac/java-docs-samples@909480a · GitHub

Commit 909480a

Browse files
authored andcommitted
Remove deprecated references to categories and fix paths. (GoogleCloudPlatform#1164)
* Remove deprecated references to categories * Correct the paths to the jar in the instructions.
1 parent 2e5996c commit 909480a

1 file changed

Lines changed: 12 additions & 19 deletions

File tree

‎dlp/README.md‎

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,26 @@ and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to th
1919
This project uses the [Assembly Plugin](https://maven.apache.org/plugins/maven-assembly-plugin/usage.html) to build an uber jar.
2020
Run:
2121
```
22-
mvn clean package
22+
mvn clean package -DskipTests
2323
```
2424

2525
## Retrieve InfoTypes
2626
An [InfoType identifier](https://cloud.google.com/dlp/docs/infotypes-categories) represents an element of sensitive data.
2727

28-
[Info types](https://cloud.google.com/dlp/docs/infotypes-reference#global) are updated periodically. Use the API to retrieve the most current
29-
info types for a given category. eg. HEALTH or GOVERNMENT.
28+
[InfoTypes](https://cloud.google.com/dlp/docs/infotypes-reference#global) are updated periodically. Use the API to retrieve the most current InfoTypes.
3029
```
31-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Metadata -category GOVERNMENT
30+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Metadata
3231
```
3332

34-
## Retrieve Categories
35-
[Categories](https://cloud.google.com/dlp/docs/infotypes-categories) provide a way to easily access a group of related InfoTypes.
36-
```
37-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Metadata
38-
```
39-
4033
## Run the quickstart
4134

4235
The Quickstart demonstrates using the DLP API to identify an InfoType in a given string.
4336
```
44-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.QuickStart
37+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.QuickStart
4538
```
4639

4740
## Inspect data for sensitive elements
48-
Inspect strings, files locally and on Google Cloud Storage and Cloud Datastore kinds with the DLP API.
41+
Inspect strings, files locally and on Google Cloud Storage, Cloud Datastore, and BigQuery with the DLP API.
4942

5043
Note: image scanning is not currently supported on Google Cloud Storage.
5144
For more information, refer to the [API documentation](https://cloud.google.com/dlp/docs).
@@ -73,21 +66,21 @@ Options:
7366
### Examples
7467
- Inspect a string:
7568
```
76-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" --infoTypes PHONE_NUMBER EMAIL_ADDRESS
77-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" -customDictionaries me@somedomain.com -customRegexes "\(\d{3}\) \d{3}-\d{4}"
69+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" --infoTypes PHONE_NUMBER EMAIL_ADDRESS
70+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" -customDictionaries me@somedomain.com -customRegexes "\(\d{3}\) \d{3}-\d{4}"
7871
```
7972
- Inspect a local file (text / image):
8073
```
81-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS
82-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.png --infoTypes PHONE_NUMBER EMAIL_ADDRESS
74+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS
75+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.png --infoTypes PHONE_NUMBER EMAIL_ADDRESS
8376
```
8477
- Inspect a file on Google Cloud Storage:
8578
```
86-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -gcs -bucketName my-bucket -fileName my-file.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS
79+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -gcs -bucketName my-bucket -fileName my-file.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS
8780
```
8881
- Inspect a Google Cloud Datastore kind:
8982
```
90-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -ds -kind my-kind --infoTypes PHONE_NUMBER EMAIL_ADDRESS
83+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -ds -kind my-kind --infoTypes PHONE_NUMBER EMAIL_ADDRESS
9184
```
9285

9386
## Automatic redaction of sensitive data from images
@@ -109,7 +102,7 @@ Commands:
109102
### Example
110103
- Redact phone numbers and email addresses from `test.png`:
111104
```
112-
java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Redact -f src/test/resources/test.png -o test-redacted.png -infoTypes PHONE_NUMBER EMAIL_ADDRESS
105+
java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Redact -f src/test/resources/test.png -o test-redacted.png -infoTypes PHONE_NUMBER EMAIL_ADDRESS
113106
```
114107

115108
## Integration tests

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL