Skip to main content

EmailDlpRule

Email Dlp Rule resource for Zscaler Internet Access.

Resource operations

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 EmailDlpRule
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 EmailDlpRule
resource = session.zia.EmailDlpRule(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

Creates a new EmailDlpRule. Set properties on the resource instance, then call create() — this method takes no arguments.

Properties for creation:

NameTypeRequiredDescription
actionstringNo-
auditorEntityReferenceNo-
content_locationsContentLocationsEnumCollectionNo-
custom_headerstringNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
dlp_enginesEntityReferenceWrapperCollectionNo-
email_recipient_profilesEntityReferenceWrapperCollectionNo-
email_tenantsEntityReferenceWrapperCollectionNo-
excluded_departmentsEntityReferenceWrapperCollectionNo-
excluded_groupsEntityReferenceWrapperCollectionNo-
excluded_usersEntityReferenceWrapperCollectionNo-
external_auditor_emailstringNo-
file_type_categoriesFileTypeCategoryWrapperCollectionNo-
file_typesstringCollectionNo-
groupsEntityReferenceWrapperCollectionNo-
idintegerNo-
included_domain_profilesEntityReferenceWrapperCollectionNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
min_sizeintegerNo-
namestringNo-
notification_templateEntityReferenceNo-
orderintegerNo-
parent_ruleintegerNo-
receiverIncidentReceiverReferenceNo-
severitystringNo-
statestringNo-
sub_rulesEmailDlpRuleWrapperCollectionNo-
template_synced_rule_flagstringNo-
time_windowsEntityReferenceWrapperCollectionNo-
user_risk_score_levelsUserRiskScoreLevelsEnumCollectionNo-
usersEntityReferenceWrapperCollectionNo-
without_content_inspectionbooleanNo-

Returns: EmailDlpRule

Example:

resource = session.zia.EmailDlpRule()
resource.action = "value"
resource.auditor = {"association_time": 3600, "deleted": True, "extensions": {"key1": "value", "key2": "value"}, "external_id": "resource-id"}
resource.content_locations = ["value"]
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

Deletes a EmailDlpRule by id. Only the id identifier is required; delete() takes no other arguments.

Example:

resource = session.zia.EmailDlpRule(id="your-resource-id")
resource.delete()

list_email_dlp_policy_actions()​

Parameters:

NameTypeRequiredDescription
tenant_idsintegerYes-

Returns: EmailDlpPolicyActionEnumsRecord

Example:

resource = session.zia.EmailDlpRule()
result = resource.list_email_dlp_policy_actions(tenant_ids=3600)
print(result)

load()​

Fetches an existing EmailDlpRule by id. Only the id identifier is required; load() takes no other arguments.

Returns: EmailDlpRule

Example:

resource = session.zia.EmailDlpRule(id="your-resource-id")
resource.load()
print(resource.name)

update()​

Updates an existing EmailDlpRule. Call load() first, modify properties, then call update() — this method takes no arguments.

Properties for update:

NameTypeRequiredDescription
actionstringNo-
auditorEntityReferenceNo-
content_locationsContentLocationsEnumCollectionNo-
custom_headerstringNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
dlp_enginesEntityReferenceWrapperCollectionNo-
email_recipient_profilesEntityReferenceWrapperCollectionNo-
email_tenantsEntityReferenceWrapperCollectionNo-
excluded_departmentsEntityReferenceWrapperCollectionNo-
excluded_groupsEntityReferenceWrapperCollectionNo-
excluded_usersEntityReferenceWrapperCollectionNo-
external_auditor_emailstringNo-
file_type_categoriesFileTypeCategoryWrapperCollectionNo-
file_typesstringCollectionNo-
groupsEntityReferenceWrapperCollectionNo-
idintegerYes-
included_domain_profilesEntityReferenceWrapperCollectionNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
min_sizeintegerNo-
namestringNo-
notification_templateEntityReferenceNo-
orderintegerNo-
parent_ruleintegerNo-
receiverIncidentReceiverReferenceNo-
severitystringNo-
statestringNo-
sub_rulesEmailDlpRuleWrapperCollectionNo-
template_synced_rule_flagstringNo-
time_windowsEntityReferenceWrapperCollectionNo-
user_risk_score_levelsUserRiskScoreLevelsEnumCollectionNo-
usersEntityReferenceWrapperCollectionNo-
without_content_inspectionbooleanNo-

Returns: EmailDlpRule

Example:

resource = session.zia.EmailDlpRule(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()

Attributes​

NameTypeRequiredDescription
actionstringNo-
auditorEntityReferenceNo-
content_locationsContentLocationsEnumCollectionNo-
custom_headerstringNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
dlp_enginesEntityReferenceWrapperCollectionNo-
email_recipient_profilesEntityReferenceWrapperCollectionNo-
email_tenantsEntityReferenceWrapperCollectionNo-
excluded_departmentsEntityReferenceWrapperCollectionNo-
excluded_groupsEntityReferenceWrapperCollectionNo-
excluded_usersEntityReferenceWrapperCollectionNo-
external_auditor_emailstringNo-
file_type_categoriesFileTypeCategoryWrapperCollectionNo-
file_typesstringCollectionNo-
groupsEntityReferenceWrapperCollectionNo-
idintegerNo-
included_domain_profilesEntityReferenceWrapperCollectionNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
min_sizeintegerNo-
namestringNo-
notification_templateEntityReferenceNo-
orderintegerNo-
parent_ruleintegerNo-
receiverIncidentReceiverReferenceNo-
severitystringNo-
statestringNo-
sub_rulesEmailDlpRuleWrapperCollectionNo-
template_synced_rule_flagstringNo-
time_windowsEntityReferenceWrapperCollectionNo-
user_risk_score_levelsUserRiskScoreLevelsEnumCollectionNo-
usersEntityReferenceWrapperCollectionNo-
without_content_inspectionbooleanNo-