Application Site#
This class is used to manage Application Site
- class ApplicationSite#
- add(name, primary_category, url_list=None, application_signature=None, additional_categories=None, description=None, tags=None, urls_defined_as_regular_expression=False, **kw)#
Create new object.
- Parameters
name (str) – Object name. Must be unique in the domain.
primary_category (str) – Each application is assigned to one primary category based on its most defining aspect.
url_list (Union[str, List[str]], optional) – URLs that determine this particular application. Mandatory if
set. (application_signature is not) –
application_signature (Union[str, List[str]], optional) – Application signature generated by Signature Tool. Mandatory if url_list is not set.
additional_categories (Union[str, List[str]], optional) – Used to configure or edit the additional categories of a custom application / site used in the Application and URL Filtering or Threat Prevention.
description (str, optional) – A description for the application.
tags (Union(str,List[str]), optional) – Collection of tag identifiers.
urls_defined_as_regular_expression (bool, optional) – States whether the URL is defined as a Regular Expression or not. Defaults to False.
- Keyword Arguments
**color (Color, optional) – Color of the object. Should be one of existing colors.
**comments (str, optional) – Comments string.
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**groups (Union(str,List[str]), optional) – Collection of group identifiers.
**ignore-warnings (bool, optional) – Apply changes ignoring warnings. Defaults to False
**ignore-errors (bool, optional) – Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Defaults to False
- Returns
The response from the server
- Return type
Box
Examples
>>> firewallManagement.service_applications.application_site.add( ... name="New Application Site 1", ... tags=["t1"], ... comments="", ... additional_categories=[], ... application_id=15874256, ... application_signature="", ... description="A custom description", ... groups=[ ... { ... "folder": { ... "uid": "5568324a-68ed-4c6c-9aa6-553978c7e746", ... "name": "/Global Objects", ... }, ... "domain": { ... "domain-type": "local domain", ... "uid": "41e821a0-3720-11e3-aa6e-0800200c9fde", ... "name": "SMC User", ... }, ... "type": "service-group", ... "name": "My Service Group1", ... "uid": "70600af1-3e61-41e2-b031-d46b2a171f86", ... }, ... { ... "folder": { ... "uid": "5568324a-68ed-4c6c-9aa6-553978c7e746", ... "name": "/Global Objects", ... }, ... "domain": { ... "domain-type": "local domain", ... "uid": "41e821a0-3720-11e3-aa6e-0800200c9fde", ... "name": "SMC User", ... }, ... "type": "service-group", ... "name": "My Service Group2", ... "uid": "e971be7e-8372-475f-9863-c0b0c5285cc0", ... }, ... ], ... primary_category="", ... risk="", ... url_list=["www.4dz84zd39f9az26rh4hz64.com"], ... urls_defined_as_regular_expression=False, ... user_defined=True)
- delete(uid=None, name=None, **kw)#
Delete existing object using object name or uid.
- Parameters
- Keyword Arguments
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**ignore-warnings (bool, optional) – Apply changes ignoring warnings. Defaults to False
**ignore-errors (bool, optional) – Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Defaults to False
- Returns
The response from the server
- Return type
Box
Examples
>>> FirewallManagement.service_applications.application_site.delete(uid="ed997ff8-6709-4d71-a713-99bf01711cd5")
- set(uid=None, name=None, new_name=None, primary_category=None, url_list=None, application_signature=None, additional_categories=None, description=None, tags=None, urls_defined_as_regular_expression=False, **kw)#
Edit existing object using object name or uid.
- Parameters
uid (str, optional) – Object unique identifier.
name (str, optional) – Object name.
new_name (str, optional) – New name of the object.
primary_category (str, optional) – Each application is assigned to one primary category based on its most defining aspect.
url_list (Union[str, List[str]], optional) – URLs that determine this particular application. Mandatory if
set. (application_signature is not) –
application_signature (Union[str, List[str]], optional) – Application signature generated by Signature Tool. Mandatory if url_list is not set.
additional_categories (Union[str, List[str]], optional) – Used to configure or edit the additional categories of a custom application / site used in the Application and URL Filtering or Threat Prevention.
description (str, optional) – A description for the application.
tags (Union(str,List[str]), optional) – Collection of tag identifiers.
urls_defined_as_regular_expression (bool, optional) – States whether the URL is defined as a Regular Expression or not.
- Keyword Arguments
**color (Color, optional) – Color of the object. Should be one of existing colors.
**comments (str, optional) – Comments string.
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**groups (Union(str,List[str]), optional) – Collection of group identifiers.
**ignore-warnings (bool, optional) – Apply changes ignoring warnings. Defaults to False
**ignore-errors (bool, optional) – Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Defaults to False
- Returns
The response from the server
- Return type
Box
Examples
>>> firewallManagement.service_applications.application_site.set( ... name="New Application Site 1", ... primary_category="Anonymizer", ... application_signature="^games\.yahoo\.com$")
- show(uid=None, name=None, **kw)#
Retrieve existing object using object name or uid.
- Parameters
- Keyword Arguments
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
- Returns
The response from the server
- Return type
Box
Examples
>>> FirewallManagement.service_applications.application_site.show(uid="ed997ff8-6709-4d71-a713-99bf01711cd5")
- show_application_sites(filter_results=None, limit=50, offset=0, order=None, **kw)#
Retrieve all objects.
- Parameters
filter_results (str, optional) – Search expression to filter objects by. The provided text should be exactly the same as it would be given in SmartConsole Object Explorer. The logical operators in the expression (‘AND’, ‘OR’) should be provided in capital letters. he search involves both a IP search and a textual search in name, comment, tags etc.
limit (int, optional) – The maximal number of returned results. Defaults to 50 (between 1 and 500)
offset (int, optional) – Number of the results to initially skip. Defaults to 0
order (List[dict], optional) – Sorts results by the given field. By default the results are sorted in the descending order by the session publish time.
show_as_ranges (bool, optional) – When true, the group’s matched content is displayed as ranges of IP addresses rather than network objects. Objects that are not represented using IP addresses are presented as objects. The ‘members’ parameter is omitted from the response and instead the ‘ranges’ parameter is displayed. Defaults to False.
- Keyword Arguments
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**domains-to-process (List[str], optional) – Indicates which domains to process the commands on. It cannot be used with the details-level full, must be run from the System Domain only and with ignore-warnings true. Valid values are: CURRENT_DOMAIN, ALL_DOMAINS_ON_THIS_SERVER.
**show-membership (bool, optional) – Indicates whether to calculate and show “groups” field for every object in reply.
- Returns
The response from the server
- Return type
Box
Examples
>>> FirewallManagement.service_applications.application_site.shows_application_sites()