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