Access Layer#

This class is used to manage Access Layer

class AccessLayer#
add(name, add_default_rule=True, applications_and_url_filtering=False, content_awareness=False, detect_using_x_forward_for=False, firewall=True, implicit_cleanup_action='drop', mobile_access=False, shared=False, tags=None, **kw)#

Create new object.

Parameters
  • name (str) – Layer name.

  • add_default_rule (bool, optional) – Indicates whether to include a cleanup rule in the new layer.

  • applications_and_url_filtering (bool, optional) – Whether to enable Applications & URL Filtering blade on the layer.

  • content_awareness (bool, optional) – Whether to enable Content Awareness blade on the layer.

  • detect_using_x_forward_for (bool, optional) – Whether to use X-Forward-For HTTP header, which is added by the proxy

  • IP. (server to keep track of the original source) –

  • firewall (bool, optional) – Whether to enable Firewall blade on the layer.

  • implicit_cleanup_action (str, optional) – The default “catch-all” action for traffic that does not match any explicit or implied rules in the layer. Valid values are “drop” or “accept”

  • mobile_access (bool, optional) – Whether to enable Mobile Access blade on the layer.

  • shared (bool, optional) – Whether this layer is shared.

  • tags (Union[str, List[str]], optional) – Collection of tag identifiers.

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.

  • **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.access_control_nat.access_layer.add(
... name="New Layer 1",
... add_default_rule=True,
... applications_and_url_filtering=False,
... content_awareness=False,
... detect_using_x_forward_for=True,
... firewall=True,
... mobile_access=False,
... shared=False,
... tags=["t1"])
delete(uid=None, name=None, **kw)#

Delete existing object using object name or uid.

Parameters
  • uid (str, optional) – Object unique identifier.

  • name (str, optional) – Object name.

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.access_control_nat.access_layer.delete(
... layer="Network",
... uid="81530aad-bc98-4e8f-a62d-079424ddd955")
set(uid=None, name=None, new_name=None, add_default_rule=True, applications_and_url_filtering=False, content_awareness=False, detect_using_x_forward_for=False, firewall=True, implicit_cleanup_action='drop', mobile_access=False, shared=False, tags=None, **kw)#

Edit existing object using object name or uid.

Parameters
  • uid (str, optional) – Object unique identifier.

  • new_name (str, optional) – New name of the object.

  • name (str, optional) – Rule name.

  • add_default_rule (bool, optional) – Indicates whether to include a cleanup rule in the new layer.

  • applications_and_url_filtering (bool, optional) – Whether to enable Applications & URL Filtering blade on the layer.

  • content_awareness (bool, optional) – Whether to enable Content Awareness blade on the layer.

  • detect_using_x_forward_for (bool, optional) – Whether to use X-Forward-For HTTP header, which is added by the proxy

  • IP. (server to keep track of the original source) –

  • firewall (bool, optional) – Whether to enable Firewall blade on the layer.

  • implicit_cleanup_action (str, optional) – The default “catch-all” action for traffic that does not match any explicit or implied rules in the layer. Valid values are “drop” or “accept”

  • mobile_access (bool, optional) – Whether to enable Mobile Access blade on the layer.

  • shared (bool, optional) – Whether this layer is shared.

  • tags (Union[str, List[str]], optional) – Collection of tag identifiers.

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.access_control_nat.access_layer.set(
... name="New Layer 1",
... add_default_rule=True,
... applications_and_url_filtering=False,
... content_awareness=False,
... detect_using_x_forward_for=True,
... firewall=True,
... mobile_access=False,
... shared=False,
... tags=["t1"])
show(uid=None, name=None, **kw)#

Retrieve existing object using object name or uid.

Parameters
  • uid (str, optional) – Object unique identifier. Mandatory if “rule_number” or “name” are not set.

  • name (str, optional) – Object name. Mandatory if “rule_number” or “uid” are not set.

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.access_control_nat.access_layer.show(
... uid="81530aad-bc98-4e8f-a62d-079424ddd955")
show_access_layers(filter_results=None, limit=50, offset=0, order=None, **kw)#

Retrieve all objects.

Parameters
  • filter_results (str) – 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) – The maximal number of returned results. Defaults to 50 (between 1 and 500)

  • offset (int) – Number of the results to initially skip. Defaults to 0

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.

Returns

The response from the server

Return type

Box

Examples

>>> firewallManagement.access_control_nat.access_layer.show_access_layers()