firewall¶
The following methods allow for interaction with the Z-Insights Zero Trust Firewall Analytics API.
Methods are accessible via zinsights.firewall
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 FirewallAPI¶
Bases:
APIClientA Client object for the Z-Insights ZERO_TRUST_FIREWALL domain.
Zscaler Zero Trust Firewall protects web and non-web traffic for all users, applications, and locations with the industry’s most comprehensive cloud-native security service edge (SSE) platform. This domain provides report data for specific type, like location, action.
- get_network_services(start_time, end_time, limit=None, filter_by=None, order_by=None)¶
Get Zero Trust Firewall network services data.
- Parameters:
start_time – Start time in epoch milliseconds.
end_time – End time in epoch milliseconds.
limit – Maximum number of entries to return.
filter_by – Filter options using FirewallEntriesFilterBy.
order_by – Ordering options using list of FirewallEntryOrderBy.
- Returns:
(entries_list, response, error)
- Return type:
- get_traffic_by_action(start_time, end_time, limit=None, filter_by=None, order_by=None)¶
Get Zero Trust Firewall traffic data grouped by action.
- Parameters:
start_time – Start time in epoch milliseconds.
end_time – End time in epoch milliseconds.
limit – Maximum number of entries to return.
filter_by – Filter options using FirewallEntriesFilterBy.
order_by – Ordering options using list of FirewallEntryOrderBy.
- Returns:
(entries_list, response, error)
- Return type:
Examples
>>> entries, _, err = client.zinsights.firewall.get_traffic_by_action( ... start_time=start_time, ... end_time=end_time, ... limit=10 ... )
- get_traffic_by_location(start_time, end_time, limit=None, filter_by=None, order_by=None)¶
Get Zero Trust Firewall traffic data grouped by location.
Returns FirewallReportDataId with fields: id, name, total.
- Parameters:
start_time – Start time in epoch milliseconds.
end_time – End time in epoch milliseconds.
limit – Maximum number of entries to return.
filter_by – Filter options using FirewallEntriesFilterBy. Supports filtering by name using StringFilter with eq, ne, in, nin.
order_by – Ordering options using list of FirewallEntryOrderBy.
- Returns:
(entries_list, response, error)
- Return type:
Examples
>>> from zscaler.zinsights.models.inputs import ( ... FirewallEntriesFilterBy, StringFilter, FirewallEntryOrderBy ... ) >>> from zscaler.zinsights.models.enums import SortOrder >>> >>> # With filtering >>> filter_by = FirewallEntriesFilterBy( ... name=StringFilter(eq="Location1") ... ) >>> entries, _, err = client.zinsights.firewall.get_traffic_by_location( ... start_time=start_time, ... end_time=end_time, ... limit=10, ... filter_by=filter_by ... ) >>> >>> # With ordering >>> order_by = [FirewallEntryOrderBy(field_name="total", order=SortOrder.DESC)] >>> entries, _, err = client.zinsights.firewall.get_traffic_by_location( ... start_time=start_time, ... end_time=end_time, ... order_by=order_by ... )