zscaler.ziacloud.zia_cloud_firewall_dns_rules module – Firewall DNS policy rule.
Note
This module is part of the zscaler.ziacloud collection (version 2.0.3).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install zscaler.ziacloud
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: zscaler.ziacloud.zia_cloud_firewall_dns_rules
.
New in zscaler.ziacloud 2.0.0
Synopsis
Adds a new Firewall DNS policy rule.
Requirements
The below requirements are needed on the host that executes this module.
Zscaler SDK Python can be obtained from PyPI https://pypi.org/project/zscaler-sdk-python/
Parameters
Parameter |
Comments |
---|---|
The action the Firewall DNS policy rule takes when packets match the rule Choices:
|
|
A string that contains the obfuscated API key. |
|
User-defined network service application group on which the rule is applied. If not set, the rule is not restricted to a specific network service application group. |
|
User-defined network service applications on which the rule is applied. If not set, the rule is not restricted to a specific network service application. |
|
When the action is selected as BLOCK_WITH_RESPONSE to block the DNS traffic Send a response code to the client, specify the response code using this field. Choices:
|
|
Indicates whether packet capture (PCAP) is enabled or not Choices:
|
|
The client ID for OAuth2 authentication. |
|
The client secret for OAuth2 authentication. |
|
The Zscaler cloud name provisioned for your organization. Choices:
|
|
The departments to which the Firewall DNS policy rule applies |
|
Additional information about the rule |
|
List of destination IP addresses to which this rule will be applied. CIDR notation can be used for destination IP addresses. |
|
Destination countries for which the rule is applicable. If not set, the rule is not restricted to specific destination countries. Provide a ISO3166 Alpha2 code. visit the following site for reference https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes |
|
IP address categories of destination for which the DNAT rule is applicable. If not set, the rule is not restricted to specific destination IP categories. |
|
User-defined destination IP address groups on which the rule is applied. If not set, the rule is not restricted to a specific destination IP address group. |
|
Destination IPv6 address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IPv6 address group. |
|
The DNS gateway used to redirect traffic, specified when the rule action is to redirect DNS request to an external DNS service. |
|
A unique identifier for an entity |
|
DNS request types to which the rule applies Choices:
|
|
Determines whether the Firewall DNS policy rule is enabled or disabled Choices:
|
|
The groups to which the Firewall DNS policy rule applies |
|
Unique identifier for the Firewall DNS policy rule |
|
Labels that are applicable to the rule. |
|
The location groups to which the Firewall DNS policy rule applies |
|
The locations to which the Firewall DNS policy rule applies |
|
Name of the Firewall DNS policy rule |
|
Rule order number of the Firewall DNS policy rule |
|
A string that contains the password for the API admin. |
|
The private key for JWT-based OAuth2 authentication. |
|
List of protocols to which this rule applies Choices:
|
|
A dict containing authentication credentials. |
|
Obfuscated API key. |
|
OAuth2 client ID. |
|
OAuth2 client secret. |
|
Zscaler cloud name. Choices:
|
|
Password for the API admin. |
|
Private key for OAuth2 JWT. |
|
Sandbox Cloud environment. |
|
Sandbox API Key. |
|
Whether to use the legacy Zscaler API client. Choices:
|
|
Email ID of the API admin. |
|
Vanity domain for OAuth2. |
|
Admin rank of the Firewall DNS policy rule Default: |
|
List of destination domain categories to which the rule applies |
|
The Sandbox cloud environment for API access. |
|
A string that contains the Sandbox API Key. |
|
The list of source countries that must be included or excluded from the rule based on the excludeSrcCountries field value. If no value is set, this field is ignored during policy evaluation and the rule is applied to all source countries. Provide a ISO3166 Alpha2 code. visit the following site for reference https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes |
|
User-defined source IP address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IP address group. |
|
User-defined source IP addresses for which the rule is applicable. If not set, the rule is not restricted to a specific source IP address. |
|
Source IPv6 address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IPv6 address group. |
|
Specifies the desired state of the resource. Choices:
|
|
The time interval in which the Firewall DNS policy rule applies |
|
Whether to use the legacy Zscaler API client. Choices:
|
|
A string that contains the email ID of the API admin. |
|
The users to which the Firewall DNS policy rule applies |
|
The vanity domain provisioned by Zscaler for OAuth2 flows. |
|
The ZPA IP pool used for domain name resolution when action is REDIR_ZPA. |
|
Unique identifier of the ZPA IP group. |
|
Name of the ZPA IP group. |
Notes
Note
Check mode is supported.
Examples
- name: Create/update Firewall DNS rule
zscaler.ziacloud.zia_cloud_firewall_filtering_rule:
provider: '{{ provider }}'
state: present
name: "Ansible_Example_Rule"
description: "TT#1965232865"
action: "ALLOW"
enabled: true
order: 1
source_countries:
- BR
- CA
- US
dest_countries:
- BR
- CA
- US