saas_security_api¶
The following methods allow for interaction with the ZIA SaaS Security API endpoint Resources.
Methods are accessible via zia.saas_security_api
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 SaaSSecurityAPI¶
Bases:
APIClientA Client object for the SaaS Security API resource.
- list_casb_email_label_lite()¶
Retrieves the email labels generated for the SaaS Security API policies in a user’s email account
See the Email Labels API reference: for details
- Parameters:
N/A
- Returns:
A tuple containing (email labels lite instance, Response, error).
- Return type:
Examples
List email label :
>>> label_list, _, error = client.zia.saas_security_api.list_casb_email_label_lite() >>> if error: ... print(f"Error listing labels: {error}") ... return ... print(f"Total labels found: {len(label_list)}") ... for label in label_list: ... print(label.as_dict())
- list_casb_tenant_lite(query_params=None)¶
Retrieves the email labels generated for the SaaS Security API policies in a user’s email account
See the SaaS Application Tenants API reference: for details
- Parameters:
{dict} (query_params) –
Map of query parameters for the request.
[query_params.active_only]{bool}: Indicates that the tenant is in use.[query_params.include_deleted]{bool}: Indicates that the tenant is deleted[query_params.scan_config_tenants_only]{bool}: Specifies the tenant which the scan is already configured[query_params.include_bucket_ready_s3_tenants]{bool}: For the AWS S3 SaaS application[query_params.filter_by_feature]{list[str]}: Filters the SaaS application tenant by featureSee the SaaS Application Tenants API reference: for details
[query_params.app]{bool}: Specifies the sanctioned SaaS applicationSee the SaaS Application Tenants API reference: for details
[query_params.app_type]{str}: Specifies the SaaS application type- Supported Values: ANY, FILE, EMAIL, CRM, ITSM,
COLLAB, REPO, STORAGE, TP_APP, GENAI, MISC
- Returns:
A tuple containing (SaaS Application Tenants lite instance, Response, error).
- Return type:
Examples
List SaaS Application Tenant :
>>> tenant_list, _, error = client.zia.saas_security_api.list_casb_tenant_lite( query_params={'active_only': True} ) >>> if error: ... print(f"Error listing saas tenants: {error}") ... return ... print(f"Total tenants found: {len(tenant_list)}") ... for tenant in tenant_list: ... print(tenant.as_dict())
- list_domain_profiles_lite()¶
Retrieves the domain profile summary
See the Domain Profiles API reference: for details
- Parameters:
N/A
- Returns:
A tuple containing (domain profiles lite instance, Response, error).
- Return type:
Examples
List domain profiles :
>>> profile_list, _, error = client.zia.saas_security_api.list_domain_profiles_lite() >>> if error: ... print(f"Error listing profiles: {error}") ... return ... print(f"Total profiles found: {len(profile_list)}") ... for profile in profile_list: ... print(profile.as_dict())
- list_quarantine_tombstone_lite()¶
Retrieves the templates for the tombstone file created when a file is quarantined
See the Quarantine Tombstone File Template API reference: for details
- Parameters:
N/A
- Returns:
A tuple containing (tombstone file lite instance, Response, error).
- Return type:
Examples
List tombstone templates :
>>> template_list, _, error = client.zia.saas_security_api.list_quarantine_tombstone_lite() >>> if error: ... print(f"Error listing templates: {error}") ... return ... print(f"Total profiles found: {len(template_list)}") ... for template in template_list: ... print(template.as_dict())
- list_saas_scan_info(query_params=None)¶
Retrieves the SaaS Security Scan Configuration information.
- Parameters:
query_params (dict) –
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 500.
- Returns:
List SaaS Security Scan Configuration information (SaaSScanInfo, Response, error).
- Return type:
Examples
List all SaaS Security Scan Configuration information:
>>> scan_info_list, _, err = client.zia.saas_security_api.list_saas_scan_info() >>> if err: ... print(f"Error listing scan information: {err}") ... return ... print(f"Total scan information found: {len(scan_info_list)}") ... for scan_info in scan_info_list: ... print(scan_info.as_dict())