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