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