Skip to main content

CASBDlpRule

C A S B 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.

Quick Start​

import zssdk
import logging

# Enable debug logging for CASBDlpRule
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 CASBDlpRule
resource = session.zia.CASBDlpRule(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

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

Properties for creation:

NameTypeRequiredDescription
access_controlstringNo-
actionstringYes-
auditorEntityReferenceNo-
auditor_notificationEntityReferenceNo-
bucket_ownerstringNo-
bucketsEntityReferenceWrapperCollectionNo-
casb_email_labelEntityReferenceNo-
casb_tombstone_templateEntityReferenceNo-
cloud_app_tenantsEntityReferenceWrapperCollectionNo-
collaboration_scopeCollaborationScopeEnumCollectionNo-
componentsComponentsEnumCollectionNo-
content_locationstringNo-
criteria_domain_profilesEntityReferenceWrapperCollectionNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
device_groupsEntityReferenceWrapperCollectionNo-
device_trust_levelsDeviceTrustLevelsEnumCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
dlp_enginesEntityReferenceWrapperCollectionNo-
domainsstringCollectionNo-
email_recipient_profilesEntityReferenceWrapperCollectionNo-
entity_groupsEntityReferenceWrapperCollectionNo-
excluded_domain_profilesEntityReferenceWrapperCollectionNo-
external_auditor_emailstringNo-
file_sharing_expiry_timeintegerNo-
file_sharing_expiry_time_typestringNo-
file_typesFileTypeWrapperCollectionNo-
groupsEntityReferenceWrapperCollectionNo-
include_criteria_domain_profilebooleanNo-
include_email_recipient_profilebooleanNo-
include_entity_groupsbooleanNo-
included_domain_profilesEntityReferenceWrapperCollectionNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
namestringYes-
number_of_external_collaboratorsstringNo-
number_of_internal_collaboratorsstringNo-
object_typesCasbDlpObjectTypeWrapperCollectionNo-
orderintegerYes-
quarantine_locationstringNo-
rankintegerNo-
receiverIncidentReceiverReferenceNo-
recipientstringNo-
redaction_profileEntityReferenceNo-
severitystringYes-
statestringYes-
tagEntityReferenceNo-
template_synced_rule_flagstringNo-
typestringYes-
usersEntityReferenceWrapperCollectionNo-
watermark_delete_old_versionbooleanNo-
watermark_profileEntityReferenceNo-
without_content_inspectionbooleanNo-

Returns: CASBDlpRule

Example:

resource = session.zia.CASBDlpRule()
resource.action = "value"
resource.name = "example-name"
resource.order = 3600
resource.severity = "value"
resource.state = "value"
resource.type = "value"
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

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

Example:

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

load()​

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

Returns: CASBDlpRule

Example:

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

update()​

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

Properties for update:

NameTypeRequiredDescription
access_controlstringNo-
actionstringYes-
auditorEntityReferenceNo-
auditor_notificationEntityReferenceNo-
bucket_ownerstringNo-
bucketsEntityReferenceWrapperCollectionNo-
casb_email_labelEntityReferenceNo-
casb_tombstone_templateEntityReferenceNo-
cloud_app_tenantsEntityReferenceWrapperCollectionNo-
collaboration_scopeCollaborationScopeEnumCollectionNo-
componentsComponentsEnumCollectionNo-
content_locationstringNo-
criteria_domain_profilesEntityReferenceWrapperCollectionNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
device_groupsEntityReferenceWrapperCollectionNo-
device_trust_levelsDeviceTrustLevelsEnumCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
dlp_enginesEntityReferenceWrapperCollectionNo-
domainsstringCollectionNo-
email_recipient_profilesEntityReferenceWrapperCollectionNo-
entity_groupsEntityReferenceWrapperCollectionNo-
excluded_domain_profilesEntityReferenceWrapperCollectionNo-
external_auditor_emailstringNo-
file_sharing_expiry_timeintegerNo-
file_sharing_expiry_time_typestringNo-
file_typesFileTypeWrapperCollectionNo-
groupsEntityReferenceWrapperCollectionNo-
include_criteria_domain_profilebooleanNo-
include_email_recipient_profilebooleanNo-
include_entity_groupsbooleanNo-
included_domain_profilesEntityReferenceWrapperCollectionNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
namestringYes-
number_of_external_collaboratorsstringNo-
number_of_internal_collaboratorsstringNo-
object_typesCasbDlpObjectTypeWrapperCollectionNo-
orderintegerYes-
quarantine_locationstringNo-
rankintegerNo-
receiverIncidentReceiverReferenceNo-
recipientstringNo-
redaction_profileEntityReferenceNo-
severitystringYes-
statestringYes-
tagEntityReferenceNo-
template_synced_rule_flagstringNo-
typestringYes-
usersEntityReferenceWrapperCollectionNo-
watermark_delete_old_versionbooleanNo-
watermark_profileEntityReferenceNo-
without_content_inspectionbooleanNo-

Returns: CASBDlpRule

Example:

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

Attributes​

NameTypeRequiredDescription
access_controlstringNo-
actionstringYes-
auditorEntityReferenceNo-
auditor_notificationEntityReferenceNo-
bucket_ownerstringNo-
bucketsEntityReferenceWrapperCollectionNo-
casb_email_labelEntityReferenceNo-
casb_tombstone_templateEntityReferenceNo-
cloud_app_tenantsEntityReferenceWrapperCollectionNo-
collaboration_scopeCollaborationScopeEnumCollectionNo-
componentsComponentsEnumCollectionNo-
content_locationstringNo-
criteria_domain_profilesEntityReferenceWrapperCollectionNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
device_groupsEntityReferenceWrapperCollectionNo-
device_trust_levelsDeviceTrustLevelsEnumCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
dlp_enginesEntityReferenceWrapperCollectionNo-
domainsstringCollectionNo-
email_recipient_profilesEntityReferenceWrapperCollectionNo-
entity_groupsEntityReferenceWrapperCollectionNo-
excluded_domain_profilesEntityReferenceWrapperCollectionNo-
external_auditor_emailstringNo-
file_sharing_expiry_timeintegerNo-
file_sharing_expiry_time_typestringNo-
file_typesFileTypeWrapperCollectionNo-
groupsEntityReferenceWrapperCollectionNo-
idintegerNo-
include_criteria_domain_profilebooleanNo-
include_email_recipient_profilebooleanNo-
include_entity_groupsbooleanNo-
included_domain_profilesEntityReferenceWrapperCollectionNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
namestringYes-
number_of_external_collaboratorsstringNo-
number_of_internal_collaboratorsstringNo-
object_typesCasbDlpObjectTypeWrapperCollectionNo-
orderintegerYes-
quarantine_locationstringNo-
rankintegerNo-
receiverIncidentReceiverReferenceNo-
recipientstringNo-
redaction_profileEntityReferenceNo-
severitystringYes-
statestringYes-
tagEntityReferenceNo-
template_synced_rule_flagstringNo-
typestringYes-
usersEntityReferenceWrapperCollectionNo-
watermark_delete_old_versionbooleanNo-
watermark_profileEntityReferenceNo-
without_content_inspectionbooleanNo-