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.image.html">image</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="#redact">redact(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">Redacts potentially sensitive info from an image.</p> |
| 80 | <h3>Method Details</h3> |
| 81 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 82 | <code class="details" id="redact">redact(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 83 | <pre>Redacts potentially sensitive info from an image. |
| 84 | This method has limits on input size, processing time, and output size. |
| 85 | See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to |
| 86 | learn more. |
| 87 | |
| 88 | When no InfoTypes or CustomInfoTypes are specified in this request, the |
| 89 | system will automatically choose what detectors to run. By default this may |
| 90 | be all types, but may change over time as detectors are updated. |
| 91 | |
| 92 | Args: |
| 93 | parent: string, The parent resource name, for example projects/my-project-id. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 94 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 95 | The object takes the form of: |
| 96 | |
| 97 | { # Request to search for potentially sensitive info in an image and redact it |
| 98 | # by covering it with a colored rectangle. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 99 | "byteItem": { # Container for bytes to inspect or redact. # The content must be PNG, JPEG, SVG or BMP. |
| 100 | "type": "A String", # The type of data stored in the bytes string. Default will be TEXT_UTF8. |
| 101 | "data": "A String", # Content data to inspect or redact. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 102 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 103 | "includeFindings": True or False, # Whether the response should include findings along with the redacted |
| 104 | # image. |
| 105 | "inspectConfig": { # Configuration description of the scanning process. # Configuration for the inspector. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | # When used with redactContent only info_types and min_likelihood are currently |
| 107 | # used. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 108 | "includeQuote": True or False, # When true, a contextual quote from the data that triggered a finding is |
| 109 | # included in the response; see Finding.quote. |
| 110 | "ruleSet": [ # Set of rules to apply to the findings for this InspectConfig. |
| 111 | # Exclusion rules, contained in the set are executed in the end, other |
| 112 | # rules are executed in the order they are specified for each info type. |
| 113 | { # Rule set for modifying a set of infoTypes to alter behavior under certain |
| 114 | # circumstances, depending on the specific details of the rules within the set. |
| 115 | "infoTypes": [ # List of infoTypes this rule set is applied to. |
| 116 | { # Type of information detected by the API. |
| 117 | "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] | 118 | # creating a CustomInfoType, or one of the names listed |
| 119 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 120 | # a built-in type. InfoType names should conform to the pattern |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 121 | # `[a-zA-Z0-9_]{1,64}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 122 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 123 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 124 | "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] | 125 | { # A single inspection rule to be applied to infoTypes, specified in |
| 126 | # `InspectionRuleSet`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 127 | "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] | 128 | # proximity of hotwords. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 129 | "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] | 130 | # part of a detection rule. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 131 | "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] | 132 | # levels. For example, if a finding would be `POSSIBLE` without the |
| 133 | # detection rule and `relative_likelihood` is 1, then it is upgraded to |
| 134 | # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. |
| 135 | # Likelihood may never drop below `VERY_UNLIKELY` or exceed |
| 136 | # `VERY_LIKELY`, so applying an adjustment of 1 followed by an |
| 137 | # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in |
| 138 | # a final likelihood of `LIKELY`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 139 | "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 140 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 141 | "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword. |
| 142 | "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] | 143 | # specified, the entire match is returned. No more than 3 may be included. |
| 144 | 42, |
| 145 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 146 | "pattern": "A String", # Pattern defining the regular expression. Its syntax |
| 147 | # (https://github.com/google/re2/wiki/Syntax) can be found under the |
| 148 | # google/re2 repository on GitHub. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 149 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 150 | "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside. |
| 151 | # The total length of the window cannot exceed 1000 characters. Note that |
| 152 | # the finding itself will be included in the window, so that hotwords may |
| 153 | # be used to match substrings of the finding itself. For example, the |
| 154 | # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be |
| 155 | # adjusted upwards if the area code is known to be the local area code of |
| 156 | # a company office using the hotword regex "\(xxx\)", where "xxx" |
| 157 | # is the area code in question. |
| 158 | # rule. |
| 159 | "windowBefore": 42, # Number of characters before the finding to consider. |
| 160 | "windowAfter": 42, # Number of characters after the finding to consider. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 161 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 162 | }, |
| 163 | "exclusionRule": { # The rule that specifies conditions when findings of infoTypes specified in # Exclusion rule. |
| 164 | # `InspectionRuleSet` are removed from results. |
| 165 | "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] | 166 | # be used to match sensitive information specific to the data, such as a list |
| 167 | # of employee IDs or job titles. |
| 168 | # |
| 169 | # Dictionary words are case-insensitive and all characters other than letters |
| 170 | # and digits in the unicode [Basic Multilingual |
| 171 | # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) |
| 172 | # will be replaced with whitespace when scanning for matches, so the |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 173 | # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", |
| 174 | # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 175 | # surrounding any match must be of a different type than the adjacent |
| 176 | # 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] | 177 | # digits next to non-digits. For example, the dictionary word "jen" will |
| 178 | # match the first three letters of the text "jen123" but will return no |
| 179 | # matches for "jennifer". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 180 | # |
| 181 | # Dictionary words containing a large number of characters that are not |
| 182 | # letters or digits may result in unexpected findings because such characters |
| 183 | # are treated as whitespace. The |
| 184 | # [limits](https://cloud.google.com/dlp/limits) page contains details about |
| 185 | # the size limits of dictionaries. For dictionaries that do not fit within |
| 186 | # these constraints, consider using `LargeCustomDictionaryConfig` in the |
| 187 | # `StoredInfoType` API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 188 | "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for. |
| 189 | "words": [ # Words or phrases defining the dictionary. The dictionary must contain |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 190 | # at least one phrase and every phrase must contain at least 2 characters |
| 191 | # that are letters or digits. [required] |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 192 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 193 | ], |
| 194 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 195 | "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 196 | # is accepted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 197 | "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 198 | # Example: gs://[BUCKET_NAME]/dictionary.txt |
| 199 | }, |
| 200 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 201 | "regex": { # Message defining a custom regular expression. # Regular expression which defines the rule. |
| 202 | "groupIndexes": [ # The index of the submatch to extract as findings. When not |
| 203 | # specified, the entire match is returned. No more than 3 may be included. |
| 204 | 42, |
| 205 | ], |
| 206 | "pattern": "A String", # Pattern defining the regular expression. Its syntax |
| 207 | # (https://github.com/google/re2/wiki/Syntax) can be found under the |
| 208 | # google/re2 repository on GitHub. |
| 209 | }, |
| 210 | "excludeInfoTypes": { # List of exclude infoTypes. # Set of infoTypes for which findings would affect this rule. |
| 211 | "infoTypes": [ # InfoType list in ExclusionRule rule drops a finding when it overlaps or |
| 212 | # contained within with a finding of an infoType from this list. For |
| 213 | # example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and |
| 214 | # `exclusion_rule` containing `exclude_info_types.info_types` with |
| 215 | # "EMAIL_ADDRESS" the phone number findings are dropped if they overlap |
| 216 | # with EMAIL_ADDRESS finding. |
| 217 | # That leads to "555-222-2222@example.org" to generate only a single |
| 218 | # finding, namely email address. |
| 219 | { # Type of information detected by the API. |
| 220 | "name": "A String", # Name of the information type. Either a name of your choosing when |
| 221 | # creating a CustomInfoType, or one of the names listed |
| 222 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 223 | # a built-in type. InfoType names should conform to the pattern |
| 224 | # `[a-zA-Z0-9_]{1,64}`. |
| 225 | }, |
| 226 | ], |
| 227 | }, |
| 228 | "matchingType": "A String", # How the rule is applied, see MatchingType documentation for details. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 229 | }, |
| 230 | }, |
| 231 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 232 | }, |
| 233 | ], |
| 234 | "limits": { # Configuration to control the number of findings returned. # Configuration to control the number of findings returned. |
| 235 | "maxFindingsPerItem": 42, # Max number of findings that will be returned for each item scanned. |
| 236 | # When set within `InspectJobConfig`, |
| 237 | # the maximum returned is 2000 regardless if this is set higher. |
| 238 | # When set within `InspectContentRequest`, this field is ignored. |
| 239 | "maxFindingsPerInfoType": [ # Configuration of findings limit given for specified infoTypes. |
| 240 | { # Max findings configuration per infoType, per content item or long |
| 241 | # running DlpJob. |
| 242 | "maxFindings": 42, # Max findings limit for the given infoType. |
| 243 | "infoType": { # Type of information detected by the API. # Type of information the findings limit applies to. Only one limit per |
| 244 | # info_type should be provided. If InfoTypeLimit does not have an |
| 245 | # info_type, the DLP API applies the limit against all info_types that |
| 246 | # are found but not specified in another InfoTypeLimit. |
| 247 | "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] | 248 | # creating a CustomInfoType, or one of the names listed |
| 249 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 250 | # a built-in type. InfoType names should conform to the pattern |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 251 | # `[a-zA-Z0-9_]{1,64}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 252 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 253 | }, |
| 254 | ], |
| 255 | "maxFindingsPerRequest": 42, # Max number of findings that will be returned per request/job. |
| 256 | # When set within `InspectContentRequest`, the maximum returned is 2000 |
| 257 | # regardless if this is set higher. |
| 258 | }, |
| 259 | "contentOptions": [ # List of options defining data content to scan. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 260 | # If empty, text, images, and other content will be included. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 261 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 262 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 263 | "infoTypes": [ # Restricts what info_types to look for. The values must correspond to |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 264 | # InfoType values returned by ListInfoTypes or listed at |
| 265 | # https://cloud.google.com/dlp/docs/infotypes-reference. |
| 266 | # |
| 267 | # When no InfoTypes or CustomInfoTypes are specified in a request, the |
| 268 | # system may automatically choose what detectors to run. By default this may |
| 269 | # be all types, but may change over time as detectors are updated. |
| 270 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 271 | # If you need precise control and predictability as to what detectors are |
| 272 | # run you should specify specific InfoTypes listed in the reference, |
| 273 | # otherwise a default list will be used, which may change over time. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 274 | { # Type of information detected by the API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 275 | "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] | 276 | # creating a CustomInfoType, or one of the names listed |
| 277 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 278 | # a built-in type. InfoType names should conform to the pattern |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 279 | # `[a-zA-Z0-9_]{1,64}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 280 | }, |
| 281 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 282 | "minLikelihood": "A String", # Only returns findings equal or above this threshold. The default is |
| 283 | # POSSIBLE. |
| 284 | # See https://cloud.google.com/dlp/docs/likelihood to learn more. |
| 285 | "excludeInfoTypes": True or False, # When true, excludes type information of the findings. |
| 286 | "customInfoTypes": [ # CustomInfoTypes provided by the user. See |
| 287 | # https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. |
| 288 | { # Custom information type provided by the user. Used to find domain-specific |
| 289 | # sensitive information configurable to the data in question. |
| 290 | "likelihood": "A String", # Likelihood to return for this CustomInfoType. This base value can be |
| 291 | # altered by a detection rule if the finding meets the criteria specified by |
| 292 | # the rule. Defaults to `VERY_LIKELY` if not specified. |
| 293 | "infoType": { # Type of information detected by the API. # CustomInfoType can either be a new infoType, or an extension of built-in |
| 294 | # infoType, when the name matches one of existing infoTypes and that infoType |
| 295 | # is specified in `InspectContent.info_types` field. Specifying the latter |
| 296 | # adds findings to the one detected by the system. If built-in info type is |
| 297 | # not specified in `InspectContent.info_types` list then the name is treated |
| 298 | # as a custom info type. |
| 299 | "name": "A String", # Name of the information type. Either a name of your choosing when |
| 300 | # creating a CustomInfoType, or one of the names listed |
| 301 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 302 | # a built-in type. InfoType names should conform to the pattern |
| 303 | # `[a-zA-Z0-9_]{1,64}`. |
| 304 | }, |
| 305 | "regex": { # Message defining a custom regular expression. # Regular expression based CustomInfoType. |
| 306 | "groupIndexes": [ # The index of the submatch to extract as findings. When not |
| 307 | # specified, the entire match is returned. No more than 3 may be included. |
| 308 | 42, |
| 309 | ], |
| 310 | "pattern": "A String", # Pattern defining the regular expression. Its syntax |
| 311 | # (https://github.com/google/re2/wiki/Syntax) can be found under the |
| 312 | # google/re2 repository on GitHub. |
| 313 | }, |
| 314 | "detectionRules": [ # Set of detection rules to apply to all findings of this CustomInfoType. |
| 315 | # Rules are applied in order that they are specified. Not supported for the |
| 316 | # `surrogate_type` CustomInfoType. |
| 317 | { # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a |
| 318 | # `CustomInfoType` to alter behavior under certain circumstances, depending |
| 319 | # on the specific details of the rule. Not supported for the `surrogate_type` |
| 320 | # custom infoType. |
| 321 | "hotwordRule": { # The rule that adjusts the likelihood of findings within a certain # Hotword-based detection rule. |
| 322 | # proximity of hotwords. |
| 323 | "likelihoodAdjustment": { # Message for specifying an adjustment to the likelihood of a finding as # Likelihood adjustment to apply to all matching findings. |
| 324 | # part of a detection rule. |
| 325 | "relativeLikelihood": 42, # Increase or decrease the likelihood by the specified number of |
| 326 | # levels. For example, if a finding would be `POSSIBLE` without the |
| 327 | # detection rule and `relative_likelihood` is 1, then it is upgraded to |
| 328 | # `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. |
| 329 | # Likelihood may never drop below `VERY_UNLIKELY` or exceed |
| 330 | # `VERY_LIKELY`, so applying an adjustment of 1 followed by an |
| 331 | # adjustment of -1 when base likelihood is `VERY_LIKELY` will result in |
| 332 | # a final likelihood of `LIKELY`. |
| 333 | "fixedLikelihood": "A String", # Set the likelihood of a finding to a fixed value. |
| 334 | }, |
| 335 | "hotwordRegex": { # Message defining a custom regular expression. # Regular expression pattern defining what qualifies as a hotword. |
| 336 | "groupIndexes": [ # The index of the submatch to extract as findings. When not |
| 337 | # specified, the entire match is returned. No more than 3 may be included. |
| 338 | 42, |
| 339 | ], |
| 340 | "pattern": "A String", # Pattern defining the regular expression. Its syntax |
| 341 | # (https://github.com/google/re2/wiki/Syntax) can be found under the |
| 342 | # google/re2 repository on GitHub. |
| 343 | }, |
| 344 | "proximity": { # Message for specifying a window around a finding to apply a detection # Proximity of the finding within which the entire hotword must reside. |
| 345 | # The total length of the window cannot exceed 1000 characters. Note that |
| 346 | # the finding itself will be included in the window, so that hotwords may |
| 347 | # be used to match substrings of the finding itself. For example, the |
| 348 | # certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be |
| 349 | # adjusted upwards if the area code is known to be the local area code of |
| 350 | # a company office using the hotword regex "\(xxx\)", where "xxx" |
| 351 | # is the area code in question. |
| 352 | # rule. |
| 353 | "windowBefore": 42, # Number of characters before the finding to consider. |
| 354 | "windowAfter": 42, # Number of characters after the finding to consider. |
| 355 | }, |
| 356 | }, |
| 357 | }, |
| 358 | ], |
| 359 | "exclusionType": "A String", # If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding |
| 360 | # to be returned. It still can be used for rules matching. |
| 361 | "dictionary": { # Custom information type based on a dictionary of words or phrases. This can # A list of phrases to detect as a CustomInfoType. |
| 362 | # be used to match sensitive information specific to the data, such as a list |
| 363 | # of employee IDs or job titles. |
| 364 | # |
| 365 | # Dictionary words are case-insensitive and all characters other than letters |
| 366 | # and digits in the unicode [Basic Multilingual |
| 367 | # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) |
| 368 | # will be replaced with whitespace when scanning for matches, so the |
| 369 | # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", |
| 370 | # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters |
| 371 | # surrounding any match must be of a different type than the adjacent |
| 372 | # characters within the word, so letters must be next to non-letters and |
| 373 | # digits next to non-digits. For example, the dictionary word "jen" will |
| 374 | # match the first three letters of the text "jen123" but will return no |
| 375 | # matches for "jennifer". |
| 376 | # |
| 377 | # Dictionary words containing a large number of characters that are not |
| 378 | # letters or digits may result in unexpected findings because such characters |
| 379 | # are treated as whitespace. The |
| 380 | # [limits](https://cloud.google.com/dlp/limits) page contains details about |
| 381 | # the size limits of dictionaries. For dictionaries that do not fit within |
| 382 | # these constraints, consider using `LargeCustomDictionaryConfig` in the |
| 383 | # `StoredInfoType` API. |
| 384 | "wordList": { # Message defining a list of words or phrases to search for in the data. # List of words or phrases to search for. |
| 385 | "words": [ # Words or phrases defining the dictionary. The dictionary must contain |
| 386 | # at least one phrase and every phrase must contain at least 2 characters |
| 387 | # that are letters or digits. [required] |
| 388 | "A String", |
| 389 | ], |
| 390 | }, |
| 391 | "cloudStoragePath": { # Message representing a single file or path in Cloud Storage. # Newline-delimited file of words in Cloud Storage. Only a single file |
| 392 | # is accepted. |
| 393 | "path": "A String", # A url representing a file or path (no wildcards) in Cloud Storage. |
| 394 | # Example: gs://[BUCKET_NAME]/dictionary.txt |
| 395 | }, |
| 396 | }, |
| 397 | "storedType": { # A reference to a StoredInfoType to use with scanning. # Load an existing `StoredInfoType` resource for use in |
| 398 | # `InspectDataSource`. Not currently supported in `InspectContent`. |
| 399 | "name": "A String", # Resource name of the requested `StoredInfoType`, for example |
| 400 | # `organizations/433245324/storedInfoTypes/432452342` or |
| 401 | # `projects/project-id/storedInfoTypes/432452342`. |
| 402 | "createTime": "A String", # Timestamp indicating when the version of the `StoredInfoType` used for |
| 403 | # inspection was created. Output-only field, populated by the system. |
| 404 | }, |
| 405 | "surrogateType": { # Message for detecting output from deidentification transformations # Message for detecting output from deidentification transformations that |
| 406 | # support reversing. |
| 407 | # such as |
| 408 | # [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). |
| 409 | # These types of transformations are |
| 410 | # those that perform pseudonymization, thereby producing a "surrogate" as |
| 411 | # output. This should be used in conjunction with a field on the |
| 412 | # transformation such as `surrogate_info_type`. This CustomInfoType does |
| 413 | # not support the use of `detection_rules`. |
| 414 | }, |
| 415 | }, |
| 416 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 417 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 418 | "imageRedactionConfigs": [ # The configuration for specifying what content to redact from images. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 419 | { # Configuration for determining how redaction of images should occur. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 420 | "redactAllText": True or False, # If true, all text found in the image, regardless whether it matches an |
| 421 | # info_type, is redacted. Only one should be provided. |
| 422 | "infoType": { # Type of information detected by the API. # Only one per info_type should be provided per request. If not |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | # specified, and redact_all_text is false, the DLP API will redact all |
| 424 | # text that it matches against all info_types that are found, but not |
| 425 | # specified in another ImageRedactionConfig. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 426 | "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] | 427 | # creating a CustomInfoType, or one of the names listed |
| 428 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 429 | # a built-in type. InfoType names should conform to the pattern |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 430 | # `[a-zA-Z0-9_]{1,64}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 431 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 432 | "redactionColor": { # Represents a color in the RGB color space. # The color to use when redacting content from an image. If not specified, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 433 | # the default is black. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 434 | "red": 3.14, # The amount of red in the color as a value in the interval [0, 1]. |
| 435 | "green": 3.14, # The amount of green in the color as a value in the interval [0, 1]. |
| 436 | "blue": 3.14, # The amount of blue in the color as a value in the interval [0, 1]. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 437 | }, |
| 438 | }, |
| 439 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 440 | "locationId": "A String", # The geographic location to process the request. Reserved for future |
| 441 | # extensions. |
| 442 | # Location is restricted to 'global', 'us', 'asia', and 'europe'. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 443 | } |
| 444 | |
| 445 | x__xgafv: string, V1 error format. |
| 446 | Allowed values |
| 447 | 1 - v1 error format |
| 448 | 2 - v2 error format |
| 449 | |
| 450 | Returns: |
| 451 | An object of the form: |
| 452 | |
| 453 | { # Results of redacting an image. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 454 | "redactedImage": "A String", # The redacted image. The type will be the same as the original image. |
| 455 | "inspectResult": { # All the findings for a single scanned item. # The findings. Populated when include_findings in the request is true. |
| 456 | "findings": [ # List of findings for an item. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 457 | { # Represents a piece of potentially sensitive content. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 458 | "resourceName": "A String", # The job that stored the finding. |
| 459 | "triggerName": "A String", # Job trigger name, if applicable, for this finding. |
| 460 | "jobCreateTime": "A String", # Time the job started that produced this finding. |
| 461 | "quoteInfo": { # Message for infoType-dependent details parsed from quote. # Contains data parsed from quotes. Only populated if include_quote was set |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 462 | # to true and a supported infoType was requested. Currently supported |
| 463 | # infoTypes: DATE, DATE_OF_BIRTH and TIME. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 464 | "dateTime": { # Message for a date time object. # The date time indicated by the quote. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 465 | # e.g. 2018-01-01, 5th August. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 466 | "date": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # One or more of the following must be set. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 467 | # Must be a valid date or time value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 468 | # and time zone are either specified elsewhere or are not significant. The date |
| 469 | # is relative to the Proleptic Gregorian Calendar. This can represent: |
| 470 | # |
| 471 | # * A full date, with non-zero year, month and day values |
| 472 | # * A month and day value, with a zero year, e.g. an anniversary |
| 473 | # * A year on its own, with zero month and day values |
| 474 | # * A year and month value, with a zero day, e.g. a credit card expiration date |
| 475 | # |
| 476 | # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 477 | "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without |
| 478 | # a year. |
| 479 | "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 480 | # month and day. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 481 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 482 | # if specifying a year by itself or a year and month where the day is not |
| 483 | # significant. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 484 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 485 | "timeZone": { # Time zone of the date time object. # Time zone |
| 486 | "offsetMinutes": 42, # Set only if the offset can be determined. Positive for time ahead of UTC. |
| 487 | # E.g. For "UTC-9", this value is -540. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 488 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 489 | "dayOfWeek": "A String", # Day of week |
| 490 | "time": { # Represents a time of day. The date and time zone are either not significant # Time of day |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 491 | # or are specified elsewhere. An API may choose to allow leap seconds. Related |
| 492 | # types are google.type.Date and `google.protobuf.Timestamp`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 493 | "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 494 | # allow the value 60 if it allows leap-seconds. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 495 | "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
| 496 | "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
| 497 | # to allow the value "24:00:00" for scenarios like business closing time. |
| 498 | "minutes": 42, # Minutes of hour of day. Must be from 0 to 59. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 499 | }, |
| 500 | }, |
| 501 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 502 | "labels": { # The labels associated with this `Finding`. |
| 503 | # |
| 504 | # Label keys must be between 1 and 63 characters long and must conform |
| 505 | # to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. |
| 506 | # |
| 507 | # Label values must be between 0 and 63 characters long and must conform |
| 508 | # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. |
| 509 | # |
| 510 | # No more than 10 labels can be associated with a given finding. |
| 511 | # |
| 512 | # Examples: |
| 513 | # * `"environment" : "production"` |
| 514 | # * `"pipeline" : "etl"` |
| 515 | "a_key": "A String", |
| 516 | }, |
| 517 | "infoType": { # Type of information detected by the API. # The type of content that might have been found. |
| 518 | # Provided if `excluded_types` is false. |
| 519 | "name": "A String", # Name of the information type. Either a name of your choosing when |
| 520 | # creating a CustomInfoType, or one of the names listed |
| 521 | # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying |
| 522 | # a built-in type. InfoType names should conform to the pattern |
| 523 | # `[a-zA-Z0-9_]{1,64}`. |
| 524 | }, |
| 525 | "likelihood": "A String", # Confidence of how likely it is that the `info_type` is correct. |
| 526 | "name": "A String", # Resource name in format |
| 527 | # projects/{project}/locations/{location}/findings/{finding} Populated only |
| 528 | # when viewing persisted findings. |
| 529 | "location": { # Specifies the location of the finding. # Where the content was found. |
| 530 | "codepointRange": { # Generic half-open interval [start, end) # Unicode character offsets delimiting the finding. |
| 531 | # These are relative to the finding's containing element. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 532 | # Provided when the content is text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 533 | "start": "A String", # Index of the first character of the range (inclusive). |
| 534 | "end": "A String", # Index of the last character of the range (exclusive). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 535 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 536 | "byteRange": { # Generic half-open interval [start, end) # Zero-based byte offsets delimiting the finding. |
| 537 | # These are relative to the finding's containing element. |
| 538 | # Note that when the content is not textual, this references |
| 539 | # the UTF-8 encoded textual representation of the content. |
| 540 | # Omitted if content is an image. |
| 541 | "start": "A String", # Index of the first character of the range (inclusive). |
| 542 | "end": "A String", # Index of the last character of the range (exclusive). |
| 543 | }, |
| 544 | "container": { # Represents a container that may contain DLP findings. # Information about the container where this finding occurred, if available. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 545 | # Examples of a container include a file, table, or database record. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 546 | "fullPath": "A String", # A string representation of the full container name. |
| 547 | # Examples: |
| 548 | # - BigQuery: 'Project:DataSetId.TableId' |
| 549 | # - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' |
| 550 | "type": "A String", # Container type, for example BigQuery or Google Cloud Storage. |
| 551 | "updateTime": "A String", # Findings container modification timestamp, if applicable. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 552 | # For Google Cloud Storage contains last file modification timestamp. |
| 553 | # For BigQuery table contains last_modified_time property. |
| 554 | # For Datastore - not populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 555 | "rootPath": "A String", # The root of the container. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 556 | # Examples: |
| 557 | # - For BigQuery table `project_id:dataset_id.table_id`, the root is |
| 558 | # `dataset_id` |
| 559 | # - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root |
| 560 | # is `gs://bucket` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 561 | "projectId": "A String", # Project where the finding was found. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 562 | # Can be different from the project that owns the finding. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 563 | "relativePath": "A String", # The rest of the path after the root. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 564 | # Examples: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 565 | # - For BigQuery table `project_id:dataset_id.table_id`, the relative path is |
| 566 | # `table_id` |
| 567 | # - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative |
| 568 | # path is `folder/filename.txt` |
| 569 | "version": "A String", # Findings container version, if available |
| 570 | # ("generation" for Google Cloud Storage). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 571 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 572 | "contentLocations": [ # List of nested objects pointing to the precise location of the finding |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 573 | # within the file or record. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 574 | { # Precise location of the finding within a document, record, image, or metadata |
| 575 | # container. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 576 | "containerName": "A String", # Name of the container where the finding is located. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 577 | # The top level name is the source file name or table name. Names of some |
| 578 | # common storage containers are formatted as follows: |
| 579 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 580 | # * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` |
| 581 | # * Cloud Storage files: `gs://{bucket}/{path}` |
| 582 | # * Datastore namespace: {namespace} |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 583 | # |
| 584 | # Nested names could be absent if the embedded object has no string |
| 585 | # identifier (for an example an image contained within a document). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 586 | "documentLocation": { # Location of a finding within a document. # Location data for document files. |
| 587 | "fileOffset": "A String", # Offset of the line, from the beginning of the file, where the finding |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 588 | # is located. |
| 589 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 590 | "recordLocation": { # Location of a finding within a row or record. # Location within a row or record of a database table. |
| 591 | "fieldId": { # General identifier of a data field in a storage service. # Field id of the field containing the finding. |
| 592 | "name": "A String", # Name describing the field. |
| 593 | }, |
| 594 | "tableLocation": { # Location of a finding within a table. # Location within a `ContentItem.Table`. |
| 595 | "rowIndex": "A String", # The zero-based index of the row where the finding is located. Only |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 596 | # populated for resources that have a natural ordering, not BigQuery. In |
| 597 | # BigQuery, to identify the row a finding came from, populate |
| 598 | # BigQueryOptions.identifying_fields with your primary key column names and |
| 599 | # when you store the findings the value of those columns will be stored |
| 600 | # inside of Finding. |
| 601 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 602 | "recordKey": { # Message for a unique key indicating a record that contains a finding. # Key of the finding. |
| 603 | "idValues": [ # Values of identifying columns in the given row. Order of values matches |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 604 | # the order of `identifying_fields` specified in the scanning request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 605 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 606 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 607 | "datastoreKey": { # Record key for a finding in Cloud Datastore. |
| 608 | "entityKey": { # A unique identifier for a Datastore entity. # Datastore entity key. |
| 609 | # If a key's partition ID or any of its path kinds or names are |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 610 | # reserved/read-only, the key is reserved/read-only. |
| 611 | # A reserved/read-only key is forbidden in certain documented contexts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 612 | "path": [ # The entity path. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 613 | # An entity path consists of one or more elements composed of a kind and a |
| 614 | # string or numerical identifier, which identify entities. The first |
| 615 | # element identifies a _root entity_, the second element identifies |
| 616 | # a _child_ of the root entity, the third element identifies a child of the |
| 617 | # second entity, and so forth. The entities identified by all prefixes of |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 618 | # the path are called the element's _ancestors_. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 619 | # |
| 620 | # A path can never be empty, and a path can have at most 100 elements. |
| 621 | { # A (kind, ID/name) pair used to construct a key path. |
| 622 | # |
| 623 | # If either name or ID is set, the element is complete. |
| 624 | # If neither is set, the element is incomplete. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 625 | "kind": "A String", # The kind of the entity. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 626 | # A kind matching regex `__.*__` is reserved/read-only. |
| 627 | # A kind must not contain more than 1500 bytes when UTF-8 encoded. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 628 | # Cannot be `""`. |
| 629 | "id": "A String", # The auto-allocated ID of the entity. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 630 | # Never equal to zero. Values less than zero are discouraged and may not |
| 631 | # be supported in the future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 632 | "name": "A String", # The name of the entity. |
| 633 | # A name matching regex `__.*__` is reserved/read-only. |
| 634 | # A name must not be more than 1500 bytes when UTF-8 encoded. |
| 635 | # Cannot be `""`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 636 | }, |
| 637 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 638 | "partitionId": { # Datastore partition ID. # Entities are partitioned into subsets, currently identified by a project |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 639 | # ID and namespace ID. |
| 640 | # Queries are scoped to a single partition. |
| 641 | # A partition ID identifies a grouping of entities. The grouping is always |
| 642 | # by project and namespace, however the namespace ID may be empty. |
| 643 | # |
| 644 | # A partition ID contains several dimensions: |
| 645 | # project ID and namespace ID. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 646 | "namespaceId": "A String", # If not empty, the ID of the namespace to which the entities belong. |
| 647 | "projectId": "A String", # The ID of the project to which the entities belong. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 648 | }, |
| 649 | }, |
| 650 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 651 | "bigQueryKey": { # Row key for identifying a record in BigQuery table. |
| 652 | "tableReference": { # Message defining the location of a BigQuery table. A table is uniquely # Complete BigQuery table reference. |
| 653 | # identified by its project_id, dataset_id, and table_name. Within a query |
| 654 | # a table is often referenced with a string in the format of: |
| 655 | # `<project_id>:<dataset_id>.<table_id>` or |
| 656 | # `<project_id>.<dataset_id>.<table_id>`. |
| 657 | "projectId": "A String", # The Google Cloud Platform project ID of the project containing the table. |
| 658 | # If omitted, project ID is inferred from the API call. |
| 659 | "datasetId": "A String", # Dataset ID of the table. |
| 660 | "tableId": "A String", # Name of the table. |
| 661 | }, |
| 662 | "rowNumber": "A String", # Row number inferred at the time the table was scanned. This value is |
| 663 | # nondeterministic, cannot be queried, and may be null for inspection |
| 664 | # jobs. To locate findings within a table, specify |
| 665 | # `inspect_job.storage_config.big_query_options.identifying_fields` in |
| 666 | # `CreateDlpJobRequest`. |
| 667 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 668 | }, |
| 669 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 670 | "containerTimestamp": "A String", # Findings container modification timestamp, if applicable. |
| 671 | # For Google Cloud Storage contains last file modification timestamp. |
| 672 | # For BigQuery table contains last_modified_time property. |
| 673 | # For Datastore - not populated. |
| 674 | "metadataLocation": { # Metadata Location # Location within the metadata for inspected content. |
| 675 | "storageLabel": { # Storage metadata label to indicate which metadata entry contains findings. # Storage metadata. |
| 676 | "key": "A String", |
| 677 | }, |
| 678 | "type": "A String", # Type of metadata containing the finding. |
| 679 | }, |
| 680 | "imageLocation": { # Location of the finding within an image. # Location within an image's pixels. |
| 681 | "boundingBoxes": [ # Bounding boxes locating the pixels within the image containing the finding. |
| 682 | { # Bounding box encompassing detected text within an image. |
| 683 | "top": 42, # Top coordinate of the bounding box. (0,0) is upper left. |
| 684 | "width": 42, # Width of the bounding box in pixels. |
| 685 | "height": 42, # Height of the bounding box in pixels. |
| 686 | "left": 42, # Left coordinate of the bounding box. (0,0) is upper left. |
| 687 | }, |
| 688 | ], |
| 689 | }, |
| 690 | "containerVersion": "A String", # Findings container version, if available |
| 691 | # ("generation" for Google Cloud Storage). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 692 | }, |
| 693 | ], |
| 694 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 695 | "quote": "A String", # The content that was found. Even if the content is not textual, it |
| 696 | # may be converted to a textual representation here. |
| 697 | # Provided if `include_quote` is true and the finding is |
| 698 | # less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes |
| 699 | # in length, the quote may be omitted. |
| 700 | "createTime": "A String", # Timestamp when finding was detected. |
| 701 | "jobName": "A String", # The job that stored the finding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 702 | }, |
| 703 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 704 | "findingsTruncated": True or False, # If true, then this item might have more findings than were returned, |
| 705 | # and the findings returned are an arbitrary subset of all findings. |
| 706 | # The findings list might be truncated because the input items were too |
| 707 | # large, or because the server reached the maximum amount of resources |
| 708 | # allowed for a single API call. For best results, divide the input into |
| 709 | # smaller batches. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 710 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 711 | "extractedText": "A String", # If an image was being inspected and the InspectConfig's include_quote was |
| 712 | # set to true, then this field will include all text, if any, that was found |
| 713 | # in the image. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 714 | }</pre> |
| 715 | </div> |
| 716 | |
| 717 | </body></html> |