DlpDictionary
Dlp Dictionary resource for Zscaler Internet Access.
This resource supports the following standard methods: create(), load(), update(), delete(). They operate on the instance state — set properties with dot notation, then call the method with no arguments. Any other action listed below is a custom action that takes explicit keyword arguments and returns a value.
Quick Start
import zssdk
import logging
# Enable debug logging for DlpDictionary
logging.getLogger('zssdk.zia').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)
session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)
# Get a specific DlpDictionary
resource = session.zia.DlpDictionary(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
create()
Creates a new DlpDictionary. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
bin_numbers | int32Collection | No | - |
confidence_level_for_predefined_dict | string | No | - |
confidence_threshold | string | No | - |
custom | boolean | No | - |
custom_phrase_match_type | string | Yes | - |
custom_phrase_supported | boolean | No | - |
description | string | Yes | - |
dict_template_id | integer | No | - |
dictionary_cloning_enabled | boolean | No | - |
dictionary_type | string | No | - |
exact_data_match_details | ExactDataMatchDetailWrapperCollection | No | - |
hierarchical_dictionary | boolean | No | - |
hierarchical_identifiers | HierarchicalIdentifiersEnumCollection | No | - |
idm_profile_match_accuracy_details | IdmProfileMatchAccuracyDetailWrapperCollection | No | - |
ignore_exact_match_idm_dict | boolean | No | - |
include_bin_numbers | boolean | No | - |
include_ssn_numbers | boolean | No | - |
low_confidence_disabled | boolean | No | - |
name | string | Yes | - |
name_l10n_tag | boolean | No | - |
parent_dictionary | boolean | No | - |
patterns | DictionaryPatternActionStringWrapperCollection | No | - |
phrases | DictionaryPhraseActionStringWrapperCollection | Yes | - |
predefined_clone | boolean | No | - |
predefined_count_action_type | string | No | - |
predefined_phrases | stringCollection | No | - |
proximity | integer | No | - |
proximity_enabled_for_custom_dictionary | boolean | No | - |
proximity_length_enabled | boolean | No | - |
ssn_numbers | stringCollection | No | - |
sub_dictionaries | DlpDictionaryWrapperCollection | No | - |
threshold_allowed | boolean | No | - |
unicode_phrase_matching_enabled | boolean | No | - |
view_only | boolean | No | - |
Returns: DlpDictionary
Example:
resource = session.zia.DlpDictionary()
resource.custom_phrase_match_type = "value"
resource.description = "Resource description"
resource.name = "example-name"
resource.phrases = [{"action": "value", "phrase": "value"}]
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a DlpDictionary by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
resource.delete()
load()
Fetches an existing DlpDictionary by id. Only the id identifier is required; load() takes no other arguments.
Returns: DlpDictionary
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
resource.load()
print(resource.name)
update()
Updates an existing DlpDictionary. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
bin_numbers | int32Collection | No | - |
confidence_level_for_predefined_dict | string | No | - |
confidence_threshold | string | No | - |
custom | boolean | No | - |
custom_phrase_match_type | string | Yes | - |
custom_phrase_supported | boolean | No | - |
description | string | Yes | - |
dict_template_id | integer | No | - |
dictionary_cloning_enabled | boolean | No | - |
dictionary_type | string | No | - |
exact_data_match_details | ExactDataMatchDetailWrapperCollection | No | - |
hierarchical_dictionary | boolean | No | - |
hierarchical_identifiers | HierarchicalIdentifiersEnumCollection | No | - |
idm_profile_match_accuracy_details | IdmProfileMatchAccuracyDetailWrapperCollection | No | - |
ignore_exact_match_idm_dict | boolean | No | - |
include_bin_numbers | boolean | No | - |
include_ssn_numbers | boolean | No | - |
low_confidence_disabled | boolean | No | - |
name | string | Yes | - |
name_l10n_tag | boolean | No | - |
parent_dictionary | boolean | No | - |
patterns | DictionaryPatternActionStringWrapperCollection | No | - |
phrases | DictionaryPhraseActionStringWrapperCollection | Yes | - |
predefined_clone | boolean | No | - |
predefined_count_action_type | string | No | - |
predefined_phrases | stringCollection | No | - |
proximity | integer | No | - |
proximity_enabled_for_custom_dictionary | boolean | No | - |
proximity_length_enabled | boolean | No | - |
ssn_numbers | stringCollection | No | - |
sub_dictionaries | DlpDictionaryWrapperCollection | No | - |
threshold_allowed | boolean | No | - |
unicode_phrase_matching_enabled | boolean | No | - |
view_only | boolean | No | - |
Returns: DlpDictionary
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()
validate_dlp_pattern()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
body | string | Yes | - |
Returns: SMMsgStatusInfo
Example:
resource = session.zia.DlpDictionary()
result = resource.validate_dlp_pattern(body="value")
print(result)
create_dlp_subdictionary()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
bin_numbers | int32Collection | No | - |
confidence_level_for_predefined_dict | string | No | - |
confidence_threshold | string | No | - |
custom | boolean | No | - |
custom_phrase_match_type | string | Yes | - |
custom_phrase_supported | boolean | No | - |
description | string | Yes | - |
dict_template_id | integer | No | - |
dictionary_cloning_enabled | boolean | No | - |
dictionary_type | string | No | - |
exact_data_match_details | ExactDataMatchDetailWrapperCollection | No | - |
hierarchical_dictionary | boolean | No | - |
hierarchical_identifiers | HierarchicalIdentifiersEnumCollection | No | - |
idm_profile_match_accuracy_details | IdmProfileMatchAccuracyDetailWrapperCollection | No | - |
ignore_exact_match_idm_dict | boolean | No | - |
include_bin_numbers | boolean | No | - |
include_ssn_numbers | boolean | No | - |
low_confidence_disabled | boolean | No | - |
name | string | Yes | - |
name_l10n_tag | boolean | No | - |
parent_dictionary | boolean | No | - |
patterns | DictionaryPatternActionStringWrapperCollection | No | - |
phrases | DictionaryPhraseActionStringWrapperCollection | Yes | - |
predefined_clone | boolean | No | - |
predefined_count_action_type | string | No | - |
predefined_phrases | stringCollection | No | - |
proximity | integer | No | - |
proximity_enabled_for_custom_dictionary | boolean | No | - |
proximity_length_enabled | boolean | No | - |
ssn_numbers | stringCollection | No | - |
sub_dictionaries | DlpDictionaryWrapperCollection | No | - |
threshold_allowed | boolean | No | - |
unicode_phrase_matching_enabled | boolean | No | - |
view_only | boolean | No | - |
parent_dictionary_id | integer | Yes | - |
Returns: DlpDictionary
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
result = resource.create_dlp_subdictionary(custom_phrase_match_type="value", description="Resource description", name="example-name", phrases=[{"action": "value", "phrase": "value"}], parent_dictionary_id=3600)
print(result)
get_dlp_subdictionary()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
sub_dictionary_id | integer | Yes | - |
Returns: DlpDictionary
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
result = resource.get_dlp_subdictionary(sub_dictionary_id=3600)
print(result)
update_dlp_subdictionary()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
sub_dictionary_id | integer | No | - |
bin_numbers | int32Collection | No | - |
confidence_level_for_predefined_dict | string | No | - |
confidence_threshold | string | No | - |
custom | boolean | No | - |
custom_phrase_match_type | string | Yes | - |
custom_phrase_supported | boolean | No | - |
description | string | Yes | - |
dict_template_id | integer | No | - |
dictionary_cloning_enabled | boolean | No | - |
dictionary_type | string | No | - |
exact_data_match_details | ExactDataMatchDetailWrapperCollection | No | - |
hierarchical_dictionary | boolean | No | - |
hierarchical_identifiers | HierarchicalIdentifiersEnumCollection | No | - |
idm_profile_match_accuracy_details | IdmProfileMatchAccuracyDetailWrapperCollection | No | - |
ignore_exact_match_idm_dict | boolean | No | - |
include_bin_numbers | boolean | No | - |
include_ssn_numbers | boolean | No | - |
low_confidence_disabled | boolean | No | - |
name | string | Yes | - |
name_l10n_tag | boolean | No | - |
parent_dictionary | boolean | No | - |
patterns | DictionaryPatternActionStringWrapperCollection | No | - |
phrases | DictionaryPhraseActionStringWrapperCollection | Yes | - |
predefined_clone | boolean | No | - |
predefined_count_action_type | string | No | - |
predefined_phrases | stringCollection | No | - |
proximity | integer | No | - |
proximity_enabled_for_custom_dictionary | boolean | No | - |
proximity_length_enabled | boolean | No | - |
ssn_numbers | stringCollection | No | - |
sub_dictionaries | DlpDictionaryWrapperCollection | No | - |
threshold_allowed | boolean | No | - |
unicode_phrase_matching_enabled | boolean | No | - |
view_only | boolean | No | - |
parent_dictionary_id | integer | Yes | - |
id | integer | Yes | - |
Returns: DlpDictionary
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
result = resource.update_dlp_subdictionary(custom_phrase_match_type="value", description="Resource description", name="example-name", phrases=[{"action": "value", "phrase": "value"}], parent_dictionary_id=3600, id=3600)
print(result)
delete_dlp_subdictionary()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
sub_dictionary_id | integer | Yes | - |
Example:
resource = session.zia.DlpDictionary(id="your-resource-id")
result = resource.delete_dlp_subdictionary(sub_dictionary_id=3600)
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
bin_numbers | int32Collection | No | - |
confidence_level_for_predefined_dict | string | No | - |
confidence_threshold | string | No | - |
custom | boolean | No | - |
custom_phrase_match_type | string | Yes | - |
custom_phrase_supported | boolean | No | - |
description | string | Yes | - |
dict_template_id | integer | No | - |
dictionary_cloning_enabled | boolean | No | - |
dictionary_type | string | No | - |
exact_data_match_details | ExactDataMatchDetailWrapperCollection | No | - |
hierarchical_dictionary | boolean | No | - |
hierarchical_identifiers | HierarchicalIdentifiersEnumCollection | No | - |
id | integer | Yes | - |
idm_profile_match_accuracy_details | IdmProfileMatchAccuracyDetailWrapperCollection | No | - |
ignore_exact_match_idm_dict | boolean | No | - |
include_bin_numbers | boolean | No | - |
include_ssn_numbers | boolean | No | - |
low_confidence_disabled | boolean | No | - |
name | string | Yes | - |
name_l10n_tag | boolean | No | - |
parent_dictionary | boolean | No | - |
parent_dictionary_id | integer | Yes | - |
patterns | DictionaryPatternActionStringWrapperCollection | No | - |
phrases | DictionaryPhraseActionStringWrapperCollection | Yes | - |
predefined_clone | boolean | No | - |
predefined_count_action_type | string | No | - |
predefined_phrases | stringCollection | No | - |
proximity | integer | No | - |
proximity_enabled_for_custom_dictionary | boolean | No | - |
proximity_length_enabled | boolean | No | - |
ssn_numbers | stringCollection | No | - |
sub_dictionaries | DlpDictionaryWrapperCollection | No | - |
threshold_allowed | boolean | No | - |
unicode_phrase_matching_enabled | boolean | No | - |
view_only | boolean | No | - |
Related
- DlpDictionary - Data structure definition
- Logging guide - enable verbose logs while debugging this resource