blob: fade53d414ee1ad88272ae9ffdaa9e5ed73163b6 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dlp_v2.html">Cloud Data Loss Prevention (DLP) API</a> . <a href="dlp_v2.projects.html">projects</a> . <a href="dlp_v2.projects.inspectTemplates.html">inspectTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates an InspectTemplate for re-using frequently used configuration</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes an InspectTemplate.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets an InspectTemplate.</p>
86<p class="toc_element">
87 <code><a href="#list">list(parent, orderBy=None, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p>
88<p class="firstline">Lists InspectTemplates.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#patch">patch(name, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates the InspectTemplate.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(parent, body, x__xgafv=None)</code>
98 <pre>Creates an InspectTemplate for re-using frequently used configuration
99for inspecting content, images, and storage.
100See https://cloud.google.com/dlp/docs/creating-templates to learn more.
101
102Args:
103 parent: string, The parent resource name, for example projects/my-project-id or
104organizations/my-org-id. (required)
105 body: object, The request body. (required)
106 The object takes the form of:
107
108{ # Request message for CreateInspectTemplate.
109 "inspectTemplate": { # The inspectTemplate contains a configuration (set of types of sensitive data # The InspectTemplate to create.
110 # to be detected) to be used anywhere you otherwise would normally specify
111 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
112 # to learn more.
113 "updateTime": "A String", # The last update timestamp of a inspectTemplate, output only field.
114 "displayName": "A String", # Display name (max 256 chars).
115 "description": "A String", # Short description (max 256 chars).
116 "inspectConfig": { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
117 # When used with redactContent only info_types and min_likelihood are currently
118 # used.
119 "excludeInfoTypes": True or False, # When true, excludes type information of the findings.
120 "limits": {
121 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job.
122 # When set within `InspectContentRequest`, the maximum returned is 2000
123 # regardless if this is set higher.
124 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes.
125 { # Max findings configuration per infoType, per content item or long
126 # running DlpJob.
127 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
128 # info_type should be provided. If InfoTypeLimit does not have an
129 # info_type, the DLP API applies the limit against all info_types that
130 # are found but not specified in another InfoTypeLimit.
131 "name": "A String", # Name of the information type. Either a name of your choosing when
132 # creating a CustomInfoType, or one of the names listed
133 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
134 # a built-in type. InfoType names should conform to the pattern
135 # [a-zA-Z0-9_]{1,64}.
136 },
137 "maxFindings": 42, # Max findings limit for the given infoType.
138 },
139 ],
140 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned.
141 # When set within `InspectDataSourceRequest`,
142 # the maximum returned is 2000 regardless if this is set higher.
143 # When set within `InspectContentRequest`, this field is ignored.
144 },
145 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is
146 # POSSIBLE.
147 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
148 "customInfoTypes": [ # CustomInfoTypes provided by the user. See
149 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
150 { # Custom information type provided by the user. Used to find domain-specific
151 # sensitive information configurable to the data in question.
152 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
153 "pattern": "A String", # Pattern defining the regular expression. Its syntax
154 # (https://github.com/google/re2/wiki/Syntax) can be found under the
155 # google/re2 repository on GitHub.
156 "groupIndexes": [ # The index of the submatch to extract as findings. When not
157 # specified, the entire match is returned. No more than 3 may be included.
158 42,
159 ],
160 },
161 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
162 # support reversing.
163 # such as
164 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
165 # These types of transformations are
166 # those that perform pseudonymization, thereby producing a "surrogate" as
167 # output. This should be used in conjunction with a field on the
168 # transformation such as `surrogate_info_type`. This CustomInfoType does
169 # not support the use of `detection_rules`.
170 },
171 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
172 # infoType, when the name matches one of existing infoTypes and that infoType
173 # is specified in `InspectContent.info_types` field. Specifying the latter
174 # adds findings to the one detected by the system. If built-in info type is
175 # not specified in `InspectContent.info_types` list then the name is treated
176 # as a custom info type.
177 "name": "A String", # Name of the information type. Either a name of your choosing when
178 # creating a CustomInfoType, or one of the names listed
179 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
180 # a built-in type. InfoType names should conform to the pattern
181 # [a-zA-Z0-9_]{1,64}.
182 },
183 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
184 # be used to match sensitive information specific to the data, such as a list
185 # of employee IDs or job titles.
186 #
187 # Dictionary words are case-insensitive and all characters other than letters
188 # and digits in the unicode [Basic Multilingual
189 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
190 # will be replaced with whitespace when scanning for matches, so the
191 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
192 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
193 # surrounding any match must be of a different type than the adjacent
194 # characters within the word, so letters must be next to non-letters and
195 # digits next to non-digits. For example, the dictionary word "jen" will
196 # match the first three letters of the text "jen123" but will return no
197 # matches for "jennifer".
198 #
199 # Dictionary words containing a large number of characters that are not
200 # letters or digits may result in unexpected findings because such characters
201 # are treated as whitespace. The
202 # [limits](https://cloud.google.com/dlp/limits) page contains details about
203 # the size limits of dictionaries. For dictionaries that do not fit within
204 # these constraints, consider using `LargeCustomDictionaryConfig` in the
205 # `StoredInfoType` API.
206 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
207 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
208 # at least one phrase and every phrase must contain at least 2 characters
209 # that are letters or digits. [required]
210 "A String",
211 ],
212 },
213 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
214 # is accepted.
215 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
216 # Example: gs://[BUCKET_NAME]/dictionary.txt
217 },
218 },
219 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
220 # `InspectDataSource`. Not currently supported in `InspectContent`.
221 "name": "A String", # Resource name of the requested `StoredInfoType`, for example
222 # `organizations/433245324/storedInfoTypes/432452342` or
223 # `projects/project-id/storedInfoTypes/432452342`.
224 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for
225 # inspection was created. Output-only field, populated by the system.
226 },
227 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType.
228 # Rules are applied in order that they are specified. Not supported for the
229 # `surrogate_type` CustomInfoType.
230 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
231 # `CustomInfoType` to alter behavior under certain circumstances, depending
232 # on the specific details of the rule. Not supported for the `surrogate_type`
233 # custom infoType.
234 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
235 # proximity of hotwords.
236 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
237 # The total length of the window cannot exceed 1000 characters. Note that
238 # the finding itself will be included in the window, so that hotwords may
239 # be used to match substrings of the finding itself. For example, the
240 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
241 # adjusted upwards if the area code is known to be the local area code of
242 # a company office using the hotword regex "\(xxx\)", where "xxx"
243 # is the area code in question.
244 # rule.
245 "windowAfter": 42, # Number of characters after the finding to consider.
246 "windowBefore": 42, # Number of characters before the finding to consider.
247 },
248 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
249 "pattern": "A String", # Pattern defining the regular expression. Its syntax
250 # (https://github.com/google/re2/wiki/Syntax) can be found under the
251 # google/re2 repository on GitHub.
252 "groupIndexes": [ # The index of the submatch to extract as findings. When not
253 # specified, the entire match is returned. No more than 3 may be included.
254 42,
255 ],
256 },
257 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
258 # part of a detection rule.
259 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
260 # levels. For example, if a finding would be `POSSIBLE` without the
261 # detection rule and `relative_likelihood` is 1, then it is upgraded to
262 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
263 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
264 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
265 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
266 # a final likelihood of `LIKELY`.
267 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
268 },
269 },
270 },
271 ],
272 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
273 # to be returned. It still can be used for rules matching.
274 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be
275 # altered by a detection rule if the finding meets the criteria specified by
276 # the rule. Defaults to `VERY_LIKELY` if not specified.
277 },
278 ],
279 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
280 # included in the response; see Finding.quote.
281 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig.
282 # Exclusion rules, contained in the set are executed in the end, other
283 # rules are executed in the order they are specified for each info type.
284 { # Rule set for modifying a set of infoTypes to alter behavior under certain
285 # circumstances, depending on the specific details of the rules within the set.
286 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order.
287 { # A single inspection rule to be applied to infoTypes, specified in
288 # `InspectionRuleSet`.
289 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
290 # proximity of hotwords.
291 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
292 # The total length of the window cannot exceed 1000 characters. Note that
293 # the finding itself will be included in the window, so that hotwords may
294 # be used to match substrings of the finding itself. For example, the
295 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
296 # adjusted upwards if the area code is known to be the local area code of
297 # a company office using the hotword regex "\(xxx\)", where "xxx"
298 # is the area code in question.
299 # rule.
300 "windowAfter": 42, # Number of characters after the finding to consider.
301 "windowBefore": 42, # Number of characters before the finding to consider.
302 },
303 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
304 "pattern": "A String", # Pattern defining the regular expression. Its syntax
305 # (https://github.com/google/re2/wiki/Syntax) can be found under the
306 # google/re2 repository on GitHub.
307 "groupIndexes": [ # The index of the submatch to extract as findings. When not
308 # specified, the entire match is returned. No more than 3 may be included.
309 42,
310 ],
311 },
312 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
313 # part of a detection rule.
314 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
315 # levels. For example, if a finding would be `POSSIBLE` without the
316 # detection rule and `relative_likelihood` is 1, then it is upgraded to
317 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
318 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
319 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
320 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
321 # a final likelihood of `LIKELY`.
322 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
323 },
324 },
325 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
326 # `InspectionRuleSet` are removed from results.
327 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule.
328 "pattern": "A String", # Pattern defining the regular expression. Its syntax
329 # (https://github.com/google/re2/wiki/Syntax) can be found under the
330 # google/re2 repository on GitHub.
331 "groupIndexes": [ # The index of the submatch to extract as findings. When not
332 # specified, the entire match is returned. No more than 3 may be included.
333 42,
334 ],
335 },
336 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
337 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
338 # contained within with a finding of an infoType from this list. For
339 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
340 # `exclusion_rule` containing `exclude_info_types.info_types` with
341 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
342 # with EMAIL_ADDRESS finding.
343 # That leads to "555-222-2222@example.org" to generate only a single
344 # finding, namely email address.
345 { # Type of information detected by the API.
346 "name": "A String", # Name of the information type. Either a name of your choosing when
347 # creating a CustomInfoType, or one of the names listed
348 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
349 # a built-in type. InfoType names should conform to the pattern
350 # [a-zA-Z0-9_]{1,64}.
351 },
352 ],
353 },
354 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
355 # be used to match sensitive information specific to the data, such as a list
356 # of employee IDs or job titles.
357 #
358 # Dictionary words are case-insensitive and all characters other than letters
359 # and digits in the unicode [Basic Multilingual
360 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
361 # will be replaced with whitespace when scanning for matches, so the
362 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
363 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
364 # surrounding any match must be of a different type than the adjacent
365 # characters within the word, so letters must be next to non-letters and
366 # digits next to non-digits. For example, the dictionary word "jen" will
367 # match the first three letters of the text "jen123" but will return no
368 # matches for "jennifer".
369 #
370 # Dictionary words containing a large number of characters that are not
371 # letters or digits may result in unexpected findings because such characters
372 # are treated as whitespace. The
373 # [limits](https://cloud.google.com/dlp/limits) page contains details about
374 # the size limits of dictionaries. For dictionaries that do not fit within
375 # these constraints, consider using `LargeCustomDictionaryConfig` in the
376 # `StoredInfoType` API.
377 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
378 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
379 # at least one phrase and every phrase must contain at least 2 characters
380 # that are letters or digits. [required]
381 "A String",
382 ],
383 },
384 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
385 # is accepted.
386 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
387 # Example: gs://[BUCKET_NAME]/dictionary.txt
388 },
389 },
390 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details.
391 },
392 },
393 ],
394 "infoTypes": [ # List of infoTypes this rule set is applied to.
395 { # Type of information detected by the API.
396 "name": "A String", # Name of the information type. Either a name of your choosing when
397 # creating a CustomInfoType, or one of the names listed
398 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
399 # a built-in type. InfoType names should conform to the pattern
400 # [a-zA-Z0-9_]{1,64}.
401 },
402 ],
403 },
404 ],
405 "contentOptions": [ # List of options defining data content to scan.
406 # If empty, text, images, and other content will be included.
407 "A String",
408 ],
409 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to
410 # InfoType values returned by ListInfoTypes or listed at
411 # https://cloud.google.com/dlp/docs/infotypes-reference.
412 #
413 # When no InfoTypes or CustomInfoTypes are specified in a request, the
414 # system may automatically choose what detectors to run. By default this may
415 # be all types, but may change over time as detectors are updated.
416 #
417 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
418 # but may change over time as new InfoTypes are added. If you need precise
419 # control and predictability as to what detectors are run you should specify
420 # specific InfoTypes listed in the reference.
421 { # Type of information detected by the API.
422 "name": "A String", # Name of the information type. Either a name of your choosing when
423 # creating a CustomInfoType, or one of the names listed
424 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
425 # a built-in type. InfoType names should conform to the pattern
426 # [a-zA-Z0-9_]{1,64}.
427 },
428 ],
429 },
430 "createTime": "A String", # The creation timestamp of a inspectTemplate, output only field.
431 "name": "A String", # The template name. Output only.
432 #
433 # The template will have one of the following formats:
434 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
435 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
436 },
437 "templateId": "A String", # The template id can contain uppercase and lowercase letters,
438 # numbers, and hyphens; that is, it must match the regular
439 # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
440 # characters. Can be empty to allow the system to generate one.
441 }
442
443 x__xgafv: string, V1 error format.
444 Allowed values
445 1 - v1 error format
446 2 - v2 error format
447
448Returns:
449 An object of the form:
450
451 { # The inspectTemplate contains a configuration (set of types of sensitive data
452 # to be detected) to be used anywhere you otherwise would normally specify
453 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
454 # to learn more.
455 "updateTime": "A String", # The last update timestamp of a inspectTemplate, output only field.
456 "displayName": "A String", # Display name (max 256 chars).
457 "description": "A String", # Short description (max 256 chars).
458 "inspectConfig": { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
459 # When used with redactContent only info_types and min_likelihood are currently
460 # used.
461 "excludeInfoTypes": True or False, # When true, excludes type information of the findings.
462 "limits": {
463 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job.
464 # When set within `InspectContentRequest`, the maximum returned is 2000
465 # regardless if this is set higher.
466 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes.
467 { # Max findings configuration per infoType, per content item or long
468 # running DlpJob.
469 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
470 # info_type should be provided. If InfoTypeLimit does not have an
471 # info_type, the DLP API applies the limit against all info_types that
472 # are found but not specified in another InfoTypeLimit.
473 "name": "A String", # Name of the information type. Either a name of your choosing when
474 # creating a CustomInfoType, or one of the names listed
475 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
476 # a built-in type. InfoType names should conform to the pattern
477 # [a-zA-Z0-9_]{1,64}.
478 },
479 "maxFindings": 42, # Max findings limit for the given infoType.
480 },
481 ],
482 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned.
483 # When set within `InspectDataSourceRequest`,
484 # the maximum returned is 2000 regardless if this is set higher.
485 # When set within `InspectContentRequest`, this field is ignored.
486 },
487 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is
488 # POSSIBLE.
489 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
490 "customInfoTypes": [ # CustomInfoTypes provided by the user. See
491 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
492 { # Custom information type provided by the user. Used to find domain-specific
493 # sensitive information configurable to the data in question.
494 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
495 "pattern": "A String", # Pattern defining the regular expression. Its syntax
496 # (https://github.com/google/re2/wiki/Syntax) can be found under the
497 # google/re2 repository on GitHub.
498 "groupIndexes": [ # The index of the submatch to extract as findings. When not
499 # specified, the entire match is returned. No more than 3 may be included.
500 42,
501 ],
502 },
503 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
504 # support reversing.
505 # such as
506 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
507 # These types of transformations are
508 # those that perform pseudonymization, thereby producing a "surrogate" as
509 # output. This should be used in conjunction with a field on the
510 # transformation such as `surrogate_info_type`. This CustomInfoType does
511 # not support the use of `detection_rules`.
512 },
513 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
514 # infoType, when the name matches one of existing infoTypes and that infoType
515 # is specified in `InspectContent.info_types` field. Specifying the latter
516 # adds findings to the one detected by the system. If built-in info type is
517 # not specified in `InspectContent.info_types` list then the name is treated
518 # as a custom info type.
519 "name": "A String", # Name of the information type. Either a name of your choosing when
520 # creating a CustomInfoType, or one of the names listed
521 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
522 # a built-in type. InfoType names should conform to the pattern
523 # [a-zA-Z0-9_]{1,64}.
524 },
525 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
526 # be used to match sensitive information specific to the data, such as a list
527 # of employee IDs or job titles.
528 #
529 # Dictionary words are case-insensitive and all characters other than letters
530 # and digits in the unicode [Basic Multilingual
531 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
532 # will be replaced with whitespace when scanning for matches, so the
533 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
534 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
535 # surrounding any match must be of a different type than the adjacent
536 # characters within the word, so letters must be next to non-letters and
537 # digits next to non-digits. For example, the dictionary word "jen" will
538 # match the first three letters of the text "jen123" but will return no
539 # matches for "jennifer".
540 #
541 # Dictionary words containing a large number of characters that are not
542 # letters or digits may result in unexpected findings because such characters
543 # are treated as whitespace. The
544 # [limits](https://cloud.google.com/dlp/limits) page contains details about
545 # the size limits of dictionaries. For dictionaries that do not fit within
546 # these constraints, consider using `LargeCustomDictionaryConfig` in the
547 # `StoredInfoType` API.
548 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
549 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
550 # at least one phrase and every phrase must contain at least 2 characters
551 # that are letters or digits. [required]
552 "A String",
553 ],
554 },
555 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
556 # is accepted.
557 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
558 # Example: gs://[BUCKET_NAME]/dictionary.txt
559 },
560 },
561 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
562 # `InspectDataSource`. Not currently supported in `InspectContent`.
563 "name": "A String", # Resource name of the requested `StoredInfoType`, for example
564 # `organizations/433245324/storedInfoTypes/432452342` or
565 # `projects/project-id/storedInfoTypes/432452342`.
566 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for
567 # inspection was created. Output-only field, populated by the system.
568 },
569 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType.
570 # Rules are applied in order that they are specified. Not supported for the
571 # `surrogate_type` CustomInfoType.
572 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
573 # `CustomInfoType` to alter behavior under certain circumstances, depending
574 # on the specific details of the rule. Not supported for the `surrogate_type`
575 # custom infoType.
576 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
577 # proximity of hotwords.
578 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
579 # The total length of the window cannot exceed 1000 characters. Note that
580 # the finding itself will be included in the window, so that hotwords may
581 # be used to match substrings of the finding itself. For example, the
582 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
583 # adjusted upwards if the area code is known to be the local area code of
584 # a company office using the hotword regex "\(xxx\)", where "xxx"
585 # is the area code in question.
586 # rule.
587 "windowAfter": 42, # Number of characters after the finding to consider.
588 "windowBefore": 42, # Number of characters before the finding to consider.
589 },
590 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
591 "pattern": "A String", # Pattern defining the regular expression. Its syntax
592 # (https://github.com/google/re2/wiki/Syntax) can be found under the
593 # google/re2 repository on GitHub.
594 "groupIndexes": [ # The index of the submatch to extract as findings. When not
595 # specified, the entire match is returned. No more than 3 may be included.
596 42,
597 ],
598 },
599 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
600 # part of a detection rule.
601 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
602 # levels. For example, if a finding would be `POSSIBLE` without the
603 # detection rule and `relative_likelihood` is 1, then it is upgraded to
604 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
605 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
606 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
607 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
608 # a final likelihood of `LIKELY`.
609 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
610 },
611 },
612 },
613 ],
614 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
615 # to be returned. It still can be used for rules matching.
616 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be
617 # altered by a detection rule if the finding meets the criteria specified by
618 # the rule. Defaults to `VERY_LIKELY` if not specified.
619 },
620 ],
621 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
622 # included in the response; see Finding.quote.
623 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig.
624 # Exclusion rules, contained in the set are executed in the end, other
625 # rules are executed in the order they are specified for each info type.
626 { # Rule set for modifying a set of infoTypes to alter behavior under certain
627 # circumstances, depending on the specific details of the rules within the set.
628 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order.
629 { # A single inspection rule to be applied to infoTypes, specified in
630 # `InspectionRuleSet`.
631 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
632 # proximity of hotwords.
633 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
634 # The total length of the window cannot exceed 1000 characters. Note that
635 # the finding itself will be included in the window, so that hotwords may
636 # be used to match substrings of the finding itself. For example, the
637 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
638 # adjusted upwards if the area code is known to be the local area code of
639 # a company office using the hotword regex "\(xxx\)", where "xxx"
640 # is the area code in question.
641 # rule.
642 "windowAfter": 42, # Number of characters after the finding to consider.
643 "windowBefore": 42, # Number of characters before the finding to consider.
644 },
645 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
646 "pattern": "A String", # Pattern defining the regular expression. Its syntax
647 # (https://github.com/google/re2/wiki/Syntax) can be found under the
648 # google/re2 repository on GitHub.
649 "groupIndexes": [ # The index of the submatch to extract as findings. When not
650 # specified, the entire match is returned. No more than 3 may be included.
651 42,
652 ],
653 },
654 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
655 # part of a detection rule.
656 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
657 # levels. For example, if a finding would be `POSSIBLE` without the
658 # detection rule and `relative_likelihood` is 1, then it is upgraded to
659 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
660 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
661 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
662 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
663 # a final likelihood of `LIKELY`.
664 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
665 },
666 },
667 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
668 # `InspectionRuleSet` are removed from results.
669 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule.
670 "pattern": "A String", # Pattern defining the regular expression. Its syntax
671 # (https://github.com/google/re2/wiki/Syntax) can be found under the
672 # google/re2 repository on GitHub.
673 "groupIndexes": [ # The index of the submatch to extract as findings. When not
674 # specified, the entire match is returned. No more than 3 may be included.
675 42,
676 ],
677 },
678 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
679 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
680 # contained within with a finding of an infoType from this list. For
681 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
682 # `exclusion_rule` containing `exclude_info_types.info_types` with
683 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
684 # with EMAIL_ADDRESS finding.
685 # That leads to "555-222-2222@example.org" to generate only a single
686 # finding, namely email address.
687 { # Type of information detected by the API.
688 "name": "A String", # Name of the information type. Either a name of your choosing when
689 # creating a CustomInfoType, or one of the names listed
690 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
691 # a built-in type. InfoType names should conform to the pattern
692 # [a-zA-Z0-9_]{1,64}.
693 },
694 ],
695 },
696 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
697 # be used to match sensitive information specific to the data, such as a list
698 # of employee IDs or job titles.
699 #
700 # Dictionary words are case-insensitive and all characters other than letters
701 # and digits in the unicode [Basic Multilingual
702 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
703 # will be replaced with whitespace when scanning for matches, so the
704 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
705 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
706 # surrounding any match must be of a different type than the adjacent
707 # characters within the word, so letters must be next to non-letters and
708 # digits next to non-digits. For example, the dictionary word "jen" will
709 # match the first three letters of the text "jen123" but will return no
710 # matches for "jennifer".
711 #
712 # Dictionary words containing a large number of characters that are not
713 # letters or digits may result in unexpected findings because such characters
714 # are treated as whitespace. The
715 # [limits](https://cloud.google.com/dlp/limits) page contains details about
716 # the size limits of dictionaries. For dictionaries that do not fit within
717 # these constraints, consider using `LargeCustomDictionaryConfig` in the
718 # `StoredInfoType` API.
719 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
720 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
721 # at least one phrase and every phrase must contain at least 2 characters
722 # that are letters or digits. [required]
723 "A String",
724 ],
725 },
726 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
727 # is accepted.
728 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
729 # Example: gs://[BUCKET_NAME]/dictionary.txt
730 },
731 },
732 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details.
733 },
734 },
735 ],
736 "infoTypes": [ # List of infoTypes this rule set is applied to.
737 { # Type of information detected by the API.
738 "name": "A String", # Name of the information type. Either a name of your choosing when
739 # creating a CustomInfoType, or one of the names listed
740 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
741 # a built-in type. InfoType names should conform to the pattern
742 # [a-zA-Z0-9_]{1,64}.
743 },
744 ],
745 },
746 ],
747 "contentOptions": [ # List of options defining data content to scan.
748 # If empty, text, images, and other content will be included.
749 "A String",
750 ],
751 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to
752 # InfoType values returned by ListInfoTypes or listed at
753 # https://cloud.google.com/dlp/docs/infotypes-reference.
754 #
755 # When no InfoTypes or CustomInfoTypes are specified in a request, the
756 # system may automatically choose what detectors to run. By default this may
757 # be all types, but may change over time as detectors are updated.
758 #
759 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
760 # but may change over time as new InfoTypes are added. If you need precise
761 # control and predictability as to what detectors are run you should specify
762 # specific InfoTypes listed in the reference.
763 { # Type of information detected by the API.
764 "name": "A String", # Name of the information type. Either a name of your choosing when
765 # creating a CustomInfoType, or one of the names listed
766 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
767 # a built-in type. InfoType names should conform to the pattern
768 # [a-zA-Z0-9_]{1,64}.
769 },
770 ],
771 },
772 "createTime": "A String", # The creation timestamp of a inspectTemplate, output only field.
773 "name": "A String", # The template name. Output only.
774 #
775 # The template will have one of the following formats:
776 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
777 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
778 }</pre>
779</div>
780
781<div class="method">
782 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
783 <pre>Deletes an InspectTemplate.
784See https://cloud.google.com/dlp/docs/creating-templates to learn more.
785
786Args:
787 name: string, Resource name of the organization and inspectTemplate to be deleted, for
788example `organizations/433245324/inspectTemplates/432452342` or
789projects/project-id/inspectTemplates/432452342. (required)
790 x__xgafv: string, V1 error format.
791 Allowed values
792 1 - v1 error format
793 2 - v2 error format
794
795Returns:
796 An object of the form:
797
798 { # A generic empty message that you can re-use to avoid defining duplicated
799 # empty messages in your APIs. A typical example is to use it as the request
800 # or the response type of an API method. For instance:
801 #
802 # service Foo {
803 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
804 # }
805 #
806 # The JSON representation for `Empty` is empty JSON object `{}`.
807 }</pre>
808</div>
809
810<div class="method">
811 <code class="details" id="get">get(name, x__xgafv=None)</code>
812 <pre>Gets an InspectTemplate.
813See https://cloud.google.com/dlp/docs/creating-templates to learn more.
814
815Args:
816 name: string, Resource name of the organization and inspectTemplate to be read, for
817example `organizations/433245324/inspectTemplates/432452342` or
818projects/project-id/inspectTemplates/432452342. (required)
819 x__xgafv: string, V1 error format.
820 Allowed values
821 1 - v1 error format
822 2 - v2 error format
823
824Returns:
825 An object of the form:
826
827 { # The inspectTemplate contains a configuration (set of types of sensitive data
828 # to be detected) to be used anywhere you otherwise would normally specify
829 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
830 # to learn more.
831 "updateTime": "A String", # The last update timestamp of a inspectTemplate, output only field.
832 "displayName": "A String", # Display name (max 256 chars).
833 "description": "A String", # Short description (max 256 chars).
834 "inspectConfig": { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
835 # When used with redactContent only info_types and min_likelihood are currently
836 # used.
837 "excludeInfoTypes": True or False, # When true, excludes type information of the findings.
838 "limits": {
839 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job.
840 # When set within `InspectContentRequest`, the maximum returned is 2000
841 # regardless if this is set higher.
842 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes.
843 { # Max findings configuration per infoType, per content item or long
844 # running DlpJob.
845 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
846 # info_type should be provided. If InfoTypeLimit does not have an
847 # info_type, the DLP API applies the limit against all info_types that
848 # are found but not specified in another InfoTypeLimit.
849 "name": "A String", # Name of the information type. Either a name of your choosing when
850 # creating a CustomInfoType, or one of the names listed
851 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
852 # a built-in type. InfoType names should conform to the pattern
853 # [a-zA-Z0-9_]{1,64}.
854 },
855 "maxFindings": 42, # Max findings limit for the given infoType.
856 },
857 ],
858 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned.
859 # When set within `InspectDataSourceRequest`,
860 # the maximum returned is 2000 regardless if this is set higher.
861 # When set within `InspectContentRequest`, this field is ignored.
862 },
863 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is
864 # POSSIBLE.
865 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
866 "customInfoTypes": [ # CustomInfoTypes provided by the user. See
867 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
868 { # Custom information type provided by the user. Used to find domain-specific
869 # sensitive information configurable to the data in question.
870 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
871 "pattern": "A String", # Pattern defining the regular expression. Its syntax
872 # (https://github.com/google/re2/wiki/Syntax) can be found under the
873 # google/re2 repository on GitHub.
874 "groupIndexes": [ # The index of the submatch to extract as findings. When not
875 # specified, the entire match is returned. No more than 3 may be included.
876 42,
877 ],
878 },
879 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
880 # support reversing.
881 # such as
882 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
883 # These types of transformations are
884 # those that perform pseudonymization, thereby producing a "surrogate" as
885 # output. This should be used in conjunction with a field on the
886 # transformation such as `surrogate_info_type`. This CustomInfoType does
887 # not support the use of `detection_rules`.
888 },
889 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
890 # infoType, when the name matches one of existing infoTypes and that infoType
891 # is specified in `InspectContent.info_types` field. Specifying the latter
892 # adds findings to the one detected by the system. If built-in info type is
893 # not specified in `InspectContent.info_types` list then the name is treated
894 # as a custom info type.
895 "name": "A String", # Name of the information type. Either a name of your choosing when
896 # creating a CustomInfoType, or one of the names listed
897 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
898 # a built-in type. InfoType names should conform to the pattern
899 # [a-zA-Z0-9_]{1,64}.
900 },
901 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
902 # be used to match sensitive information specific to the data, such as a list
903 # of employee IDs or job titles.
904 #
905 # Dictionary words are case-insensitive and all characters other than letters
906 # and digits in the unicode [Basic Multilingual
907 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
908 # will be replaced with whitespace when scanning for matches, so the
909 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
910 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
911 # surrounding any match must be of a different type than the adjacent
912 # characters within the word, so letters must be next to non-letters and
913 # digits next to non-digits. For example, the dictionary word "jen" will
914 # match the first three letters of the text "jen123" but will return no
915 # matches for "jennifer".
916 #
917 # Dictionary words containing a large number of characters that are not
918 # letters or digits may result in unexpected findings because such characters
919 # are treated as whitespace. The
920 # [limits](https://cloud.google.com/dlp/limits) page contains details about
921 # the size limits of dictionaries. For dictionaries that do not fit within
922 # these constraints, consider using `LargeCustomDictionaryConfig` in the
923 # `StoredInfoType` API.
924 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
925 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
926 # at least one phrase and every phrase must contain at least 2 characters
927 # that are letters or digits. [required]
928 "A String",
929 ],
930 },
931 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
932 # is accepted.
933 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
934 # Example: gs://[BUCKET_NAME]/dictionary.txt
935 },
936 },
937 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
938 # `InspectDataSource`. Not currently supported in `InspectContent`.
939 "name": "A String", # Resource name of the requested `StoredInfoType`, for example
940 # `organizations/433245324/storedInfoTypes/432452342` or
941 # `projects/project-id/storedInfoTypes/432452342`.
942 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for
943 # inspection was created. Output-only field, populated by the system.
944 },
945 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType.
946 # Rules are applied in order that they are specified. Not supported for the
947 # `surrogate_type` CustomInfoType.
948 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
949 # `CustomInfoType` to alter behavior under certain circumstances, depending
950 # on the specific details of the rule. Not supported for the `surrogate_type`
951 # custom infoType.
952 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
953 # proximity of hotwords.
954 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
955 # The total length of the window cannot exceed 1000 characters. Note that
956 # the finding itself will be included in the window, so that hotwords may
957 # be used to match substrings of the finding itself. For example, the
958 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
959 # adjusted upwards if the area code is known to be the local area code of
960 # a company office using the hotword regex "\(xxx\)", where "xxx"
961 # is the area code in question.
962 # rule.
963 "windowAfter": 42, # Number of characters after the finding to consider.
964 "windowBefore": 42, # Number of characters before the finding to consider.
965 },
966 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
967 "pattern": "A String", # Pattern defining the regular expression. Its syntax
968 # (https://github.com/google/re2/wiki/Syntax) can be found under the
969 # google/re2 repository on GitHub.
970 "groupIndexes": [ # The index of the submatch to extract as findings. When not
971 # specified, the entire match is returned. No more than 3 may be included.
972 42,
973 ],
974 },
975 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
976 # part of a detection rule.
977 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
978 # levels. For example, if a finding would be `POSSIBLE` without the
979 # detection rule and `relative_likelihood` is 1, then it is upgraded to
980 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
981 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
982 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
983 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
984 # a final likelihood of `LIKELY`.
985 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
986 },
987 },
988 },
989 ],
990 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
991 # to be returned. It still can be used for rules matching.
992 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be
993 # altered by a detection rule if the finding meets the criteria specified by
994 # the rule. Defaults to `VERY_LIKELY` if not specified.
995 },
996 ],
997 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
998 # included in the response; see Finding.quote.
999 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig.
1000 # Exclusion rules, contained in the set are executed in the end, other
1001 # rules are executed in the order they are specified for each info type.
1002 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1003 # circumstances, depending on the specific details of the rules within the set.
1004 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order.
1005 { # A single inspection rule to be applied to infoTypes, specified in
1006 # `InspectionRuleSet`.
1007 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1008 # proximity of hotwords.
1009 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1010 # The total length of the window cannot exceed 1000 characters. Note that
1011 # the finding itself will be included in the window, so that hotwords may
1012 # be used to match substrings of the finding itself. For example, the
1013 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
1014 # adjusted upwards if the area code is known to be the local area code of
1015 # a company office using the hotword regex "\(xxx\)", where "xxx"
1016 # is the area code in question.
1017 # rule.
1018 "windowAfter": 42, # Number of characters after the finding to consider.
1019 "windowBefore": 42, # Number of characters before the finding to consider.
1020 },
1021 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1022 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1023 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1024 # google/re2 repository on GitHub.
1025 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1026 # specified, the entire match is returned. No more than 3 may be included.
1027 42,
1028 ],
1029 },
1030 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1031 # part of a detection rule.
1032 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
1033 # levels. For example, if a finding would be `POSSIBLE` without the
1034 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1035 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1036 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1037 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1038 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1039 # a final likelihood of `LIKELY`.
1040 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
1041 },
1042 },
1043 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1044 # `InspectionRuleSet` are removed from results.
1045 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule.
1046 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1047 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1048 # google/re2 repository on GitHub.
1049 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1050 # specified, the entire match is returned. No more than 3 may be included.
1051 42,
1052 ],
1053 },
1054 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1055 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1056 # contained within with a finding of an infoType from this list. For
1057 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
1058 # `exclusion_rule` containing `exclude_info_types.info_types` with
1059 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
1060 # with EMAIL_ADDRESS finding.
1061 # That leads to "555-222-2222@example.org" to generate only a single
1062 # finding, namely email address.
1063 { # Type of information detected by the API.
1064 "name": "A String", # Name of the information type. Either a name of your choosing when
1065 # creating a CustomInfoType, or one of the names listed
1066 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1067 # a built-in type. InfoType names should conform to the pattern
1068 # [a-zA-Z0-9_]{1,64}.
1069 },
1070 ],
1071 },
1072 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
1073 # be used to match sensitive information specific to the data, such as a list
1074 # of employee IDs or job titles.
1075 #
1076 # Dictionary words are case-insensitive and all characters other than letters
1077 # and digits in the unicode [Basic Multilingual
1078 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1079 # will be replaced with whitespace when scanning for matches, so the
1080 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1081 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1082 # surrounding any match must be of a different type than the adjacent
1083 # characters within the word, so letters must be next to non-letters and
1084 # digits next to non-digits. For example, the dictionary word "jen" will
1085 # match the first three letters of the text "jen123" but will return no
1086 # matches for "jennifer".
1087 #
1088 # Dictionary words containing a large number of characters that are not
1089 # letters or digits may result in unexpected findings because such characters
1090 # are treated as whitespace. The
1091 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1092 # the size limits of dictionaries. For dictionaries that do not fit within
1093 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1094 # `StoredInfoType` API.
1095 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1096 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
1097 # at least one phrase and every phrase must contain at least 2 characters
1098 # that are letters or digits. [required]
1099 "A String",
1100 ],
1101 },
1102 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1103 # is accepted.
1104 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
1105 # Example: gs://[BUCKET_NAME]/dictionary.txt
1106 },
1107 },
1108 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details.
1109 },
1110 },
1111 ],
1112 "infoTypes": [ # List of infoTypes this rule set is applied to.
1113 { # Type of information detected by the API.
1114 "name": "A String", # Name of the information type. Either a name of your choosing when
1115 # creating a CustomInfoType, or one of the names listed
1116 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1117 # a built-in type. InfoType names should conform to the pattern
1118 # [a-zA-Z0-9_]{1,64}.
1119 },
1120 ],
1121 },
1122 ],
1123 "contentOptions": [ # List of options defining data content to scan.
1124 # If empty, text, images, and other content will be included.
1125 "A String",
1126 ],
1127 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to
1128 # InfoType values returned by ListInfoTypes or listed at
1129 # https://cloud.google.com/dlp/docs/infotypes-reference.
1130 #
1131 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1132 # system may automatically choose what detectors to run. By default this may
1133 # be all types, but may change over time as detectors are updated.
1134 #
1135 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
1136 # but may change over time as new InfoTypes are added. If you need precise
1137 # control and predictability as to what detectors are run you should specify
1138 # specific InfoTypes listed in the reference.
1139 { # Type of information detected by the API.
1140 "name": "A String", # Name of the information type. Either a name of your choosing when
1141 # creating a CustomInfoType, or one of the names listed
1142 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1143 # a built-in type. InfoType names should conform to the pattern
1144 # [a-zA-Z0-9_]{1,64}.
1145 },
1146 ],
1147 },
1148 "createTime": "A String", # The creation timestamp of a inspectTemplate, output only field.
1149 "name": "A String", # The template name. Output only.
1150 #
1151 # The template will have one of the following formats:
1152 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1153 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
1154 }</pre>
1155</div>
1156
1157<div class="method">
1158 <code class="details" id="list">list(parent, orderBy=None, pageToken=None, x__xgafv=None, pageSize=None)</code>
1159 <pre>Lists InspectTemplates.
1160See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1161
1162Args:
1163 parent: string, The parent resource name, for example projects/my-project-id or
1164organizations/my-org-id. (required)
1165 orderBy: string, Optional comma separated list of fields to order by,
1166followed by `asc` or `desc` postfix. This list is case-insensitive,
1167default sorting order is ascending, redundant space characters are
1168insignificant.
1169
1170Example: `name asc,update_time, create_time desc`
1171
1172Supported fields are:
1173
1174- `create_time`: corresponds to time the template was created.
1175- `update_time`: corresponds to time the template was last updated.
1176- `name`: corresponds to template's name.
1177- `display_name`: corresponds to template's display name.
1178 pageToken: string, Optional page token to continue retrieval. Comes from previous call
1179to `ListInspectTemplates`.
1180 x__xgafv: string, V1 error format.
1181 Allowed values
1182 1 - v1 error format
1183 2 - v2 error format
1184 pageSize: integer, Optional size of the page, can be limited by server. If zero server returns
1185a page of max size 100.
1186
1187Returns:
1188 An object of the form:
1189
1190 { # Response message for ListInspectTemplates.
1191 "nextPageToken": "A String", # If the next page is available then the next page token to be used
1192 # in following ListInspectTemplates request.
1193 "inspectTemplates": [ # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
1194 { # The inspectTemplate contains a configuration (set of types of sensitive data
1195 # to be detected) to be used anywhere you otherwise would normally specify
1196 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1197 # to learn more.
1198 "updateTime": "A String", # The last update timestamp of a inspectTemplate, output only field.
1199 "displayName": "A String", # Display name (max 256 chars).
1200 "description": "A String", # Short description (max 256 chars).
1201 "inspectConfig": { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
1202 # When used with redactContent only info_types and min_likelihood are currently
1203 # used.
1204 "excludeInfoTypes": True or False, # When true, excludes type information of the findings.
1205 "limits": {
1206 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job.
1207 # When set within `InspectContentRequest`, the maximum returned is 2000
1208 # regardless if this is set higher.
1209 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes.
1210 { # Max findings configuration per infoType, per content item or long
1211 # running DlpJob.
1212 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1213 # info_type should be provided. If InfoTypeLimit does not have an
1214 # info_type, the DLP API applies the limit against all info_types that
1215 # are found but not specified in another InfoTypeLimit.
1216 "name": "A String", # Name of the information type. Either a name of your choosing when
1217 # creating a CustomInfoType, or one of the names listed
1218 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1219 # a built-in type. InfoType names should conform to the pattern
1220 # [a-zA-Z0-9_]{1,64}.
1221 },
1222 "maxFindings": 42, # Max findings limit for the given infoType.
1223 },
1224 ],
1225 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned.
1226 # When set within `InspectDataSourceRequest`,
1227 # the maximum returned is 2000 regardless if this is set higher.
1228 # When set within `InspectContentRequest`, this field is ignored.
1229 },
1230 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is
1231 # POSSIBLE.
1232 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1233 "customInfoTypes": [ # CustomInfoTypes provided by the user. See
1234 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1235 { # Custom information type provided by the user. Used to find domain-specific
1236 # sensitive information configurable to the data in question.
1237 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1238 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1239 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1240 # google/re2 repository on GitHub.
1241 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1242 # specified, the entire match is returned. No more than 3 may be included.
1243 42,
1244 ],
1245 },
1246 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1247 # support reversing.
1248 # such as
1249 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1250 # These types of transformations are
1251 # those that perform pseudonymization, thereby producing a "surrogate" as
1252 # output. This should be used in conjunction with a field on the
1253 # transformation such as `surrogate_info_type`. This CustomInfoType does
1254 # not support the use of `detection_rules`.
1255 },
1256 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1257 # infoType, when the name matches one of existing infoTypes and that infoType
1258 # is specified in `InspectContent.info_types` field. Specifying the latter
1259 # adds findings to the one detected by the system. If built-in info type is
1260 # not specified in `InspectContent.info_types` list then the name is treated
1261 # as a custom info type.
1262 "name": "A String", # Name of the information type. Either a name of your choosing when
1263 # creating a CustomInfoType, or one of the names listed
1264 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1265 # a built-in type. InfoType names should conform to the pattern
1266 # [a-zA-Z0-9_]{1,64}.
1267 },
1268 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
1269 # be used to match sensitive information specific to the data, such as a list
1270 # of employee IDs or job titles.
1271 #
1272 # Dictionary words are case-insensitive and all characters other than letters
1273 # and digits in the unicode [Basic Multilingual
1274 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1275 # will be replaced with whitespace when scanning for matches, so the
1276 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1277 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1278 # surrounding any match must be of a different type than the adjacent
1279 # characters within the word, so letters must be next to non-letters and
1280 # digits next to non-digits. For example, the dictionary word "jen" will
1281 # match the first three letters of the text "jen123" but will return no
1282 # matches for "jennifer".
1283 #
1284 # Dictionary words containing a large number of characters that are not
1285 # letters or digits may result in unexpected findings because such characters
1286 # are treated as whitespace. The
1287 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1288 # the size limits of dictionaries. For dictionaries that do not fit within
1289 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1290 # `StoredInfoType` API.
1291 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1292 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
1293 # at least one phrase and every phrase must contain at least 2 characters
1294 # that are letters or digits. [required]
1295 "A String",
1296 ],
1297 },
1298 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1299 # is accepted.
1300 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
1301 # Example: gs://[BUCKET_NAME]/dictionary.txt
1302 },
1303 },
1304 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1305 # `InspectDataSource`. Not currently supported in `InspectContent`.
1306 "name": "A String", # Resource name of the requested `StoredInfoType`, for example
1307 # `organizations/433245324/storedInfoTypes/432452342` or
1308 # `projects/project-id/storedInfoTypes/432452342`.
1309 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for
1310 # inspection was created. Output-only field, populated by the system.
1311 },
1312 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType.
1313 # Rules are applied in order that they are specified. Not supported for the
1314 # `surrogate_type` CustomInfoType.
1315 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1316 # `CustomInfoType` to alter behavior under certain circumstances, depending
1317 # on the specific details of the rule. Not supported for the `surrogate_type`
1318 # custom infoType.
1319 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1320 # proximity of hotwords.
1321 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1322 # The total length of the window cannot exceed 1000 characters. Note that
1323 # the finding itself will be included in the window, so that hotwords may
1324 # be used to match substrings of the finding itself. For example, the
1325 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
1326 # adjusted upwards if the area code is known to be the local area code of
1327 # a company office using the hotword regex "\(xxx\)", where "xxx"
1328 # is the area code in question.
1329 # rule.
1330 "windowAfter": 42, # Number of characters after the finding to consider.
1331 "windowBefore": 42, # Number of characters before the finding to consider.
1332 },
1333 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1334 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1335 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1336 # google/re2 repository on GitHub.
1337 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1338 # specified, the entire match is returned. No more than 3 may be included.
1339 42,
1340 ],
1341 },
1342 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1343 # part of a detection rule.
1344 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
1345 # levels. For example, if a finding would be `POSSIBLE` without the
1346 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1347 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1348 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1349 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1350 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1351 # a final likelihood of `LIKELY`.
1352 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
1353 },
1354 },
1355 },
1356 ],
1357 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1358 # to be returned. It still can be used for rules matching.
1359 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be
1360 # altered by a detection rule if the finding meets the criteria specified by
1361 # the rule. Defaults to `VERY_LIKELY` if not specified.
1362 },
1363 ],
1364 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
1365 # included in the response; see Finding.quote.
1366 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig.
1367 # Exclusion rules, contained in the set are executed in the end, other
1368 # rules are executed in the order they are specified for each info type.
1369 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1370 # circumstances, depending on the specific details of the rules within the set.
1371 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order.
1372 { # A single inspection rule to be applied to infoTypes, specified in
1373 # `InspectionRuleSet`.
1374 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1375 # proximity of hotwords.
1376 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1377 # The total length of the window cannot exceed 1000 characters. Note that
1378 # the finding itself will be included in the window, so that hotwords may
1379 # be used to match substrings of the finding itself. For example, the
1380 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
1381 # adjusted upwards if the area code is known to be the local area code of
1382 # a company office using the hotword regex "\(xxx\)", where "xxx"
1383 # is the area code in question.
1384 # rule.
1385 "windowAfter": 42, # Number of characters after the finding to consider.
1386 "windowBefore": 42, # Number of characters before the finding to consider.
1387 },
1388 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1389 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1390 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1391 # google/re2 repository on GitHub.
1392 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1393 # specified, the entire match is returned. No more than 3 may be included.
1394 42,
1395 ],
1396 },
1397 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1398 # part of a detection rule.
1399 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
1400 # levels. For example, if a finding would be `POSSIBLE` without the
1401 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1402 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1403 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1404 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1405 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1406 # a final likelihood of `LIKELY`.
1407 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
1408 },
1409 },
1410 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1411 # `InspectionRuleSet` are removed from results.
1412 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule.
1413 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1414 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1415 # google/re2 repository on GitHub.
1416 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1417 # specified, the entire match is returned. No more than 3 may be included.
1418 42,
1419 ],
1420 },
1421 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1422 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1423 # contained within with a finding of an infoType from this list. For
1424 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
1425 # `exclusion_rule` containing `exclude_info_types.info_types` with
1426 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
1427 # with EMAIL_ADDRESS finding.
1428 # That leads to "555-222-2222@example.org" to generate only a single
1429 # finding, namely email address.
1430 { # Type of information detected by the API.
1431 "name": "A String", # Name of the information type. Either a name of your choosing when
1432 # creating a CustomInfoType, or one of the names listed
1433 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1434 # a built-in type. InfoType names should conform to the pattern
1435 # [a-zA-Z0-9_]{1,64}.
1436 },
1437 ],
1438 },
1439 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
1440 # be used to match sensitive information specific to the data, such as a list
1441 # of employee IDs or job titles.
1442 #
1443 # Dictionary words are case-insensitive and all characters other than letters
1444 # and digits in the unicode [Basic Multilingual
1445 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1446 # will be replaced with whitespace when scanning for matches, so the
1447 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1448 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1449 # surrounding any match must be of a different type than the adjacent
1450 # characters within the word, so letters must be next to non-letters and
1451 # digits next to non-digits. For example, the dictionary word "jen" will
1452 # match the first three letters of the text "jen123" but will return no
1453 # matches for "jennifer".
1454 #
1455 # Dictionary words containing a large number of characters that are not
1456 # letters or digits may result in unexpected findings because such characters
1457 # are treated as whitespace. The
1458 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1459 # the size limits of dictionaries. For dictionaries that do not fit within
1460 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1461 # `StoredInfoType` API.
1462 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1463 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
1464 # at least one phrase and every phrase must contain at least 2 characters
1465 # that are letters or digits. [required]
1466 "A String",
1467 ],
1468 },
1469 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1470 # is accepted.
1471 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
1472 # Example: gs://[BUCKET_NAME]/dictionary.txt
1473 },
1474 },
1475 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details.
1476 },
1477 },
1478 ],
1479 "infoTypes": [ # List of infoTypes this rule set is applied to.
1480 { # Type of information detected by the API.
1481 "name": "A String", # Name of the information type. Either a name of your choosing when
1482 # creating a CustomInfoType, or one of the names listed
1483 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1484 # a built-in type. InfoType names should conform to the pattern
1485 # [a-zA-Z0-9_]{1,64}.
1486 },
1487 ],
1488 },
1489 ],
1490 "contentOptions": [ # List of options defining data content to scan.
1491 # If empty, text, images, and other content will be included.
1492 "A String",
1493 ],
1494 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to
1495 # InfoType values returned by ListInfoTypes or listed at
1496 # https://cloud.google.com/dlp/docs/infotypes-reference.
1497 #
1498 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1499 # system may automatically choose what detectors to run. By default this may
1500 # be all types, but may change over time as detectors are updated.
1501 #
1502 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
1503 # but may change over time as new InfoTypes are added. If you need precise
1504 # control and predictability as to what detectors are run you should specify
1505 # specific InfoTypes listed in the reference.
1506 { # Type of information detected by the API.
1507 "name": "A String", # Name of the information type. Either a name of your choosing when
1508 # creating a CustomInfoType, or one of the names listed
1509 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1510 # a built-in type. InfoType names should conform to the pattern
1511 # [a-zA-Z0-9_]{1,64}.
1512 },
1513 ],
1514 },
1515 "createTime": "A String", # The creation timestamp of a inspectTemplate, output only field.
1516 "name": "A String", # The template name. Output only.
1517 #
1518 # The template will have one of the following formats:
1519 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1520 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
1521 },
1522 ],
1523 }</pre>
1524</div>
1525
1526<div class="method">
1527 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1528 <pre>Retrieves the next page of results.
1529
1530Args:
1531 previous_request: The request for the previous page. (required)
1532 previous_response: The response from the request for the previous page. (required)
1533
1534Returns:
1535 A request object that you can call 'execute()' on to request the next
1536 page. Returns None if there are no more items in the collection.
1537 </pre>
1538</div>
1539
1540<div class="method">
1541 <code class="details" id="patch">patch(name, body, x__xgafv=None)</code>
1542 <pre>Updates the InspectTemplate.
1543See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1544
1545Args:
1546 name: string, Resource name of organization and inspectTemplate to be updated, for
1547example `organizations/433245324/inspectTemplates/432452342` or
1548projects/project-id/inspectTemplates/432452342. (required)
1549 body: object, The request body. (required)
1550 The object takes the form of:
1551
1552{ # Request message for UpdateInspectTemplate.
1553 "updateMask": "A String", # Mask to control which fields get updated.
1554 "inspectTemplate": { # The inspectTemplate contains a configuration (set of types of sensitive data # New InspectTemplate value.
1555 # to be detected) to be used anywhere you otherwise would normally specify
1556 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1557 # to learn more.
1558 "updateTime": "A String", # The last update timestamp of a inspectTemplate, output only field.
1559 "displayName": "A String", # Display name (max 256 chars).
1560 "description": "A String", # Short description (max 256 chars).
1561 "inspectConfig": { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
1562 # When used with redactContent only info_types and min_likelihood are currently
1563 # used.
1564 "excludeInfoTypes": True or False, # When true, excludes type information of the findings.
1565 "limits": {
1566 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job.
1567 # When set within `InspectContentRequest`, the maximum returned is 2000
1568 # regardless if this is set higher.
1569 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes.
1570 { # Max findings configuration per infoType, per content item or long
1571 # running DlpJob.
1572 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1573 # info_type should be provided. If InfoTypeLimit does not have an
1574 # info_type, the DLP API applies the limit against all info_types that
1575 # are found but not specified in another InfoTypeLimit.
1576 "name": "A String", # Name of the information type. Either a name of your choosing when
1577 # creating a CustomInfoType, or one of the names listed
1578 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1579 # a built-in type. InfoType names should conform to the pattern
1580 # [a-zA-Z0-9_]{1,64}.
1581 },
1582 "maxFindings": 42, # Max findings limit for the given infoType.
1583 },
1584 ],
1585 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned.
1586 # When set within `InspectDataSourceRequest`,
1587 # the maximum returned is 2000 regardless if this is set higher.
1588 # When set within `InspectContentRequest`, this field is ignored.
1589 },
1590 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is
1591 # POSSIBLE.
1592 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1593 "customInfoTypes": [ # CustomInfoTypes provided by the user. See
1594 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1595 { # Custom information type provided by the user. Used to find domain-specific
1596 # sensitive information configurable to the data in question.
1597 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1598 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1599 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1600 # google/re2 repository on GitHub.
1601 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1602 # specified, the entire match is returned. No more than 3 may be included.
1603 42,
1604 ],
1605 },
1606 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1607 # support reversing.
1608 # such as
1609 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1610 # These types of transformations are
1611 # those that perform pseudonymization, thereby producing a "surrogate" as
1612 # output. This should be used in conjunction with a field on the
1613 # transformation such as `surrogate_info_type`. This CustomInfoType does
1614 # not support the use of `detection_rules`.
1615 },
1616 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1617 # infoType, when the name matches one of existing infoTypes and that infoType
1618 # is specified in `InspectContent.info_types` field. Specifying the latter
1619 # adds findings to the one detected by the system. If built-in info type is
1620 # not specified in `InspectContent.info_types` list then the name is treated
1621 # as a custom info type.
1622 "name": "A String", # Name of the information type. Either a name of your choosing when
1623 # creating a CustomInfoType, or one of the names listed
1624 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1625 # a built-in type. InfoType names should conform to the pattern
1626 # [a-zA-Z0-9_]{1,64}.
1627 },
1628 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
1629 # be used to match sensitive information specific to the data, such as a list
1630 # of employee IDs or job titles.
1631 #
1632 # Dictionary words are case-insensitive and all characters other than letters
1633 # and digits in the unicode [Basic Multilingual
1634 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1635 # will be replaced with whitespace when scanning for matches, so the
1636 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1637 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1638 # surrounding any match must be of a different type than the adjacent
1639 # characters within the word, so letters must be next to non-letters and
1640 # digits next to non-digits. For example, the dictionary word "jen" will
1641 # match the first three letters of the text "jen123" but will return no
1642 # matches for "jennifer".
1643 #
1644 # Dictionary words containing a large number of characters that are not
1645 # letters or digits may result in unexpected findings because such characters
1646 # are treated as whitespace. The
1647 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1648 # the size limits of dictionaries. For dictionaries that do not fit within
1649 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1650 # `StoredInfoType` API.
1651 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1652 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
1653 # at least one phrase and every phrase must contain at least 2 characters
1654 # that are letters or digits. [required]
1655 "A String",
1656 ],
1657 },
1658 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1659 # is accepted.
1660 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
1661 # Example: gs://[BUCKET_NAME]/dictionary.txt
1662 },
1663 },
1664 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1665 # `InspectDataSource`. Not currently supported in `InspectContent`.
1666 "name": "A String", # Resource name of the requested `StoredInfoType`, for example
1667 # `organizations/433245324/storedInfoTypes/432452342` or
1668 # `projects/project-id/storedInfoTypes/432452342`.
1669 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for
1670 # inspection was created. Output-only field, populated by the system.
1671 },
1672 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType.
1673 # Rules are applied in order that they are specified. Not supported for the
1674 # `surrogate_type` CustomInfoType.
1675 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1676 # `CustomInfoType` to alter behavior under certain circumstances, depending
1677 # on the specific details of the rule. Not supported for the `surrogate_type`
1678 # custom infoType.
1679 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1680 # proximity of hotwords.
1681 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1682 # The total length of the window cannot exceed 1000 characters. Note that
1683 # the finding itself will be included in the window, so that hotwords may
1684 # be used to match substrings of the finding itself. For example, the
1685 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
1686 # adjusted upwards if the area code is known to be the local area code of
1687 # a company office using the hotword regex "\(xxx\)", where "xxx"
1688 # is the area code in question.
1689 # rule.
1690 "windowAfter": 42, # Number of characters after the finding to consider.
1691 "windowBefore": 42, # Number of characters before the finding to consider.
1692 },
1693 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1694 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1695 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1696 # google/re2 repository on GitHub.
1697 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1698 # specified, the entire match is returned. No more than 3 may be included.
1699 42,
1700 ],
1701 },
1702 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1703 # part of a detection rule.
1704 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
1705 # levels. For example, if a finding would be `POSSIBLE` without the
1706 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1707 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1708 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1709 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1710 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1711 # a final likelihood of `LIKELY`.
1712 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
1713 },
1714 },
1715 },
1716 ],
1717 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1718 # to be returned. It still can be used for rules matching.
1719 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be
1720 # altered by a detection rule if the finding meets the criteria specified by
1721 # the rule. Defaults to `VERY_LIKELY` if not specified.
1722 },
1723 ],
1724 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
1725 # included in the response; see Finding.quote.
1726 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig.
1727 # Exclusion rules, contained in the set are executed in the end, other
1728 # rules are executed in the order they are specified for each info type.
1729 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1730 # circumstances, depending on the specific details of the rules within the set.
1731 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order.
1732 { # A single inspection rule to be applied to infoTypes, specified in
1733 # `InspectionRuleSet`.
1734 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1735 # proximity of hotwords.
1736 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1737 # The total length of the window cannot exceed 1000 characters. Note that
1738 # the finding itself will be included in the window, so that hotwords may
1739 # be used to match substrings of the finding itself. For example, the
1740 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
1741 # adjusted upwards if the area code is known to be the local area code of
1742 # a company office using the hotword regex "\(xxx\)", where "xxx"
1743 # is the area code in question.
1744 # rule.
1745 "windowAfter": 42, # Number of characters after the finding to consider.
1746 "windowBefore": 42, # Number of characters before the finding to consider.
1747 },
1748 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1749 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1750 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1751 # google/re2 repository on GitHub.
1752 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1753 # specified, the entire match is returned. No more than 3 may be included.
1754 42,
1755 ],
1756 },
1757 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1758 # part of a detection rule.
1759 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
1760 # levels. For example, if a finding would be `POSSIBLE` without the
1761 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1762 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1763 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1764 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1765 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1766 # a final likelihood of `LIKELY`.
1767 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
1768 },
1769 },
1770 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1771 # `InspectionRuleSet` are removed from results.
1772 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule.
1773 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1774 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1775 # google/re2 repository on GitHub.
1776 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1777 # specified, the entire match is returned. No more than 3 may be included.
1778 42,
1779 ],
1780 },
1781 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1782 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1783 # contained within with a finding of an infoType from this list. For
1784 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
1785 # `exclusion_rule` containing `exclude_info_types.info_types` with
1786 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
1787 # with EMAIL_ADDRESS finding.
1788 # That leads to "555-222-2222@example.org" to generate only a single
1789 # finding, namely email address.
1790 { # Type of information detected by the API.
1791 "name": "A String", # Name of the information type. Either a name of your choosing when
1792 # creating a CustomInfoType, or one of the names listed
1793 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1794 # a built-in type. InfoType names should conform to the pattern
1795 # [a-zA-Z0-9_]{1,64}.
1796 },
1797 ],
1798 },
1799 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
1800 # be used to match sensitive information specific to the data, such as a list
1801 # of employee IDs or job titles.
1802 #
1803 # Dictionary words are case-insensitive and all characters other than letters
1804 # and digits in the unicode [Basic Multilingual
1805 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1806 # will be replaced with whitespace when scanning for matches, so the
1807 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1808 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1809 # surrounding any match must be of a different type than the adjacent
1810 # characters within the word, so letters must be next to non-letters and
1811 # digits next to non-digits. For example, the dictionary word "jen" will
1812 # match the first three letters of the text "jen123" but will return no
1813 # matches for "jennifer".
1814 #
1815 # Dictionary words containing a large number of characters that are not
1816 # letters or digits may result in unexpected findings because such characters
1817 # are treated as whitespace. The
1818 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1819 # the size limits of dictionaries. For dictionaries that do not fit within
1820 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1821 # `StoredInfoType` API.
1822 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1823 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
1824 # at least one phrase and every phrase must contain at least 2 characters
1825 # that are letters or digits. [required]
1826 "A String",
1827 ],
1828 },
1829 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1830 # is accepted.
1831 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
1832 # Example: gs://[BUCKET_NAME]/dictionary.txt
1833 },
1834 },
1835 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details.
1836 },
1837 },
1838 ],
1839 "infoTypes": [ # List of infoTypes this rule set is applied to.
1840 { # Type of information detected by the API.
1841 "name": "A String", # Name of the information type. Either a name of your choosing when
1842 # creating a CustomInfoType, or one of the names listed
1843 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1844 # a built-in type. InfoType names should conform to the pattern
1845 # [a-zA-Z0-9_]{1,64}.
1846 },
1847 ],
1848 },
1849 ],
1850 "contentOptions": [ # List of options defining data content to scan.
1851 # If empty, text, images, and other content will be included.
1852 "A String",
1853 ],
1854 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to
1855 # InfoType values returned by ListInfoTypes or listed at
1856 # https://cloud.google.com/dlp/docs/infotypes-reference.
1857 #
1858 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1859 # system may automatically choose what detectors to run. By default this may
1860 # be all types, but may change over time as detectors are updated.
1861 #
1862 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
1863 # but may change over time as new InfoTypes are added. If you need precise
1864 # control and predictability as to what detectors are run you should specify
1865 # specific InfoTypes listed in the reference.
1866 { # Type of information detected by the API.
1867 "name": "A String", # Name of the information type. Either a name of your choosing when
1868 # creating a CustomInfoType, or one of the names listed
1869 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1870 # a built-in type. InfoType names should conform to the pattern
1871 # [a-zA-Z0-9_]{1,64}.
1872 },
1873 ],
1874 },
1875 "createTime": "A String", # The creation timestamp of a inspectTemplate, output only field.
1876 "name": "A String", # The template name. Output only.
1877 #
1878 # The template will have one of the following formats:
1879 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1880 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
1881 },
1882 }
1883
1884 x__xgafv: string, V1 error format.
1885 Allowed values
1886 1 - v1 error format
1887 2 - v2 error format
1888
1889Returns:
1890 An object of the form:
1891
1892 { # The inspectTemplate contains a configuration (set of types of sensitive data
1893 # to be detected) to be used anywhere you otherwise would normally specify
1894 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1895 # to learn more.
1896 "updateTime": "A String", # The last update timestamp of a inspectTemplate, output only field.
1897 "displayName": "A String", # Display name (max 256 chars).
1898 "description": "A String", # Short description (max 256 chars).
1899 "inspectConfig": { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
1900 # When used with redactContent only info_types and min_likelihood are currently
1901 # used.
1902 "excludeInfoTypes": True or False, # When true, excludes type information of the findings.
1903 "limits": {
1904 "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job.
1905 # When set within `InspectContentRequest`, the maximum returned is 2000
1906 # regardless if this is set higher.
1907 "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes.
1908 { # Max findings configuration per infoType, per content item or long
1909 # running DlpJob.
1910 "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1911 # info_type should be provided. If InfoTypeLimit does not have an
1912 # info_type, the DLP API applies the limit against all info_types that
1913 # are found but not specified in another InfoTypeLimit.
1914 "name": "A String", # Name of the information type. Either a name of your choosing when
1915 # creating a CustomInfoType, or one of the names listed
1916 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1917 # a built-in type. InfoType names should conform to the pattern
1918 # [a-zA-Z0-9_]{1,64}.
1919 },
1920 "maxFindings": 42, # Max findings limit for the given infoType.
1921 },
1922 ],
1923 "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned.
1924 # When set within `InspectDataSourceRequest`,
1925 # the maximum returned is 2000 regardless if this is set higher.
1926 # When set within `InspectContentRequest`, this field is ignored.
1927 },
1928 "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is
1929 # POSSIBLE.
1930 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1931 "customInfoTypes": [ # CustomInfoTypes provided by the user. See
1932 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1933 { # Custom information type provided by the user. Used to find domain-specific
1934 # sensitive information configurable to the data in question.
1935 "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1936 "pattern": "A String", # Pattern defining the regular expression. Its syntax
1937 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1938 # google/re2 repository on GitHub.
1939 "groupIndexes": [ # The index of the submatch to extract as findings. When not
1940 # specified, the entire match is returned. No more than 3 may be included.
1941 42,
1942 ],
1943 },
1944 "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1945 # support reversing.
1946 # such as
1947 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1948 # These types of transformations are
1949 # those that perform pseudonymization, thereby producing a "surrogate" as
1950 # output. This should be used in conjunction with a field on the
1951 # transformation such as `surrogate_info_type`. This CustomInfoType does
1952 # not support the use of `detection_rules`.
1953 },
1954 "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1955 # infoType, when the name matches one of existing infoTypes and that infoType
1956 # is specified in `InspectContent.info_types` field. Specifying the latter
1957 # adds findings to the one detected by the system. If built-in info type is
1958 # not specified in `InspectContent.info_types` list then the name is treated
1959 # as a custom info type.
1960 "name": "A String", # Name of the information type. Either a name of your choosing when
1961 # creating a CustomInfoType, or one of the names listed
1962 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1963 # a built-in type. InfoType names should conform to the pattern
1964 # [a-zA-Z0-9_]{1,64}.
1965 },
1966 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
1967 # be used to match sensitive information specific to the data, such as a list
1968 # of employee IDs or job titles.
1969 #
1970 # Dictionary words are case-insensitive and all characters other than letters
1971 # and digits in the unicode [Basic Multilingual
1972 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1973 # will be replaced with whitespace when scanning for matches, so the
1974 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1975 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1976 # surrounding any match must be of a different type than the adjacent
1977 # characters within the word, so letters must be next to non-letters and
1978 # digits next to non-digits. For example, the dictionary word "jen" will
1979 # match the first three letters of the text "jen123" but will return no
1980 # matches for "jennifer".
1981 #
1982 # Dictionary words containing a large number of characters that are not
1983 # letters or digits may result in unexpected findings because such characters
1984 # are treated as whitespace. The
1985 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1986 # the size limits of dictionaries. For dictionaries that do not fit within
1987 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1988 # `StoredInfoType` API.
1989 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1990 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
1991 # at least one phrase and every phrase must contain at least 2 characters
1992 # that are letters or digits. [required]
1993 "A String",
1994 ],
1995 },
1996 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1997 # is accepted.
1998 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
1999 # Example: gs://[BUCKET_NAME]/dictionary.txt
2000 },
2001 },
2002 "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
2003 # `InspectDataSource`. Not currently supported in `InspectContent`.
2004 "name": "A String", # Resource name of the requested `StoredInfoType`, for example
2005 # `organizations/433245324/storedInfoTypes/432452342` or
2006 # `projects/project-id/storedInfoTypes/432452342`.
2007 "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for
2008 # inspection was created. Output-only field, populated by the system.
2009 },
2010 "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType.
2011 # Rules are applied in order that they are specified. Not supported for the
2012 # `surrogate_type` CustomInfoType.
2013 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
2014 # `CustomInfoType` to alter behavior under certain circumstances, depending
2015 # on the specific details of the rule. Not supported for the `surrogate_type`
2016 # custom infoType.
2017 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
2018 # proximity of hotwords.
2019 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
2020 # The total length of the window cannot exceed 1000 characters. Note that
2021 # the finding itself will be included in the window, so that hotwords may
2022 # be used to match substrings of the finding itself. For example, the
2023 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
2024 # adjusted upwards if the area code is known to be the local area code of
2025 # a company office using the hotword regex "\(xxx\)", where "xxx"
2026 # is the area code in question.
2027 # rule.
2028 "windowAfter": 42, # Number of characters after the finding to consider.
2029 "windowBefore": 42, # Number of characters before the finding to consider.
2030 },
2031 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
2032 "pattern": "A String", # Pattern defining the regular expression. Its syntax
2033 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2034 # google/re2 repository on GitHub.
2035 "groupIndexes": [ # The index of the submatch to extract as findings. When not
2036 # specified, the entire match is returned. No more than 3 may be included.
2037 42,
2038 ],
2039 },
2040 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
2041 # part of a detection rule.
2042 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
2043 # levels. For example, if a finding would be `POSSIBLE` without the
2044 # detection rule and `relative_likelihood` is 1, then it is upgraded to
2045 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
2046 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
2047 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
2048 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
2049 # a final likelihood of `LIKELY`.
2050 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
2051 },
2052 },
2053 },
2054 ],
2055 "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
2056 # to be returned. It still can be used for rules matching.
2057 "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be
2058 # altered by a detection rule if the finding meets the criteria specified by
2059 # the rule. Defaults to `VERY_LIKELY` if not specified.
2060 },
2061 ],
2062 "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is
2063 # included in the response; see Finding.quote.
2064 "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig.
2065 # Exclusion rules, contained in the set are executed in the end, other
2066 # rules are executed in the order they are specified for each info type.
2067 { # Rule set for modifying a set of infoTypes to alter behavior under certain
2068 # circumstances, depending on the specific details of the rules within the set.
2069 "rules": [ # Set of rules to be applied to infoTypes. The rules are applied in order.
2070 { # A single inspection rule to be applied to infoTypes, specified in
2071 # `InspectionRuleSet`.
2072 "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
2073 # proximity of hotwords.
2074 "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
2075 # The total length of the window cannot exceed 1000 characters. Note that
2076 # the finding itself will be included in the window, so that hotwords may
2077 # be used to match substrings of the finding itself. For example, the
2078 # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
2079 # adjusted upwards if the area code is known to be the local area code of
2080 # a company office using the hotword regex "\(xxx\)", where "xxx"
2081 # is the area code in question.
2082 # rule.
2083 "windowAfter": 42, # Number of characters after the finding to consider.
2084 "windowBefore": 42, # Number of characters before the finding to consider.
2085 },
2086 "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
2087 "pattern": "A String", # Pattern defining the regular expression. Its syntax
2088 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2089 # google/re2 repository on GitHub.
2090 "groupIndexes": [ # The index of the submatch to extract as findings. When not
2091 # specified, the entire match is returned. No more than 3 may be included.
2092 42,
2093 ],
2094 },
2095 "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
2096 # part of a detection rule.
2097 "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of
2098 # levels. For example, if a finding would be `POSSIBLE` without the
2099 # detection rule and `relative_likelihood` is 1, then it is upgraded to
2100 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
2101 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
2102 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
2103 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
2104 # a final likelihood of `LIKELY`.
2105 "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value.
2106 },
2107 },
2108 "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
2109 # `InspectionRuleSet` are removed from results.
2110 "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule.
2111 "pattern": "A String", # Pattern defining the regular expression. Its syntax
2112 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2113 # google/re2 repository on GitHub.
2114 "groupIndexes": [ # The index of the submatch to extract as findings. When not
2115 # specified, the entire match is returned. No more than 3 may be included.
2116 42,
2117 ],
2118 },
2119 "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
2120 "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
2121 # contained within with a finding of an infoType from this list. For
2122 # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
2123 # `exclusion_rule` containing `exclude_info_types.info_types` with
2124 # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
2125 # with EMAIL_ADDRESS finding.
2126 # That leads to "555-222-2222@example.org" to generate only a single
2127 # finding, namely email address.
2128 { # Type of information detected by the API.
2129 "name": "A String", # Name of the information type. Either a name of your choosing when
2130 # creating a CustomInfoType, or one of the names listed
2131 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2132 # a built-in type. InfoType names should conform to the pattern
2133 # [a-zA-Z0-9_]{1,64}.
2134 },
2135 ],
2136 },
2137 "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
2138 # be used to match sensitive information specific to the data, such as a list
2139 # of employee IDs or job titles.
2140 #
2141 # Dictionary words are case-insensitive and all characters other than letters
2142 # and digits in the unicode [Basic Multilingual
2143 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
2144 # will be replaced with whitespace when scanning for matches, so the
2145 # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
2146 # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
2147 # surrounding any match must be of a different type than the adjacent
2148 # characters within the word, so letters must be next to non-letters and
2149 # digits next to non-digits. For example, the dictionary word "jen" will
2150 # match the first three letters of the text "jen123" but will return no
2151 # matches for "jennifer".
2152 #
2153 # Dictionary words containing a large number of characters that are not
2154 # letters or digits may result in unexpected findings because such characters
2155 # are treated as whitespace. The
2156 # [limits](https://cloud.google.com/dlp/limits) page contains details about
2157 # the size limits of dictionaries. For dictionaries that do not fit within
2158 # these constraints, consider using `LargeCustomDictionaryConfig` in the
2159 # `StoredInfoType` API.
2160 "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
2161 "words": [ # Words or phrases defining the dictionary. The dictionary must contain
2162 # at least one phrase and every phrase must contain at least 2 characters
2163 # that are letters or digits. [required]
2164 "A String",
2165 ],
2166 },
2167 "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
2168 # is accepted.
2169 "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage.
2170 # Example: gs://[BUCKET_NAME]/dictionary.txt
2171 },
2172 },
2173 "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details.
2174 },
2175 },
2176 ],
2177 "infoTypes": [ # List of infoTypes this rule set is applied to.
2178 { # Type of information detected by the API.
2179 "name": "A String", # Name of the information type. Either a name of your choosing when
2180 # creating a CustomInfoType, or one of the names listed
2181 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2182 # a built-in type. InfoType names should conform to the pattern
2183 # [a-zA-Z0-9_]{1,64}.
2184 },
2185 ],
2186 },
2187 ],
2188 "contentOptions": [ # List of options defining data content to scan.
2189 # If empty, text, images, and other content will be included.
2190 "A String",
2191 ],
2192 "infoTypes": [ # Restricts what info_types to look for. The values must correspond to
2193 # InfoType values returned by ListInfoTypes or listed at
2194 # https://cloud.google.com/dlp/docs/infotypes-reference.
2195 #
2196 # When no InfoTypes or CustomInfoTypes are specified in a request, the
2197 # system may automatically choose what detectors to run. By default this may
2198 # be all types, but may change over time as detectors are updated.
2199 #
2200 # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
2201 # but may change over time as new InfoTypes are added. If you need precise
2202 # control and predictability as to what detectors are run you should specify
2203 # specific InfoTypes listed in the reference.
2204 { # Type of information detected by the API.
2205 "name": "A String", # Name of the information type. Either a name of your choosing when
2206 # creating a CustomInfoType, or one of the names listed
2207 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2208 # a built-in type. InfoType names should conform to the pattern
2209 # [a-zA-Z0-9_]{1,64}.
2210 },
2211 ],
2212 },
2213 "createTime": "A String", # The creation timestamp of a inspectTemplate, output only field.
2214 "name": "A String", # The template name. Output only.
2215 #
2216 # The template will have one of the following formats:
2217 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
2218 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
2219 }</pre>
2220</div>
2221
2222</body></html>