dlp_resources¶
The following methods allow for interaction with the ZIA DLP resources such as: ICAP Servers, Incident Receivers IDM Profiles, and EDM Schemas endpoints.
Methods are accessible via zia.dlp_resources
Copyright (c) 2023, Zscaler Inc.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- class DLPResourcesAPI¶
Bases:
APIClientA Client object for other DLP resources.
- get_dlp_icap_servers(icap_server_id)¶
Returns the dlp icap server details for a given DLP ICAP Server.
- Parameters:
icap_server_id (str) – The unique identifier for the DLP ICAP Server.
- Returns:
A tuple containing (DLP Resources instance, Response, error).
- Return type:
Examples
>>> icap = zia.dlp_resources.get_dlp_icap_servers('99999')
- get_dlp_idm_profiles(profile_id)¶
Returns the dlp idmp profile details for a given DLP IDM Profile.
- Parameters:
icap_server_id (str) – The unique identifier for the DLP IDM Profile.
- Returns:
A tuple containing (IDM Profiles instance, Response, error).
- Return type:
Examples
>>> idm = zia.dlp_resources.get_dlp_idm_profiles('99999')
- get_dlp_incident_receiver(receiver_id)¶
Returns the dlp incident receiver details for a given DLP Incident Receiver.
- Parameters:
receiver_id (str) – The unique identifier for the DLP Incident Receiver.
- Returns:
A tuple containing (IncidentReceiver instance, Response, error).
- Return type:
Examples
>>> incident_receiver = zia.dlp_resources.get_dlp_incident_receiver('99999')
- list_dlp_icap_servers(query_params=None)¶
Returns the list of ZIA DLP ICAP Servers.
- Parameters:
{dict} (query_params) – Map of query parameters for the request.
[query_params.search]{str}: The search string used to match against a Icap server name attributes.- Returns:
A tuple containing (list of DLP ICAP Server instances, Response, error)
- Return type:
Example
List all dlp icap servers:
>>> icap_list, response, error = client.zia.dlp_resources.list_dlp_icap_servers() ... if error: ... print(f"Error listing dlp icaps: {error}") ... return ... print(f"Total icaps found: {len(icap_list)}") ... for icap in icap_list: ... print(icap.as_dict())
filtering dlp icap by name :
>>> icap_list, response, error = client.dlp_resources.list_dlp_icap_servers( query_params={"search": 'ICAP_SERVER01'} ) ... if error: ... print(f"Error listing dlp icaps: {error}") ... return ... print(f"Total icaps found: {len(icap_list)}") ... for icap in icap_list: ... print(icap.as_dict())
- list_dlp_icap_servers_lite(query_params=None)¶
Lists name and ID of all ICAP servers. If the search parameter is provided, the function filters the rules client-side.
- Parameters:
{dict} (query_params) – Map of query parameters for the request.
[query_params.search]{str}: The search string used to match against a ICAP servers name.- Returns:
List of ICAP servers resource records.
- Return type:
Example
List all dlp icap servers:
>>> icap_list, response, error = client.zia.dlp_resources.list_dlp_icap_servers_lite() ... if error: ... print(f"Error listing dlp icaps: {error}") ... return ... print(f"Total icaps found: {len(icap_list)}") ... for icap in icap_list: ... print(icap.as_dict())
filtering dlp icap by name :
>>> icap_list, response, error = client.dlp_resources.list_dlp_icap_servers_lite( query_params={"search": 'ICAP_SERVER01'} ) ... if error: ... print(f"Error listing dlp icaps: {error}") ... return ... print(f"Total icaps found: {len(icap_list)}") ... for icap in icap_list: ... print(icap.as_dict())
- list_dlp_idm_profiles(query_params=None)¶
Returns the list of ZIA DLP IDM Profiles.
- Parameters:
{dict} (query_params) –
Map of query parameters for the request.
[query_params.search]{str}: Search string for filtering results.- Returns:
A tuple containing (list of DLP IDM Profile instances, Response, error)
- Return type:
Examples
Print all idm profiles
>>> for dlp idm in zia.dlp_resources.list_dlp_idm_profiles(): ... pprint(idm)
Print IDM profiles that match the name or description ‘IDM_PROFILE_TEMPLATE’
>>> pprint(zia.dlp_resources.list_dlp_idm_profiles('IDM_PROFILE_TEMPLATE'))
- list_dlp_incident_receiver(query_params=None)¶
Returns the list of ZIA DLP Incident Receiver.
- Parameters:
{dict} (query_params) – Map of query parameters for the request.
[query_params.search]{str}: The search string used to match against a Icap server name attributes.- Returns:
A tuple containing (list of DLP Incident Receivers instances, Response, error)
- Return type:
Example
List all incident receivers
>>> receiver_list, response, error = client.zia.dlp_resources.list_dlp_incident_receiver() ... if error: ... print(f"Error listing dlp incident receivers: {error}") ... return ... print(f"Total incident receivers found: {len(receiver_list)}") ... for receiver in receiver_list: ... print(receiver.as_dict())
filtering incident receivers by name :
>>> receiver_list, response, error = client.dlp_resources.list_dlp_incident_receiver( query_params={"search": 'ZS_INC_RECEIVER_01'} ) ... if error: ... print(f"Error listing dlp incident receivers: {error}") ... return ... print(f"Total incident receivers found: {len(receiver_list)}") ... for receiver in receiver_list: ... print(receiver.as_dict())
- list_dlp_incident_receiver_lite(query_params=None)¶
Lists name and ID DLP Incident Receiver.
- Parameters:
{dict} (query_params) – Map of query parameters for the request.
[query_params.search]{str}: The search string used to match against a Incident Receiver name attributes.- Returns:
A tuple containing (list of DLP Incident Receivers instances, Response, error)
- Return type:
Example
List all incident receivers
>>> receiver_list, response, error = client.zia.dlp_resources.list_dlp_incident_receiver_lite() ... if error: ... print(f"Error listing dlp incident receivers: {error}") ... return ... print(f"Total incident receivers found: {len(receiver_list)}") ... for receiver in receiver_list: ... print(receiver.as_dict())
filtering incident receivers by name :
>>> receiver_list, response, error = client.dlp_resources.list_dlp_incident_receiver_lite( query_params={"search": 'ZS_INC_RECEIVER_01'} ) ... if error: ... print(f"Error listing dlp incident receivers: {error}") ... return ... print(f"Total incident receivers found: {len(receiver_list)}") ... for receiver in receiver_list: ... print(receiver.as_dict())
- list_edm_schema_lite(schema_name=None, active_only=None, fetch_tokens=None, query_params=None)¶
Returns the list of active EDM templates (or EDM schemas) and their criteria (or token details), only.
- Parameters:
- Returns:
A tuple containing (list of EDM Schema instances, Response, error)
- Return type:
Examples
Print engines that match the name or description ‘ZS_DLP_IDX01’ >>> pprint(zia.dlp_resources.list_edm_schema_lite(schema_name=’ZS_DLP_IDX01’))
List active EDM schemas with their token details >>> pprint(zia.dlp_resources.list_edm_schema_lite(active_only=True, fetch_tokens=True))
- list_edm_schemas(query_params=None)¶
Returns the list of ZIA DLP Exact Data Match Schemas.
- Parameters:
{dict} (query_params) –
Map of query parameters for the request.
[query_params.page]{int}: Specifies the page offset.[query_params.page_size]{int}: Specifies the page size.The default size is 100, but the maximum size is 1000.
[query_params.search]{str}: Search string for filtering results.- Returns:
A tuple containing (list of DLP EDM Schema instances, Response, error)
- Return type:
Examples
Print all dlp edms
>>> pprint(zia.dlp_resources.list_edm_schemas())