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