---
title: "POST /v2/{+parent}/image:redact"
method: POST
path: "/v2/{+parent}/image:redact"
tags: ["projects"]
---

# POST /v2/{+parent}/image:redact

`POST /v2/{+parent}/image:redact`

Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. Only the first frame of each multiframe image is redacted. Metadata and other frames are omitted in the response.

## Path parameters

- `parent` string, required

## Request body

- GooglePrivacyDlpV2RedactImageRequest — Request to search for potentially sensitive info in an image and redact it by covering it with a colored rectangle.
  - `includeFindings` boolean — Whether the response should include findings along with the redacted image.
  - `byteItem` GooglePrivacyDlpV2ByteContentItem — Container for bytes to inspect or redact.
    - `type` 'BYTES_TYPE_UNSPECIFIED' | 'IMAGE' | 'IMAGE_JPEG' | 'IMAGE_BMP' | 'IMAGE_PNG' | 'IMAGE_SVG' | 'TEXT_UTF8' | 'WORD_DOCUMENT' | 'PDF' | 'POWERPOINT_DOCUMENT' | 'EXCEL_DOCUMENT' | 'AVRO' | 'CSV' | 'TSV' | 'AUDIO' | 'VIDEO' | 'EXECUTABLE' | 'AI_MODEL' — The type of data stored in the bytes string. Default will be TEXT_UTF8.
    - `data` string, byte — Content data to inspect or redact.
  - `deidentifyTemplate` string — The full resource name of the de-identification template to use. Settings in the main `image_redaction_configs` field override the corresponding settings in this de-identification template. The request fails if the type of the template's deidentify_config is not image_transformations.
  - `locationId` string — Deprecated. This field has no effect.
  - `inspectTemplate` string — The full resource name of the inspection template to use. Settings in the main `inspect_config` field override the corresponding settings in this inspection template. The merge behavior is as follows: - Singular field: The main field's value replaces the value of the corresponding field in the template. - Repeated fields: The field values are appended to the list defined in the template. - Sub-messages and groups: The fields are recursively merged.
  - `inspectConfig` GooglePrivacyDlpV2InspectConfig — Configuration description of the scanning process. When used with redactContent only info_types and min_likelihood are currently used.
    - `minLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Only returns findings equal to or above this threshold. The default is POSSIBLE. In general, the highest likelihood setting yields the fewest findings in results and the lowest chance of a false positive. For more information, see [Match likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood).
    - `limits` GooglePrivacyDlpV2FindingLimits — Configuration to control the number of findings returned for inspection. This is not used for de-identification or data profiling. When redacting sensitive data from images, finding limits don't apply. They can cause unexpected or inconsistent results, where only some data is redacted. Don't include finding limits in RedactImage requests. Otherwise, Cloud DLP returns an error.
      - `maxFindingsPerRequest` integer — Max number of findings that are returned per request or job. If you set this field in an InspectContentRequest, the resulting maximum value is the value that you set or 3,000, whichever is lower. This value isn't a hard limit. If an inspection reaches this limit, the inspection ends gradually, not abruptly. Therefore, the actual number of findings that Cloud DLP returns can be multiple times higher than this value.
      - `maxFindingsPerItem` integer — Max number of findings that are returned for each item scanned. When set within an InspectContentRequest, this field is ignored. This value isn't a hard limit. If the number of findings for an item reaches this limit, the inspection of that item ends gradually, not abruptly. Therefore, the actual number of findings that Cloud DLP returns for the item can be multiple times higher than this value.
      - `maxFindingsPerInfoType` GooglePrivacyDlpV2InfoTypeLimit[] — Configuration of findings limit given for specified infoTypes.
        - `infoType` GooglePrivacyDlpV2InfoType — Type of information detected by the API.
          - `name` string — Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.
          - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
            - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
          - `version` string — Optional version name for this InfoType.
        - `maxFindings` integer — Max findings limit for the given infoType.
    - `minLikelihoodPerInfoType` GooglePrivacyDlpV2InfoTypeLikelihood[] — Minimum likelihood per infotype. For each infotype, a user can specify a minimum likelihood. The system only returns a finding if its likelihood is above this threshold. If this field is not set, the system uses the InspectConfig min_likelihood.
      - `infoType` GooglePrivacyDlpV2InfoType — Type of information detected by the API.
        - `name` string — Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.
        - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
          - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
        - `version` string — Optional version name for this InfoType.
      - `minLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Only returns findings equal to or above this threshold. This field is required or else the configuration fails.
    - `customInfoTypes` GooglePrivacyDlpV2CustomInfoType[] — CustomInfoTypes provided by the user. See https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes to learn more.
      - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
        - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
      - `detectionRules` GooglePrivacyDlpV2DetectionRule[] — Set of detection rules to apply to all findings of this CustomInfoType. Rules are applied in the order that they are specified. Only supported for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes.
        - `hotwordRule` GooglePrivacyDlpV2HotwordRule — The rule that adjusts the likelihood of findings within a certain proximity of hotwords.
          - `hotwordRegex` GooglePrivacyDlpV2Regex — Message defining a custom regular expression.
            - `pattern` string — Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
            - `groupIndexes` integer[] — The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
          - `likelihoodAdjustment` GooglePrivacyDlpV2LikelihoodAdjustment — Message for specifying an adjustment to the likelihood of a finding as part of a detection rule.
            - `fixedLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Set the likelihood of a finding to a fixed value.
            - `relativeLikelihood` integer — Increase or decrease the likelihood by the specified number of levels. For example, if a finding would be `POSSIBLE` without the detection rule and `relative_likelihood` is 1, then it is upgraded to `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an adjustment of -1 when base likelihood is `VERY_LIKELY` will result in a final likelihood of `LIKELY`.
          - `proximity` GooglePrivacyDlpV2Proximity — Message for specifying a window around a finding to apply a detection rule.
            - `windowBefore` integer — Number of characters before the finding to consider. For tabular data, if you want to modify the likelihood of an entire column of findngs, set this to 1. For more information, see [Hotword example: Set the match likelihood of a table column] (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
            - `windowAfter` integer — Number of characters after the finding to consider.
      - `storedType` GooglePrivacyDlpV2StoredType — A reference to a StoredInfoType to use with scanning.
        - `name` string — Resource name of the requested `StoredInfoType`, for example `organizations/433245324/storedInfoTypes/432452342` or `projects/project-id/storedInfoTypes/432452342`.
        - `createTime` string, google-datetime — Timestamp indicating when the version of the `StoredInfoType` used for inspection was created. Output-only field, populated by the system.
      - `metadataKeyValueExpression` GooglePrivacyDlpV2MetadataKeyValueExpression — Configuration for a custom infoType that detects key-value pairs in the metadata matching the specified regular expressions.
        - `valueRegex` string — The regular expression for the value. Value should be non-empty.
        - `keyRegex` string — The regular expression for the key. Key should be non-empty.
      - `exclusionType` 'EXCLUSION_TYPE_UNSPECIFIED' | 'EXCLUSION_TYPE_EXCLUDE' — If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding to be returned. It still can be used for rules matching. Only supported for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes.
      - `fileLabelInfoType` GooglePrivacyDlpV2FileLabelInfoType — Configuration for a custom infoType that detects file labels.
        - `googleDriveLabel` GooglePrivacyDlpV2GoogleDriveLabel — Google Drive labels published by Google.
          - `labelFieldsToMatch` GooglePrivacyDlpV2LabelField[] — The field values of the Google Drive label to match.
            - `id` string — The identifier of the Label Field.
            - `value` string — The value of the Label Field to match.
          - `labelId` string — The [label ID](https://developers.google.com/workspace/drive/labels/guides/overview) of the Google Drive label.
        - `sensitivityLabel` GooglePrivacyDlpV2SensitivityLabel — Sensitivity labels published by Microsoft.
          - `guid` string — The GUID of the sensitivity label.
      - `likelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Likelihood to return for this CustomInfoType. This base value can be altered by a detection rule if the finding meets the criteria specified by the rule. Defaults to `VERY_LIKELY` if not specified.
      - `infoType` GooglePrivacyDlpV2InfoType — Type of information detected by the API.
        - `name` string — Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.
        - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
          - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
        - `version` string — Optional version name for this InfoType.
      - `dictionary` GooglePrivacyDlpV2Dictionary — Custom information type based on a dictionary of words or phrases. This can be used to match sensitive information specific to the data, such as a list of employee IDs or job titles. Dictionary words are case-insensitive and all characters other than letters and digits in the unicode [Basic Multilingual Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) will be replaced with whitespace when scanning for matches, so the dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters surrounding any match must be of a different type than the adjacent characters within the word, so letters must be next to non-letters and digits next to non-digits. For example, the dictionary word "jen" will match the first three letters of the text "jen123" but will return no matches for "jennifer". Dictionary words containing a large number of characters that are not letters or digits may result in unexpected findings because such characters are treated as whitespace. The [limits](https://cloud.google.com/sensitive-data-protection/limits) page contains details about the size limits of dictionaries. For dictionaries that do not fit within these constraints, consider using `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
        - `wordList` GooglePrivacyDlpV2WordList — Message defining a list of words or phrases to search for in the data.
          - `words` string[] — Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. [required]
        - `cloudStoragePath` GooglePrivacyDlpV2CloudStoragePath — Message representing a single file or path in Cloud Storage.
          - `path` string — A URL representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt`
      - `regex` GooglePrivacyDlpV2Regex — Message defining a custom regular expression.
        - `pattern` string — Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
        - `groupIndexes` integer[] — The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
      - `surrogateType` GooglePrivacyDlpV2SurrogateType — Message for detecting output from deidentification transformations such as [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). These types of transformations are those that perform pseudonymization, thereby producing a "surrogate" as output. This should be used in conjunction with a field on the transformation such as `surrogate_info_type`. This CustomInfoType does not support the use of `detection_rules`.
    - `ruleSet` GooglePrivacyDlpV2InspectionRuleSet[] — Set of rules to apply to the findings for this InspectConfig. Exclusion rules, contained in the set are executed in the end, other rules are executed in the order they are specified for each info type. Not supported for the `metadata_key_value_expression` CustomInfoType.
      - `infoTypes` GooglePrivacyDlpV2InfoType[] — List of infoTypes this rule set is applied to.
        - `name` string — Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.
        - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
          - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
        - `version` string — Optional version name for this InfoType.
      - `rules` GooglePrivacyDlpV2InspectionRule[] — Set of rules to be applied to infoTypes. The rules are applied in order.
        - `exclusionRule` GooglePrivacyDlpV2ExclusionRule — The rule that specifies conditions when findings of infoTypes specified in `InspectionRuleSet` are removed from results.
          - `dictionary` GooglePrivacyDlpV2Dictionary — Custom information type based on a dictionary of words or phrases. This can be used to match sensitive information specific to the data, such as a list of employee IDs or job titles. Dictionary words are case-insensitive and all characters other than letters and digits in the unicode [Basic Multilingual Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) will be replaced with whitespace when scanning for matches, so the dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters surrounding any match must be of a different type than the adjacent characters within the word, so letters must be next to non-letters and digits next to non-digits. For example, the dictionary word "jen" will match the first three letters of the text "jen123" but will return no matches for "jennifer". Dictionary words containing a large number of characters that are not letters or digits may result in unexpected findings because such characters are treated as whitespace. The [limits](https://cloud.google.com/sensitive-data-protection/limits) page contains details about the size limits of dictionaries. For dictionaries that do not fit within these constraints, consider using `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
            - `wordList` GooglePrivacyDlpV2WordList — Message defining a list of words or phrases to search for in the data.
              - …
            - `cloudStoragePath` GooglePrivacyDlpV2CloudStoragePath — Message representing a single file or path in Cloud Storage.
              - …
          - `regex` GooglePrivacyDlpV2Regex — Message defining a custom regular expression.
            - `pattern` string — Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
            - `groupIndexes` integer[] — The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
          - `excludeInfoTypes` GooglePrivacyDlpV2ExcludeInfoTypes — List of excluded infoTypes.
            - `infoTypes` GooglePrivacyDlpV2InfoType[] — InfoType list in ExclusionRule rule drops a finding when it overlaps or contained within with a finding of an infoType from this list. For example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and `exclusion_rule` containing `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number findings are dropped if they overlap with EMAIL_ADDRESS finding. That leads to "555-222-2222@example.org" to generate only a single finding, namely email address.
              - …
          - `excludeByHotword` GooglePrivacyDlpV2ExcludeByHotword — The rule to exclude findings based on a hotword. For record inspection of tables, column names are considered hotwords. An example of this is to exclude a finding if it belongs to a BigQuery column that matches a specific pattern.
            - `proximity` GooglePrivacyDlpV2Proximity — Message for specifying a window around a finding to apply a detection rule.
              - …
            - `hotwordRegex` GooglePrivacyDlpV2Regex — Message defining a custom regular expression.
              - …
          - `matchingType` 'MATCHING_TYPE_UNSPECIFIED' | 'MATCHING_TYPE_FULL_MATCH' | 'MATCHING_TYPE_PARTIAL_MATCH' | 'MATCHING_TYPE_INVERSE_MATCH' | 'MATCHING_TYPE_RULE_SPECIFIC' — How the rule is applied, see MatchingType documentation for details.
          - `excludeByImageFindings` GooglePrivacyDlpV2ExcludeByImageFindings — The rule to exclude image findings based on spatial relationships with other image findings. For example, exclude an image finding if it overlaps with another image finding. This rule is silently ignored if the content being inspected is not an image.
            - `infoTypes` GooglePrivacyDlpV2InfoType[] — A list of image-supported infoTypes—excluding [document infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to be used as context for the exclusion rule. A finding is excluded if its bounding box has the specified spatial relationship (defined by `image_containment_type`) with a finding of an infoType in this list. For example, if `InspectionRuleSet.info_types` includes `OBJECT_TYPE/PERSON` and this `exclusion_rule` specifies `info_types` as `OBJECT_TYPE/PERSON/PASSPORT` with `image_containment_type` set to `encloses`, then `OBJECT_TYPE/PERSON` findings will be excluded if they are fully contained within the bounding box of an `OBJECT_TYPE/PERSON/PASSPORT` finding.
              - …
            - `imageContainmentType` GooglePrivacyDlpV2ImageContainmentType — Specifies the relationship between bounding boxes for image findings.
              - …
        - `hotwordRule` GooglePrivacyDlpV2HotwordRule — The rule that adjusts the likelihood of findings within a certain proximity of hotwords.
          - `hotwordRegex` GooglePrivacyDlpV2Regex — Message defining a custom regular expression.
            - `pattern` string — Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.
            - `groupIndexes` integer[] — The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.
          - `likelihoodAdjustment` GooglePrivacyDlpV2LikelihoodAdjustment — Message for specifying an adjustment to the likelihood of a finding as part of a detection rule.
            - `fixedLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Set the likelihood of a finding to a fixed value.
            - `relativeLikelihood` integer — Increase or decrease the likelihood by the specified number of levels. For example, if a finding would be `POSSIBLE` without the detection rule and `relative_likelihood` is 1, then it is upgraded to `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an adjustment of -1 when base likelihood is `VERY_LIKELY` will result in a final likelihood of `LIKELY`.
          - `proximity` GooglePrivacyDlpV2Proximity — Message for specifying a window around a finding to apply a detection rule.
            - `windowBefore` integer — Number of characters before the finding to consider. For tabular data, if you want to modify the likelihood of an entire column of findngs, set this to 1. For more information, see [Hotword example: Set the match likelihood of a table column] (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
            - `windowAfter` integer — Number of characters after the finding to consider.
        - `adjustmentRule` GooglePrivacyDlpV2AdjustmentRule — Rule that specifies conditions when a certain infoType's finding details should be adjusted.
          - `adjustByMatchingInfoTypes` GooglePrivacyDlpV2AdjustByMatchingInfoTypes — AdjustmentRule condition for matching infoTypes.
            - `minLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Required. Minimum likelihood of the `adjust_by_matching_info_types.info_types` finding. If the likelihood is lower than this value, Sensitive Data Protection doesn't adjust the likelihood of the `InspectionRuleSet.info_types` finding.
            - `matchingType` 'MATCHING_TYPE_UNSPECIFIED' | 'MATCHING_TYPE_FULL_MATCH' | 'MATCHING_TYPE_PARTIAL_MATCH' | 'MATCHING_TYPE_INVERSE_MATCH' | 'MATCHING_TYPE_RULE_SPECIFIC' — How the adjustment rule is applied. Only `MATCHING_TYPE_PARTIAL_MATCH` is supported: - Partial match: adjusts the findings of infoTypes specified in the inspection rule when they have a nonempty intersection with a finding of an infoType specified in this adjustment rule.
            - `infoTypes` GooglePrivacyDlpV2InfoType[] — Sensitive Data Protection adjusts the likelihood of a finding if that finding also matches one of these infoTypes. For example, you can create a rule to adjust the likelihood of a `PHONE_NUMBER` finding if the string is found within a document that is classified as `DOCUMENT_TYPE/HR/RESUME`. To configure this, set `PHONE_NUMBER` in `InspectionRuleSet.info_types`. Add an `adjustment_rule` with an `adjust_by_matching_info_types.info_types` that contains `DOCUMENT_TYPE/HR/RESUME`. In this case, the likelihood of the `PHONE_NUMBER` finding is adjusted, but the likelihood of the `DOCUMENT_TYPE/HR/RESUME` finding is not.
              - …
          - `adjustByImageFindings` GooglePrivacyDlpV2AdjustByImageFindings — AdjustmentRule condition for image findings. This rule is silently ignored if the content being inspected is not an image.
            - `infoTypes` GooglePrivacyDlpV2InfoType[] — A list of image-supported infoTypes—excluding [document infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to be used as context for the adjustment rule. Sensitive Data Protection adjusts the likelihood of an image finding if its bounding box has the specified spatial relationship (defined by `image_containment_type`) with a finding of an infoType in this list. For example, you can create a rule to adjust the likelihood of a `US_PASSPORT` finding if it is enclosed by a finding of `OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in `InspectionRuleSet.info_types`. Add an `adjustment_rule` with an `adjust_by_image_findings.info_types` that contains `OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT` finding is not.
              - …
            - `imageContainmentType` GooglePrivacyDlpV2ImageContainmentType — Specifies the relationship between bounding boxes for image findings.
              - …
            - `minLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Required. Minimum likelihood of the `adjust_by_image_findings.info_types` finding. If the likelihood is lower than this value, Sensitive Data Protection doesn't adjust the likelihood of the `InspectionRuleSet.info_types` finding.
          - `likelihoodAdjustment` GooglePrivacyDlpV2LikelihoodAdjustment — Message for specifying an adjustment to the likelihood of a finding as part of a detection rule.
            - `fixedLikelihood` 'LIKELIHOOD_UNSPECIFIED' | 'VERY_UNLIKELY' | 'UNLIKELY' | 'POSSIBLE' | 'LIKELY' | 'VERY_LIKELY' — Set the likelihood of a finding to a fixed value.
            - `relativeLikelihood` integer — Increase or decrease the likelihood by the specified number of levels. For example, if a finding would be `POSSIBLE` without the detection rule and `relative_likelihood` is 1, then it is upgraded to `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an adjustment of -1 when base likelihood is `VERY_LIKELY` will result in a final likelihood of `LIKELY`.
    - `contentOptions` string[] — Deprecated and unused.
    - `includeQuote` boolean — When true, a contextual quote from the data that triggered a finding is included in the response; see Finding.quote. This is not used for data profiling.
    - `excludeInfoTypes` boolean — When true, excludes type information of the findings. This is not used for data profiling.
    - `infoTypes` GooglePrivacyDlpV2InfoType[] — Restricts what info_types to look for. The values must correspond to InfoType values returned by ListInfoTypes or listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference. When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose a default list of detectors to run, which may change over time. If you need precise control and predictability as to what detectors are run you should specify specific InfoTypes listed in the reference, otherwise a default list will be used, which may change over time.
      - `name` string — Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.
      - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
        - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
      - `version` string — Optional version name for this InfoType.
  - `imageRedactionConfigs` GooglePrivacyDlpV2ImageRedactionConfig[] — The configuration for specifying what content to redact from images.
    - `redactionColor` GooglePrivacyDlpV2Color — Represents a color in the RGB color space.
      - `blue` number, float — The amount of blue in the color as a value in the interval [0, 1].
      - `red` number, float — The amount of red in the color as a value in the interval [0, 1].
      - `green` number, float — The amount of green in the color as a value in the interval [0, 1].
    - `infoType` GooglePrivacyDlpV2InfoType — Type of information detected by the API.
      - `name` string — Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.
      - `sensitivityScore` GooglePrivacyDlpV2SensitivityScore — Score is calculated from of all elements in the data profile. A higher level means the data is more sensitive.
        - `score` 'SENSITIVITY_SCORE_UNSPECIFIED' | 'SENSITIVITY_LOW' | 'SENSITIVITY_UNKNOWN' | 'SENSITIVITY_MODERATE' | 'SENSITIVITY_HIGH' — The sensitivity score applied to the resource.
      - `version` string — Optional version name for this InfoType.
    - `redactAllText` boolean — If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/dlp.md) · [All operations](https://skmtc.net/google/apis/dlp/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/dlp/versions/98ced13f7159/schema)
