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