@@ -7,7 +7,7 @@ Google Data Loss Prevention Python Samples
77 :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/README.rst
88
99
10- This directory contains samples for Google Data Loss Prevention. `Google Data Loss Prevention `_ provides programmatic access to a powerful detection engine for personally identifiable information and other privacy-sensitive data in unstructured data streams. ** This api is currently in beta **.
10+ This directory contains samples for Google Data Loss Prevention. `Google Data Loss Prevention `_ provides programmatic access to a powerful detection engine for personally identifiable information and other privacy-sensitive data in unstructured data streams.
1111
1212
1313
@@ -59,7 +59,7 @@ Quickstart
5959+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6060
6161.. image :: https://gstatic.com/cloudssh/images/open-btn.png
62- :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/quickstart.py, dlp/README.rst
62+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/quickstart.py; dlp/README.rst
6363
6464
6565
@@ -75,7 +75,7 @@ Inspect Content
7575+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7676
7777.. image :: https://gstatic.com/cloudssh/images/open-btn.png
78- :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/inspect_content.py, dlp/README.rst
78+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/inspect_content.py; dlp/README.rst
7979
8080
8181
@@ -109,7 +109,7 @@ Redact Content
109109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
110110
111111.. image :: https://gstatic.com/cloudssh/images/open-btn.png
112- :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/redact.py, dlp/README.rst
112+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/redact.py; dlp/README.rst
113113
114114
115115
@@ -152,11 +152,11 @@ To run this sample:
152152
153153
154154
155- Display Metadata
155+ Metadata
156156+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
157157
158158.. image:: https://gstatic.com/cloudssh/images/open-btn.png
159- :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/metadata.py, dlp/README.rst
159+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/metadata.py; dlp/README.rst
160160
161161
162162
@@ -182,6 +182,168 @@ To run this sample:
182182
183183
184184
185+ Jobs
186+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
187+
188+ .. image:: https://gstatic.com/cloudssh/images/open-btn.png
189+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/jobs.py;dlp/README.rst
190+
191+
192+
193+
194+ To run this sample:
195+
196+ .. code-block:: bash
197+
198+ $ python jobs.py
199+
200+ usage: jobs.py [-h] {list,delete} ...
201+
202+ Sample app to list and delete DLP jobs using the Data Loss Prevent API.
203+
204+ positional arguments:
205+ {list,delete} Select how to submit content to the API.
206+ list List Data Loss Prevention API jobs corresponding to a given
207+ filter.
208+ delete Delete results of a Data Loss Prevention API job.
209+
210+ optional arguments:
211+ -h, --help show this help message and exit
212+
213+
214+
215+ Templates
216+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
217+
218+ .. image:: https://gstatic.com/cloudssh/images/open-btn.png
219+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/templates.py;dlp/README.rst
220+
221+
222+
223+
224+ To run this sample:
225+
226+ .. code-block:: bash
227+
228+ $ python templates.py
229+
230+ usage: templates.py [-h] {create,list,delete} ...
231+
232+ Sample app that sets up Data Loss Prevention API inspect templates.
233+
234+ positional arguments:
235+ {create,list,delete} Select which action to perform.
236+ create Create a template.
237+ list List all templates.
238+ delete Delete a template.
239+
240+ optional arguments:
241+ -h, --help show this help message and exit
242+
243+
244+
245+ Triggers
246+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
247+
248+ .. image:: https://gstatic.com/cloudssh/images/open-btn.png
249+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/triggers.py;dlp/README.rst
250+
251+
252+
253+
254+ To run this sample:
255+
256+ .. code-block:: bash
257+
258+ $ python triggers.py
259+
260+ usage: triggers.py [-h] {create,list,delete} ...
261+
262+ Sample app that sets up Data Loss Prevention API automation triggers.
263+
264+ positional arguments:
265+ {create,list,delete} Select which action to perform.
266+ create Create a trigger.
267+ list List all triggers.
268+ delete Delete a trigger.
269+
270+ optional arguments:
271+ -h, --help show this help message and exit
272+
273+
274+
275+ Risk Analysis
276+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
277+
278+ .. image:: https://gstatic.com/cloudssh/images/open-btn.png
279+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/risk.py;dlp/README.rst
280+
281+
282+
283+
284+ To run this sample:
285+
286+ .. code-block:: bash
287+
288+ $ python risk.py
289+
290+ usage: risk.py [-h] {numerical,categorical,k_anonymity,l_diversity,k_map} ...
291+
292+ Sample app that uses the Data Loss Prevent API to perform risk anaylsis.
293+
294+ positional arguments:
295+ {numerical,categorical,k_anonymity,l_diversity,k_map}
296+ Select how to submit content to the API.
297+ numerical
298+ categorical
299+ k_anonymity Computes the k-anonymity of a column set in a Google
300+ BigQuerytable.
301+ l_diversity Computes the l-diversity of a column set in a Google
302+ BigQuerytable.
303+ k_map Computes the k-map risk estimation of a column set in
304+ a GoogleBigQuery table.
305+
306+ optional arguments:
307+ -h, --help show this help message and exit
308+
309+
310+
311+ DeID
312+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
313+
314+ .. image:: https://gstatic.com/cloudssh/images/open-btn.png
315+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dlp/deid.py;dlp/README.rst
316+
317+
318+
319+
320+ To run this sample:
321+
322+ .. code-block:: bash
323+
324+ $ python deid.py
325+
326+ usage: deid.py [-h] {deid_mask,deid_fpe,reid_fpe,deid_date_shift} ...
327+
328+ Uses of the Data Loss Prevention API for deidentifying sensitive data.
329+
330+ positional arguments:
331+ {deid_mask,deid_fpe,reid_fpe,deid_date_shift}
332+ Select how to submit content to the API.
333+ deid_mask Deidentify sensitive data in a string by masking it
334+ with a character.
335+ deid_fpe Deidentify sensitive data in a string using Format
336+ Preserving Encryption (FPE).
337+ reid_fpe Reidentify sensitive data in a string using Format
338+ Preserving Encryption (FPE).
339+ deid_date_shift Deidentify dates in a CSV file by pseudorandomly
340+ shifting them.
341+
342+ optional arguments:
343+ -h, --help show this help message and exit
344+
345+
346+
185347
186348
187349The client library
0 commit comments