Reference documentation and code samples for the Data Loss Prevention V2 Client class Dictionary.
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 unicodeBasic Multilingual
Planewill 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. Thelimitspage
contains details about the size limits of dictionaries. For dictionaries
that do not fit within these constraints, consider usingLargeCustomDictionaryConfigin theStoredInfoTypeAPI.
Generated from protobuf messagegoogle.privacy.dlp.v2.CustomInfoType.Dictionary
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class Dictionary (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.CustomInfoType.Dictionary)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.CustomInfoType.Dictionary)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.CustomInfoType.Dictionary)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.CustomInfoType.Dictionary)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.CustomInfoType.Dictionary)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.CustomInfoType.Dictionary)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.CustomInfoType.Dictionary)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.CustomInfoType.Dictionary)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.CustomInfoType.Dictionary)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.CustomInfoType.Dictionary)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.CustomInfoType.Dictionary)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.CustomInfoType.Dictionary)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.CustomInfoType.Dictionary)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.CustomInfoType.Dictionary)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.CustomInfoType.Dictionary)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.CustomInfoType.Dictionary)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.CustomInfoType.Dictionary)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.CustomInfoType.Dictionary)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.CustomInfoType.Dictionary) \nReference documentation and code samples for the Data Loss Prevention V2 Client class Dictionary.\n\nCustom information type based on a dictionary of words or phrases. This can\nbe used to match sensitive information specific to the data, such as a list\nof employee IDs or job titles.\n\nDictionary words are case-insensitive and all characters other than letters\nand digits in the unicode [Basic Multilingual\nPlane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)\nwill be replaced with whitespace when scanning for matches, so the\ndictionary phrase \"Sam Johnson\" will match all three phrases \"sam johnson\",\n\"Sam, Johnson\", and \"Sam (Johnson)\". Additionally, the characters\nsurrounding any match must be of a different type than the adjacent\ncharacters within the word, so letters must be next to non-letters and\ndigits next to non-digits. For example, the dictionary word \"jen\" will\nmatch the first three letters of the text \"jen123\" but will return no\nmatches for \"jennifer\".\nDictionary words containing a large number of characters that are not\nletters or digits may result in unexpected findings because such characters\nare treated as whitespace. The\n[limits](https://cloud.google.com/sensitive-data-protection/limits) page\ncontains details about the size limits of dictionaries. For dictionaries\nthat do not fit within these constraints, consider using\n`LargeCustomDictionaryConfig` in the `StoredInfoType` API.\n\nGenerated from protobuf message `google.privacy.dlp.v2.CustomInfoType.Dictionary`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2 \\\\ CustomInfoType\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getWordList\n\nList of words or phrases to search for.\n\n### hasWordList\n\n### setWordList\n\nList of words or phrases to search for.\n\n### getCloudStoragePath\n\nNewline-delimited file of words in Cloud Storage. Only a single file\nis accepted.\n\n### hasCloudStoragePath\n\n### setCloudStoragePath\n\nNewline-delimited file of words in Cloud Storage. Only a single file\nis accepted.\n\n### getSource"]]