blob: 6ee762c51f428ef453fcd453480170adff5db9ff [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 Kim4ed7d3f2020-05-27 12:20:54 -070087 <code><a href="#list">list(parent, orderBy=None, pageToken=None, locationId=None, pageSize=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 Kim4ed7d3f2020-05-27 12:20:54 -0700109 &quot;templateId&quot;: &quot;A String&quot;, # The template id can contain uppercase and lowercase letters,
110 # numbers, and hyphens; that is, it must match the regular
111 # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
112 # characters. Can be empty to allow the system to generate one.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &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 -0700114 # to be detected) to be used anywhere you otherwise would normally specify
115 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
116 # to learn more.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700117 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
118 #
119 # The template will have one of the following formats:
120 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
121 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
122 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
124 &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 -0700125 # When used with redactContent only info_types and min_likelihood are currently
126 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700127 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
128 # POSSIBLE.
129 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
130 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
131 # If empty, text, images, and other content will be included.
132 &quot;A String&quot;,
133 ],
134 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
135 # InfoType values returned by ListInfoTypes or listed at
136 # https://cloud.google.com/dlp/docs/infotypes-reference.
137 #
138 # When no InfoTypes or CustomInfoTypes are specified in a request, the
139 # system may automatically choose what detectors to run. By default this may
140 # be all types, but may change over time as detectors are updated.
141 #
142 # If you need precise control and predictability as to what detectors are
143 # run you should specify specific InfoTypes listed in the reference,
144 # otherwise a default list will be used, which may change over time.
145 { # Type of information detected by the API.
146 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
147 # creating a CustomInfoType, or one of the names listed
148 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
149 # a built-in type. InfoType names should conform to the pattern
150 # `[a-zA-Z0-9_]{1,64}`.
151 },
152 ],
153 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
154 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
155 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
156 { # Custom information type provided by the user. Used to find domain-specific
157 # sensitive information configurable to the data in question.
158 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
159 # support reversing.
160 # such as
161 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
162 # These types of transformations are
163 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
164 # output. This should be used in conjunction with a field on the
165 # transformation such as `surrogate_info_type`. This CustomInfoType does
166 # not support the use of `detection_rules`.
167 },
168 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
169 # altered by a detection rule if the finding meets the criteria specified by
170 # the rule. Defaults to `VERY_LIKELY` if not specified.
171 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
172 # infoType, when the name matches one of existing infoTypes and that infoType
173 # is specified in `InspectContent.info_types` field. Specifying the latter
174 # adds findings to the one detected by the system. If built-in info type is
175 # not specified in `InspectContent.info_types` list then the name is treated
176 # as a custom info type.
177 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
178 # creating a CustomInfoType, or one of the names listed
179 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
180 # a built-in type. InfoType names should conform to the pattern
181 # `[a-zA-Z0-9_]{1,64}`.
182 },
183 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
184 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
185 # specified, the entire match is returned. No more than 3 may be included.
186 42,
187 ],
188 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
189 # (https://github.com/google/re2/wiki/Syntax) can be found under the
190 # google/re2 repository on GitHub.
191 },
192 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
193 # Rules are applied in order that they are specified. Not supported for the
194 # `surrogate_type` CustomInfoType.
195 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
196 # `CustomInfoType` to alter behavior under certain circumstances, depending
197 # on the specific details of the rule. Not supported for the `surrogate_type`
198 # custom infoType.
199 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
200 # proximity of hotwords.
201 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
202 # part of a detection rule.
203 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
204 # levels. For example, if a finding would be `POSSIBLE` without the
205 # detection rule and `relative_likelihood` is 1, then it is upgraded to
206 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
207 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
208 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
209 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
210 # a final likelihood of `LIKELY`.
211 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
212 },
213 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
214 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
215 # specified, the entire match is returned. No more than 3 may be included.
216 42,
217 ],
218 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
219 # (https://github.com/google/re2/wiki/Syntax) can be found under the
220 # google/re2 repository on GitHub.
221 },
222 &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.
223 # The total length of the window cannot exceed 1000 characters. Note that
224 # the finding itself will be included in the window, so that hotwords may
225 # be used to match substrings of the finding itself. For example, the
226 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
227 # adjusted upwards if the area code is known to be the local area code of
228 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
229 # is the area code in question.
230 # rule.
231 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
232 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
233 },
234 },
235 },
236 ],
237 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
238 # to be returned. It still can be used for rules matching.
239 &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.
240 # be used to match sensitive information specific to the data, such as a list
241 # of employee IDs or job titles.
242 #
243 # Dictionary words are case-insensitive and all characters other than letters
244 # and digits in the unicode [Basic Multilingual
245 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
246 # will be replaced with whitespace when scanning for matches, so the
247 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
248 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
249 # surrounding any match must be of a different type than the adjacent
250 # characters within the word, so letters must be next to non-letters and
251 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
252 # match the first three letters of the text &quot;jen123&quot; but will return no
253 # matches for &quot;jennifer&quot;.
254 #
255 # Dictionary words containing a large number of characters that are not
256 # letters or digits may result in unexpected findings because such characters
257 # are treated as whitespace. The
258 # [limits](https://cloud.google.com/dlp/limits) page contains details about
259 # the size limits of dictionaries. For dictionaries that do not fit within
260 # these constraints, consider using `LargeCustomDictionaryConfig` in the
261 # `StoredInfoType` API.
262 &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.
263 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
264 # at least one phrase and every phrase must contain at least 2 characters
265 # that are letters or digits. [required]
266 &quot;A String&quot;,
267 ],
268 },
269 &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
270 # is accepted.
271 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
272 # Example: gs://[BUCKET_NAME]/dictionary.txt
273 },
274 },
275 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
276 # `InspectDataSource`. Not currently supported in `InspectContent`.
277 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
278 # `organizations/433245324/storedInfoTypes/432452342` or
279 # `projects/project-id/storedInfoTypes/432452342`.
280 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
281 # inspection was created. Output-only field, populated by the system.
282 },
283 },
284 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
286 # included in the response; see Finding.quote.
287 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
288 # Exclusion rules, contained in the set are executed in the end, other
289 # rules are executed in the order they are specified for each info type.
290 { # Rule set for modifying a set of infoTypes to alter behavior under certain
291 # circumstances, depending on the specific details of the rules within the set.
292 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
293 { # Type of information detected by the API.
294 &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 -0700295 # creating a CustomInfoType, or one of the names listed
296 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
297 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &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 -0700302 { # A single inspection rule to be applied to infoTypes, specified in
303 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 &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 -0700305 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &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 -0700307 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 # levels. For example, if a finding would be `POSSIBLE` without the
310 # detection rule and `relative_likelihood` is 1, then it is upgraded to
311 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
312 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
313 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
314 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
315 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &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 -0700317 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
319 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 # specified, the entire match is returned. No more than 3 may be included.
321 42,
322 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
324 # (https://github.com/google/re2/wiki/Syntax) can be found under the
325 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700327 &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.
328 # The total length of the window cannot exceed 1000 characters. Note that
329 # the finding itself will be included in the window, so that hotwords may
330 # be used to match substrings of the finding itself. For example, the
331 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
332 # adjusted upwards if the area code is known to be the local area code of
333 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
334 # is the area code in question.
335 # rule.
336 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
337 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 },
340 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
341 # `InspectionRuleSet` are removed from results.
342 &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 -0700343 # be used to match sensitive information specific to the data, such as a list
344 # of employee IDs or job titles.
345 #
346 # Dictionary words are case-insensitive and all characters other than letters
347 # and digits in the unicode [Basic Multilingual
348 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
349 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
351 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 # surrounding any match must be of a different type than the adjacent
353 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
355 # match the first three letters of the text &quot;jen123&quot; but will return no
356 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700357 #
358 # Dictionary words containing a large number of characters that are not
359 # letters or digits may result in unexpected findings because such characters
360 # are treated as whitespace. The
361 # [limits](https://cloud.google.com/dlp/limits) page contains details about
362 # the size limits of dictionaries. For dictionaries that do not fit within
363 # these constraints, consider using `LargeCustomDictionaryConfig` in the
364 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &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.
366 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 # at least one phrase and every phrase must contain at least 2 characters
368 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 ],
371 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &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 -0700373 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &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 -0700375 # Example: gs://[BUCKET_NAME]/dictionary.txt
376 },
377 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
379 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
380 # specified, the entire match is returned. No more than 3 may be included.
381 42,
382 ],
383 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
384 # (https://github.com/google/re2/wiki/Syntax) can be found under the
385 # google/re2 repository on GitHub.
386 },
387 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
388 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
389 # contained within with a finding of an infoType from this list. For
390 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
391 # `exclusion_rule` containing `exclude_info_types.info_types` with
392 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
393 # with EMAIL_ADDRESS finding.
394 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
395 # finding, namely email address.
396 { # Type of information detected by the API.
397 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
398 # creating a CustomInfoType, or one of the names listed
399 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
400 # a built-in type. InfoType names should conform to the pattern
401 # `[a-zA-Z0-9_]{1,64}`.
402 },
403 ],
404 },
405 &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 -0700406 },
407 },
408 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 },
410 ],
411 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
412 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
413 # When set within `InspectJobConfig`,
414 # the maximum returned is 2000 regardless if this is set higher.
415 # When set within `InspectContentRequest`, this field is ignored.
416 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
417 { # Max findings configuration per infoType, per content item or long
418 # running DlpJob.
419 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
420 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
421 # info_type should be provided. If InfoTypeLimit does not have an
422 # info_type, the DLP API applies the limit against all info_types that
423 # are found but not specified in another InfoTypeLimit.
424 &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 -0700425 # creating a CustomInfoType, or one of the names listed
426 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
427 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 },
431 ],
432 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
433 # When set within `InspectContentRequest`, the maximum returned is 2000
434 # regardless if this is set higher.
435 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
438 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 &quot;locationId&quot;: &quot;A String&quot;, # The geographic location to store the inspection template. Reserved for
441 # future extensions.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 }
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 Kim4ed7d3f2020-05-27 12:20:54 -0700456 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
457 #
458 # The template will have one of the following formats:
459 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
460 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
461 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim65020912020-05-20 12:08:20 -0700462 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
463 &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 -0700464 # When used with redactContent only info_types and min_likelihood are currently
465 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700466 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
467 # POSSIBLE.
468 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
469 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
470 # If empty, text, images, and other content will be included.
471 &quot;A String&quot;,
472 ],
473 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
474 # InfoType values returned by ListInfoTypes or listed at
475 # https://cloud.google.com/dlp/docs/infotypes-reference.
476 #
477 # When no InfoTypes or CustomInfoTypes are specified in a request, the
478 # system may automatically choose what detectors to run. By default this may
479 # be all types, but may change over time as detectors are updated.
480 #
481 # If you need precise control and predictability as to what detectors are
482 # run you should specify specific InfoTypes listed in the reference,
483 # otherwise a default list will be used, which may change over time.
484 { # Type of information detected by the API.
485 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
486 # creating a CustomInfoType, or one of the names listed
487 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
488 # a built-in type. InfoType names should conform to the pattern
489 # `[a-zA-Z0-9_]{1,64}`.
490 },
491 ],
492 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
493 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
494 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
495 { # Custom information type provided by the user. Used to find domain-specific
496 # sensitive information configurable to the data in question.
497 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
498 # support reversing.
499 # such as
500 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
501 # These types of transformations are
502 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
503 # output. This should be used in conjunction with a field on the
504 # transformation such as `surrogate_info_type`. This CustomInfoType does
505 # not support the use of `detection_rules`.
506 },
507 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
508 # altered by a detection rule if the finding meets the criteria specified by
509 # the rule. Defaults to `VERY_LIKELY` if not specified.
510 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
511 # infoType, when the name matches one of existing infoTypes and that infoType
512 # is specified in `InspectContent.info_types` field. Specifying the latter
513 # adds findings to the one detected by the system. If built-in info type is
514 # not specified in `InspectContent.info_types` list then the name is treated
515 # as a custom info type.
516 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
517 # creating a CustomInfoType, or one of the names listed
518 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
519 # a built-in type. InfoType names should conform to the pattern
520 # `[a-zA-Z0-9_]{1,64}`.
521 },
522 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
523 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
524 # specified, the entire match is returned. No more than 3 may be included.
525 42,
526 ],
527 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
528 # (https://github.com/google/re2/wiki/Syntax) can be found under the
529 # google/re2 repository on GitHub.
530 },
531 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
532 # Rules are applied in order that they are specified. Not supported for the
533 # `surrogate_type` CustomInfoType.
534 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
535 # `CustomInfoType` to alter behavior under certain circumstances, depending
536 # on the specific details of the rule. Not supported for the `surrogate_type`
537 # custom infoType.
538 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
539 # proximity of hotwords.
540 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
541 # part of a detection rule.
542 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
543 # levels. For example, if a finding would be `POSSIBLE` without the
544 # detection rule and `relative_likelihood` is 1, then it is upgraded to
545 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
546 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
547 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
548 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
549 # a final likelihood of `LIKELY`.
550 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
551 },
552 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
553 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
554 # specified, the entire match is returned. No more than 3 may be included.
555 42,
556 ],
557 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
558 # (https://github.com/google/re2/wiki/Syntax) can be found under the
559 # google/re2 repository on GitHub.
560 },
561 &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.
562 # The total length of the window cannot exceed 1000 characters. Note that
563 # the finding itself will be included in the window, so that hotwords may
564 # be used to match substrings of the finding itself. For example, the
565 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
566 # adjusted upwards if the area code is known to be the local area code of
567 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
568 # is the area code in question.
569 # rule.
570 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
571 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
572 },
573 },
574 },
575 ],
576 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
577 # to be returned. It still can be used for rules matching.
578 &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.
579 # be used to match sensitive information specific to the data, such as a list
580 # of employee IDs or job titles.
581 #
582 # Dictionary words are case-insensitive and all characters other than letters
583 # and digits in the unicode [Basic Multilingual
584 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
585 # will be replaced with whitespace when scanning for matches, so the
586 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
587 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
588 # surrounding any match must be of a different type than the adjacent
589 # characters within the word, so letters must be next to non-letters and
590 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
591 # match the first three letters of the text &quot;jen123&quot; but will return no
592 # matches for &quot;jennifer&quot;.
593 #
594 # Dictionary words containing a large number of characters that are not
595 # letters or digits may result in unexpected findings because such characters
596 # are treated as whitespace. The
597 # [limits](https://cloud.google.com/dlp/limits) page contains details about
598 # the size limits of dictionaries. For dictionaries that do not fit within
599 # these constraints, consider using `LargeCustomDictionaryConfig` in the
600 # `StoredInfoType` API.
601 &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.
602 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
603 # at least one phrase and every phrase must contain at least 2 characters
604 # that are letters or digits. [required]
605 &quot;A String&quot;,
606 ],
607 },
608 &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
609 # is accepted.
610 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
611 # Example: gs://[BUCKET_NAME]/dictionary.txt
612 },
613 },
614 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
615 # `InspectDataSource`. Not currently supported in `InspectContent`.
616 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
617 # `organizations/433245324/storedInfoTypes/432452342` or
618 # `projects/project-id/storedInfoTypes/432452342`.
619 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
620 # inspection was created. Output-only field, populated by the system.
621 },
622 },
623 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
625 # included in the response; see Finding.quote.
626 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
627 # Exclusion rules, contained in the set are executed in the end, other
628 # rules are executed in the order they are specified for each info type.
629 { # Rule set for modifying a set of infoTypes to alter behavior under certain
630 # circumstances, depending on the specific details of the rules within the set.
631 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
632 { # Type of information detected by the API.
633 &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 -0700634 # creating a CustomInfoType, or one of the names listed
635 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
636 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700639 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &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 -0700641 { # A single inspection rule to be applied to infoTypes, specified in
642 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &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 -0700644 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &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 -0700646 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 # levels. For example, if a finding would be `POSSIBLE` without the
649 # detection rule and `relative_likelihood` is 1, then it is upgraded to
650 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
651 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
652 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
653 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
654 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &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 -0700656 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
658 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 # specified, the entire match is returned. No more than 3 may be included.
660 42,
661 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700662 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 &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.
667 # The total length of the window cannot exceed 1000 characters. Note that
668 # the finding itself will be included in the window, so that hotwords may
669 # be used to match substrings of the finding itself. For example, the
670 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
671 # adjusted upwards if the area code is known to be the local area code of
672 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
673 # is the area code in question.
674 # rule.
675 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
676 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 },
679 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
680 # `InspectionRuleSet` are removed from results.
681 &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 -0700682 # be used to match sensitive information specific to the data, such as a list
683 # of employee IDs or job titles.
684 #
685 # Dictionary words are case-insensitive and all characters other than letters
686 # and digits in the unicode [Basic Multilingual
687 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
688 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
690 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700691 # surrounding any match must be of a different type than the adjacent
692 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700693 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
694 # match the first three letters of the text &quot;jen123&quot; but will return no
695 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 #
697 # Dictionary words containing a large number of characters that are not
698 # letters or digits may result in unexpected findings because such characters
699 # are treated as whitespace. The
700 # [limits](https://cloud.google.com/dlp/limits) page contains details about
701 # the size limits of dictionaries. For dictionaries that do not fit within
702 # these constraints, consider using `LargeCustomDictionaryConfig` in the
703 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &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.
705 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 # at least one phrase and every phrase must contain at least 2 characters
707 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 ],
710 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &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 -0700712 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 &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 -0700714 # Example: gs://[BUCKET_NAME]/dictionary.txt
715 },
716 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
718 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
719 # specified, the entire match is returned. No more than 3 may be included.
720 42,
721 ],
722 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
723 # (https://github.com/google/re2/wiki/Syntax) can be found under the
724 # google/re2 repository on GitHub.
725 },
726 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
727 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
728 # contained within with a finding of an infoType from this list. For
729 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
730 # `exclusion_rule` containing `exclude_info_types.info_types` with
731 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
732 # with EMAIL_ADDRESS finding.
733 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
734 # finding, namely email address.
735 { # Type of information detected by the API.
736 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
737 # creating a CustomInfoType, or one of the names listed
738 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
739 # a built-in type. InfoType names should conform to the pattern
740 # `[a-zA-Z0-9_]{1,64}`.
741 },
742 ],
743 },
744 &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 -0700745 },
746 },
747 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 },
749 ],
750 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
751 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
752 # When set within `InspectJobConfig`,
753 # the maximum returned is 2000 regardless if this is set higher.
754 # When set within `InspectContentRequest`, this field is ignored.
755 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
756 { # Max findings configuration per infoType, per content item or long
757 # running DlpJob.
758 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
759 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
760 # info_type should be provided. If InfoTypeLimit does not have an
761 # info_type, the DLP API applies the limit against all info_types that
762 # are found but not specified in another InfoTypeLimit.
763 &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 -0700764 # creating a CustomInfoType, or one of the names listed
765 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
766 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -0700767 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 },
770 ],
771 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
772 # When set within `InspectContentRequest`, the maximum returned is 2000
773 # regardless if this is set higher.
774 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
777 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700831 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
832 #
833 # The template will have one of the following formats:
834 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
835 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
836 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim65020912020-05-20 12:08:20 -0700837 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
838 &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 -0700839 # When used with redactContent only info_types and min_likelihood are currently
840 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700841 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
842 # POSSIBLE.
843 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
844 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
845 # If empty, text, images, and other content will be included.
846 &quot;A String&quot;,
847 ],
848 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
849 # InfoType values returned by ListInfoTypes or listed at
850 # https://cloud.google.com/dlp/docs/infotypes-reference.
851 #
852 # When no InfoTypes or CustomInfoTypes are specified in a request, the
853 # system may automatically choose what detectors to run. By default this may
854 # be all types, but may change over time as detectors are updated.
855 #
856 # If you need precise control and predictability as to what detectors are
857 # run you should specify specific InfoTypes listed in the reference,
858 # otherwise a default list will be used, which may change over time.
859 { # Type of information detected by the API.
860 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
861 # creating a CustomInfoType, or one of the names listed
862 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
863 # a built-in type. InfoType names should conform to the pattern
864 # `[a-zA-Z0-9_]{1,64}`.
865 },
866 ],
867 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
868 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
869 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
870 { # Custom information type provided by the user. Used to find domain-specific
871 # sensitive information configurable to the data in question.
872 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
873 # support reversing.
874 # such as
875 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
876 # These types of transformations are
877 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
878 # output. This should be used in conjunction with a field on the
879 # transformation such as `surrogate_info_type`. This CustomInfoType does
880 # not support the use of `detection_rules`.
881 },
882 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
883 # altered by a detection rule if the finding meets the criteria specified by
884 # the rule. Defaults to `VERY_LIKELY` if not specified.
885 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
886 # infoType, when the name matches one of existing infoTypes and that infoType
887 # is specified in `InspectContent.info_types` field. Specifying the latter
888 # adds findings to the one detected by the system. If built-in info type is
889 # not specified in `InspectContent.info_types` list then the name is treated
890 # as a custom info type.
891 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
892 # creating a CustomInfoType, or one of the names listed
893 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
894 # a built-in type. InfoType names should conform to the pattern
895 # `[a-zA-Z0-9_]{1,64}`.
896 },
897 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
898 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
899 # specified, the entire match is returned. No more than 3 may be included.
900 42,
901 ],
902 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
903 # (https://github.com/google/re2/wiki/Syntax) can be found under the
904 # google/re2 repository on GitHub.
905 },
906 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
907 # Rules are applied in order that they are specified. Not supported for the
908 # `surrogate_type` CustomInfoType.
909 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
910 # `CustomInfoType` to alter behavior under certain circumstances, depending
911 # on the specific details of the rule. Not supported for the `surrogate_type`
912 # custom infoType.
913 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
914 # proximity of hotwords.
915 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
916 # part of a detection rule.
917 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
918 # levels. For example, if a finding would be `POSSIBLE` without the
919 # detection rule and `relative_likelihood` is 1, then it is upgraded to
920 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
921 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
922 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
923 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
924 # a final likelihood of `LIKELY`.
925 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
926 },
927 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
928 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
929 # specified, the entire match is returned. No more than 3 may be included.
930 42,
931 ],
932 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
933 # (https://github.com/google/re2/wiki/Syntax) can be found under the
934 # google/re2 repository on GitHub.
935 },
936 &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.
937 # The total length of the window cannot exceed 1000 characters. Note that
938 # the finding itself will be included in the window, so that hotwords may
939 # be used to match substrings of the finding itself. For example, the
940 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
941 # adjusted upwards if the area code is known to be the local area code of
942 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
943 # is the area code in question.
944 # rule.
945 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
946 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
947 },
948 },
949 },
950 ],
951 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
952 # to be returned. It still can be used for rules matching.
953 &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.
954 # be used to match sensitive information specific to the data, such as a list
955 # of employee IDs or job titles.
956 #
957 # Dictionary words are case-insensitive and all characters other than letters
958 # and digits in the unicode [Basic Multilingual
959 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
960 # will be replaced with whitespace when scanning for matches, so the
961 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
962 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
963 # surrounding any match must be of a different type than the adjacent
964 # characters within the word, so letters must be next to non-letters and
965 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
966 # match the first three letters of the text &quot;jen123&quot; but will return no
967 # matches for &quot;jennifer&quot;.
968 #
969 # Dictionary words containing a large number of characters that are not
970 # letters or digits may result in unexpected findings because such characters
971 # are treated as whitespace. The
972 # [limits](https://cloud.google.com/dlp/limits) page contains details about
973 # the size limits of dictionaries. For dictionaries that do not fit within
974 # these constraints, consider using `LargeCustomDictionaryConfig` in the
975 # `StoredInfoType` API.
976 &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.
977 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
978 # at least one phrase and every phrase must contain at least 2 characters
979 # that are letters or digits. [required]
980 &quot;A String&quot;,
981 ],
982 },
983 &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
984 # is accepted.
985 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
986 # Example: gs://[BUCKET_NAME]/dictionary.txt
987 },
988 },
989 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
990 # `InspectDataSource`. Not currently supported in `InspectContent`.
991 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
992 # `organizations/433245324/storedInfoTypes/432452342` or
993 # `projects/project-id/storedInfoTypes/432452342`.
994 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
995 # inspection was created. Output-only field, populated by the system.
996 },
997 },
998 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1000 # included in the response; see Finding.quote.
1001 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1002 # Exclusion rules, contained in the set are executed in the end, other
1003 # rules are executed in the order they are specified for each info type.
1004 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1005 # circumstances, depending on the specific details of the rules within the set.
1006 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1007 { # Type of information detected by the API.
1008 &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 -07001009 # creating a CustomInfoType, or one of the names listed
1010 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1011 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001012 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001015 &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 -07001016 { # A single inspection rule to be applied to infoTypes, specified in
1017 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001018 &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 -07001019 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 &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 -07001021 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 # levels. For example, if a finding would be `POSSIBLE` without the
1024 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1025 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1026 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1027 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1028 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1029 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001030 &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 -07001031 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1033 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 # specified, the entire match is returned. No more than 3 may be included.
1035 42,
1036 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001037 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 &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.
1042 # The total length of the window cannot exceed 1000 characters. Note that
1043 # the finding itself will be included in the window, so that hotwords may
1044 # be used to match substrings of the finding itself. For example, the
1045 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1046 # adjusted upwards if the area code is known to be the local area code of
1047 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1048 # is the area code in question.
1049 # rule.
1050 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1051 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 },
1054 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1055 # `InspectionRuleSet` are removed from results.
1056 &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 -07001057 # be used to match sensitive information specific to the data, such as a list
1058 # of employee IDs or job titles.
1059 #
1060 # Dictionary words are case-insensitive and all characters other than letters
1061 # and digits in the unicode [Basic Multilingual
1062 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1063 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1065 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001066 # surrounding any match must be of a different type than the adjacent
1067 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001068 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1069 # match the first three letters of the text &quot;jen123&quot; but will return no
1070 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 #
1072 # Dictionary words containing a large number of characters that are not
1073 # letters or digits may result in unexpected findings because such characters
1074 # are treated as whitespace. The
1075 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1076 # the size limits of dictionaries. For dictionaries that do not fit within
1077 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1078 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 &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.
1080 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001081 # at least one phrase and every phrase must contain at least 2 characters
1082 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084 ],
1085 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &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 -07001087 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 &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 -07001089 # Example: gs://[BUCKET_NAME]/dictionary.txt
1090 },
1091 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001092 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1093 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1094 # specified, the entire match is returned. No more than 3 may be included.
1095 42,
1096 ],
1097 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1098 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1099 # google/re2 repository on GitHub.
1100 },
1101 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1102 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1103 # contained within with a finding of an infoType from this list. For
1104 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1105 # `exclusion_rule` containing `exclude_info_types.info_types` with
1106 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1107 # with EMAIL_ADDRESS finding.
1108 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1109 # finding, namely email address.
1110 { # Type of information detected by the API.
1111 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1112 # creating a CustomInfoType, or one of the names listed
1113 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1114 # a built-in type. InfoType names should conform to the pattern
1115 # `[a-zA-Z0-9_]{1,64}`.
1116 },
1117 ],
1118 },
1119 &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 -07001120 },
1121 },
1122 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001123 },
1124 ],
1125 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1126 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1127 # When set within `InspectJobConfig`,
1128 # the maximum returned is 2000 regardless if this is set higher.
1129 # When set within `InspectContentRequest`, this field is ignored.
1130 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1131 { # Max findings configuration per infoType, per content item or long
1132 # running DlpJob.
1133 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1134 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1135 # info_type should be provided. If InfoTypeLimit does not have an
1136 # info_type, the DLP API applies the limit against all info_types that
1137 # are found but not specified in another InfoTypeLimit.
1138 &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 -07001139 # creating a CustomInfoType, or one of the names listed
1140 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1141 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001142 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001144 },
1145 ],
1146 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1147 # When set within `InspectContentRequest`, the maximum returned is 2000
1148 # regardless if this is set higher.
1149 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001150 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001151 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1152 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 }</pre>
1154</div>
1155
1156<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001157 <code class="details" id="list">list(parent, orderBy=None, pageToken=None, locationId=None, pageSize=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)
Dan O'Mearadd494642020-05-01 07:42:23 -07001164 orderBy: string, Comma separated list of fields to order by,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001165followed by `asc` or `desc` postfix. This list is case-insensitive,
1166default sorting order is ascending, redundant space characters are
1167insignificant.
1168
1169Example: `name asc,update_time, create_time desc`
1170
1171Supported fields are:
1172
1173- `create_time`: corresponds to time the template was created.
1174- `update_time`: corresponds to time the template was last updated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001175- `name`: corresponds to template&#x27;s name.
1176- `display_name`: corresponds to template&#x27;s display name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001177 pageToken: string, Page token to continue retrieval. Comes from previous call
1178to `ListInspectTemplates`.
1179 locationId: string, The geographic location where inspection templates will be retrieved from.
1180Use `-` for all locations. Reserved for future extensions.
1181 pageSize: integer, Size of the page, can be limited by server. If zero server returns
1182a page of max size 100.
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 Kim4ed7d3f2020-05-27 12:20:54 -07001197 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
1198 #
1199 # The template will have one of the following formats:
1200 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1201 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
1202 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim65020912020-05-20 12:08:20 -07001203 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1204 &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 -07001205 # When used with redactContent only info_types and min_likelihood are currently
1206 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001207 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1208 # POSSIBLE.
1209 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1210 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
1211 # If empty, text, images, and other content will be included.
1212 &quot;A String&quot;,
1213 ],
1214 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
1215 # InfoType values returned by ListInfoTypes or listed at
1216 # https://cloud.google.com/dlp/docs/infotypes-reference.
1217 #
1218 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1219 # system may automatically choose what detectors to run. By default this may
1220 # be all types, but may change over time as detectors are updated.
1221 #
1222 # If you need precise control and predictability as to what detectors are
1223 # run you should specify specific InfoTypes listed in the reference,
1224 # otherwise a default list will be used, which may change over time.
1225 { # Type of information detected by the API.
1226 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1227 # creating a CustomInfoType, or one of the names listed
1228 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1229 # a built-in type. InfoType names should conform to the pattern
1230 # `[a-zA-Z0-9_]{1,64}`.
1231 },
1232 ],
1233 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
1234 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1235 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1236 { # Custom information type provided by the user. Used to find domain-specific
1237 # sensitive information configurable to the data in question.
1238 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1239 # support reversing.
1240 # such as
1241 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1242 # These types of transformations are
1243 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1244 # output. This should be used in conjunction with a field on the
1245 # transformation such as `surrogate_info_type`. This CustomInfoType does
1246 # not support the use of `detection_rules`.
1247 },
1248 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1249 # altered by a detection rule if the finding meets the criteria specified by
1250 # the rule. Defaults to `VERY_LIKELY` if not specified.
1251 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1252 # infoType, when the name matches one of existing infoTypes and that infoType
1253 # is specified in `InspectContent.info_types` field. Specifying the latter
1254 # adds findings to the one detected by the system. If built-in info type is
1255 # not specified in `InspectContent.info_types` list then the name is treated
1256 # as a custom info type.
1257 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1258 # creating a CustomInfoType, or one of the names listed
1259 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1260 # a built-in type. InfoType names should conform to the pattern
1261 # `[a-zA-Z0-9_]{1,64}`.
1262 },
1263 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1264 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1265 # specified, the entire match is returned. No more than 3 may be included.
1266 42,
1267 ],
1268 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1269 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1270 # google/re2 repository on GitHub.
1271 },
1272 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1273 # Rules are applied in order that they are specified. Not supported for the
1274 # `surrogate_type` CustomInfoType.
1275 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1276 # `CustomInfoType` to alter behavior under certain circumstances, depending
1277 # on the specific details of the rule. Not supported for the `surrogate_type`
1278 # custom infoType.
1279 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1280 # proximity of hotwords.
1281 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1282 # part of a detection rule.
1283 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1284 # levels. For example, if a finding would be `POSSIBLE` without the
1285 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1286 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1287 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1288 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1289 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1290 # a final likelihood of `LIKELY`.
1291 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1292 },
1293 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1294 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1295 # specified, the entire match is returned. No more than 3 may be included.
1296 42,
1297 ],
1298 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1299 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1300 # google/re2 repository on GitHub.
1301 },
1302 &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.
1303 # The total length of the window cannot exceed 1000 characters. Note that
1304 # the finding itself will be included in the window, so that hotwords may
1305 # be used to match substrings of the finding itself. For example, the
1306 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1307 # adjusted upwards if the area code is known to be the local area code of
1308 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1309 # is the area code in question.
1310 # rule.
1311 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1312 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1313 },
1314 },
1315 },
1316 ],
1317 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1318 # to be returned. It still can be used for rules matching.
1319 &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.
1320 # be used to match sensitive information specific to the data, such as a list
1321 # of employee IDs or job titles.
1322 #
1323 # Dictionary words are case-insensitive and all characters other than letters
1324 # and digits in the unicode [Basic Multilingual
1325 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1326 # will be replaced with whitespace when scanning for matches, so the
1327 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1328 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1329 # surrounding any match must be of a different type than the adjacent
1330 # characters within the word, so letters must be next to non-letters and
1331 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1332 # match the first three letters of the text &quot;jen123&quot; but will return no
1333 # matches for &quot;jennifer&quot;.
1334 #
1335 # Dictionary words containing a large number of characters that are not
1336 # letters or digits may result in unexpected findings because such characters
1337 # are treated as whitespace. The
1338 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1339 # the size limits of dictionaries. For dictionaries that do not fit within
1340 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1341 # `StoredInfoType` API.
1342 &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.
1343 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1344 # at least one phrase and every phrase must contain at least 2 characters
1345 # that are letters or digits. [required]
1346 &quot;A String&quot;,
1347 ],
1348 },
1349 &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
1350 # is accepted.
1351 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1352 # Example: gs://[BUCKET_NAME]/dictionary.txt
1353 },
1354 },
1355 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1356 # `InspectDataSource`. Not currently supported in `InspectContent`.
1357 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1358 # `organizations/433245324/storedInfoTypes/432452342` or
1359 # `projects/project-id/storedInfoTypes/432452342`.
1360 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1361 # inspection was created. Output-only field, populated by the system.
1362 },
1363 },
1364 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1366 # included in the response; see Finding.quote.
1367 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1368 # Exclusion rules, contained in the set are executed in the end, other
1369 # rules are executed in the order they are specified for each info type.
1370 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1371 # circumstances, depending on the specific details of the rules within the set.
1372 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1373 { # Type of information detected by the API.
1374 &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 -07001375 # creating a CustomInfoType, or one of the names listed
1376 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1377 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001378 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001379 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001380 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001381 &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 -07001382 { # A single inspection rule to be applied to infoTypes, specified in
1383 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 &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 -07001385 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 &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 -07001387 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001389 # levels. For example, if a finding would be `POSSIBLE` without the
1390 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1391 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1392 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1393 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1394 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1395 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &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 -07001397 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1399 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001400 # specified, the entire match is returned. No more than 3 may be included.
1401 42,
1402 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001403 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001406 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 &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.
1408 # The total length of the window cannot exceed 1000 characters. Note that
1409 # the finding itself will be included in the window, so that hotwords may
1410 # be used to match substrings of the finding itself. For example, the
1411 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1412 # adjusted upwards if the area code is known to be the local area code of
1413 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1414 # is the area code in question.
1415 # rule.
1416 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1417 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001418 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 },
1420 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1421 # `InspectionRuleSet` are removed from results.
1422 &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 -07001423 # be used to match sensitive information specific to the data, such as a list
1424 # of employee IDs or job titles.
1425 #
1426 # Dictionary words are case-insensitive and all characters other than letters
1427 # and digits in the unicode [Basic Multilingual
1428 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1429 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001430 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1431 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 # surrounding any match must be of a different type than the adjacent
1433 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1435 # match the first three letters of the text &quot;jen123&quot; but will return no
1436 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001437 #
1438 # Dictionary words containing a large number of characters that are not
1439 # letters or digits may result in unexpected findings because such characters
1440 # are treated as whitespace. The
1441 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1442 # the size limits of dictionaries. For dictionaries that do not fit within
1443 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1444 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 &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.
1446 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001447 # at least one phrase and every phrase must contain at least 2 characters
1448 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001449 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001450 ],
1451 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 &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 -07001453 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001454 &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 -07001455 # Example: gs://[BUCKET_NAME]/dictionary.txt
1456 },
1457 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001458 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1459 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1460 # specified, the entire match is returned. No more than 3 may be included.
1461 42,
1462 ],
1463 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1464 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1465 # google/re2 repository on GitHub.
1466 },
1467 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1468 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1469 # contained within with a finding of an infoType from this list. For
1470 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1471 # `exclusion_rule` containing `exclude_info_types.info_types` with
1472 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1473 # with EMAIL_ADDRESS finding.
1474 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1475 # finding, namely email address.
1476 { # Type of information detected by the API.
1477 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1478 # creating a CustomInfoType, or one of the names listed
1479 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1480 # a built-in type. InfoType names should conform to the pattern
1481 # `[a-zA-Z0-9_]{1,64}`.
1482 },
1483 ],
1484 },
1485 &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 -07001486 },
1487 },
1488 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001489 },
1490 ],
1491 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1492 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1493 # When set within `InspectJobConfig`,
1494 # the maximum returned is 2000 regardless if this is set higher.
1495 # When set within `InspectContentRequest`, this field is ignored.
1496 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1497 { # Max findings configuration per infoType, per content item or long
1498 # running DlpJob.
1499 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1500 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1501 # info_type should be provided. If InfoTypeLimit does not have an
1502 # info_type, the DLP API applies the limit against all info_types that
1503 # are found but not specified in another InfoTypeLimit.
1504 &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 -07001505 # creating a CustomInfoType, or one of the names listed
1506 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1507 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001508 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001509 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001510 },
1511 ],
1512 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1513 # When set within `InspectContentRequest`, the maximum returned is 2000
1514 # regardless if this is set higher.
1515 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001517 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1518 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
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 Kim4ed7d3f2020-05-27 12:20:54 -07001557 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
1558 #
1559 # The template will have one of the following formats:
1560 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1561 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
1562 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim65020912020-05-20 12:08:20 -07001563 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1564 &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 -07001565 # When used with redactContent only info_types and min_likelihood are currently
1566 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001567 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1568 # POSSIBLE.
1569 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1570 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
1571 # If empty, text, images, and other content will be included.
1572 &quot;A String&quot;,
1573 ],
1574 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
1575 # InfoType values returned by ListInfoTypes or listed at
1576 # https://cloud.google.com/dlp/docs/infotypes-reference.
1577 #
1578 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1579 # system may automatically choose what detectors to run. By default this may
1580 # be all types, but may change over time as detectors are updated.
1581 #
1582 # If you need precise control and predictability as to what detectors are
1583 # run you should specify specific InfoTypes listed in the reference,
1584 # otherwise a default list will be used, which may change over time.
1585 { # Type of information detected by the API.
1586 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1587 # creating a CustomInfoType, or one of the names listed
1588 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1589 # a built-in type. InfoType names should conform to the pattern
1590 # `[a-zA-Z0-9_]{1,64}`.
1591 },
1592 ],
1593 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
1594 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1595 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1596 { # Custom information type provided by the user. Used to find domain-specific
1597 # sensitive information configurable to the data in question.
1598 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1599 # support reversing.
1600 # such as
1601 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1602 # These types of transformations are
1603 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1604 # output. This should be used in conjunction with a field on the
1605 # transformation such as `surrogate_info_type`. This CustomInfoType does
1606 # not support the use of `detection_rules`.
1607 },
1608 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1609 # altered by a detection rule if the finding meets the criteria specified by
1610 # the rule. Defaults to `VERY_LIKELY` if not specified.
1611 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1612 # infoType, when the name matches one of existing infoTypes and that infoType
1613 # is specified in `InspectContent.info_types` field. Specifying the latter
1614 # adds findings to the one detected by the system. If built-in info type is
1615 # not specified in `InspectContent.info_types` list then the name is treated
1616 # as a custom info type.
1617 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1618 # creating a CustomInfoType, or one of the names listed
1619 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1620 # a built-in type. InfoType names should conform to the pattern
1621 # `[a-zA-Z0-9_]{1,64}`.
1622 },
1623 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1624 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1625 # specified, the entire match is returned. No more than 3 may be included.
1626 42,
1627 ],
1628 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1629 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1630 # google/re2 repository on GitHub.
1631 },
1632 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1633 # Rules are applied in order that they are specified. Not supported for the
1634 # `surrogate_type` CustomInfoType.
1635 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1636 # `CustomInfoType` to alter behavior under certain circumstances, depending
1637 # on the specific details of the rule. Not supported for the `surrogate_type`
1638 # custom infoType.
1639 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1640 # proximity of hotwords.
1641 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1642 # part of a detection rule.
1643 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1644 # levels. For example, if a finding would be `POSSIBLE` without the
1645 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1646 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1647 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1648 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1649 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1650 # a final likelihood of `LIKELY`.
1651 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1652 },
1653 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1654 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1655 # specified, the entire match is returned. No more than 3 may be included.
1656 42,
1657 ],
1658 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1659 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1660 # google/re2 repository on GitHub.
1661 },
1662 &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.
1663 # The total length of the window cannot exceed 1000 characters. Note that
1664 # the finding itself will be included in the window, so that hotwords may
1665 # be used to match substrings of the finding itself. For example, the
1666 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1667 # adjusted upwards if the area code is known to be the local area code of
1668 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1669 # is the area code in question.
1670 # rule.
1671 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1672 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1673 },
1674 },
1675 },
1676 ],
1677 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1678 # to be returned. It still can be used for rules matching.
1679 &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.
1680 # be used to match sensitive information specific to the data, such as a list
1681 # of employee IDs or job titles.
1682 #
1683 # Dictionary words are case-insensitive and all characters other than letters
1684 # and digits in the unicode [Basic Multilingual
1685 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1686 # will be replaced with whitespace when scanning for matches, so the
1687 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1688 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1689 # surrounding any match must be of a different type than the adjacent
1690 # characters within the word, so letters must be next to non-letters and
1691 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1692 # match the first three letters of the text &quot;jen123&quot; but will return no
1693 # matches for &quot;jennifer&quot;.
1694 #
1695 # Dictionary words containing a large number of characters that are not
1696 # letters or digits may result in unexpected findings because such characters
1697 # are treated as whitespace. The
1698 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1699 # the size limits of dictionaries. For dictionaries that do not fit within
1700 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1701 # `StoredInfoType` API.
1702 &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.
1703 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1704 # at least one phrase and every phrase must contain at least 2 characters
1705 # that are letters or digits. [required]
1706 &quot;A String&quot;,
1707 ],
1708 },
1709 &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
1710 # is accepted.
1711 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1712 # Example: gs://[BUCKET_NAME]/dictionary.txt
1713 },
1714 },
1715 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1716 # `InspectDataSource`. Not currently supported in `InspectContent`.
1717 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1718 # `organizations/433245324/storedInfoTypes/432452342` or
1719 # `projects/project-id/storedInfoTypes/432452342`.
1720 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1721 # inspection was created. Output-only field, populated by the system.
1722 },
1723 },
1724 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001725 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1726 # included in the response; see Finding.quote.
1727 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1728 # Exclusion rules, contained in the set are executed in the end, other
1729 # rules are executed in the order they are specified for each info type.
1730 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1731 # circumstances, depending on the specific details of the rules within the set.
1732 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1733 { # Type of information detected by the API.
1734 &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 -07001735 # creating a CustomInfoType, or one of the names listed
1736 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1737 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001738 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001739 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001740 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001741 &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 -07001742 { # A single inspection rule to be applied to infoTypes, specified in
1743 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001744 &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 -07001745 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07001746 &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 -07001747 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07001748 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001749 # levels. For example, if a finding would be `POSSIBLE` without the
1750 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1751 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1752 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1753 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1754 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1755 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001756 &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 -07001757 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001758 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1759 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001760 # specified, the entire match is returned. No more than 3 may be included.
1761 42,
1762 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001766 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001767 &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.
1768 # The total length of the window cannot exceed 1000 characters. Note that
1769 # the finding itself will be included in the window, so that hotwords may
1770 # be used to match substrings of the finding itself. For example, the
1771 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1772 # adjusted upwards if the area code is known to be the local area code of
1773 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1774 # is the area code in question.
1775 # rule.
1776 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1777 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001778 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001779 },
1780 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1781 # `InspectionRuleSet` are removed from results.
1782 &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 -07001783 # be used to match sensitive information specific to the data, such as a list
1784 # of employee IDs or job titles.
1785 #
1786 # Dictionary words are case-insensitive and all characters other than letters
1787 # and digits in the unicode [Basic Multilingual
1788 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1789 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001790 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1791 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001792 # surrounding any match must be of a different type than the adjacent
1793 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001794 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1795 # match the first three letters of the text &quot;jen123&quot; but will return no
1796 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001797 #
1798 # Dictionary words containing a large number of characters that are not
1799 # letters or digits may result in unexpected findings because such characters
1800 # are treated as whitespace. The
1801 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1802 # the size limits of dictionaries. For dictionaries that do not fit within
1803 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1804 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001805 &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.
1806 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001807 # at least one phrase and every phrase must contain at least 2 characters
1808 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001809 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001810 ],
1811 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001812 &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 -07001813 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001814 &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 -07001815 # Example: gs://[BUCKET_NAME]/dictionary.txt
1816 },
1817 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001818 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1819 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1820 # specified, the entire match is returned. No more than 3 may be included.
1821 42,
1822 ],
1823 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1824 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1825 # google/re2 repository on GitHub.
1826 },
1827 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1828 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1829 # contained within with a finding of an infoType from this list. For
1830 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1831 # `exclusion_rule` containing `exclude_info_types.info_types` with
1832 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1833 # with EMAIL_ADDRESS finding.
1834 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1835 # finding, namely email address.
1836 { # Type of information detected by the API.
1837 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1838 # creating a CustomInfoType, or one of the names listed
1839 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1840 # a built-in type. InfoType names should conform to the pattern
1841 # `[a-zA-Z0-9_]{1,64}`.
1842 },
1843 ],
1844 },
1845 &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 -07001846 },
1847 },
1848 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001849 },
1850 ],
1851 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1852 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1853 # When set within `InspectJobConfig`,
1854 # the maximum returned is 2000 regardless if this is set higher.
1855 # When set within `InspectContentRequest`, this field is ignored.
1856 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1857 { # Max findings configuration per infoType, per content item or long
1858 # running DlpJob.
1859 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1860 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1861 # info_type should be provided. If InfoTypeLimit does not have an
1862 # info_type, the DLP API applies the limit against all info_types that
1863 # are found but not specified in another InfoTypeLimit.
1864 &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 -07001865 # creating a CustomInfoType, or one of the names listed
1866 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1867 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07001868 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001870 },
1871 ],
1872 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1873 # When set within `InspectContentRequest`, the maximum returned is 2000
1874 # regardless if this is set higher.
1875 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001876 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001877 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1878 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
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 Kim4ed7d3f2020-05-27 12:20:54 -07001895 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
1896 #
1897 # The template will have one of the following formats:
1898 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1899 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
1900 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
Bu Sun Kim65020912020-05-20 12:08:20 -07001901 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1902 &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 -07001903 # When used with redactContent only info_types and min_likelihood are currently
1904 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001905 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1906 # POSSIBLE.
1907 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1908 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
1909 # If empty, text, images, and other content will be included.
1910 &quot;A String&quot;,
1911 ],
1912 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
1913 # InfoType values returned by ListInfoTypes or listed at
1914 # https://cloud.google.com/dlp/docs/infotypes-reference.
1915 #
1916 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1917 # system may automatically choose what detectors to run. By default this may
1918 # be all types, but may change over time as detectors are updated.
1919 #
1920 # If you need precise control and predictability as to what detectors are
1921 # run you should specify specific InfoTypes listed in the reference,
1922 # otherwise a default list will be used, which may change over time.
1923 { # Type of information detected by the API.
1924 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1925 # creating a CustomInfoType, or one of the names listed
1926 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1927 # a built-in type. InfoType names should conform to the pattern
1928 # `[a-zA-Z0-9_]{1,64}`.
1929 },
1930 ],
1931 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
1932 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1933 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1934 { # Custom information type provided by the user. Used to find domain-specific
1935 # sensitive information configurable to the data in question.
1936 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1937 # support reversing.
1938 # such as
1939 # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1940 # These types of transformations are
1941 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1942 # output. This should be used in conjunction with a field on the
1943 # transformation such as `surrogate_info_type`. This CustomInfoType does
1944 # not support the use of `detection_rules`.
1945 },
1946 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1947 # altered by a detection rule if the finding meets the criteria specified by
1948 # the rule. Defaults to `VERY_LIKELY` if not specified.
1949 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1950 # infoType, when the name matches one of existing infoTypes and that infoType
1951 # is specified in `InspectContent.info_types` field. Specifying the latter
1952 # adds findings to the one detected by the system. If built-in info type is
1953 # not specified in `InspectContent.info_types` list then the name is treated
1954 # as a custom info type.
1955 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1956 # creating a CustomInfoType, or one of the names listed
1957 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1958 # a built-in type. InfoType names should conform to the pattern
1959 # `[a-zA-Z0-9_]{1,64}`.
1960 },
1961 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1962 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1963 # specified, the entire match is returned. No more than 3 may be included.
1964 42,
1965 ],
1966 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1967 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1968 # google/re2 repository on GitHub.
1969 },
1970 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1971 # Rules are applied in order that they are specified. Not supported for the
1972 # `surrogate_type` CustomInfoType.
1973 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1974 # `CustomInfoType` to alter behavior under certain circumstances, depending
1975 # on the specific details of the rule. Not supported for the `surrogate_type`
1976 # custom infoType.
1977 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1978 # proximity of hotwords.
1979 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1980 # part of a detection rule.
1981 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1982 # levels. For example, if a finding would be `POSSIBLE` without the
1983 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1984 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1985 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1986 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1987 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1988 # a final likelihood of `LIKELY`.
1989 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1990 },
1991 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1992 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1993 # specified, the entire match is returned. No more than 3 may be included.
1994 42,
1995 ],
1996 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1997 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1998 # google/re2 repository on GitHub.
1999 },
2000 &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.
2001 # The total length of the window cannot exceed 1000 characters. Note that
2002 # the finding itself will be included in the window, so that hotwords may
2003 # be used to match substrings of the finding itself. For example, the
2004 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
2005 # adjusted upwards if the area code is known to be the local area code of
2006 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
2007 # is the area code in question.
2008 # rule.
2009 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
2010 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
2011 },
2012 },
2013 },
2014 ],
2015 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
2016 # to be returned. It still can be used for rules matching.
2017 &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.
2018 # be used to match sensitive information specific to the data, such as a list
2019 # of employee IDs or job titles.
2020 #
2021 # Dictionary words are case-insensitive and all characters other than letters
2022 # and digits in the unicode [Basic Multilingual
2023 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
2024 # will be replaced with whitespace when scanning for matches, so the
2025 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
2026 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
2027 # surrounding any match must be of a different type than the adjacent
2028 # characters within the word, so letters must be next to non-letters and
2029 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
2030 # match the first three letters of the text &quot;jen123&quot; but will return no
2031 # matches for &quot;jennifer&quot;.
2032 #
2033 # Dictionary words containing a large number of characters that are not
2034 # letters or digits may result in unexpected findings because such characters
2035 # are treated as whitespace. The
2036 # [limits](https://cloud.google.com/dlp/limits) page contains details about
2037 # the size limits of dictionaries. For dictionaries that do not fit within
2038 # these constraints, consider using `LargeCustomDictionaryConfig` in the
2039 # `StoredInfoType` API.
2040 &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.
2041 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
2042 # at least one phrase and every phrase must contain at least 2 characters
2043 # that are letters or digits. [required]
2044 &quot;A String&quot;,
2045 ],
2046 },
2047 &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
2048 # is accepted.
2049 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
2050 # Example: gs://[BUCKET_NAME]/dictionary.txt
2051 },
2052 },
2053 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
2054 # `InspectDataSource`. Not currently supported in `InspectContent`.
2055 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
2056 # `organizations/433245324/storedInfoTypes/432452342` or
2057 # `projects/project-id/storedInfoTypes/432452342`.
2058 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
2059 # inspection was created. Output-only field, populated by the system.
2060 },
2061 },
2062 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002063 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
2064 # included in the response; see Finding.quote.
2065 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
2066 # Exclusion rules, contained in the set are executed in the end, other
2067 # rules are executed in the order they are specified for each info type.
2068 { # Rule set for modifying a set of infoTypes to alter behavior under certain
2069 # circumstances, depending on the specific details of the rules within the set.
2070 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
2071 { # Type of information detected by the API.
2072 &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 -07002073 # creating a CustomInfoType, or one of the names listed
2074 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2075 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07002076 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002077 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002078 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002079 &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 -07002080 { # A single inspection rule to be applied to infoTypes, specified in
2081 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002082 &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 -07002083 # proximity of hotwords.
Bu Sun Kim65020912020-05-20 12:08:20 -07002084 &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 -07002085 # part of a detection rule.
Bu Sun Kim65020912020-05-20 12:08:20 -07002086 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002087 # levels. For example, if a finding would be `POSSIBLE` without the
2088 # detection rule and `relative_likelihood` is 1, then it is upgraded to
2089 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
2090 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
2091 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
2092 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
2093 # a final likelihood of `LIKELY`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002094 &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 -07002095 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002096 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
2097 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002098 # specified, the entire match is returned. No more than 3 may be included.
2099 42,
2100 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002101 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002104 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002105 &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.
2106 # The total length of the window cannot exceed 1000 characters. Note that
2107 # the finding itself will be included in the window, so that hotwords may
2108 # be used to match substrings of the finding itself. For example, the
2109 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
2110 # adjusted upwards if the area code is known to be the local area code of
2111 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
2112 # is the area code in question.
2113 # rule.
2114 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
2115 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002116 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002117 },
2118 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
2119 # `InspectionRuleSet` are removed from results.
2120 &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 -07002121 # be used to match sensitive information specific to the data, such as a list
2122 # of employee IDs or job titles.
2123 #
2124 # Dictionary words are case-insensitive and all characters other than letters
2125 # and digits in the unicode [Basic Multilingual
2126 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
2127 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07002128 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
2129 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002130 # surrounding any match must be of a different type than the adjacent
2131 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07002132 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
2133 # match the first three letters of the text &quot;jen123&quot; but will return no
2134 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002135 #
2136 # Dictionary words containing a large number of characters that are not
2137 # letters or digits may result in unexpected findings because such characters
2138 # are treated as whitespace. The
2139 # [limits](https://cloud.google.com/dlp/limits) page contains details about
2140 # the size limits of dictionaries. For dictionaries that do not fit within
2141 # these constraints, consider using `LargeCustomDictionaryConfig` in the
2142 # `StoredInfoType` API.
Bu Sun Kim65020912020-05-20 12:08:20 -07002143 &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.
2144 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002145 # at least one phrase and every phrase must contain at least 2 characters
2146 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07002147 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002148 ],
2149 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002150 &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 -07002151 # is accepted.
Bu Sun Kim65020912020-05-20 12:08:20 -07002152 &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 -07002153 # Example: gs://[BUCKET_NAME]/dictionary.txt
2154 },
2155 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002156 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
2157 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
2158 # specified, the entire match is returned. No more than 3 may be included.
2159 42,
2160 ],
2161 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2162 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2163 # google/re2 repository on GitHub.
2164 },
2165 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
2166 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
2167 # contained within with a finding of an infoType from this list. For
2168 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
2169 # `exclusion_rule` containing `exclude_info_types.info_types` with
2170 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
2171 # with EMAIL_ADDRESS finding.
2172 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
2173 # finding, namely email address.
2174 { # Type of information detected by the API.
2175 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
2176 # creating a CustomInfoType, or one of the names listed
2177 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2178 # a built-in type. InfoType names should conform to the pattern
2179 # `[a-zA-Z0-9_]{1,64}`.
2180 },
2181 ],
2182 },
2183 &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 -07002184 },
2185 },
2186 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002187 },
2188 ],
2189 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
2190 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
2191 # When set within `InspectJobConfig`,
2192 # the maximum returned is 2000 regardless if this is set higher.
2193 # When set within `InspectContentRequest`, this field is ignored.
2194 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
2195 { # Max findings configuration per infoType, per content item or long
2196 # running DlpJob.
2197 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
2198 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
2199 # info_type should be provided. If InfoTypeLimit does not have an
2200 # info_type, the DLP API applies the limit against all info_types that
2201 # are found but not specified in another InfoTypeLimit.
2202 &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 -07002203 # creating a CustomInfoType, or one of the names listed
2204 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2205 # a built-in type. InfoType names should conform to the pattern
Dan O'Mearadd494642020-05-01 07:42:23 -07002206 # `[a-zA-Z0-9_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002207 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002208 },
2209 ],
2210 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
2211 # When set within `InspectContentRequest`, the maximum returned is 2000
2212 # regardless if this is set higher.
2213 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002215 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
2216 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 }</pre>
2218</div>
2219
2220</body></html>