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