blob: f7d65c45e4c41496bbb05a13674e1cafbb5e2e24 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dlp_v2.html">Cloud Data Loss Prevention (DLP) API</a> . <a href="dlp_v2.projects.html">projects</a> . <a href="dlp_v2.projects.inspectTemplates.html">inspectTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates an InspectTemplate for re-using frequently used configuration</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes an InspectTemplate.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets an InspectTemplate.</p>
86<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(parent, orderBy=None, pageToken=None, pageSize=None, locationId=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:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700103 parent: string, Required. Parent resource name.
104- Format:projects/[PROJECT-ID]
105- Format:organizations/[ORGANIZATION-ID]
106- Format:projects/[PROJECT-ID]/locations/[LOCATION-ID]
107- Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 The object takes the form of:
110
111{ # Request message for CreateInspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700112 &quot;templateId&quot;: &quot;A String&quot;, # The template id can contain uppercase and lowercase letters,
113 # numbers, and hyphens; that is, it must match the regular
114 # expression: `[a-zA-Z\\d-_]+`. The maximum length is 100
115 # characters. Can be empty to allow the system to generate one.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700116 &quot;locationId&quot;: &quot;A String&quot;, # Deprecated. This field has no effect.
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 &quot;inspectTemplate&quot;: { # The inspectTemplate contains a configuration (set of types of sensitive data # Required. The InspectTemplate to create.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 # to be detected) to be used anywhere you otherwise would normally specify
119 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
120 # to learn more.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
122 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
123 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
124 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700125 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
126 #
127 # The template will have one of the following formats:
128 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
129 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 # When used with redactContent only info_types and min_likelihood are currently
132 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700133 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
134 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
135 { # Custom information type provided by the user. Used to find domain-specific
136 # sensitive information configurable to the data in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700137 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
138 # be used to match sensitive information specific to the data, such as a list
139 # of employee IDs or job titles.
140 #
141 # Dictionary words are case-insensitive and all characters other than letters
142 # and digits in the unicode [Basic Multilingual
143 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
144 # will be replaced with whitespace when scanning for matches, so the
145 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
146 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
147 # surrounding any match must be of a different type than the adjacent
148 # characters within the word, so letters must be next to non-letters and
149 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
150 # match the first three letters of the text &quot;jen123&quot; but will return no
151 # matches for &quot;jennifer&quot;.
152 #
153 # Dictionary words containing a large number of characters that are not
154 # letters or digits may result in unexpected findings because such characters
155 # are treated as whitespace. The
156 # [limits](https://cloud.google.com/dlp/limits) page contains details about
157 # the size limits of dictionaries. For dictionaries that do not fit within
158 # these constraints, consider using `LargeCustomDictionaryConfig` in the
159 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700160 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
161 # is accepted.
162 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
163 # Example: gs://[BUCKET_NAME]/dictionary.txt
164 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700165 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
166 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
167 # at least one phrase and every phrase must contain at least 2 characters
168 # that are letters or digits. [required]
169 &quot;A String&quot;,
170 ],
171 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700172 },
173 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
174 # infoType, when the name matches one of existing infoTypes and that infoType
175 # is specified in `InspectContent.info_types` field. Specifying the latter
176 # adds findings to the one detected by the system. If built-in info type is
177 # not specified in `InspectContent.info_types` list then the name is treated
178 # as a custom info type.
179 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
180 # creating a CustomInfoType, or one of the names listed
181 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
182 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
183 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
184 },
185 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
186 # altered by a detection rule if the finding meets the criteria specified by
187 # the rule. Defaults to `VERY_LIKELY` if not specified.
188 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
189 # Rules are applied in order that they are specified. Not supported for the
190 # `surrogate_type` CustomInfoType.
191 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
192 # `CustomInfoType` to alter behavior under certain circumstances, depending
193 # on the specific details of the rule. Not supported for the `surrogate_type`
194 # custom infoType.
195 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
196 # proximity of hotwords.
197 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
198 # The total length of the window cannot exceed 1000 characters. Note that
199 # the finding itself will be included in the window, so that hotwords may
200 # be used to match substrings of the finding itself. For example, the
201 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
202 # adjusted upwards if the area code is known to be the local area code of
203 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
204 # is the area code in question.
205 # rule.
206 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
207 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
208 },
209 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
210 # part of a detection rule.
211 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
212 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
213 # levels. For example, if a finding would be `POSSIBLE` without the
214 # detection rule and `relative_likelihood` is 1, then it is upgraded to
215 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
216 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
217 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
218 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
219 # a final likelihood of `LIKELY`.
220 },
221 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
222 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
223 # specified, the entire match is returned. No more than 3 may be included.
224 42,
225 ],
226 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
227 # (https://github.com/google/re2/wiki/Syntax) can be found under the
228 # google/re2 repository on GitHub.
229 },
230 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700231 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700232 ],
233 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
234 # support reversing.
235 # such as
236 # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
237 # These types of transformations are
238 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
239 # output. This should be used in conjunction with a field on the
240 # transformation such as `surrogate_info_type`. This CustomInfoType does
241 # not support the use of `detection_rules`.
242 },
243 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
244 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
245 # specified, the entire match is returned. No more than 3 may be included.
246 42,
247 ],
248 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
249 # (https://github.com/google/re2/wiki/Syntax) can be found under the
250 # google/re2 repository on GitHub.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 },
252 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
253 # `InspectDataSource`. Not currently supported in `InspectContent`.
254 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
255 # `organizations/433245324/storedInfoTypes/432452342` or
256 # `projects/project-id/storedInfoTypes/432452342`.
257 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
258 # inspection was created. Output-only field, populated by the system.
259 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700260 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
261 # to be returned. It still can be used for rules matching.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700262 },
263 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700264 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
265 # POSSIBLE.
266 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
267 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
268 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
269 # When set within `InspectContentRequest`, the maximum returned is 2000
270 # regardless if this is set higher.
271 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
272 { # Max findings configuration per infoType, per content item or long
273 # running DlpJob.
274 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
275 # info_type should be provided. If InfoTypeLimit does not have an
276 # info_type, the DLP API applies the limit against all info_types that
277 # are found but not specified in another InfoTypeLimit.
278 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
279 # creating a CustomInfoType, or one of the names listed
280 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
281 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
282 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
283 },
284 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
285 },
286 ],
287 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
288 # When set within `InspectJobConfig`,
289 # the maximum returned is 2000 regardless if this is set higher.
290 # When set within `InspectContentRequest`, this field is ignored.
291 },
292 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
294 # included in the response; see Finding.quote.
295 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
296 # Exclusion rules, contained in the set are executed in the end, other
297 # rules are executed in the order they are specified for each info type.
298 { # Rule set for modifying a set of infoTypes to alter behavior under certain
299 # circumstances, depending on the specific details of the rules within the set.
300 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
301 { # Type of information detected by the API.
302 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 # creating a CustomInfoType, or one of the names listed
304 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700305 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
306 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 { # A single inspection rule to be applied to infoTypes, specified in
311 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 # proximity of hotwords.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700314 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
315 # The total length of the window cannot exceed 1000 characters. Note that
316 # the finding itself will be included in the window, so that hotwords may
317 # be used to match substrings of the finding itself. For example, the
318 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
319 # adjusted upwards if the area code is known to be the local area code of
320 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
321 # is the area code in question.
322 # rule.
323 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
324 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
325 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 # part of a detection rule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700328 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 # levels. For example, if a finding would be `POSSIBLE` without the
331 # detection rule and `relative_likelihood` is 1, then it is upgraded to
332 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
333 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
334 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
335 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
336 # a final likelihood of `LIKELY`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
339 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 # specified, the entire match is returned. No more than 3 may be included.
341 42,
342 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
344 # (https://github.com/google/re2/wiki/Syntax) can be found under the
345 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 },
348 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
349 # `InspectionRuleSet` are removed from results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700350 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 # be used to match sensitive information specific to the data, such as a list
353 # of employee IDs or job titles.
354 #
355 # Dictionary words are case-insensitive and all characters other than letters
356 # and digits in the unicode [Basic Multilingual
357 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
358 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
360 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 # surrounding any match must be of a different type than the adjacent
362 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
364 # match the first three letters of the text &quot;jen123&quot; but will return no
365 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 #
367 # Dictionary words containing a large number of characters that are not
368 # letters or digits may result in unexpected findings because such characters
369 # are treated as whitespace. The
370 # [limits](https://cloud.google.com/dlp/limits) page contains details about
371 # the size limits of dictionaries. For dictionaries that do not fit within
372 # these constraints, consider using `LargeCustomDictionaryConfig` in the
373 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700374 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
375 # is accepted.
376 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
377 # Example: gs://[BUCKET_NAME]/dictionary.txt
378 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
380 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 # at least one phrase and every phrase must contain at least 2 characters
382 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 ],
385 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 },
387 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
388 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
389 # contained within with a finding of an infoType from this list. For
390 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
391 # `exclusion_rule` containing `exclude_info_types.info_types` with
392 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
393 # with EMAIL_ADDRESS finding.
394 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
395 # finding, namely email address.
396 { # Type of information detected by the API.
397 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
398 # creating a CustomInfoType, or one of the names listed
399 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700400 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
401 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 },
403 ],
404 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
406 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
407 # specified, the entire match is returned. No more than 3 may be included.
408 42,
409 ],
410 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
411 # (https://github.com/google/re2/wiki/Syntax) can be found under the
412 # google/re2 repository on GitHub.
413 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 },
415 },
416 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 },
418 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700419 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
420 # If empty, text, images, and other content will be included.
421 &quot;A String&quot;,
422 ],
423 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
424 # InfoType values returned by ListInfoTypes or listed at
425 # https://cloud.google.com/dlp/docs/infotypes-reference.
426 #
427 # When no InfoTypes or CustomInfoTypes are specified in a request, the
428 # system may automatically choose what detectors to run. By default this may
429 # be all types, but may change over time as detectors are updated.
430 #
431 # If you need precise control and predictability as to what detectors are
432 # run you should specify specific InfoTypes listed in the reference,
433 # otherwise a default list will be used, which may change over time.
434 { # Type of information detected by the API.
435 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
436 # creating a CustomInfoType, or one of the names listed
437 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
438 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
439 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
440 },
441 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700444 }
445
446 x__xgafv: string, V1 error format.
447 Allowed values
448 1 - v1 error format
449 2 - v2 error format
450
451Returns:
452 An object of the form:
453
454 { # The inspectTemplate contains a configuration (set of types of sensitive data
455 # to be detected) to be used anywhere you otherwise would normally specify
456 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
457 # to learn more.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700458 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
459 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
460 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
461 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700462 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
463 #
464 # The template will have one of the following formats:
465 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
466 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 # When used with redactContent only info_types and min_likelihood are currently
469 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700470 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
471 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
472 { # Custom information type provided by the user. Used to find domain-specific
473 # sensitive information configurable to the data in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700474 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
475 # be used to match sensitive information specific to the data, such as a list
476 # of employee IDs or job titles.
477 #
478 # Dictionary words are case-insensitive and all characters other than letters
479 # and digits in the unicode [Basic Multilingual
480 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
481 # will be replaced with whitespace when scanning for matches, so the
482 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
483 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
484 # surrounding any match must be of a different type than the adjacent
485 # characters within the word, so letters must be next to non-letters and
486 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
487 # match the first three letters of the text &quot;jen123&quot; but will return no
488 # matches for &quot;jennifer&quot;.
489 #
490 # Dictionary words containing a large number of characters that are not
491 # letters or digits may result in unexpected findings because such characters
492 # are treated as whitespace. The
493 # [limits](https://cloud.google.com/dlp/limits) page contains details about
494 # the size limits of dictionaries. For dictionaries that do not fit within
495 # these constraints, consider using `LargeCustomDictionaryConfig` in the
496 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700497 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
498 # is accepted.
499 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
500 # Example: gs://[BUCKET_NAME]/dictionary.txt
501 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700502 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
503 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
504 # at least one phrase and every phrase must contain at least 2 characters
505 # that are letters or digits. [required]
506 &quot;A String&quot;,
507 ],
508 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700509 },
510 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
511 # infoType, when the name matches one of existing infoTypes and that infoType
512 # is specified in `InspectContent.info_types` field. Specifying the latter
513 # adds findings to the one detected by the system. If built-in info type is
514 # not specified in `InspectContent.info_types` list then the name is treated
515 # as a custom info type.
516 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
517 # creating a CustomInfoType, or one of the names listed
518 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
519 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
520 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
521 },
522 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
523 # altered by a detection rule if the finding meets the criteria specified by
524 # the rule. Defaults to `VERY_LIKELY` if not specified.
525 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
526 # Rules are applied in order that they are specified. Not supported for the
527 # `surrogate_type` CustomInfoType.
528 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
529 # `CustomInfoType` to alter behavior under certain circumstances, depending
530 # on the specific details of the rule. Not supported for the `surrogate_type`
531 # custom infoType.
532 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
533 # proximity of hotwords.
534 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
535 # The total length of the window cannot exceed 1000 characters. Note that
536 # the finding itself will be included in the window, so that hotwords may
537 # be used to match substrings of the finding itself. For example, the
538 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
539 # adjusted upwards if the area code is known to be the local area code of
540 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
541 # is the area code in question.
542 # rule.
543 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
544 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
545 },
546 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
547 # part of a detection rule.
548 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
549 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
550 # levels. For example, if a finding would be `POSSIBLE` without the
551 # detection rule and `relative_likelihood` is 1, then it is upgraded to
552 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
553 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
554 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
555 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
556 # a final likelihood of `LIKELY`.
557 },
558 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
559 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
560 # specified, the entire match is returned. No more than 3 may be included.
561 42,
562 ],
563 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
564 # (https://github.com/google/re2/wiki/Syntax) can be found under the
565 # google/re2 repository on GitHub.
566 },
567 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700568 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700569 ],
570 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
571 # support reversing.
572 # such as
573 # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
574 # These types of transformations are
575 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
576 # output. This should be used in conjunction with a field on the
577 # transformation such as `surrogate_info_type`. This CustomInfoType does
578 # not support the use of `detection_rules`.
579 },
580 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
581 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
582 # specified, the entire match is returned. No more than 3 may be included.
583 42,
584 ],
585 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
586 # (https://github.com/google/re2/wiki/Syntax) can be found under the
587 # google/re2 repository on GitHub.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700588 },
589 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
590 # `InspectDataSource`. Not currently supported in `InspectContent`.
591 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
592 # `organizations/433245324/storedInfoTypes/432452342` or
593 # `projects/project-id/storedInfoTypes/432452342`.
594 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
595 # inspection was created. Output-only field, populated by the system.
596 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700597 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
598 # to be returned. It still can be used for rules matching.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700599 },
600 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700601 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
602 # POSSIBLE.
603 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
604 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
605 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
606 # When set within `InspectContentRequest`, the maximum returned is 2000
607 # regardless if this is set higher.
608 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
609 { # Max findings configuration per infoType, per content item or long
610 # running DlpJob.
611 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
612 # info_type should be provided. If InfoTypeLimit does not have an
613 # info_type, the DLP API applies the limit against all info_types that
614 # are found but not specified in another InfoTypeLimit.
615 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
616 # creating a CustomInfoType, or one of the names listed
617 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
618 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
619 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
620 },
621 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
622 },
623 ],
624 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
625 # When set within `InspectJobConfig`,
626 # the maximum returned is 2000 regardless if this is set higher.
627 # When set within `InspectContentRequest`, this field is ignored.
628 },
629 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
631 # included in the response; see Finding.quote.
632 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
633 # Exclusion rules, contained in the set are executed in the end, other
634 # rules are executed in the order they are specified for each info type.
635 { # Rule set for modifying a set of infoTypes to alter behavior under certain
636 # circumstances, depending on the specific details of the rules within the set.
637 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
638 { # Type of information detected by the API.
639 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 # creating a CustomInfoType, or one of the names listed
641 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700642 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
643 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700645 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 { # A single inspection rule to be applied to infoTypes, specified in
648 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 # proximity of hotwords.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700651 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
652 # The total length of the window cannot exceed 1000 characters. Note that
653 # the finding itself will be included in the window, so that hotwords may
654 # be used to match substrings of the finding itself. For example, the
655 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
656 # adjusted upwards if the area code is known to be the local area code of
657 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
658 # is the area code in question.
659 # rule.
660 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
661 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
662 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 # part of a detection rule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700665 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700667 # levels. For example, if a finding would be `POSSIBLE` without the
668 # detection rule and `relative_likelihood` is 1, then it is upgraded to
669 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
670 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
671 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
672 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
673 # a final likelihood of `LIKELY`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
676 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 # specified, the entire match is returned. No more than 3 may be included.
678 42,
679 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
681 # (https://github.com/google/re2/wiki/Syntax) can be found under the
682 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 },
685 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
686 # `InspectionRuleSet` are removed from results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700687 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 # be used to match sensitive information specific to the data, such as a list
690 # of employee IDs or job titles.
691 #
692 # Dictionary words are case-insensitive and all characters other than letters
693 # and digits in the unicode [Basic Multilingual
694 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
695 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
697 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 # surrounding any match must be of a different type than the adjacent
699 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
701 # match the first three letters of the text &quot;jen123&quot; but will return no
702 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 #
704 # Dictionary words containing a large number of characters that are not
705 # letters or digits may result in unexpected findings because such characters
706 # are treated as whitespace. The
707 # [limits](https://cloud.google.com/dlp/limits) page contains details about
708 # the size limits of dictionaries. For dictionaries that do not fit within
709 # these constraints, consider using `LargeCustomDictionaryConfig` in the
710 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700711 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
712 # is accepted.
713 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
714 # Example: gs://[BUCKET_NAME]/dictionary.txt
715 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
717 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 # at least one phrase and every phrase must contain at least 2 characters
719 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 ],
722 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 },
724 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
725 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
726 # contained within with a finding of an infoType from this list. For
727 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
728 # `exclusion_rule` containing `exclude_info_types.info_types` with
729 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
730 # with EMAIL_ADDRESS finding.
731 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
732 # finding, namely email address.
733 { # Type of information detected by the API.
734 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
735 # creating a CustomInfoType, or one of the names listed
736 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700737 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
738 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 },
740 ],
741 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700742 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
743 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
744 # specified, the entire match is returned. No more than 3 may be included.
745 42,
746 ],
747 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
748 # (https://github.com/google/re2/wiki/Syntax) can be found under the
749 # google/re2 repository on GitHub.
750 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 },
752 },
753 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 },
755 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700756 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
757 # If empty, text, images, and other content will be included.
758 &quot;A String&quot;,
759 ],
760 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
761 # InfoType values returned by ListInfoTypes or listed at
762 # https://cloud.google.com/dlp/docs/infotypes-reference.
763 #
764 # When no InfoTypes or CustomInfoTypes are specified in a request, the
765 # system may automatically choose what detectors to run. By default this may
766 # be all types, but may change over time as detectors are updated.
767 #
768 # If you need precise control and predictability as to what detectors are
769 # run you should specify specific InfoTypes listed in the reference,
770 # otherwise a default list will be used, which may change over time.
771 { # Type of information detected by the API.
772 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
773 # creating a CustomInfoType, or one of the names listed
774 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
775 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
776 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
777 },
778 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 }</pre>
781</div>
782
783<div class="method">
784 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
785 <pre>Deletes an InspectTemplate.
786See https://cloud.google.com/dlp/docs/creating-templates to learn more.
787
788Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700789 name: string, Required. Resource name of the organization and inspectTemplate to be deleted, for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790example `organizations/433245324/inspectTemplates/432452342` or
791projects/project-id/inspectTemplates/432452342. (required)
792 x__xgafv: string, V1 error format.
793 Allowed values
794 1 - v1 error format
795 2 - v2 error format
796
797Returns:
798 An object of the form:
799
800 { # A generic empty message that you can re-use to avoid defining duplicated
801 # empty messages in your APIs. A typical example is to use it as the request
802 # or the response type of an API method. For instance:
803 #
804 # service Foo {
805 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
806 # }
807 #
808 # The JSON representation for `Empty` is empty JSON object `{}`.
809 }</pre>
810</div>
811
812<div class="method">
813 <code class="details" id="get">get(name, x__xgafv=None)</code>
814 <pre>Gets an InspectTemplate.
815See https://cloud.google.com/dlp/docs/creating-templates to learn more.
816
817Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 name: string, Required. Resource name of the organization and inspectTemplate to be read, for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819example `organizations/433245324/inspectTemplates/432452342` or
820projects/project-id/inspectTemplates/432452342. (required)
821 x__xgafv: string, V1 error format.
822 Allowed values
823 1 - v1 error format
824 2 - v2 error format
825
826Returns:
827 An object of the form:
828
829 { # The inspectTemplate contains a configuration (set of types of sensitive data
830 # to be detected) to be used anywhere you otherwise would normally specify
831 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
832 # to learn more.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700833 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
834 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
835 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
836 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700837 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
838 #
839 # The template will have one of the following formats:
840 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
841 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700843 # When used with redactContent only info_types and min_likelihood are currently
844 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700845 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
846 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
847 { # Custom information type provided by the user. Used to find domain-specific
848 # sensitive information configurable to the data in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700849 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
850 # be used to match sensitive information specific to the data, such as a list
851 # of employee IDs or job titles.
852 #
853 # Dictionary words are case-insensitive and all characters other than letters
854 # and digits in the unicode [Basic Multilingual
855 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
856 # will be replaced with whitespace when scanning for matches, so the
857 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
858 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
859 # surrounding any match must be of a different type than the adjacent
860 # characters within the word, so letters must be next to non-letters and
861 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
862 # match the first three letters of the text &quot;jen123&quot; but will return no
863 # matches for &quot;jennifer&quot;.
864 #
865 # Dictionary words containing a large number of characters that are not
866 # letters or digits may result in unexpected findings because such characters
867 # are treated as whitespace. The
868 # [limits](https://cloud.google.com/dlp/limits) page contains details about
869 # the size limits of dictionaries. For dictionaries that do not fit within
870 # these constraints, consider using `LargeCustomDictionaryConfig` in the
871 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700872 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
873 # is accepted.
874 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
875 # Example: gs://[BUCKET_NAME]/dictionary.txt
876 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700877 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
878 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
879 # at least one phrase and every phrase must contain at least 2 characters
880 # that are letters or digits. [required]
881 &quot;A String&quot;,
882 ],
883 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700884 },
885 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
886 # infoType, when the name matches one of existing infoTypes and that infoType
887 # is specified in `InspectContent.info_types` field. Specifying the latter
888 # adds findings to the one detected by the system. If built-in info type is
889 # not specified in `InspectContent.info_types` list then the name is treated
890 # as a custom info type.
891 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
892 # creating a CustomInfoType, or one of the names listed
893 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
894 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
895 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
896 },
897 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
898 # altered by a detection rule if the finding meets the criteria specified by
899 # the rule. Defaults to `VERY_LIKELY` if not specified.
900 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
901 # Rules are applied in order that they are specified. Not supported for the
902 # `surrogate_type` CustomInfoType.
903 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
904 # `CustomInfoType` to alter behavior under certain circumstances, depending
905 # on the specific details of the rule. Not supported for the `surrogate_type`
906 # custom infoType.
907 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
908 # proximity of hotwords.
909 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
910 # The total length of the window cannot exceed 1000 characters. Note that
911 # the finding itself will be included in the window, so that hotwords may
912 # be used to match substrings of the finding itself. For example, the
913 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
914 # adjusted upwards if the area code is known to be the local area code of
915 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
916 # is the area code in question.
917 # rule.
918 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
919 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
920 },
921 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
922 # part of a detection rule.
923 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
924 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
925 # levels. For example, if a finding would be `POSSIBLE` without the
926 # detection rule and `relative_likelihood` is 1, then it is upgraded to
927 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
928 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
929 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
930 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
931 # a final likelihood of `LIKELY`.
932 },
933 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
934 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
935 # specified, the entire match is returned. No more than 3 may be included.
936 42,
937 ],
938 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
939 # (https://github.com/google/re2/wiki/Syntax) can be found under the
940 # google/re2 repository on GitHub.
941 },
942 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700943 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700944 ],
945 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
946 # support reversing.
947 # such as
948 # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
949 # These types of transformations are
950 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
951 # output. This should be used in conjunction with a field on the
952 # transformation such as `surrogate_info_type`. This CustomInfoType does
953 # not support the use of `detection_rules`.
954 },
955 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
956 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
957 # specified, the entire match is returned. No more than 3 may be included.
958 42,
959 ],
960 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
961 # (https://github.com/google/re2/wiki/Syntax) can be found under the
962 # google/re2 repository on GitHub.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700963 },
964 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
965 # `InspectDataSource`. Not currently supported in `InspectContent`.
966 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
967 # `organizations/433245324/storedInfoTypes/432452342` or
968 # `projects/project-id/storedInfoTypes/432452342`.
969 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
970 # inspection was created. Output-only field, populated by the system.
971 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700972 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
973 # to be returned. It still can be used for rules matching.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700974 },
975 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700976 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
977 # POSSIBLE.
978 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
979 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
980 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
981 # When set within `InspectContentRequest`, the maximum returned is 2000
982 # regardless if this is set higher.
983 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
984 { # Max findings configuration per infoType, per content item or long
985 # running DlpJob.
986 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
987 # info_type should be provided. If InfoTypeLimit does not have an
988 # info_type, the DLP API applies the limit against all info_types that
989 # are found but not specified in another InfoTypeLimit.
990 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
991 # creating a CustomInfoType, or one of the names listed
992 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
993 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
994 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
995 },
996 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
997 },
998 ],
999 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1000 # When set within `InspectJobConfig`,
1001 # the maximum returned is 2000 regardless if this is set higher.
1002 # When set within `InspectContentRequest`, this field is ignored.
1003 },
1004 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
Bu Sun Kim65020912020-05-20 12:08:20 -07001005 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1006 # included in the response; see Finding.quote.
1007 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1008 # Exclusion rules, contained in the set are executed in the end, other
1009 # rules are executed in the order they are specified for each info type.
1010 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1011 # circumstances, depending on the specific details of the rules within the set.
1012 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1013 { # Type of information detected by the API.
1014 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 # creating a CustomInfoType, or one of the names listed
1016 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001017 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1018 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001019 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001022 { # A single inspection rule to be applied to infoTypes, specified in
1023 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001025 # proximity of hotwords.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001026 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1027 # The total length of the window cannot exceed 1000 characters. Note that
1028 # the finding itself will be included in the window, so that hotwords may
1029 # be used to match substrings of the finding itself. For example, the
1030 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1031 # adjusted upwards if the area code is known to be the local area code of
1032 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1033 # is the area code in question.
1034 # rule.
1035 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1036 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1037 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001039 # part of a detection rule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001040 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001042 # levels. For example, if a finding would be `POSSIBLE` without the
1043 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1044 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1045 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1046 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1047 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1048 # a final likelihood of `LIKELY`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001049 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1051 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 # specified, the entire match is returned. No more than 3 may be included.
1053 42,
1054 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001055 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1056 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1057 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001059 },
1060 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1061 # `InspectionRuleSet` are removed from results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001062 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001064 # be used to match sensitive information specific to the data, such as a list
1065 # of employee IDs or job titles.
1066 #
1067 # Dictionary words are case-insensitive and all characters other than letters
1068 # and digits in the unicode [Basic Multilingual
1069 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1070 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001071 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1072 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001073 # surrounding any match must be of a different type than the adjacent
1074 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1076 # match the first three letters of the text &quot;jen123&quot; but will return no
1077 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 #
1079 # Dictionary words containing a large number of characters that are not
1080 # letters or digits may result in unexpected findings because such characters
1081 # are treated as whitespace. The
1082 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1083 # the size limits of dictionaries. For dictionaries that do not fit within
1084 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1085 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001086 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1087 # is accepted.
1088 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1089 # Example: gs://[BUCKET_NAME]/dictionary.txt
1090 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1092 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001093 # at least one phrase and every phrase must contain at least 2 characters
1094 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001095 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001096 ],
1097 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001098 },
1099 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1100 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1101 # contained within with a finding of an infoType from this list. For
1102 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1103 # `exclusion_rule` containing `exclude_info_types.info_types` with
1104 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1105 # with EMAIL_ADDRESS finding.
1106 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1107 # finding, namely email address.
1108 { # Type of information detected by the API.
1109 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1110 # creating a CustomInfoType, or one of the names listed
1111 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001112 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1113 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 },
1115 ],
1116 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001117 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1118 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1119 # specified, the entire match is returned. No more than 3 may be included.
1120 42,
1121 ],
1122 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1123 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1124 # google/re2 repository on GitHub.
1125 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 },
1127 },
1128 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 },
1130 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001131 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
1132 # If empty, text, images, and other content will be included.
1133 &quot;A String&quot;,
1134 ],
1135 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
1136 # InfoType values returned by ListInfoTypes or listed at
1137 # https://cloud.google.com/dlp/docs/infotypes-reference.
1138 #
1139 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1140 # system may automatically choose what detectors to run. By default this may
1141 # be all types, but may change over time as detectors are updated.
1142 #
1143 # If you need precise control and predictability as to what detectors are
1144 # run you should specify specific InfoTypes listed in the reference,
1145 # otherwise a default list will be used, which may change over time.
1146 { # Type of information detected by the API.
1147 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1148 # creating a CustomInfoType, or one of the names listed
1149 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1150 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1151 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1152 },
1153 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 }</pre>
1156</div>
1157
1158<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001159 <code class="details" id="list">list(parent, orderBy=None, pageToken=None, pageSize=None, locationId=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 <pre>Lists InspectTemplates.
1161See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1162
1163Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001164 parent: string, Required. Parent resource name.
1165- Format:projects/[PROJECT-ID]
1166- Format:organizations/[ORGANIZATION-ID]
1167- Format:projects/[PROJECT-ID]/locations/[LOCATION-ID]
1168- Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001169 orderBy: string, Comma separated list of fields to order by,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170followed by `asc` or `desc` postfix. This list is case-insensitive,
1171default sorting order is ascending, redundant space characters are
1172insignificant.
1173
1174Example: `name asc,update_time, create_time desc`
1175
1176Supported fields are:
1177
1178- `create_time`: corresponds to time the template was created.
1179- `update_time`: corresponds to time the template was last updated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001180- `name`: corresponds to template&#x27;s name.
1181- `display_name`: corresponds to template&#x27;s display name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001182 pageToken: string, Page token to continue retrieval. Comes from previous call
1183to `ListInspectTemplates`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001184 pageSize: integer, Size of the page, can be limited by server. If zero server returns
1185a page of max size 100.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001186 locationId: string, Deprecated. This field has no effect.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001187 x__xgafv: string, V1 error format.
1188 Allowed values
1189 1 - v1 error format
1190 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001191
1192Returns:
1193 An object of the form:
1194
1195 { # Response message for ListInspectTemplates.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001196 &quot;nextPageToken&quot;: &quot;A String&quot;, # If the next page is available then the next page token to be used
1197 # in following ListInspectTemplates request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 &quot;inspectTemplates&quot;: [ # List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 { # The inspectTemplate contains a configuration (set of types of sensitive data
1200 # to be detected) to be used anywhere you otherwise would normally specify
1201 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1202 # to learn more.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001203 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
1204 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1205 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1206 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001207 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
1208 #
1209 # The template will have one of the following formats:
1210 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1211 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07001212 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001213 # When used with redactContent only info_types and min_likelihood are currently
1214 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001215 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1216 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1217 { # Custom information type provided by the user. Used to find domain-specific
1218 # sensitive information configurable to the data in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001219 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
1220 # be used to match sensitive information specific to the data, such as a list
1221 # of employee IDs or job titles.
1222 #
1223 # Dictionary words are case-insensitive and all characters other than letters
1224 # and digits in the unicode [Basic Multilingual
1225 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1226 # will be replaced with whitespace when scanning for matches, so the
1227 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1228 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1229 # surrounding any match must be of a different type than the adjacent
1230 # characters within the word, so letters must be next to non-letters and
1231 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1232 # match the first three letters of the text &quot;jen123&quot; but will return no
1233 # matches for &quot;jennifer&quot;.
1234 #
1235 # Dictionary words containing a large number of characters that are not
1236 # letters or digits may result in unexpected findings because such characters
1237 # are treated as whitespace. The
1238 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1239 # the size limits of dictionaries. For dictionaries that do not fit within
1240 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1241 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001242 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1243 # is accepted.
1244 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1245 # Example: gs://[BUCKET_NAME]/dictionary.txt
1246 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001247 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1248 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1249 # at least one phrase and every phrase must contain at least 2 characters
1250 # that are letters or digits. [required]
1251 &quot;A String&quot;,
1252 ],
1253 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001254 },
1255 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1256 # infoType, when the name matches one of existing infoTypes and that infoType
1257 # is specified in `InspectContent.info_types` field. Specifying the latter
1258 # adds findings to the one detected by the system. If built-in info type is
1259 # not specified in `InspectContent.info_types` list then the name is treated
1260 # as a custom info type.
1261 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1262 # creating a CustomInfoType, or one of the names listed
1263 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1264 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1265 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1266 },
1267 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1268 # altered by a detection rule if the finding meets the criteria specified by
1269 # the rule. Defaults to `VERY_LIKELY` if not specified.
1270 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1271 # Rules are applied in order that they are specified. Not supported for the
1272 # `surrogate_type` CustomInfoType.
1273 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1274 # `CustomInfoType` to alter behavior under certain circumstances, depending
1275 # on the specific details of the rule. Not supported for the `surrogate_type`
1276 # custom infoType.
1277 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1278 # proximity of hotwords.
1279 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1280 # The total length of the window cannot exceed 1000 characters. Note that
1281 # the finding itself will be included in the window, so that hotwords may
1282 # be used to match substrings of the finding itself. For example, the
1283 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1284 # adjusted upwards if the area code is known to be the local area code of
1285 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1286 # is the area code in question.
1287 # rule.
1288 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1289 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1290 },
1291 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1292 # part of a detection rule.
1293 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1294 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1295 # levels. For example, if a finding would be `POSSIBLE` without the
1296 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1297 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1298 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1299 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1300 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1301 # a final likelihood of `LIKELY`.
1302 },
1303 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1304 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1305 # specified, the entire match is returned. No more than 3 may be included.
1306 42,
1307 ],
1308 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1309 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1310 # google/re2 repository on GitHub.
1311 },
1312 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001313 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001314 ],
1315 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1316 # support reversing.
1317 # such as
1318 # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1319 # These types of transformations are
1320 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1321 # output. This should be used in conjunction with a field on the
1322 # transformation such as `surrogate_info_type`. This CustomInfoType does
1323 # not support the use of `detection_rules`.
1324 },
1325 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1326 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1327 # specified, the entire match is returned. No more than 3 may be included.
1328 42,
1329 ],
1330 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1331 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1332 # google/re2 repository on GitHub.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001333 },
1334 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1335 # `InspectDataSource`. Not currently supported in `InspectContent`.
1336 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1337 # `organizations/433245324/storedInfoTypes/432452342` or
1338 # `projects/project-id/storedInfoTypes/432452342`.
1339 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1340 # inspection was created. Output-only field, populated by the system.
1341 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001342 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1343 # to be returned. It still can be used for rules matching.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001344 },
1345 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001346 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1347 # POSSIBLE.
1348 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1349 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1350 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1351 # When set within `InspectContentRequest`, the maximum returned is 2000
1352 # regardless if this is set higher.
1353 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1354 { # Max findings configuration per infoType, per content item or long
1355 # running DlpJob.
1356 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1357 # info_type should be provided. If InfoTypeLimit does not have an
1358 # info_type, the DLP API applies the limit against all info_types that
1359 # are found but not specified in another InfoTypeLimit.
1360 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1361 # creating a CustomInfoType, or one of the names listed
1362 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1363 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1364 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1365 },
1366 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1367 },
1368 ],
1369 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1370 # When set within `InspectJobConfig`,
1371 # the maximum returned is 2000 regardless if this is set higher.
1372 # When set within `InspectContentRequest`, this field is ignored.
1373 },
1374 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
Bu Sun Kim65020912020-05-20 12:08:20 -07001375 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1376 # included in the response; see Finding.quote.
1377 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1378 # Exclusion rules, contained in the set are executed in the end, other
1379 # rules are executed in the order they are specified for each info type.
1380 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1381 # circumstances, depending on the specific details of the rules within the set.
1382 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1383 { # Type of information detected by the API.
1384 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001385 # creating a CustomInfoType, or one of the names listed
1386 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001387 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1388 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001389 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001391 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 { # A single inspection rule to be applied to infoTypes, specified in
1393 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001395 # proximity of hotwords.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001396 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1397 # The total length of the window cannot exceed 1000 characters. Note that
1398 # the finding itself will be included in the window, so that hotwords may
1399 # be used to match substrings of the finding itself. For example, the
1400 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1401 # adjusted upwards if the area code is known to be the local area code of
1402 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1403 # is the area code in question.
1404 # rule.
1405 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1406 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1407 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001408 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 # part of a detection rule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001410 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001412 # levels. For example, if a finding would be `POSSIBLE` without the
1413 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1414 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1415 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1416 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1417 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1418 # a final likelihood of `LIKELY`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001419 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001420 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1421 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001422 # specified, the entire match is returned. No more than 3 may be included.
1423 42,
1424 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1426 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1427 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001428 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001429 },
1430 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1431 # `InspectionRuleSet` are removed from results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001432 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001434 # be used to match sensitive information specific to the data, such as a list
1435 # of employee IDs or job titles.
1436 #
1437 # Dictionary words are case-insensitive and all characters other than letters
1438 # and digits in the unicode [Basic Multilingual
1439 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1440 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001441 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1442 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001443 # surrounding any match must be of a different type than the adjacent
1444 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1446 # match the first three letters of the text &quot;jen123&quot; but will return no
1447 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001448 #
1449 # Dictionary words containing a large number of characters that are not
1450 # letters or digits may result in unexpected findings because such characters
1451 # are treated as whitespace. The
1452 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1453 # the size limits of dictionaries. For dictionaries that do not fit within
1454 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1455 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001456 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1457 # is accepted.
1458 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1459 # Example: gs://[BUCKET_NAME]/dictionary.txt
1460 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1462 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001463 # at least one phrase and every phrase must contain at least 2 characters
1464 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001466 ],
1467 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001468 },
1469 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1470 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1471 # contained within with a finding of an infoType from this list. For
1472 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1473 # `exclusion_rule` containing `exclude_info_types.info_types` with
1474 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1475 # with EMAIL_ADDRESS finding.
1476 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1477 # finding, namely email address.
1478 { # Type of information detected by the API.
1479 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1480 # creating a CustomInfoType, or one of the names listed
1481 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001482 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1483 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001484 },
1485 ],
1486 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001487 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1488 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1489 # specified, the entire match is returned. No more than 3 may be included.
1490 42,
1491 ],
1492 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1493 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1494 # google/re2 repository on GitHub.
1495 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001496 },
1497 },
1498 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001499 },
1500 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001501 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
1502 # If empty, text, images, and other content will be included.
1503 &quot;A String&quot;,
1504 ],
1505 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
1506 # InfoType values returned by ListInfoTypes or listed at
1507 # https://cloud.google.com/dlp/docs/infotypes-reference.
1508 #
1509 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1510 # system may automatically choose what detectors to run. By default this may
1511 # be all types, but may change over time as detectors are updated.
1512 #
1513 # If you need precise control and predictability as to what detectors are
1514 # run you should specify specific InfoTypes listed in the reference,
1515 # otherwise a default list will be used, which may change over time.
1516 { # Type of information detected by the API.
1517 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1518 # creating a CustomInfoType, or one of the names listed
1519 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1520 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1521 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1522 },
1523 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001524 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001525 },
1526 ],
1527 }</pre>
1528</div>
1529
1530<div class="method">
1531 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1532 <pre>Retrieves the next page of results.
1533
1534Args:
1535 previous_request: The request for the previous page. (required)
1536 previous_response: The response from the request for the previous page. (required)
1537
1538Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001539 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 page. Returns None if there are no more items in the collection.
1541 </pre>
1542</div>
1543
1544<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001545 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001546 <pre>Updates the InspectTemplate.
1547See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1548
1549Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001550 name: string, Required. Resource name of organization and inspectTemplate to be updated, for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001551example `organizations/433245324/inspectTemplates/432452342` or
1552projects/project-id/inspectTemplates/432452342. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001553 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001554 The object takes the form of:
1555
1556{ # Request message for UpdateInspectTemplate.
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;inspectTemplate&quot;: { # The inspectTemplate contains a configuration (set of types of sensitive data # New InspectTemplate value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558 # to be detected) to be used anywhere you otherwise would normally specify
1559 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1560 # to learn more.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001561 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
1562 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1563 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1564 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001565 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
1566 #
1567 # The template will have one of the following formats:
1568 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1569 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001571 # When used with redactContent only info_types and min_likelihood are currently
1572 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001573 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1574 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1575 { # Custom information type provided by the user. Used to find domain-specific
1576 # sensitive information configurable to the data in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001577 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
1578 # be used to match sensitive information specific to the data, such as a list
1579 # of employee IDs or job titles.
1580 #
1581 # Dictionary words are case-insensitive and all characters other than letters
1582 # and digits in the unicode [Basic Multilingual
1583 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1584 # will be replaced with whitespace when scanning for matches, so the
1585 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1586 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1587 # surrounding any match must be of a different type than the adjacent
1588 # characters within the word, so letters must be next to non-letters and
1589 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1590 # match the first three letters of the text &quot;jen123&quot; but will return no
1591 # matches for &quot;jennifer&quot;.
1592 #
1593 # Dictionary words containing a large number of characters that are not
1594 # letters or digits may result in unexpected findings because such characters
1595 # are treated as whitespace. The
1596 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1597 # the size limits of dictionaries. For dictionaries that do not fit within
1598 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1599 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001600 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1601 # is accepted.
1602 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1603 # Example: gs://[BUCKET_NAME]/dictionary.txt
1604 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001605 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1606 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1607 # at least one phrase and every phrase must contain at least 2 characters
1608 # that are letters or digits. [required]
1609 &quot;A String&quot;,
1610 ],
1611 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001612 },
1613 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1614 # infoType, when the name matches one of existing infoTypes and that infoType
1615 # is specified in `InspectContent.info_types` field. Specifying the latter
1616 # adds findings to the one detected by the system. If built-in info type is
1617 # not specified in `InspectContent.info_types` list then the name is treated
1618 # as a custom info type.
1619 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1620 # creating a CustomInfoType, or one of the names listed
1621 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1622 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1623 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1624 },
1625 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1626 # altered by a detection rule if the finding meets the criteria specified by
1627 # the rule. Defaults to `VERY_LIKELY` if not specified.
1628 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1629 # Rules are applied in order that they are specified. Not supported for the
1630 # `surrogate_type` CustomInfoType.
1631 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1632 # `CustomInfoType` to alter behavior under certain circumstances, depending
1633 # on the specific details of the rule. Not supported for the `surrogate_type`
1634 # custom infoType.
1635 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1636 # proximity of hotwords.
1637 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1638 # The total length of the window cannot exceed 1000 characters. Note that
1639 # the finding itself will be included in the window, so that hotwords may
1640 # be used to match substrings of the finding itself. For example, the
1641 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1642 # adjusted upwards if the area code is known to be the local area code of
1643 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1644 # is the area code in question.
1645 # rule.
1646 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1647 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1648 },
1649 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1650 # part of a detection rule.
1651 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1652 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1653 # levels. For example, if a finding would be `POSSIBLE` without the
1654 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1655 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1656 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1657 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1658 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1659 # a final likelihood of `LIKELY`.
1660 },
1661 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1662 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1663 # specified, the entire match is returned. No more than 3 may be included.
1664 42,
1665 ],
1666 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1667 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1668 # google/re2 repository on GitHub.
1669 },
1670 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001671 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001672 ],
1673 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
1674 # support reversing.
1675 # such as
1676 # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
1677 # These types of transformations are
1678 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
1679 # output. This should be used in conjunction with a field on the
1680 # transformation such as `surrogate_info_type`. This CustomInfoType does
1681 # not support the use of `detection_rules`.
1682 },
1683 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
1684 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1685 # specified, the entire match is returned. No more than 3 may be included.
1686 42,
1687 ],
1688 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1689 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1690 # google/re2 repository on GitHub.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001691 },
1692 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
1693 # `InspectDataSource`. Not currently supported in `InspectContent`.
1694 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
1695 # `organizations/433245324/storedInfoTypes/432452342` or
1696 # `projects/project-id/storedInfoTypes/432452342`.
1697 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
1698 # inspection was created. Output-only field, populated by the system.
1699 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001700 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
1701 # to be returned. It still can be used for rules matching.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001702 },
1703 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001704 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
1705 # POSSIBLE.
1706 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
1707 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
1708 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
1709 # When set within `InspectContentRequest`, the maximum returned is 2000
1710 # regardless if this is set higher.
1711 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
1712 { # Max findings configuration per infoType, per content item or long
1713 # running DlpJob.
1714 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
1715 # info_type should be provided. If InfoTypeLimit does not have an
1716 # info_type, the DLP API applies the limit against all info_types that
1717 # are found but not specified in another InfoTypeLimit.
1718 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1719 # creating a CustomInfoType, or one of the names listed
1720 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1721 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1722 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1723 },
1724 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
1725 },
1726 ],
1727 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
1728 # When set within `InspectJobConfig`,
1729 # the maximum returned is 2000 regardless if this is set higher.
1730 # When set within `InspectContentRequest`, this field is ignored.
1731 },
1732 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
Bu Sun Kim65020912020-05-20 12:08:20 -07001733 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
1734 # included in the response; see Finding.quote.
1735 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
1736 # Exclusion rules, contained in the set are executed in the end, other
1737 # rules are executed in the order they are specified for each info type.
1738 { # Rule set for modifying a set of infoTypes to alter behavior under certain
1739 # circumstances, depending on the specific details of the rules within the set.
1740 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
1741 { # Type of information detected by the API.
1742 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001743 # creating a CustomInfoType, or one of the names listed
1744 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001745 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1746 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001747 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001748 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001749 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001750 { # A single inspection rule to be applied to infoTypes, specified in
1751 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001752 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001753 # proximity of hotwords.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001754 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1755 # The total length of the window cannot exceed 1000 characters. Note that
1756 # the finding itself will be included in the window, so that hotwords may
1757 # be used to match substrings of the finding itself. For example, the
1758 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1759 # adjusted upwards if the area code is known to be the local area code of
1760 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1761 # is the area code in question.
1762 # rule.
1763 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1764 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1765 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001766 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767 # part of a detection rule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001768 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001769 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001770 # levels. For example, if a finding would be `POSSIBLE` without the
1771 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1772 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1773 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1774 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1775 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1776 # a final likelihood of `LIKELY`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001777 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001778 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
1779 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001780 # specified, the entire match is returned. No more than 3 may be included.
1781 42,
1782 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001783 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1784 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1785 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001786 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001787 },
1788 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
1789 # `InspectionRuleSet` are removed from results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001790 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim65020912020-05-20 12:08:20 -07001791 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001792 # be used to match sensitive information specific to the data, such as a list
1793 # of employee IDs or job titles.
1794 #
1795 # Dictionary words are case-insensitive and all characters other than letters
1796 # and digits in the unicode [Basic Multilingual
1797 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1798 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07001799 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1800 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001801 # surrounding any match must be of a different type than the adjacent
1802 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07001803 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1804 # match the first three letters of the text &quot;jen123&quot; but will return no
1805 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001806 #
1807 # Dictionary words containing a large number of characters that are not
1808 # letters or digits may result in unexpected findings because such characters
1809 # are treated as whitespace. The
1810 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1811 # the size limits of dictionaries. For dictionaries that do not fit within
1812 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1813 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001814 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1815 # is accepted.
1816 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1817 # Example: gs://[BUCKET_NAME]/dictionary.txt
1818 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001819 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1820 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001821 # at least one phrase and every phrase must contain at least 2 characters
1822 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07001823 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001824 ],
1825 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 },
1827 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
1828 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
1829 # contained within with a finding of an infoType from this list. For
1830 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
1831 # `exclusion_rule` containing `exclude_info_types.info_types` with
1832 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
1833 # with EMAIL_ADDRESS finding.
1834 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
1835 # finding, namely email address.
1836 { # Type of information detected by the API.
1837 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1838 # creating a CustomInfoType, or one of the names listed
1839 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001840 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1841 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001842 },
1843 ],
1844 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001845 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
1846 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
1847 # specified, the entire match is returned. No more than 3 may be included.
1848 42,
1849 ],
1850 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
1851 # (https://github.com/google/re2/wiki/Syntax) can be found under the
1852 # google/re2 repository on GitHub.
1853 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001854 },
1855 },
1856 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001857 },
1858 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001859 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
1860 # If empty, text, images, and other content will be included.
1861 &quot;A String&quot;,
1862 ],
1863 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
1864 # InfoType values returned by ListInfoTypes or listed at
1865 # https://cloud.google.com/dlp/docs/infotypes-reference.
1866 #
1867 # When no InfoTypes or CustomInfoTypes are specified in a request, the
1868 # system may automatically choose what detectors to run. By default this may
1869 # be all types, but may change over time as detectors are updated.
1870 #
1871 # If you need precise control and predictability as to what detectors are
1872 # run you should specify specific InfoTypes listed in the reference,
1873 # otherwise a default list will be used, which may change over time.
1874 { # Type of information detected by the API.
1875 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1876 # creating a CustomInfoType, or one of the names listed
1877 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1878 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1879 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1880 },
1881 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001882 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001883 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001884 &quot;updateMask&quot;: &quot;A String&quot;, # Mask to control which fields get updated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001885 }
1886
1887 x__xgafv: string, V1 error format.
1888 Allowed values
1889 1 - v1 error format
1890 2 - v2 error format
1891
1892Returns:
1893 An object of the form:
1894
1895 { # The inspectTemplate contains a configuration (set of types of sensitive data
1896 # to be detected) to be used anywhere you otherwise would normally specify
1897 # InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
1898 # to learn more.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001899 &quot;description&quot;: &quot;A String&quot;, # Short description (max 256 chars).
1900 &quot;displayName&quot;: &quot;A String&quot;, # Display name (max 256 chars).
1901 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation timestamp of an inspectTemplate.
1902 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of an inspectTemplate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001903 &quot;name&quot;: &quot;A String&quot;, # Output only. The template name.
1904 #
1905 # The template will have one of the following formats:
1906 # `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
1907 # `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Bu Sun Kim65020912020-05-20 12:08:20 -07001908 &quot;inspectConfig&quot;: { # Configuration description of the scanning process. # The core content of the template. Configuration of the scanning process.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001909 # When used with redactContent only info_types and min_likelihood are currently
1910 # used.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001911 &quot;customInfoTypes&quot;: [ # CustomInfoTypes provided by the user. See
1912 # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
1913 { # Custom information type provided by the user. Used to find domain-specific
1914 # sensitive information configurable to the data in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001915 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType.
1916 # be used to match sensitive information specific to the data, such as a list
1917 # of employee IDs or job titles.
1918 #
1919 # Dictionary words are case-insensitive and all characters other than letters
1920 # and digits in the unicode [Basic Multilingual
1921 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1922 # will be replaced with whitespace when scanning for matches, so the
1923 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
1924 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
1925 # surrounding any match must be of a different type than the adjacent
1926 # characters within the word, so letters must be next to non-letters and
1927 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
1928 # match the first three letters of the text &quot;jen123&quot; but will return no
1929 # matches for &quot;jennifer&quot;.
1930 #
1931 # Dictionary words containing a large number of characters that are not
1932 # letters or digits may result in unexpected findings because such characters
1933 # are treated as whitespace. The
1934 # [limits](https://cloud.google.com/dlp/limits) page contains details about
1935 # the size limits of dictionaries. For dictionaries that do not fit within
1936 # these constraints, consider using `LargeCustomDictionaryConfig` in the
1937 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001938 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
1939 # is accepted.
1940 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
1941 # Example: gs://[BUCKET_NAME]/dictionary.txt
1942 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001943 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
1944 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
1945 # at least one phrase and every phrase must contain at least 2 characters
1946 # that are letters or digits. [required]
1947 &quot;A String&quot;,
1948 ],
1949 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001950 },
1951 &quot;infoType&quot;: { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in
1952 # infoType, when the name matches one of existing infoTypes and that infoType
1953 # is specified in `InspectContent.info_types` field. Specifying the latter
1954 # adds findings to the one detected by the system. If built-in info type is
1955 # not specified in `InspectContent.info_types` list then the name is treated
1956 # as a custom info type.
1957 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
1958 # creating a CustomInfoType, or one of the names listed
1959 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
1960 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
1961 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
1962 },
1963 &quot;likelihood&quot;: &quot;A String&quot;, # Likelihood to return for this CustomInfoType. This base value can be
1964 # altered by a detection rule if the finding meets the criteria specified by
1965 # the rule. Defaults to `VERY_LIKELY` if not specified.
1966 &quot;detectionRules&quot;: [ # Set of detection rules to apply to all findings of this CustomInfoType.
1967 # Rules are applied in order that they are specified. Not supported for the
1968 # `surrogate_type` CustomInfoType.
1969 { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
1970 # `CustomInfoType` to alter behavior under certain circumstances, depending
1971 # on the specific details of the rule. Not supported for the `surrogate_type`
1972 # custom infoType.
1973 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
1974 # proximity of hotwords.
1975 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
1976 # The total length of the window cannot exceed 1000 characters. Note that
1977 # the finding itself will be included in the window, so that hotwords may
1978 # be used to match substrings of the finding itself. For example, the
1979 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
1980 # adjusted upwards if the area code is known to be the local area code of
1981 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
1982 # is the area code in question.
1983 # rule.
1984 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
1985 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
1986 },
1987 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
1988 # part of a detection rule.
1989 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
1990 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
1991 # levels. For example, if a finding would be `POSSIBLE` without the
1992 # detection rule and `relative_likelihood` is 1, then it is upgraded to
1993 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
1994 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
1995 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
1996 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
1997 # a final likelihood of `LIKELY`.
1998 },
1999 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
2000 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
2001 # specified, the entire match is returned. No more than 3 may be included.
2002 42,
2003 ],
2004 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2005 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2006 # google/re2 repository on GitHub.
2007 },
2008 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002009 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002010 ],
2011 &quot;surrogateType&quot;: { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that
2012 # support reversing.
2013 # such as
2014 # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
2015 # These types of transformations are
2016 # those that perform pseudonymization, thereby producing a &quot;surrogate&quot; as
2017 # output. This should be used in conjunction with a field on the
2018 # transformation such as `surrogate_info_type`. This CustomInfoType does
2019 # not support the use of `detection_rules`.
2020 },
2021 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression based CustomInfoType.
2022 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
2023 # specified, the entire match is returned. No more than 3 may be included.
2024 42,
2025 ],
2026 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2027 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2028 # google/re2 repository on GitHub.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002029 },
2030 &quot;storedType&quot;: { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in
2031 # `InspectDataSource`. Not currently supported in `InspectContent`.
2032 &quot;name&quot;: &quot;A String&quot;, # Resource name of the requested `StoredInfoType`, for example
2033 # `organizations/433245324/storedInfoTypes/432452342` or
2034 # `projects/project-id/storedInfoTypes/432452342`.
2035 &quot;createTime&quot;: &quot;A String&quot;, # Timestamp indicating when the version of the `StoredInfoType` used for
2036 # inspection was created. Output-only field, populated by the system.
2037 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002038 &quot;exclusionType&quot;: &quot;A String&quot;, # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
2039 # to be returned. It still can be used for rules matching.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002040 },
2041 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002042 &quot;minLikelihood&quot;: &quot;A String&quot;, # Only returns findings equal or above this threshold. The default is
2043 # POSSIBLE.
2044 # See https://cloud.google.com/dlp/docs/likelihood to learn more.
2045 &quot;limits&quot;: { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned.
2046 &quot;maxFindingsPerRequest&quot;: 42, # Max number of findings that will be returned per request/job.
2047 # When set within `InspectContentRequest`, the maximum returned is 2000
2048 # regardless if this is set higher.
2049 &quot;maxFindingsPerInfoType&quot;: [ # Configuration of findings limit given for specified infoTypes.
2050 { # Max findings configuration per infoType, per content item or long
2051 # running DlpJob.
2052 &quot;infoType&quot;: { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per
2053 # info_type should be provided. If InfoTypeLimit does not have an
2054 # info_type, the DLP API applies the limit against all info_types that
2055 # are found but not specified in another InfoTypeLimit.
2056 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
2057 # creating a CustomInfoType, or one of the names listed
2058 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2059 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
2060 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
2061 },
2062 &quot;maxFindings&quot;: 42, # Max findings limit for the given infoType.
2063 },
2064 ],
2065 &quot;maxFindingsPerItem&quot;: 42, # Max number of findings that will be returned for each item scanned.
2066 # When set within `InspectJobConfig`,
2067 # the maximum returned is 2000 regardless if this is set higher.
2068 # When set within `InspectContentRequest`, this field is ignored.
2069 },
2070 &quot;excludeInfoTypes&quot;: True or False, # When true, excludes type information of the findings.
Bu Sun Kim65020912020-05-20 12:08:20 -07002071 &quot;includeQuote&quot;: True or False, # When true, a contextual quote from the data that triggered a finding is
2072 # included in the response; see Finding.quote.
2073 &quot;ruleSet&quot;: [ # Set of rules to apply to the findings for this InspectConfig.
2074 # Exclusion rules, contained in the set are executed in the end, other
2075 # rules are executed in the order they are specified for each info type.
2076 { # Rule set for modifying a set of infoTypes to alter behavior under certain
2077 # circumstances, depending on the specific details of the rules within the set.
2078 &quot;infoTypes&quot;: [ # List of infoTypes this rule set is applied to.
2079 { # Type of information detected by the API.
2080 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002081 # creating a CustomInfoType, or one of the names listed
2082 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002083 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
2084 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002085 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002086 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002087 &quot;rules&quot;: [ # Set of rules to be applied to infoTypes. The rules are applied in order.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002088 { # A single inspection rule to be applied to infoTypes, specified in
2089 # `InspectionRuleSet`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002090 &quot;hotwordRule&quot;: { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002091 # proximity of hotwords.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002092 &quot;proximity&quot;: { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside.
2093 # The total length of the window cannot exceed 1000 characters. Note that
2094 # the finding itself will be included in the window, so that hotwords may
2095 # be used to match substrings of the finding itself. For example, the
2096 # certainty of a phone number regex &quot;\(\d{3}\) \d{3}-\d{4}&quot; could be
2097 # adjusted upwards if the area code is known to be the local area code of
2098 # a company office using the hotword regex &quot;\(xxx\)&quot;, where &quot;xxx&quot;
2099 # is the area code in question.
2100 # rule.
2101 &quot;windowAfter&quot;: 42, # Number of characters after the finding to consider.
2102 &quot;windowBefore&quot;: 42, # Number of characters before the finding to consider.
2103 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002104 &quot;likelihoodAdjustment&quot;: { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002105 # part of a detection rule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002106 &quot;fixedLikelihood&quot;: &quot;A String&quot;, # Set the likelihood of a finding to a fixed value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002107 &quot;relativeLikelihood&quot;: 42, # Increase or decrease the likelihood by the specified number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002108 # levels. For example, if a finding would be `POSSIBLE` without the
2109 # detection rule and `relative_likelihood` is 1, then it is upgraded to
2110 # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
2111 # Likelihood may never drop below `VERY_UNLIKELY` or exceed
2112 # `VERY_LIKELY`, so applying an adjustment of 1 followed by an
2113 # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
2114 # a final likelihood of `LIKELY`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002115 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002116 &quot;hotwordRegex&quot;: { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword.
2117 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002118 # specified, the entire match is returned. No more than 3 may be included.
2119 42,
2120 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002121 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2122 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2123 # google/re2 repository on GitHub.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002124 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002125 },
2126 &quot;exclusionRule&quot;: { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule.
2127 # `InspectionRuleSet` are removed from results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002128 &quot;matchingType&quot;: &quot;A String&quot;, # How the rule is applied, see MatchingType documentation for details.
Bu Sun Kim65020912020-05-20 12:08:20 -07002129 &quot;dictionary&quot;: { # Custom information type based on a dictionary of words or phrases. This can # Dictionary which defines the rule.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002130 # be used to match sensitive information specific to the data, such as a list
2131 # of employee IDs or job titles.
2132 #
2133 # Dictionary words are case-insensitive and all characters other than letters
2134 # and digits in the unicode [Basic Multilingual
2135 # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
2136 # will be replaced with whitespace when scanning for matches, so the
Bu Sun Kim65020912020-05-20 12:08:20 -07002137 # dictionary phrase &quot;Sam Johnson&quot; will match all three phrases &quot;sam johnson&quot;,
2138 # &quot;Sam, Johnson&quot;, and &quot;Sam (Johnson)&quot;. Additionally, the characters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002139 # surrounding any match must be of a different type than the adjacent
2140 # characters within the word, so letters must be next to non-letters and
Bu Sun Kim65020912020-05-20 12:08:20 -07002141 # digits next to non-digits. For example, the dictionary word &quot;jen&quot; will
2142 # match the first three letters of the text &quot;jen123&quot; but will return no
2143 # matches for &quot;jennifer&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002144 #
2145 # Dictionary words containing a large number of characters that are not
2146 # letters or digits may result in unexpected findings because such characters
2147 # are treated as whitespace. The
2148 # [limits](https://cloud.google.com/dlp/limits) page contains details about
2149 # the size limits of dictionaries. For dictionaries that do not fit within
2150 # these constraints, consider using `LargeCustomDictionaryConfig` in the
2151 # `StoredInfoType` API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002152 &quot;cloudStoragePath&quot;: { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file
2153 # is accepted.
2154 &quot;path&quot;: &quot;A String&quot;, # A url representing a file or path (no wildcards) in Cloud Storage.
2155 # Example: gs://[BUCKET_NAME]/dictionary.txt
2156 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002157 &quot;wordList&quot;: { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for.
2158 &quot;words&quot;: [ # Words or phrases defining the dictionary. The dictionary must contain
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002159 # at least one phrase and every phrase must contain at least 2 characters
2160 # that are letters or digits. [required]
Bu Sun Kim65020912020-05-20 12:08:20 -07002161 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002162 ],
2163 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002164 },
2165 &quot;excludeInfoTypes&quot;: { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule.
2166 &quot;infoTypes&quot;: [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or
2167 # contained within with a finding of an infoType from this list. For
2168 # example, for `InspectionRuleSet.info_types` containing &quot;PHONE_NUMBER&quot;` and
2169 # `exclusion_rule` containing `exclude_info_types.info_types` with
2170 # &quot;EMAIL_ADDRESS&quot; the phone number findings are dropped if they overlap
2171 # with EMAIL_ADDRESS finding.
2172 # That leads to &quot;555-222-2222@example.org&quot; to generate only a single
2173 # finding, namely email address.
2174 { # Type of information detected by the API.
2175 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
2176 # creating a CustomInfoType, or one of the names listed
2177 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002178 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
2179 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002180 },
2181 ],
2182 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002183 &quot;regex&quot;: { # Message defining a custom regular expression. # Regular expression which defines the rule.
2184 &quot;groupIndexes&quot;: [ # The index of the submatch to extract as findings. When not
2185 # specified, the entire match is returned. No more than 3 may be included.
2186 42,
2187 ],
2188 &quot;pattern&quot;: &quot;A String&quot;, # Pattern defining the regular expression. Its syntax
2189 # (https://github.com/google/re2/wiki/Syntax) can be found under the
2190 # google/re2 repository on GitHub.
2191 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002192 },
2193 },
2194 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002195 },
2196 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002197 &quot;contentOptions&quot;: [ # List of options defining data content to scan.
2198 # If empty, text, images, and other content will be included.
2199 &quot;A String&quot;,
2200 ],
2201 &quot;infoTypes&quot;: [ # Restricts what info_types to look for. The values must correspond to
2202 # InfoType values returned by ListInfoTypes or listed at
2203 # https://cloud.google.com/dlp/docs/infotypes-reference.
2204 #
2205 # When no InfoTypes or CustomInfoTypes are specified in a request, the
2206 # system may automatically choose what detectors to run. By default this may
2207 # be all types, but may change over time as detectors are updated.
2208 #
2209 # If you need precise control and predictability as to what detectors are
2210 # run you should specify specific InfoTypes listed in the reference,
2211 # otherwise a default list will be used, which may change over time.
2212 { # Type of information detected by the API.
2213 &quot;name&quot;: &quot;A String&quot;, # Name of the information type. Either a name of your choosing when
2214 # creating a CustomInfoType, or one of the names listed
2215 # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
2216 # a built-in type. When sending Cloud DLP results to Data Catalog, infoType
2217 # names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
2218 },
2219 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002220 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002221 }</pre>
2222</div>
2223
2224</body></html>