Cloud Data Loss Prevention (Cloud DLP) ist jetzt Teil des Schutzes sensibler Daten. Der Name der API bleibt unverändert: Cloud Data Loss Prevention API (DLP API). Informationen zu den Diensten, die zum Schutz sensibler Daten gehören, finden Sie unter Schutz sensibler Daten.
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Sensitive Data Protection enthält zahlreiche integrierte infoType-Detektoren. Sie können aber auch Ihre eigenen erstellen. Sie können das Erkennungsverhalten anpassen. Definieren Sie dazu Sie Ihre eigenen benutzerdefinierten infoType-Detektoren, sodass der Schutz sensibler Daten sensible Daten, die mit von Ihnen angegebenen Mustern übereinstimmen, untersucht oder de-identifiziert. Es gibt die folgenden Arten von benutzerdefinierten infoType-Detektoren:
Reguläre benutzerdefinierte Wörterbuchdetektoren sind einfache Wort- und Wortgruppenlisten, nach denen Sensitive Data Protection auf Übereinstimmungen prüft. Verwenden Sie normale benutzerdefinierte Wörterbuchdetektoren, wenn Ihre Wortzahl nicht mehr als mehrere hunderttausend Wörter beträgt.
Große benutzerdefinierte Wörterbuchdetektoren werden von Sensitive Data Protection unter Verwendung umfangreicher Listen von Wörtern oder Wortgruppen generiert, die entweder in Cloud Storage oder BigQuery gespeichert sind. Verwenden Sie große benutzerdefinierte Wörterbuchdetektoren, wenn Sie eine umfangreiche Liste von Wörtern oder Wortgruppen haben (bis zu mehreren zehn Millionen).
Detektoren regulärer Ausdrücke (Regex-Detektoren) ermöglichen es Sensitive Data Protection, Übereinstimmungen anhand eines regulären Ausdrucksmusters zu erkennen.
Ersatz-InfoType-Detektoren erkennen die Ausgabe der Transformation zur De-Identifizierung CryptoReplaceFfxFpeConfig des Schutzes sensibler Daten.
Dieser benutzerdefinierte infoType-Detektor wird ausschließlich mit der Methode content:reidentify verwendet, um die De-Identifikation mit formaterhaltender Verschlüsselung (Format-Preserving Encryption, FPE) im FFX-Modus rückgängig zu machen. Aus diesem Grund werden Ersatzwerte in diesen Themen nicht ausführlich beschrieben. Weitere Informationen dazu, wie und wann benutzerdefinierte infoType-Ersatzdetektoren verwendet werden, finden Sie unter Pseudonymisierung.
Außerdem gilt in Sensitive Data Protection das Konzept der Prüfregeln, mit denen Sie die Scanergebnisse auf folgende Weise verfeinern können:
Mit Ausschlussregeln können Sie falsche oder unerwünschte Ergebnisse ausschließen. Hierzu erweitern Sie einen integrierten oder benutzerdefinierten infoType-Detektor durch Regeln.
Mit Hotword-Regeln können Sie die Anzahl oder Genauigkeit von zurückgegebenen Ergebnissen erhöhen. Hierzu erweitern Sie einen integrierten oder benutzerdefinierten infoType-Detektor durch Regeln.
Weitere Informationen zu benutzerdefinierten infoType-Detektoren finden Sie auf der Seite, auf der das Konzept InfoTypes und infoType-Detektoren erläutert wird. Einige Beispiele, die Sie nach Belieben verwenden oder ändern können, finden Sie unter Beispiele für benutzerdefinierte infoType-Detektoren. Im Rest dieses Themas wird beschrieben, wie Sie mit Sensitive Data Protection Ihre eigenen benutzerdefinierten infoType-Detektoren erstellen können.
Einsatzmöglichkeiten für benutzerdefinierte infoType-Detektoren
Benutzerdefinierte infoType-Detektoren werden im Objekt CustomInfoType definiert. Sie geben im Objekt InspectConfig einen CustomInfoType an, wenn Sie Folgendes konfigurieren:
Re-Identifikation von Inhalten, die im FX-Modus mit FPE de-identifiziert wurden, mithilfe von projects.content.reidentify
Dieses Szenario ist spezifisch für benutzerdefinierte infoType-Ersatzdetektoren.
API-Übersicht
Mit dem Objekt CustomInfoType können Sie einen benutzerdefinierten infoType-Detektor für neuen Inhalt erstellen oder die Ergebnisse vordefinierter infoType-Detektoren optimieren.
Das Objekt CustomInfoType besteht aus den folgenden Feldern, die wie beschrieben festgelegt werden:
"infotype": Name des benutzerdefinierten infoType-Detektors in einem InfoType-Objekt
"likelihood": Standardwert Likelihood, der für diesen benutzerdefinierten infoType-Detektor zurückgegeben werden soll. Sie können in "detectionRules" alternative Likelihood-Werte angeben, die diese Basis-Likelihood ersetzen, wenn das Ergebnis den Kriterien der Regel entspricht. Wenn Sie das Feld "likelihood" nicht einfügen, wird der benutzerdefinierte infoType-Detektor standardmäßig auf VERY_LIKELY gesetzt. Weitere Informationen zur Wahrscheinlichkeit finden Sie auf der Konzeptseite Wahrscheinlichkeit.
"detectionRules": Eine Reihe von Objekten DetectionRule, die zusätzlich auf alle Ergebnisse dieses benutzerdefinierten infoType-Detektors angewendet werden sollen. Hier geben Sie Hotword-Regeln als Objekt HotwordRule an. Regeln werden in der Reihenfolge angewendet, in der sie angegeben sind. Dieses Feld gilt nicht für SurrogateType-Objekte
"sensitivityScore": Der SensitivityScore-Wert, der für diesen benutzerdefinierten infoType-Detektor zurückgegeben werden soll. Wenn Sie das Feld "sensitivityScore" nicht angeben, wird der benutzerdefinierte infoType-Detektor standardmäßig auf VERY_LIKELY gesetzt.
Sensitivitätswerte werden in Datenprofilen verwendet. Beim Erstellen von Profilen für Ihre Daten verwendet Sensitive Data Protection die Sensibilitätswerte der infoTypes, um die Sensibilitätsstufe zu berechnen.
Eines der folgenden Felder, abhängig von der Art des benutzerdefinierten infoType-Detektors, den Sie erstellen:
"dictionary": Ein Objekt Dictionary, das eine Liste von Wörtern oder Wortgruppen enthält, nach denen gesucht werden soll
"regex": Ein Objekt Regex mit einem einzelnen Muster, das den regulären Ausdruck definiert
"surrogateType": Ein Objekt SurrogateType gibt, falls vorhanden, an, dass der benutzerdefinierte infoType-Detektor ein Ersatzwert ist. Weitere Informationen zur Verwendung von benutzerdefinierten infoType-Ersatzdetektoren finden Sie unter Pseudonymisierung.
"storedType": Ein Verweis auf ein vorhandenes StoredInfoType-Objekt. Dieses Feld ist beim Erstellen eines großen benutzerdefinierten Wörterbuchdetektors erforderlich. Sie können zwar reguläre Wörterbuchdetektoren oder Detektoren für reguläre Ausdrücke erstellen, indem Sie dieses Feld definieren, es ist jedoch einfacher, diese zu erstellen, indem Sie das Feld dictionary bzw. regex definieren.
Nächste Schritte
Weitere Informationen zum Erstellen von benutzerdefinierten infoTypes finden Sie in den folgenden Themen:
Großen benutzerdefinierten Wörterbuchdetektor erstellen: Erfahren Sie, wie Sie Übereinstimmungen in einer sehr großen Liste von Wörtern und Wortgruppen finden.
Gespeicherte benutzerdefinierte infoType-Detektoren können bis zu mehrere Millionen Wörter abgleichen.
Benutzerdefinierten Regex-Detektor erstellen: Erfahren Sie, wie Sie einen benutzerdefinierten infoType-Detektor erstellen, um Übereinstimmungen mit einem regulären Ausdruck zu finden.
Übereinstimmungswahrscheinlichkeit anpassen: Erfahren Sie, wie Sie Erkennungsregeln und Hotwords verwenden, um die Wahrscheinlichkeitswerte anzupassen, die Übereinstimmungen mit benutzerdefinierten Detektoren zugeordnet sind.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Custom infoType detectors\n\nSensitive Data Protection contains many built-in [infoType\ndetectors](/sensitive-data-protection/docs/concepts-infotypes), but you can also create your own. You can\ncustomize detection behavior by defining your own *custom infoType detectors*,\nso that Sensitive Data Protection will inspect or de-identify sensitive data that\nmatches patterns that you specify. The following are the types of custom\ninfoType detectors:\n\n- *Regular custom dictionary detectors* are simple word and phrase lists that Sensitive Data Protection matches on. Use regular custom dictionary detectors when you have at most several hundred thousand words.\n- *Large custom dictionary detectors* are generated by Sensitive Data Protection using large lists of words or phrases stored in either Cloud Storage or BigQuery. Use large custom dictionary detectors when you have a large list of words or phrases---up to tens of millions.\n- *Regular expression (regex) detectors* enable Sensitive Data Protection to detect matches based on a regular expression pattern.\n- *Surrogate infoType detectors* detect output from Sensitive Data Protection de-identification transformation [`CryptoReplaceFfxFpeConfig`](/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). This custom infoType detector is only used with the [`content:reidentify`](/sensitive-data-protection/docs/reference/rest/v2/projects.content/reidentify) method to reverse de-identification using format-preserving encryption (FPE) in FFX mode. For this reason, surrogates are not extensively described in these topics. For more information about how and when to use surrogate custom infoType detectors, see [Pseudonymization](/sensitive-data-protection/docs/pseudonymization).\n\nIn addition, Sensitive Data Protection includes the concept of *inspection rules*,\nwhich enable you to fine-tune scan results using the following:\n\n- *Exclusion rules* enable you to exclude false or unwanted findings by adding rules to a built-in or custom infoType detector.\n- *Hotword rules* enable you to increase the quantity or accuracy of findings returned by adding rules to a built-in or custom infoType detector.\n\nTo learn more about custom infoType detectors, see the [InfoTypes and infoType\ndetectors](/sensitive-data-protection/docs/concepts-infotypes#custom) concept page. For several examples that\nyou can use or alter as you see fit, see [Examples of custom infoType\ndetectors](/sensitive-data-protection/docs/examples-custom-infotypes). The rest of this topic describes how to\nuse Sensitive Data Protection to create your own custom infoType detectors.\n\nWhere to use custom infoType detectors\n--------------------------------------\n\nCustom infoType detectors are defined in the\n[`CustomInfoType`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#CustomInfoType)\nobject. You specify a `CustomInfoType` in the\n[`InspectConfig`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig)\nobject when configuring the following:\n\n- Inspection using [`projects.content.inspect`](/sensitive-data-protection/docs/reference/rest/v2/projects.content/inspect).\n- Inspection jobs inside [`InspectJobConfig`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig).\n- Inspection templates inside [`InspectTemplate`](/sensitive-data-protection/docs/reference/rest/v2/organizations.inspectTemplates#InspectTemplate).\n- De-identification using [`projects.content.deidentify`](/sensitive-data-protection/docs/reference/rest/v2/projects.content/deidentify).\n- De-identification templates inside [`DeidentifyTemplate`](/sensitive-data-protection/docs/reference/rest/v2/projects.deidentifyTemplates#resource-deidentifytemplate).\n- Re-identification of content that has been de-identified with FPE in FFX mode using [`projects.content.reidentify`](/sensitive-data-protection/docs/reference/rest/v2/projects.content/reidentify). This scenario is specific to surrogate custom infoType detectors.\n\nAPI overview\n------------\n\nThe\n[`CustomInfoType`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#CustomInfoType)\nobject allows you to create a custom infoType detector for new content or to\nfine-tune the results returned by pre-defined infoType detectors.\n\nThe `CustomInfoType` object is comprised of the following fields, which are set\nas described:\n\n- `\"infotype\"`: The name of the custom infoType detector, contained in an [`InfoType`](/sensitive-data-protection/docs/reference/rest/v2/InfoType) object.\n- `\"likelihood\"`: The default [`Likelihood`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#Likelihood) value to return for this custom infoType detector. You can specify alternate `Likelihood` values in `\"detectionRules\"` that will supersede this base `Likelihood` if the finding meets the criteria specified by the rule. If you don't include the `\"likelihood\"` field, the custom infoType detector defaults to `VERY_LIKELY`. For more information about likelihood, see the [Likelihood](/sensitive-data-protection/docs/likelihood) concept page.\n- `\"detectionRules\"`: A set of [`DetectionRule`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#DetectionRule) objects to additionally apply to all findings of this custom infoType detector. This is where you specify hotword rules, as [`HotwordRule`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#HotwordRule) objects. Rules are applied in the order in which they are specified. This field does not apply to `SurrogateType` objects.\n- `\"sensitivityScore\"`: The\n [`SensitivityScore`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#CustomInfoType.FIELDS.sensitivity_score)\n value to return for this custom infoType detector. If you don't include the\n `\"sensitivityScore\"` field, the custom infoType detector defaults to\n `VERY_LIKELY`.\n\n\n Sensitivity scores are used in [data profiles](/sensitive-data-protection/docs/data-profiles). When\n profiling your data, Sensitive Data Protection uses the sensitivity scores of the infoTypes to\n [calculate the sensitivity level](/sensitive-data-protection/docs/sensitivity-risk-calculation).\n\n\n- One of the following fields, depending on the kind of custom infoType\n detector you're creating:\n\n - `\"dictionary\"`: A [`Dictionary`](/sensitive-data-protection/docs/reference/rest/v2/Dictionary) object, which contains a list of words or phrases to search for.\n - `\"regex\"`: A [`Regex`](/sensitive-data-protection/docs/reference/rest/v2/Regex) object, which contains a single pattern defining the regular expression.\n - `\"surrogateType\"`: A [`SurrogateType`](/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#SurrogateType) object, if present, indicates that the custom infoType detector is a surrogate. For more information about how to use surrogate custom infoType detectors, see [Pseudonymization](/sensitive-data-protection/docs/pseudonymization).\n - `\"storedType\"`: A reference to an existing [`StoredInfoType`](/sensitive-data-protection/docs/reference/rest/v2/projects.locations.storedInfoTypes) object. This field is required when creating a large custom dictionary detector. Although you can create regular dictionary detectors or regular expression detectors by defining this field, it's simpler to create those by defining the `dictionary` field or `regex` field respectively.\n\nNext steps\n----------\n\nLearn more about creating custom infoTypes from the following topics:\n\n- [Creating a regular custom dictionary detector](/sensitive-data-protection/docs/creating-custom-infotypes-dictionary): Learn how to create a custom infoType detector to match findings on a list of words and phrases.\n- [Creating a large custom dictionary detector](/sensitive-data-protection/docs/creating-stored-infotypes): Learn how to match findings on a very large list of words and phrases. Stored custom infoType detectors can match on up to tens of millions of words.\n- [Creating a custom regex detector](/sensitive-data-protection/docs/creating-custom-infotypes-regex): Learn how to create a custom infoType detector to match findings on a regular expression.\n- [Modifying infoType detectors to refine scan results](/sensitive-data-protection/docs/creating-custom-infotypes-rules): Learn how to create modifiers for both built-in and custom infoType detectors that can fine-tune scan results.\n- [Customizing match likelihood](/sensitive-data-protection/docs/creating-custom-infotypes-likelihood): Learn how to use detection rules and hotwords to customize the likelihood values that are assigned to custom detector matches.\n- [Examples of custom infoType detectors](/sensitive-data-protection/docs/examples-custom-infotypes): Several example JSON custom infoType detector definitions that you can use or alter as you see fit."]]