blob: aeb3ffc91a0d183eb909a9f5e949d13d5dd224d7 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dlp_v2.html">Cloud Data Loss Prevention (DLP) API</a> . <a href="dlp_v2.projects.html">projects</a> . <a href="dlp_v2.projects.inspectTemplates.html">inspectTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<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 Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(parent, pageToken=None, locationId=None, pageSize=None, orderBy=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Updates the InspectTemplate.</p>
95<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 <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:
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 parent: string, Required. The parent resource name, for example projects/my-project-id or
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104organizations/my-org-id. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106 The object takes the form of:
107
108{ # Request message for CreateInspectTemplate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 &quot;inspectTemplate&quot;: { # The inspectTemplate contains a configuration (set of types of sensitive data # Required. The InspectTemplate to create.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 # to be detected) to be used anywhere you otherwise would normally specify
111 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
112 # to learn more.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
114 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115 # When used with redactContent only info_types and min_likelihood are currently
116 # used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
118 # included in the response; see Finding.quote.
119 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
120 # Exclusion rules, contained in the set are executed in the end, other
121 # rules are executed in the order they are specified for each info type.
122 { # Rule set for modifying a set of infoTypes to alter behavior under certain
123 # circumstances, depending on the specific details of the rules within the set.
124 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
125 { # Type of information detected by the API.
126 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127 # creating a CustomInfoType, or one of the names listed
128 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
129 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 { # A single inspection rule to be applied to infoTypes, specified in
135 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 # levels. For example, if a finding would be `POSSIBLE` without the
142 # detection rule and `relative_likelihood` is 1, then it is upgraded to
143 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
144 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
145 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
146 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
147 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
151 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 # specified, the entire match is returned. No more than 3 may be included.
153 42,
154 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
156 # (https://github.com/google/re2/wiki/Syntax) can be found under the
157 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &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.
160 # The total length of the window cannot exceed 1000 characters. Note that
161 # the finding itself will be included in the window, so that hotwords may
162 # be used to match substrings of the finding itself. For example, the
163 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
164 # adjusted upwards if the area code is known to be the local area code of
165 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
166 # is the area code in question.
167 # rule.
168 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
169 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 },
172 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
173 # `InspectionRuleSet` are removed from results.
174 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175 # be used to match sensitive information specific to the data, such as a list
176 # of employee IDs or job titles.
177 #
178 # Dictionary words are case-insensitive and all characters other than letters
179 # and digits in the unicode [Basic Multilingual
180 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
181 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
183 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184 # surrounding any match must be of a different type than the adjacent
185 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
187 # match the first three letters of the text &quot;jen123&quot; but will return no
188 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 #
190 # Dictionary words containing a large number of characters that are not
191 # letters or digits may result in unexpected findings because such characters
192 # are treated as whitespace. The
193 # [limits](https://cloud.google.com/dlp/limits) page contains details about
194 # the size limits of dictionaries. For dictionaries that do not fit within
195 # these constraints, consider using `LargeCustomDictionaryConfig` in the
196 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &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.
198 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199 # at least one phrase and every phrase must contain at least 2 characters
200 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202 ],
203 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 # Example: gs://[BUCKET_NAME]/dictionary.txt
208 },
209 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
211 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
212 # specified, the entire match is returned. No more than 3 may be included.
213 42,
214 ],
215 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
216 # (https://github.com/google/re2/wiki/Syntax) can be found under the
217 # google/re2 repository on GitHub.
218 },
219 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
220 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
221 # contained within with a finding of an infoType from this list. For
222 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
223 # `exclusion_rule` containing `exclude_info_types.info_types` with
224 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
225 # with EMAIL_ADDRESS finding.
226 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
227 # finding, namely email address.
228 { # Type of information detected by the API.
229 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
230 # creating a CustomInfoType, or one of the names listed
231 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
232 # a built-in type. InfoType names should conform to the pattern
233 # `[a-zA-Z0-9_]{1,64}`.
234 },
235 ],
236 },
237 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 },
239 },
240 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 },
242 ],
243 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
244 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
245 # When set within `InspectJobConfig`,
246 # the maximum returned is 2000 regardless if this is set higher.
247 # When set within `InspectContentRequest`, this field is ignored.
248 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
249 { # Max findings configuration per infoType, per content item or long
250 # running DlpJob.
251 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
252 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
253 # info_type should be provided. If InfoTypeLimit does not have an
254 # info_type, the DLP API applies the limit against all info_types that
255 # are found but not specified in another InfoTypeLimit.
256 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 # creating a CustomInfoType, or one of the names listed
258 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
259 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 },
263 ],
264 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
265 # When set within `InspectContentRequest`, the maximum returned is 2000
266 # regardless if this is set higher.
267 },
268 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700269 # If empty, text, images, and other content will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 # InfoType values returned by ListInfoTypes or listed at
274 # https://cloud.google.com/dlp/docs/infotypes-reference.
275 #
276 # When no InfoTypes or CustomInfoTypes are specified in a request, the
277 # system may automatically choose what detectors to run. By default this may
278 # be all types, but may change over time as detectors are updated.
279 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 # If you need precise control and predictability as to what detectors are
281 # run you should specify specific InfoTypes listed in the reference,
282 # otherwise a default list will be used, which may change over time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 { # Type of information detected by the API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700285 # creating a CustomInfoType, or one of the names listed
286 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
287 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700288 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 },
290 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
292 # POSSIBLE.
293 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
294 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
295 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
296 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
297 { # Custom information type provided by the user. Used to find domain-specific
298 # sensitive information configurable to the data in question.
299 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
300 # altered by a detection rule if the finding meets the criteria specified by
301 # the rule. Defaults to `VERY_LIKELY` if not specified.
302 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
303 # infoType, when the name matches one of existing infoTypes and that infoType
304 # is specified in `InspectContent.info_types` field. Specifying the latter
305 # adds findings to the one detected by the system. If built-in info type is
306 # not specified in `InspectContent.info_types` list then the name is treated
307 # as a custom info type.
308 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
309 # creating a CustomInfoType, or one of the names listed
310 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
311 # a built-in type. InfoType names should conform to the pattern
312 # `[a-zA-Z0-9_]{1,64}`.
313 },
314 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
315 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
316 # specified, the entire match is returned. No more than 3 may be included.
317 42,
318 ],
319 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
320 # (https://github.com/google/re2/wiki/Syntax) can be found under the
321 # google/re2 repository on GitHub.
322 },
323 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
324 # Rules are applied in order that they are specified. Not supported for the
325 # `surrogate_type` CustomInfoType.
326 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
327 # `CustomInfoType` to alter behavior under certain circumstances, depending
328 # on the specific details of the rule. Not supported for the `surrogate_type`
329 # custom infoType.
330 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
331 # proximity of hotwords.
332 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
333 # part of a detection rule.
334 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
335 # levels. For example, if a finding would be `POSSIBLE` without the
336 # detection rule and `relative_likelihood` is 1, then it is upgraded to
337 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
338 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
339 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
340 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
341 # a final likelihood of `LIKELY`.
342 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
343 },
344 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
345 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
346 # specified, the entire match is returned. No more than 3 may be included.
347 42,
348 ],
349 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
350 # (https://github.com/google/re2/wiki/Syntax) can be found under the
351 # google/re2 repository on GitHub.
352 },
353 &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.
354 # The total length of the window cannot exceed 1000 characters. Note that
355 # the finding itself will be included in the window, so that hotwords may
356 # be used to match substrings of the finding itself. For example, the
357 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
358 # adjusted upwards if the area code is known to be the local area code of
359 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
360 # is the area code in question.
361 # rule.
362 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
363 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
364 },
365 },
366 },
367 ],
368 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
369 # to be returned. It still can be used for rules matching.
370 &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.
371 # be used to match sensitive information specific to the data, such as a list
372 # of employee IDs or job titles.
373 #
374 # Dictionary words are case-insensitive and all characters other than letters
375 # and digits in the unicode [Basic Multilingual
376 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
377 # will be replaced with whitespace when scanning for matches, so the
378 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
379 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
380 # surrounding any match must be of a different type than the adjacent
381 # characters within the word, so letters must be next to non-letters and
382 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
383 # match the first three letters of the text &quot;jen123&quot; but will return no
384 # matches for &quot;jennifer&quot;.
385 #
386 # Dictionary words containing a large number of characters that are not
387 # letters or digits may result in unexpected findings because such characters
388 # are treated as whitespace. The
389 # [limits](https://cloud.google.com/dlp/limits) page contains details about
390 # the size limits of dictionaries. For dictionaries that do not fit within
391 # these constraints, consider using `LargeCustomDictionaryConfig` in the
392 # `StoredInfoType` API.
393 &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.
394 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
395 # at least one phrase and every phrase must contain at least 2 characters
396 # that are letters or digits. [required]
397 &quot;A String&quot;,
398 ],
399 },
400 &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
401 # is accepted.
402 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
403 # Example: gs://[BUCKET_NAME]/dictionary.txt
404 },
405 },
406 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
407 # `InspectDataSource`. Not currently supported in `InspectContent`.
408 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
409 # `organizations/433245324/storedInfoTypes/432452342` or
410 # `projects/project-id/storedInfoTypes/432452342`.
411 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
412 # inspection was created. Output-only field, populated by the system.
413 },
414 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
415 # support reversing.
416 # such as
417 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
418 # These types of transformations are
419 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
420 # output. This should be used in conjunction with a field on the
421 # transformation such as `surrogate_info_type`. This CustomInfoType does
422 # not support the use of `detection_rules`.
423 },
424 },
425 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700427 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
428 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
429 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 #
431 # The template will have one of the following formats:
432 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
Dan O'Mearadd494642020-05-01 07:42:23 -0700433 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 &quot;locationId&quot;: &quot;A String&quot;, # The geographic location to store the inspection template. Reserved for
437 # future extensions.
438 &quot;templateId&quot;: &quot;A String&quot;, # The template id can contain uppercase and lowercase letters,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 # numbers, and hyphens; that is, it must match the regular
440 # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
441 # characters. Can be empty to allow the system to generate one.
442 }
443
444 x__xgafv: string, V1 error format.
445 Allowed values
446 1 - v1 error format
447 2 - v2 error format
448
449Returns:
450 An object of the form:
451
452 { # The inspectTemplate contains a configuration (set of types of sensitive data
453 # to be detected) to be used anywhere you otherwise would normally specify
454 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
455 # to learn more.
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
457 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 # When used with redactContent only info_types and min_likelihood are currently
459 # used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
461 # included in the response; see Finding.quote.
462 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
463 # Exclusion rules, contained in the set are executed in the end, other
464 # rules are executed in the order they are specified for each info type.
465 { # Rule set for modifying a set of infoTypes to alter behavior under certain
466 # circumstances, depending on the specific details of the rules within the set.
467 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
468 { # Type of information detected by the API.
469 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 # creating a CustomInfoType, or one of the names listed
471 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
472 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 { # A single inspection rule to be applied to infoTypes, specified in
478 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700480 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -0700481 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700482 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 # levels. For example, if a finding would be `POSSIBLE` without the
485 # detection rule and `relative_likelihood` is 1, then it is upgraded to
486 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
487 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
488 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
489 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
490 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700492 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
494 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 # specified, the entire match is returned. No more than 3 may be included.
496 42,
497 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700498 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
499 # (https://github.com/google/re2/wiki/Syntax) can be found under the
500 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &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.
503 # The total length of the window cannot exceed 1000 characters. Note that
504 # the finding itself will be included in the window, so that hotwords may
505 # be used to match substrings of the finding itself. For example, the
506 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
507 # adjusted upwards if the area code is known to be the local area code of
508 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
509 # is the area code in question.
510 # rule.
511 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
512 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700513 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 },
515 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
516 # `InspectionRuleSet` are removed from results.
517 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 # be used to match sensitive information specific to the data, such as a list
519 # of employee IDs or job titles.
520 #
521 # Dictionary words are case-insensitive and all characters other than letters
522 # and digits in the unicode [Basic Multilingual
523 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
524 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
526 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700527 # surrounding any match must be of a different type than the adjacent
528 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
530 # match the first three letters of the text &quot;jen123&quot; but will return no
531 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 #
533 # Dictionary words containing a large number of characters that are not
534 # letters or digits may result in unexpected findings because such characters
535 # are treated as whitespace. The
536 # [limits](https://cloud.google.com/dlp/limits) page contains details about
537 # the size limits of dictionaries. For dictionaries that do not fit within
538 # these constraints, consider using `LargeCustomDictionaryConfig` in the
539 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 &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.
541 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 # at least one phrase and every phrase must contain at least 2 characters
543 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 ],
546 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 # Example: gs://[BUCKET_NAME]/dictionary.txt
551 },
552 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700553 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
554 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
555 # specified, the entire match is returned. No more than 3 may be included.
556 42,
557 ],
558 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
559 # (https://github.com/google/re2/wiki/Syntax) can be found under the
560 # google/re2 repository on GitHub.
561 },
562 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
563 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
564 # contained within with a finding of an infoType from this list. For
565 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
566 # `exclusion_rule` containing `exclude_info_types.info_types` with
567 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
568 # with EMAIL_ADDRESS finding.
569 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
570 # finding, namely email address.
571 { # Type of information detected by the API.
572 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
573 # creating a CustomInfoType, or one of the names listed
574 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
575 # a built-in type. InfoType names should conform to the pattern
576 # `[a-zA-Z0-9_]{1,64}`.
577 },
578 ],
579 },
580 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 },
582 },
583 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 },
585 ],
586 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
587 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
588 # When set within `InspectJobConfig`,
589 # the maximum returned is 2000 regardless if this is set higher.
590 # When set within `InspectContentRequest`, this field is ignored.
591 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
592 { # Max findings configuration per infoType, per content item or long
593 # running DlpJob.
594 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
595 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
596 # info_type should be provided. If InfoTypeLimit does not have an
597 # info_type, the DLP API applies the limit against all info_types that
598 # are found but not specified in another InfoTypeLimit.
599 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 # creating a CustomInfoType, or one of the names listed
601 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
602 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 },
606 ],
607 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
608 # When set within `InspectContentRequest`, the maximum returned is 2000
609 # regardless if this is set higher.
610 },
611 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 # If empty, text, images, and other content will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 # InfoType values returned by ListInfoTypes or listed at
617 # https://cloud.google.com/dlp/docs/infotypes-reference.
618 #
619 # When no InfoTypes or CustomInfoTypes are specified in a request, the
620 # system may automatically choose what detectors to run. By default this may
621 # be all types, but may change over time as detectors are updated.
622 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 # If you need precise control and predictability as to what detectors are
624 # run you should specify specific InfoTypes listed in the reference,
625 # otherwise a default list will be used, which may change over time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 { # Type of information detected by the API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 # creating a CustomInfoType, or one of the names listed
629 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
630 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700632 },
633 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700634 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
635 # POSSIBLE.
636 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
637 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
638 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
639 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
640 { # Custom information type provided by the user. Used to find domain-specific
641 # sensitive information configurable to the data in question.
642 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
643 # altered by a detection rule if the finding meets the criteria specified by
644 # the rule. Defaults to `VERY_LIKELY` if not specified.
645 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
646 # infoType, when the name matches one of existing infoTypes and that infoType
647 # is specified in `InspectContent.info_types` field. Specifying the latter
648 # adds findings to the one detected by the system. If built-in info type is
649 # not specified in `InspectContent.info_types` list then the name is treated
650 # as a custom info type.
651 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
652 # creating a CustomInfoType, or one of the names listed
653 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
654 # a built-in type. InfoType names should conform to the pattern
655 # `[a-zA-Z0-9_]{1,64}`.
656 },
657 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
658 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
659 # specified, the entire match is returned. No more than 3 may be included.
660 42,
661 ],
662 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
663 # (https://github.com/google/re2/wiki/Syntax) can be found under the
664 # google/re2 repository on GitHub.
665 },
666 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
667 # Rules are applied in order that they are specified. Not supported for the
668 # `surrogate_type` CustomInfoType.
669 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
670 # `CustomInfoType` to alter behavior under certain circumstances, depending
671 # on the specific details of the rule. Not supported for the `surrogate_type`
672 # custom infoType.
673 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
674 # proximity of hotwords.
675 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
676 # part of a detection rule.
677 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
678 # levels. For example, if a finding would be `POSSIBLE` without the
679 # detection rule and `relative_likelihood` is 1, then it is upgraded to
680 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
681 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
682 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
683 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
684 # a final likelihood of `LIKELY`.
685 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
686 },
687 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
688 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
689 # specified, the entire match is returned. No more than 3 may be included.
690 42,
691 ],
692 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
693 # (https://github.com/google/re2/wiki/Syntax) can be found under the
694 # google/re2 repository on GitHub.
695 },
696 &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.
697 # The total length of the window cannot exceed 1000 characters. Note that
698 # the finding itself will be included in the window, so that hotwords may
699 # be used to match substrings of the finding itself. For example, the
700 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
701 # adjusted upwards if the area code is known to be the local area code of
702 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
703 # is the area code in question.
704 # rule.
705 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
706 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
707 },
708 },
709 },
710 ],
711 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
712 # to be returned. It still can be used for rules matching.
713 &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.
714 # be used to match sensitive information specific to the data, such as a list
715 # of employee IDs or job titles.
716 #
717 # Dictionary words are case-insensitive and all characters other than letters
718 # and digits in the unicode [Basic Multilingual
719 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
720 # will be replaced with whitespace when scanning for matches, so the
721 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
722 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
723 # surrounding any match must be of a different type than the adjacent
724 # characters within the word, so letters must be next to non-letters and
725 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
726 # match the first three letters of the text &quot;jen123&quot; but will return no
727 # matches for &quot;jennifer&quot;.
728 #
729 # Dictionary words containing a large number of characters that are not
730 # letters or digits may result in unexpected findings because such characters
731 # are treated as whitespace. The
732 # [limits](https://cloud.google.com/dlp/limits) page contains details about
733 # the size limits of dictionaries. For dictionaries that do not fit within
734 # these constraints, consider using `LargeCustomDictionaryConfig` in the
735 # `StoredInfoType` API.
736 &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.
737 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
738 # at least one phrase and every phrase must contain at least 2 characters
739 # that are letters or digits. [required]
740 &quot;A String&quot;,
741 ],
742 },
743 &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
744 # is accepted.
745 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
746 # Example: gs://[BUCKET_NAME]/dictionary.txt
747 },
748 },
749 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
750 # `InspectDataSource`. Not currently supported in `InspectContent`.
751 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
752 # `organizations/433245324/storedInfoTypes/432452342` or
753 # `projects/project-id/storedInfoTypes/432452342`.
754 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
755 # inspection was created. Output-only field, populated by the system.
756 },
757 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
758 # support reversing.
759 # such as
760 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
761 # These types of transformations are
762 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
763 # output. This should be used in conjunction with a field on the
764 # transformation such as `surrogate_info_type`. This CustomInfoType does
765 # not support the use of `detection_rules`.
766 },
767 },
768 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
771 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
772 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700773 #
774 # The template will have one of the following formats:
775 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 }</pre>
779</div>
780
781<div class="method">
782 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
783 <pre>Deletes an InspectTemplate.
784See https://cloud.google.com/dlp/docs/creating-templates to learn more.
785
786Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700787 name: string, Required. Resource name of the organization and inspectTemplate to be deleted, for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788example `organizations/433245324/inspectTemplates/432452342` or
789projects/project-id/inspectTemplates/432452342. (required)
790 x__xgafv: string, V1 error format.
791 Allowed values
792 1 - v1 error format
793 2 - v2 error format
794
795Returns:
796 An object of the form:
797
798 { # A generic empty message that you can re-use to avoid defining duplicated
799 # empty messages in your APIs. A typical example is to use it as the request
800 # or the response type of an API method. For instance:
801 #
802 # service Foo {
803 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
804 # }
805 #
806 # The JSON representation for `Empty` is empty JSON object `{}`.
807 }</pre>
808</div>
809
810<div class="method">
811 <code class="details" id="get">get(name, x__xgafv=None)</code>
812 <pre>Gets an InspectTemplate.
813See https://cloud.google.com/dlp/docs/creating-templates to learn more.
814
815Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700816 name: string, Required. Resource name of the organization and inspectTemplate to be read, for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817example `organizations/433245324/inspectTemplates/432452342` or
818projects/project-id/inspectTemplates/432452342. (required)
819 x__xgafv: string, V1 error format.
820 Allowed values
821 1 - v1 error format
822 2 - v2 error format
823
824Returns:
825 An object of the form:
826
827 { # The inspectTemplate contains a configuration (set of types of sensitive data
828 # to be detected) to be used anywhere you otherwise would normally specify
829 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
830 # to learn more.
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
832 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700833 # When used with redactContent only info_types and min_likelihood are currently
834 # used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
836 # included in the response; see Finding.quote.
837 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
838 # Exclusion rules, contained in the set are executed in the end, other
839 # rules are executed in the order they are specified for each info type.
840 { # Rule set for modifying a set of infoTypes to alter behavior under certain
841 # circumstances, depending on the specific details of the rules within the set.
842 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
843 { # Type of information detected by the API.
844 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 # creating a CustomInfoType, or one of the names listed
846 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
847 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700849 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700852 { # A single inspection rule to be applied to infoTypes, specified in
853 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700859 # levels. For example, if a finding would be `POSSIBLE` without the
860 # detection rule and `relative_likelihood` is 1, then it is upgraded to
861 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
862 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
863 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
864 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
865 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
869 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 # specified, the entire match is returned. No more than 3 may be included.
871 42,
872 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
874 # (https://github.com/google/re2/wiki/Syntax) can be found under the
875 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &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.
878 # The total length of the window cannot exceed 1000 characters. Note that
879 # the finding itself will be included in the window, so that hotwords may
880 # be used to match substrings of the finding itself. For example, the
881 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
882 # adjusted upwards if the area code is known to be the local area code of
883 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
884 # is the area code in question.
885 # rule.
886 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
887 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700888 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 },
890 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
891 # `InspectionRuleSet` are removed from results.
892 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 # be used to match sensitive information specific to the data, such as a list
894 # of employee IDs or job titles.
895 #
896 # Dictionary words are case-insensitive and all characters other than letters
897 # and digits in the unicode [Basic Multilingual
898 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
899 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
901 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 # surrounding any match must be of a different type than the adjacent
903 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
905 # match the first three letters of the text &quot;jen123&quot; but will return no
906 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 #
908 # Dictionary words containing a large number of characters that are not
909 # letters or digits may result in unexpected findings because such characters
910 # are treated as whitespace. The
911 # [limits](https://cloud.google.com/dlp/limits) page contains details about
912 # the size limits of dictionaries. For dictionaries that do not fit within
913 # these constraints, consider using `LargeCustomDictionaryConfig` in the
914 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 &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.
916 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700917 # at least one phrase and every phrase must contain at least 2 characters
918 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 ],
921 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 # Example: gs://[BUCKET_NAME]/dictionary.txt
926 },
927 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
929 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
930 # specified, the entire match is returned. No more than 3 may be included.
931 42,
932 ],
933 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
934 # (https://github.com/google/re2/wiki/Syntax) can be found under the
935 # google/re2 repository on GitHub.
936 },
937 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
938 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
939 # contained within with a finding of an infoType from this list. For
940 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
941 # `exclusion_rule` containing `exclude_info_types.info_types` with
942 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
943 # with EMAIL_ADDRESS finding.
944 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
945 # finding, namely email address.
946 { # Type of information detected by the API.
947 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
948 # creating a CustomInfoType, or one of the names listed
949 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
950 # a built-in type. InfoType names should conform to the pattern
951 # `[a-zA-Z0-9_]{1,64}`.
952 },
953 ],
954 },
955 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 },
957 },
958 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 },
960 ],
961 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
962 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
963 # When set within `InspectJobConfig`,
964 # the maximum returned is 2000 regardless if this is set higher.
965 # When set within `InspectContentRequest`, this field is ignored.
966 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
967 { # Max findings configuration per infoType, per content item or long
968 # running DlpJob.
969 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
970 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
971 # info_type should be provided. If InfoTypeLimit does not have an
972 # info_type, the DLP API applies the limit against all info_types that
973 # are found but not specified in another InfoTypeLimit.
974 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 # creating a CustomInfoType, or one of the names listed
976 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
977 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 },
981 ],
982 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
983 # When set within `InspectContentRequest`, the maximum returned is 2000
984 # regardless if this is set higher.
985 },
986 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700987 # If empty, text, images, and other content will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700990 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 # InfoType values returned by ListInfoTypes or listed at
992 # https://cloud.google.com/dlp/docs/infotypes-reference.
993 #
994 # When no InfoTypes or CustomInfoTypes are specified in a request, the
995 # system may automatically choose what detectors to run. By default this may
996 # be all types, but may change over time as detectors are updated.
997 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700998 # If you need precise control and predictability as to what detectors are
999 # run you should specify specific InfoTypes listed in the reference,
1000 # otherwise a default list will be used, which may change over time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 { # Type of information detected by the API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 # creating a CustomInfoType, or one of the names listed
1004 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1005 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 },
1008 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001009 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1010 # POSSIBLE.
1011 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1012 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
1013 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1014 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1015 { # Custom information type provided by the user. Used to find domain-specific
1016 # sensitive information configurable to the data in question.
1017 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1018 # altered by a detection rule if the finding meets the criteria specified by
1019 # the rule. Defaults to `VERY_LIKELY` if not specified.
1020 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1021 # infoType, when the name matches one of existing infoTypes and that infoType
1022 # is specified in `InspectContent.info_types` field. Specifying the latter
1023 # adds findings to the one detected by the system. If built-in info type is
1024 # not specified in `InspectContent.info_types` list then the name is treated
1025 # as a custom info type.
1026 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1027 # creating a CustomInfoType, or one of the names listed
1028 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1029 # a built-in type. InfoType names should conform to the pattern
1030 # `[a-zA-Z0-9_]{1,64}`.
1031 },
1032 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1033 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1034 # specified, the entire match is returned. No more than 3 may be included.
1035 42,
1036 ],
1037 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1038 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1039 # google/re2 repository on GitHub.
1040 },
1041 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1042 # Rules are applied in order that they are specified. Not supported for the
1043 # `surrogate_type` CustomInfoType.
1044 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1045 # `CustomInfoType` to alter behavior under certain circumstances, depending
1046 # on the specific details of the rule. Not supported for the `surrogate_type`
1047 # custom infoType.
1048 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1049 # proximity of hotwords.
1050 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1051 # part of a detection rule.
1052 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1053 # levels. For example, if a finding would be `POSSIBLE` without the
1054 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1055 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1056 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1057 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1058 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1059 # a final likelihood of `LIKELY`.
1060 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1061 },
1062 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1063 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1064 # specified, the entire match is returned. No more than 3 may be included.
1065 42,
1066 ],
1067 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1068 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1069 # google/re2 repository on GitHub.
1070 },
1071 &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.
1072 # The total length of the window cannot exceed 1000 characters. Note that
1073 # the finding itself will be included in the window, so that hotwords may
1074 # be used to match substrings of the finding itself. For example, the
1075 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1076 # adjusted upwards if the area code is known to be the local area code of
1077 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1078 # is the area code in question.
1079 # rule.
1080 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1081 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1082 },
1083 },
1084 },
1085 ],
1086 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1087 # to be returned. It still can be used for rules matching.
1088 &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.
1089 # be used to match sensitive information specific to the data, such as a list
1090 # of employee IDs or job titles.
1091 #
1092 # Dictionary words are case-insensitive and all characters other than letters
1093 # and digits in the unicode [Basic Multilingual
1094 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1095 # will be replaced with whitespace when scanning for matches, so the
1096 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1097 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1098 # surrounding any match must be of a different type than the adjacent
1099 # characters within the word, so letters must be next to non-letters and
1100 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1101 # match the first three letters of the text &quot;jen123&quot; but will return no
1102 # matches for &quot;jennifer&quot;.
1103 #
1104 # Dictionary words containing a large number of characters that are not
1105 # letters or digits may result in unexpected findings because such characters
1106 # are treated as whitespace. The
1107 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1108 # the size limits of dictionaries. For dictionaries that do not fit within
1109 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1110 # `StoredInfoType` API.
1111 &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.
1112 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1113 # at least one phrase and every phrase must contain at least 2 characters
1114 # that are letters or digits. [required]
1115 &quot;A String&quot;,
1116 ],
1117 },
1118 &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
1119 # is accepted.
1120 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1121 # Example: gs://[BUCKET_NAME]/dictionary.txt
1122 },
1123 },
1124 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1125 # `InspectDataSource`. Not currently supported in `InspectContent`.
1126 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1127 # `organizations/433245324/storedInfoTypes/432452342` or
1128 # `projects/project-id/storedInfoTypes/432452342`.
1129 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1130 # inspection was created. Output-only field, populated by the system.
1131 },
1132 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1133 # support reversing.
1134 # such as
1135 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1136 # These types of transformations are
1137 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1138 # output. This should be used in conjunction with a field on the
1139 # transformation such as `surrogate_info_type`. This CustomInfoType does
1140 # not support the use of `detection_rules`.
1141 },
1142 },
1143 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001144 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1146 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
1147 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 #
1149 # The template will have one of the following formats:
1150 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
Dan O'Mearadd494642020-05-01 07:42:23 -07001151 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07001152 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 }</pre>
1154</div>
1155
1156<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 <code class="details" id="list">list(parent, pageToken=None, locationId=None, pageSize=None, orderBy=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001158 <pre>Lists InspectTemplates.
1159See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1160
1161Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001162 parent: string, Required. The parent resource name, for example projects/my-project-id or
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001163organizations/my-org-id. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001164 pageToken: string, Page token to continue retrieval. Comes from previous call
1165to `ListInspectTemplates`.
1166 locationId: string, The geographic location where inspection templates will be retrieved from.
1167Use `-` for all locations. Reserved for future extensions.
1168 pageSize: integer, Size of the page, can be limited by server. If zero server returns
1169a page of max size 100.
Dan O'Mearadd494642020-05-01 07:42:23 -07001170 orderBy: string, Comma separated list of fields to order by,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171followed by `asc` or `desc` postfix. This list is case-insensitive,
1172default sorting order is ascending, redundant space characters are
1173insignificant.
1174
1175Example: `name asc,update_time, create_time desc`
1176
1177Supported fields are:
1178
1179- `create_time`: corresponds to time the template was created.
1180- `update_time`: corresponds to time the template was last updated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001181- `name`: corresponds to template&#x27;s name.
1182- `display_name`: corresponds to template&#x27;s display name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 x__xgafv: string, V1 error format.
1184 Allowed values
1185 1 - v1 error format
1186 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001187
1188Returns:
1189 An object of the form:
1190
1191 { # Response message for ListInspectTemplates.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &quot;inspectTemplates&quot;: [ # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 { # The inspectTemplate contains a configuration (set of types of sensitive data
1194 # to be detected) to be used anywhere you otherwise would normally specify
1195 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1196 # to learn more.
Bu Sun Kim65020912020-05-20 12:08:20 -07001197 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1198 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 # When used with redactContent only info_types and min_likelihood are currently
1200 # used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1202 # included in the response; see Finding.quote.
1203 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1204 # Exclusion rules, contained in the set are executed in the end, other
1205 # rules are executed in the order they are specified for each info type.
1206 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1207 # circumstances, depending on the specific details of the rules within the set.
1208 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1209 { # Type of information detected by the API.
1210 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001211 # creating a CustomInfoType, or one of the names listed
1212 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1213 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001214 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001215 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001217 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001218 { # A single inspection rule to be applied to infoTypes, specified in
1219 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001220 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001221 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07001222 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001223 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001224 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 # levels. For example, if a finding would be `POSSIBLE` without the
1226 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1227 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1228 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1229 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1230 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1231 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001232 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001233 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001234 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1235 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001236 # specified, the entire match is returned. No more than 3 may be included.
1237 42,
1238 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1240 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1241 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001242 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &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.
1244 # The total length of the window cannot exceed 1000 characters. Note that
1245 # the finding itself will be included in the window, so that hotwords may
1246 # be used to match substrings of the finding itself. For example, the
1247 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1248 # adjusted upwards if the area code is known to be the local area code of
1249 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1250 # is the area code in question.
1251 # rule.
1252 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1253 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001254 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001255 },
1256 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1257 # `InspectionRuleSet` are removed from results.
1258 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 # be used to match sensitive information specific to the data, such as a list
1260 # of employee IDs or job titles.
1261 #
1262 # Dictionary words are case-insensitive and all characters other than letters
1263 # and digits in the unicode [Basic Multilingual
1264 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1265 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1267 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 # surrounding any match must be of a different type than the adjacent
1269 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001270 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1271 # match the first three letters of the text &quot;jen123&quot; but will return no
1272 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001273 #
1274 # Dictionary words containing a large number of characters that are not
1275 # letters or digits may result in unexpected findings because such characters
1276 # are treated as whitespace. The
1277 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1278 # the size limits of dictionaries. For dictionaries that do not fit within
1279 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1280 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001281 &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.
1282 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 # at least one phrase and every phrase must contain at least 2 characters
1284 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001285 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001286 ],
1287 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001288 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001289 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001290 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001291 # Example: gs://[BUCKET_NAME]/dictionary.txt
1292 },
1293 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001294 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1295 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1296 # specified, the entire match is returned. No more than 3 may be included.
1297 42,
1298 ],
1299 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1300 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1301 # google/re2 repository on GitHub.
1302 },
1303 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1304 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1305 # contained within with a finding of an infoType from this list. For
1306 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1307 # `exclusion_rule` containing `exclude_info_types.info_types` with
1308 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1309 # with EMAIL_ADDRESS finding.
1310 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1311 # finding, namely email address.
1312 { # Type of information detected by the API.
1313 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1314 # creating a CustomInfoType, or one of the names listed
1315 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1316 # a built-in type. InfoType names should conform to the pattern
1317 # `[a-zA-Z0-9_]{1,64}`.
1318 },
1319 ],
1320 },
1321 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001322 },
1323 },
1324 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001325 },
1326 ],
1327 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1328 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1329 # When set within `InspectJobConfig`,
1330 # the maximum returned is 2000 regardless if this is set higher.
1331 # When set within `InspectContentRequest`, this field is ignored.
1332 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1333 { # Max findings configuration per infoType, per content item or long
1334 # running DlpJob.
1335 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1336 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1337 # info_type should be provided. If InfoTypeLimit does not have an
1338 # info_type, the DLP API applies the limit against all info_types that
1339 # are found but not specified in another InfoTypeLimit.
1340 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001341 # creating a CustomInfoType, or one of the names listed
1342 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1343 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001344 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001345 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001346 },
1347 ],
1348 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1349 # When set within `InspectContentRequest`, the maximum returned is 2000
1350 # regardless if this is set higher.
1351 },
1352 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 # If empty, text, images, and other content will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -07001354 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001355 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001357 # InfoType values returned by ListInfoTypes or listed at
1358 # https://cloud.google.com/dlp/docs/infotypes-reference.
1359 #
1360 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1361 # system may automatically choose what detectors to run. By default this may
1362 # be all types, but may change over time as detectors are updated.
1363 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001364 # If you need precise control and predictability as to what detectors are
1365 # run you should specify specific InfoTypes listed in the reference,
1366 # otherwise a default list will be used, which may change over time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367 { # Type of information detected by the API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001368 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001369 # creating a CustomInfoType, or one of the names listed
1370 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1371 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001372 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373 },
1374 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001375 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1376 # POSSIBLE.
1377 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1378 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
1379 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1380 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1381 { # Custom information type provided by the user. Used to find domain-specific
1382 # sensitive information configurable to the data in question.
1383 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1384 # altered by a detection rule if the finding meets the criteria specified by
1385 # the rule. Defaults to `VERY_LIKELY` if not specified.
1386 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1387 # infoType, when the name matches one of existing infoTypes and that infoType
1388 # is specified in `InspectContent.info_types` field. Specifying the latter
1389 # adds findings to the one detected by the system. If built-in info type is
1390 # not specified in `InspectContent.info_types` list then the name is treated
1391 # as a custom info type.
1392 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1393 # creating a CustomInfoType, or one of the names listed
1394 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1395 # a built-in type. InfoType names should conform to the pattern
1396 # `[a-zA-Z0-9_]{1,64}`.
1397 },
1398 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1399 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1400 # specified, the entire match is returned. No more than 3 may be included.
1401 42,
1402 ],
1403 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1404 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1405 # google/re2 repository on GitHub.
1406 },
1407 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1408 # Rules are applied in order that they are specified. Not supported for the
1409 # `surrogate_type` CustomInfoType.
1410 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1411 # `CustomInfoType` to alter behavior under certain circumstances, depending
1412 # on the specific details of the rule. Not supported for the `surrogate_type`
1413 # custom infoType.
1414 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1415 # proximity of hotwords.
1416 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1417 # part of a detection rule.
1418 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1419 # levels. For example, if a finding would be `POSSIBLE` without the
1420 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1421 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1422 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1423 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1424 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1425 # a final likelihood of `LIKELY`.
1426 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1427 },
1428 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1429 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1430 # specified, the entire match is returned. No more than 3 may be included.
1431 42,
1432 ],
1433 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1434 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1435 # google/re2 repository on GitHub.
1436 },
1437 &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.
1438 # The total length of the window cannot exceed 1000 characters. Note that
1439 # the finding itself will be included in the window, so that hotwords may
1440 # be used to match substrings of the finding itself. For example, the
1441 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1442 # adjusted upwards if the area code is known to be the local area code of
1443 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1444 # is the area code in question.
1445 # rule.
1446 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1447 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1448 },
1449 },
1450 },
1451 ],
1452 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1453 # to be returned. It still can be used for rules matching.
1454 &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.
1455 # be used to match sensitive information specific to the data, such as a list
1456 # of employee IDs or job titles.
1457 #
1458 # Dictionary words are case-insensitive and all characters other than letters
1459 # and digits in the unicode [Basic Multilingual
1460 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1461 # will be replaced with whitespace when scanning for matches, so the
1462 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1463 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1464 # surrounding any match must be of a different type than the adjacent
1465 # characters within the word, so letters must be next to non-letters and
1466 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1467 # match the first three letters of the text &quot;jen123&quot; but will return no
1468 # matches for &quot;jennifer&quot;.
1469 #
1470 # Dictionary words containing a large number of characters that are not
1471 # letters or digits may result in unexpected findings because such characters
1472 # are treated as whitespace. The
1473 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1474 # the size limits of dictionaries. For dictionaries that do not fit within
1475 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1476 # `StoredInfoType` API.
1477 &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.
1478 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1479 # at least one phrase and every phrase must contain at least 2 characters
1480 # that are letters or digits. [required]
1481 &quot;A String&quot;,
1482 ],
1483 },
1484 &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
1485 # is accepted.
1486 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1487 # Example: gs://[BUCKET_NAME]/dictionary.txt
1488 },
1489 },
1490 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1491 # `InspectDataSource`. Not currently supported in `InspectContent`.
1492 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1493 # `organizations/433245324/storedInfoTypes/432452342` or
1494 # `projects/project-id/storedInfoTypes/432452342`.
1495 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1496 # inspection was created. Output-only field, populated by the system.
1497 },
1498 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1499 # support reversing.
1500 # such as
1501 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1502 # These types of transformations are
1503 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1504 # output. This should be used in conjunction with a field on the
1505 # transformation such as `surrogate_info_type`. This CustomInfoType does
1506 # not support the use of `detection_rules`.
1507 },
1508 },
1509 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001510 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001511 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1512 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
1513 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 #
1515 # The template will have one of the following formats:
1516 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
Dan O'Mearadd494642020-05-01 07:42:23 -07001517 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 },
1520 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001521 &quot;nextPageToken&quot;: &quot;A String&quot;, # If the next page is available then the next page token to be used
1522 # in following ListInspectTemplates request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523 }</pre>
1524</div>
1525
1526<div class="method">
1527 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1528 <pre>Retrieves the next page of results.
1529
1530Args:
1531 previous_request: The request for the previous page. (required)
1532 previous_response: The response from the request for the previous page. (required)
1533
1534Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001535 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001536 page. Returns None if there are no more items in the collection.
1537 </pre>
1538</div>
1539
1540<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001541 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001542 <pre>Updates the InspectTemplate.
1543See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1544
1545Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001546 name: string, Required. Resource name of organization and inspectTemplate to be updated, for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001547example `organizations/433245324/inspectTemplates/432452342` or
1548projects/project-id/inspectTemplates/432452342. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001549 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001550 The object takes the form of:
1551
1552{ # Request message for UpdateInspectTemplate.
Bu Sun Kim65020912020-05-20 12:08:20 -07001553 &quot;inspectTemplate&quot;: { # The inspectTemplate contains a configuration (set of types of sensitive data # New InspectTemplate value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001554 # to be detected) to be used anywhere you otherwise would normally specify
1555 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1556 # to learn more.
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1558 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559 # When used with redactContent only info_types and min_likelihood are currently
1560 # used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001561 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1562 # included in the response; see Finding.quote.
1563 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1564 # Exclusion rules, contained in the set are executed in the end, other
1565 # rules are executed in the order they are specified for each info type.
1566 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1567 # circumstances, depending on the specific details of the rules within the set.
1568 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1569 { # Type of information detected by the API.
1570 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001571 # creating a CustomInfoType, or one of the names listed
1572 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1573 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001574 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001576 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001578 { # A single inspection rule to be applied to infoTypes, specified in
1579 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001580 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001581 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07001582 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001583 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001584 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001585 # levels. For example, if a finding would be `POSSIBLE` without the
1586 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1587 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1588 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1589 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1590 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1591 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001594 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1595 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001596 # specified, the entire match is returned. No more than 3 may be included.
1597 42,
1598 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001599 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1600 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1601 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001603 &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.
1604 # The total length of the window cannot exceed 1000 characters. Note that
1605 # the finding itself will be included in the window, so that hotwords may
1606 # be used to match substrings of the finding itself. For example, the
1607 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1608 # adjusted upwards if the area code is known to be the local area code of
1609 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1610 # is the area code in question.
1611 # rule.
1612 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1613 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001614 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001615 },
1616 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1617 # `InspectionRuleSet` are removed from results.
1618 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001619 # be used to match sensitive information specific to the data, such as a list
1620 # of employee IDs or job titles.
1621 #
1622 # Dictionary words are case-insensitive and all characters other than letters
1623 # and digits in the unicode [Basic Multilingual
1624 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1625 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001626 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1627 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 # surrounding any match must be of a different type than the adjacent
1629 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1631 # match the first three letters of the text &quot;jen123&quot; but will return no
1632 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 #
1634 # Dictionary words containing a large number of characters that are not
1635 # letters or digits may result in unexpected findings because such characters
1636 # are treated as whitespace. The
1637 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1638 # the size limits of dictionaries. For dictionaries that do not fit within
1639 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1640 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 &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.
1642 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001643 # at least one phrase and every phrase must contain at least 2 characters
1644 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001645 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001646 ],
1647 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001648 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001649 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001650 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001651 # Example: gs://[BUCKET_NAME]/dictionary.txt
1652 },
1653 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001654 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1655 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1656 # specified, the entire match is returned. No more than 3 may be included.
1657 42,
1658 ],
1659 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1660 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1661 # google/re2 repository on GitHub.
1662 },
1663 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1664 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1665 # contained within with a finding of an infoType from this list. For
1666 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1667 # `exclusion_rule` containing `exclude_info_types.info_types` with
1668 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1669 # with EMAIL_ADDRESS finding.
1670 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1671 # finding, namely email address.
1672 { # Type of information detected by the API.
1673 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1674 # creating a CustomInfoType, or one of the names listed
1675 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1676 # a built-in type. InfoType names should conform to the pattern
1677 # `[a-zA-Z0-9_]{1,64}`.
1678 },
1679 ],
1680 },
1681 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001682 },
1683 },
1684 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001685 },
1686 ],
1687 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1688 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1689 # When set within `InspectJobConfig`,
1690 # the maximum returned is 2000 regardless if this is set higher.
1691 # When set within `InspectContentRequest`, this field is ignored.
1692 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1693 { # Max findings configuration per infoType, per content item or long
1694 # running DlpJob.
1695 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1696 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1697 # info_type should be provided. If InfoTypeLimit does not have an
1698 # info_type, the DLP API applies the limit against all info_types that
1699 # are found but not specified in another InfoTypeLimit.
1700 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001701 # creating a CustomInfoType, or one of the names listed
1702 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1703 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001704 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001705 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001706 },
1707 ],
1708 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1709 # When set within `InspectContentRequest`, the maximum returned is 2000
1710 # regardless if this is set higher.
1711 },
1712 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713 # If empty, text, images, and other content will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -07001714 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001715 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001717 # InfoType values returned by ListInfoTypes or listed at
1718 # https://cloud.google.com/dlp/docs/infotypes-reference.
1719 #
1720 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1721 # system may automatically choose what detectors to run. By default this may
1722 # be all types, but may change over time as detectors are updated.
1723 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001724 # If you need precise control and predictability as to what detectors are
1725 # run you should specify specific InfoTypes listed in the reference,
1726 # otherwise a default list will be used, which may change over time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727 { # Type of information detected by the API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001728 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001729 # creating a CustomInfoType, or one of the names listed
1730 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1731 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001732 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001733 },
1734 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001735 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1736 # POSSIBLE.
1737 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1738 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
1739 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1740 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1741 { # Custom information type provided by the user. Used to find domain-specific
1742 # sensitive information configurable to the data in question.
1743 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1744 # altered by a detection rule if the finding meets the criteria specified by
1745 # the rule. Defaults to `VERY_LIKELY` if not specified.
1746 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1747 # infoType, when the name matches one of existing infoTypes and that infoType
1748 # is specified in `InspectContent.info_types` field. Specifying the latter
1749 # adds findings to the one detected by the system. If built-in info type is
1750 # not specified in `InspectContent.info_types` list then the name is treated
1751 # as a custom info type.
1752 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1753 # creating a CustomInfoType, or one of the names listed
1754 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1755 # a built-in type. InfoType names should conform to the pattern
1756 # `[a-zA-Z0-9_]{1,64}`.
1757 },
1758 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1759 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1760 # specified, the entire match is returned. No more than 3 may be included.
1761 42,
1762 ],
1763 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1764 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1765 # google/re2 repository on GitHub.
1766 },
1767 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1768 # Rules are applied in order that they are specified. Not supported for the
1769 # `surrogate_type` CustomInfoType.
1770 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1771 # `CustomInfoType` to alter behavior under certain circumstances, depending
1772 # on the specific details of the rule. Not supported for the `surrogate_type`
1773 # custom infoType.
1774 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1775 # proximity of hotwords.
1776 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1777 # part of a detection rule.
1778 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1779 # levels. For example, if a finding would be `POSSIBLE` without the
1780 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1781 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1782 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1783 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1784 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1785 # a final likelihood of `LIKELY`.
1786 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1787 },
1788 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1789 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1790 # specified, the entire match is returned. No more than 3 may be included.
1791 42,
1792 ],
1793 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1794 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1795 # google/re2 repository on GitHub.
1796 },
1797 &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.
1798 # The total length of the window cannot exceed 1000 characters. Note that
1799 # the finding itself will be included in the window, so that hotwords may
1800 # be used to match substrings of the finding itself. For example, the
1801 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1802 # adjusted upwards if the area code is known to be the local area code of
1803 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1804 # is the area code in question.
1805 # rule.
1806 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1807 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1808 },
1809 },
1810 },
1811 ],
1812 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1813 # to be returned. It still can be used for rules matching.
1814 &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.
1815 # be used to match sensitive information specific to the data, such as a list
1816 # of employee IDs or job titles.
1817 #
1818 # Dictionary words are case-insensitive and all characters other than letters
1819 # and digits in the unicode [Basic Multilingual
1820 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1821 # will be replaced with whitespace when scanning for matches, so the
1822 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1823 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1824 # surrounding any match must be of a different type than the adjacent
1825 # characters within the word, so letters must be next to non-letters and
1826 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1827 # match the first three letters of the text &quot;jen123&quot; but will return no
1828 # matches for &quot;jennifer&quot;.
1829 #
1830 # Dictionary words containing a large number of characters that are not
1831 # letters or digits may result in unexpected findings because such characters
1832 # are treated as whitespace. The
1833 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1834 # the size limits of dictionaries. For dictionaries that do not fit within
1835 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1836 # `StoredInfoType` API.
1837 &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.
1838 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1839 # at least one phrase and every phrase must contain at least 2 characters
1840 # that are letters or digits. [required]
1841 &quot;A String&quot;,
1842 ],
1843 },
1844 &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
1845 # is accepted.
1846 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1847 # Example: gs://[BUCKET_NAME]/dictionary.txt
1848 },
1849 },
1850 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1851 # `InspectDataSource`. Not currently supported in `InspectContent`.
1852 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1853 # `organizations/433245324/storedInfoTypes/432452342` or
1854 # `projects/project-id/storedInfoTypes/432452342`.
1855 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1856 # inspection was created. Output-only field, populated by the system.
1857 },
1858 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1859 # support reversing.
1860 # such as
1861 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1862 # These types of transformations are
1863 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1864 # output. This should be used in conjunction with a field on the
1865 # transformation such as `surrogate_info_type`. This CustomInfoType does
1866 # not support the use of `detection_rules`.
1867 },
1868 },
1869 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001870 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001871 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1872 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
1873 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001874 #
1875 # The template will have one of the following formats:
1876 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
Dan O'Mearadd494642020-05-01 07:42:23 -07001877 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07001878 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001879 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001880 &quot;updateMask&quot;: &quot;A String&quot;, # Mask to control which fields get updated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001881 }
1882
1883 x__xgafv: string, V1 error format.
1884 Allowed values
1885 1 - v1 error format
1886 2 - v2 error format
1887
1888Returns:
1889 An object of the form:
1890
1891 { # The inspectTemplate contains a configuration (set of types of sensitive data
1892 # to be detected) to be used anywhere you otherwise would normally specify
1893 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1894 # to learn more.
Bu Sun Kim65020912020-05-20 12:08:20 -07001895 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1896 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001897 # When used with redactContent only info_types and min_likelihood are currently
1898 # used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001899 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1900 # included in the response; see Finding.quote.
1901 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1902 # Exclusion rules, contained in the set are executed in the end, other
1903 # rules are executed in the order they are specified for each info type.
1904 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1905 # circumstances, depending on the specific details of the rules within the set.
1906 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1907 { # Type of information detected by the API.
1908 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001909 # creating a CustomInfoType, or one of the names listed
1910 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1911 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001912 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001913 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001914 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001915 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001916 { # A single inspection rule to be applied to infoTypes, specified in
1917 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001918 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001919 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07001920 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001921 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001922 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001923 # levels. For example, if a finding would be `POSSIBLE` without the
1924 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1925 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1926 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1927 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1928 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1929 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001930 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001931 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001932 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1933 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001934 # specified, the entire match is returned. No more than 3 may be included.
1935 42,
1936 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001937 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1938 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1939 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001940 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001941 &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.
1942 # The total length of the window cannot exceed 1000 characters. Note that
1943 # the finding itself will be included in the window, so that hotwords may
1944 # be used to match substrings of the finding itself. For example, the
1945 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1946 # adjusted upwards if the area code is known to be the local area code of
1947 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1948 # is the area code in question.
1949 # rule.
1950 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1951 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001952 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001953 },
1954 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1955 # `InspectionRuleSet` are removed from results.
1956 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 # be used to match sensitive information specific to the data, such as a list
1958 # of employee IDs or job titles.
1959 #
1960 # Dictionary words are case-insensitive and all characters other than letters
1961 # and digits in the unicode [Basic Multilingual
1962 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1963 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001964 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1965 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001966 # surrounding any match must be of a different type than the adjacent
1967 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001968 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1969 # match the first three letters of the text &quot;jen123&quot; but will return no
1970 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001971 #
1972 # Dictionary words containing a large number of characters that are not
1973 # letters or digits may result in unexpected findings because such characters
1974 # are treated as whitespace. The
1975 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1976 # the size limits of dictionaries. For dictionaries that do not fit within
1977 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1978 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001979 &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.
1980 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001981 # at least one phrase and every phrase must contain at least 2 characters
1982 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001983 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001984 ],
1985 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001986 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001988 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001989 # Example: gs://[BUCKET_NAME]/dictionary.txt
1990 },
1991 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001992 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1993 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1994 # specified, the entire match is returned. No more than 3 may be included.
1995 42,
1996 ],
1997 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1998 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1999 # google/re2 repository on GitHub.
2000 },
2001 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
2002 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
2003 # contained within with a finding of an infoType from this list. For
2004 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
2005 # `exclusion_rule` containing `exclude_info_types.info_types` with
2006 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
2007 # with EMAIL_ADDRESS finding.
2008 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
2009 # finding, namely email address.
2010 { # Type of information detected by the API.
2011 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
2012 # creating a CustomInfoType, or one of the names listed
2013 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2014 # a built-in type. InfoType names should conform to the pattern
2015 # `[a-zA-Z0-9_]{1,64}`.
2016 },
2017 ],
2018 },
2019 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002020 },
2021 },
2022 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002023 },
2024 ],
2025 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
2026 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
2027 # When set within `InspectJobConfig`,
2028 # the maximum returned is 2000 regardless if this is set higher.
2029 # When set within `InspectContentRequest`, this field is ignored.
2030 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
2031 { # Max findings configuration per infoType, per content item or long
2032 # running DlpJob.
2033 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
2034 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
2035 # info_type should be provided. If InfoTypeLimit does not have an
2036 # info_type, the DLP API applies the limit against all info_types that
2037 # are found but not specified in another InfoTypeLimit.
2038 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002039 # creating a CustomInfoType, or one of the names listed
2040 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2041 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07002042 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002043 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 },
2045 ],
2046 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
2047 # When set within `InspectContentRequest`, the maximum returned is 2000
2048 # regardless if this is set higher.
2049 },
2050 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002051 # If empty, text, images, and other content will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -07002052 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002053 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002054 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002055 # InfoType values returned by ListInfoTypes or listed at
2056 # https://cloud.google.com/dlp/docs/infotypes-reference.
2057 #
2058 # When no InfoTypes or CustomInfoTypes are specified in a request, the
2059 # system may automatically choose what detectors to run. By default this may
2060 # be all types, but may change over time as detectors are updated.
2061 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002062 # If you need precise control and predictability as to what detectors are
2063 # run you should specify specific InfoTypes listed in the reference,
2064 # otherwise a default list will be used, which may change over time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002065 { # Type of information detected by the API.
Bu Sun Kim65020912020-05-20 12:08:20 -07002066 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002067 # creating a CustomInfoType, or one of the names listed
2068 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2069 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07002070 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002071 },
2072 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002073 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
2074 # POSSIBLE.
2075 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
2076 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
2077 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
2078 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
2079 { # Custom information type provided by the user. Used to find domain-specific
2080 # sensitive information configurable to the data in question.
2081 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
2082 # altered by a detection rule if the finding meets the criteria specified by
2083 # the rule. Defaults to `VERY_LIKELY` if not specified.
2084 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
2085 # infoType, when the name matches one of existing infoTypes and that infoType
2086 # is specified in `InspectContent.info_types` field. Specifying the latter
2087 # adds findings to the one detected by the system. If built-in info type is
2088 # not specified in `InspectContent.info_types` list then the name is treated
2089 # as a custom info type.
2090 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
2091 # creating a CustomInfoType, or one of the names listed
2092 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2093 # a built-in type. InfoType names should conform to the pattern
2094 # `[a-zA-Z0-9_]{1,64}`.
2095 },
2096 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
2097 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
2098 # specified, the entire match is returned. No more than 3 may be included.
2099 42,
2100 ],
2101 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2102 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2103 # google/re2 repository on GitHub.
2104 },
2105 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
2106 # Rules are applied in order that they are specified. Not supported for the
2107 # `surrogate_type` CustomInfoType.
2108 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
2109 # `CustomInfoType` to alter behavior under certain circumstances, depending
2110 # on the specific details of the rule. Not supported for the `surrogate_type`
2111 # custom infoType.
2112 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
2113 # proximity of hotwords.
2114 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
2115 # part of a detection rule.
2116 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
2117 # levels. For example, if a finding would be `POSSIBLE` without the
2118 # detection rule and `relative_likelihood` is 1, then it is upgraded to
2119 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
2120 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
2121 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
2122 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
2123 # a final likelihood of `LIKELY`.
2124 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
2125 },
2126 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
2127 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
2128 # specified, the entire match is returned. No more than 3 may be included.
2129 42,
2130 ],
2131 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2132 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2133 # google/re2 repository on GitHub.
2134 },
2135 &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.
2136 # The total length of the window cannot exceed 1000 characters. Note that
2137 # the finding itself will be included in the window, so that hotwords may
2138 # be used to match substrings of the finding itself. For example, the
2139 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
2140 # adjusted upwards if the area code is known to be the local area code of
2141 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
2142 # is the area code in question.
2143 # rule.
2144 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
2145 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
2146 },
2147 },
2148 },
2149 ],
2150 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
2151 # to be returned. It still can be used for rules matching.
2152 &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.
2153 # be used to match sensitive information specific to the data, such as a list
2154 # of employee IDs or job titles.
2155 #
2156 # Dictionary words are case-insensitive and all characters other than letters
2157 # and digits in the unicode [Basic Multilingual
2158 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
2159 # will be replaced with whitespace when scanning for matches, so the
2160 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
2161 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
2162 # surrounding any match must be of a different type than the adjacent
2163 # characters within the word, so letters must be next to non-letters and
2164 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
2165 # match the first three letters of the text &quot;jen123&quot; but will return no
2166 # matches for &quot;jennifer&quot;.
2167 #
2168 # Dictionary words containing a large number of characters that are not
2169 # letters or digits may result in unexpected findings because such characters
2170 # are treated as whitespace. The
2171 # [limits](https://cloud.google.com/dlp/limits) page contains details about
2172 # the size limits of dictionaries. For dictionaries that do not fit within
2173 # these constraints, consider using `LargeCustomDictionaryConfig` in the
2174 # `StoredInfoType` API.
2175 &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.
2176 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
2177 # at least one phrase and every phrase must contain at least 2 characters
2178 # that are letters or digits. [required]
2179 &quot;A String&quot;,
2180 ],
2181 },
2182 &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
2183 # is accepted.
2184 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
2185 # Example: gs://[BUCKET_NAME]/dictionary.txt
2186 },
2187 },
2188 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
2189 # `InspectDataSource`. Not currently supported in `InspectContent`.
2190 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
2191 # `organizations/433245324/storedInfoTypes/432452342` or
2192 # `projects/project-id/storedInfoTypes/432452342`.
2193 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
2194 # inspection was created. Output-only field, populated by the system.
2195 },
2196 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
2197 # support reversing.
2198 # such as
2199 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
2200 # These types of transformations are
2201 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
2202 # output. This should be used in conjunction with a field on the
2203 # transformation such as `surrogate_info_type`. This CustomInfoType does
2204 # not support the use of `detection_rules`.
2205 },
2206 },
2207 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002208 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002209 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
2210 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
2211 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002212 #
2213 # The template will have one of the following formats:
2214 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
Dan O'Mearadd494642020-05-01 07:42:23 -07002215 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07002216 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 }</pre>
2218</div>
2219
2220</body></html>